Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shld-databoard-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘自豪 Rambo Pan
shld-databoard-ui
Commits
535602cd
Commit
535602cd
authored
Sep 12, 2023
by
张恒
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release_uat' into release_uat
parents
2cf19e92
93b3b0fd
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
611 additions
and
70 deletions
+611
-70
ring-pie-chart.vue
src/module/databoard/components/chart/ring-pie-chart.vue
+89
-0
num-with-r-b-mark.vue
src/module/databoard/components/layout/num-with-r-b-mark.vue
+0
-49
title-content-mark.vue
...module/databoard/components/layout/title-content-mark.vue
+122
-0
table-column.vue
src/module/databoard/components/table/table-column.vue
+74
-0
index.vue
src/module/databoard/index.vue
+325
-20
index_back1.vue
src/module/databoard/index_back1.vue
+1
-1
No files found.
src/module/databoard/components/chart/ring-pie-chart.vue
0 → 100644
View file @
535602cd
<
template
>
<div
ref=
"chart"
style=
"width: 100%;height: 50%;"
@
click=
""
/>
</
template
>
<
script
>
import
*
as
echarts
from
"_echarts@5.4.3@echarts"
;
export
default
{
name
:
"RingPieChart"
,
data
()
{
return
{
option
:{
tooltip
:
{
trigger
:
'item'
},
series
:
[
{
name
:
''
,
type
:
'pie'
,
radius
:
[
'40%'
,
'70%'
],
avoidLabelOverlap
:
false
,
label
:
{
show
:
true
,
// position: 'center',
fontSize
:
12
,
color
:
'#5eeef4'
,
formatter
(
param
)
{
return
param
.
name
+
'
\
r
\
n'
+
param
.
value
}
},
emphasis
:
{
label
:
{
show
:
true
,
fontSize
:
12
,
fontWeight
:
'bold'
,
color
:
'#5eeef4'
,
}
},
data
:
this
.
data
}
]
},
chart
:
null
,
}
},
watch
:
{
data
(
newValue
,
oldValue
){
this
.
option
.
data
=
newValue
;
this
.
chart
.
setOption
(
this
.
option
);
}
},
methods
:
{
resizeChart
()
{
if
(
this
.
chart
)
{
this
.
chart
.
resize
();
}
}
},
mounted
()
{
setTimeout
(()
=>
{
let
chartDom
=
this
.
$refs
.
chart
;
this
.
chart
=
echarts
.
init
(
chartDom
);
this
.
chart
.
setOption
(
this
.
option
);
window
.
addEventListener
(
'resize'
,
this
.
resizeChart
);
},
500
)
},
beforeDestroy
()
{
window
.
removeEventListener
(
"resize"
,
this
.
resizeChart
);
},
props
:{
name
:
{
type
:
String
,
default
:
"环形饼图"
,
},
data
:
{
type
:
Array
,
default
:
function
()
{
return
[
{
value
:
500
,
name
:
'值1'
},
{
value
:
2500
,
name
:
'值3'
},
{
value
:
1100
,
name
:
'值2'
},
];
},
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/module/databoard/components/layout/num-with-r-b-mark.vue
deleted
100644 → 0
View file @
2cf19e92
<
template
>
<div>
<div
class=
"c_num"
>
<b>
<slot
name=
"num"
></slot>
</b>
<span
class=
"c_unit"
>
<slot
name=
"unit"
></slot>
</span>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"NumWithRBMark"
,
data
()
{
return
{
};
},
methods
:
{}
};
</
script
>
<
style
scoped
>
.c_fl
{
float
:
left
;
}
.c_num
{
position
:
relative
;
font-size
:
32px
;
line-height
:
46px
;
text-align
:
center
;
height
:
100%
;
width
:
100%
;
}
.c_unit
{
position
:
absolute
;
right
:
0px
;
bottom
:
0px
;
font-size
:
16px
;
line-height
:
16px
;
font-weight
:
normal
;
text-align
:
center
;
float
:
right
;
width
:
2em
;
}
</
style
>
src/module/databoard/components/layout/title-content-mark.vue
0 → 100644
View file @
535602cd
<
template
>
<div
class=
"bd"
:class=
"
{'center-bd': isCenter}">
<div
class=
"title"
v-if=
"title"
:class=
"
{'center-title': isCenter}" :style="{'--titleHeight': titleHeight}">
{{
title
}}
</div>
<div
class=
"content"
:style=
"
{'--titleHeight': titleHeight}">
<b
v-if=
"isBold"
:style=
"contentStyle"
>
{{
content
}}
</b>
<b
v-if=
"!isBold"
style=
"font-weight: normal"
:style=
"contentStyle"
>
{{
content
}}
</b>
<span
class=
"mark"
:style=
"
{'--markWidth': mark.length},markStyle">
{{
mark
}}
</span>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"TitleContentMark"
,
data
()
{
return
{
};
},
props
:{
title
:
{
type
:
String
,
default
:
""
,
},
mark
:
{
type
:
String
,
default
:
""
,
},
content
:
{
type
:
String
,
default
:
""
,
},
titleHeight
:
{
type
:
String
,
default
:
"20%"
,
},
isCenter
:
{
type
:
Boolean
,
},
isBold
:{
type
:
Boolean
,
},
contentStyle
:{
type
:
[
String
,
Object
],
},
markStyle
:{
type
:
[
String
,
Object
],
}
},
methods
:
{},
computed
:{
}
};
</
script
>
<
style
scoped
>
:root
{
--markWidth
:
2em
;
--titleHeight
:
20%
;
}
.bold
{
font-weight
:
bold
;
}
.bd
{
height
:
100%
;
padding
:
0
0
2%
0%
;
}
.center-bd
{
padding
:
0
10%
6%
10%
;
}
.title
{
color
:
white
;
height
:
var
(
--titleHeight
);
margin-left
:
10%
;
line-height
:
30px
;
}
.center-title
{
margin
:
0
;
display
:
block
;
text-align
:
center
;
width
:
100%
;
}
.content
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
font-size
:
30px
;
text-align
:
center
;
height
:
calc
(
100%
-
var
(
--titleHeight
));
width
:
100%
;
}
.content
>
b
{
//
margin-left
:
12%
;
width
:
100%
;
}
.mark
{
position
:
absolute
;
right
:
0px
;
bottom
:
0px
;
font-size
:
14px
;
line-height
:
16px
;
font-weight
:
normal
;
text-align
:
center
;
float
:
right
;
width
:
var
(
--markWidth
);
}
</
style
>
src/module/databoard/components/table/table-column.vue
0 → 100644
View file @
535602cd
<
template
>
<table>
<thead
v-if=
"showHead"
>
<tr><th>
{{
title
}}
</th></tr>
</thead>
<tbody>
<tr
v-for=
"row in data"
><td
:style=
"eval(cellStyleJs,row[name])"
>
{{
row
[
name
]
}}
</td></tr>
</tbody>
</table>
</
template
>
<
script
>
export
default
{
name
:
"TableColumn"
,
data
()
{
return
{
}
},
methods
:
{
eval
(
str
,
data
){
let
res
;
if
(
str
){
res
=
eval
(
str
);
}
else
if
(
this
.
cellStyleFunction
)
{
res
=
this
.
cellStyleFunction
(
data
);
}
return
res
;
}
},
props
:{
name
:
{
type
:
String
,
default
:
""
,
},
title
:
{
type
:
String
,
default
:
""
,
},
showHead
:
{
type
:
Boolean
,
},
data
:
{
type
:
Array
,
},
cellStyleJs
:
{
type
:
String
,
},
cellStyleFunction
:{
type
:
Function
},
}
}
</
script
>
<
style
scoped
>
table
{
color
:
white
;
}
th
{
color
:
white
;
font-size
:
12px
;
font-weight
:
normal
;
}
table
,
th
,
td
,
tr
,
thead
{
padding
:
0
;
margin
:
0
;
border
:
none
;
}
tr
{
width
:
100%
;
}
</
style
>
src/module/databoard/index.vue
View file @
535602cd
This diff is collapsed.
Click to expand it.
src/module/databoard/index_back1.vue
View file @
535602cd
...
@@ -217,7 +217,7 @@ import InfoCard from "./components/card/info-card.vue";
...
@@ -217,7 +217,7 @@ import InfoCard from "./components/card/info-card.vue";
import
ContrastCard
from
"./components/card/contrast-card.vue"
;
import
ContrastCard
from
"./components/card/contrast-card.vue"
;
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
TitleContent
from
"./components/container/title-content.vue"
;
import
TitleContent
from
"./components/container/title-content.vue"
;
import
NumWithRBMark
from
"./components/layout/
num-with-r-b
-mark.vue"
;
import
NumWithRBMark
from
"./components/layout/
title-content
-mark.vue"
;
import
Card
from
"./components/card/card.vue"
;
import
Card
from
"./components/card/card.vue"
;
import
ContainerWithBord
from
"./components/container/container-with-bord.vue"
;
import
ContainerWithBord
from
"./components/container/container-with-bord.vue"
;
export
default
{
export
default
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment