Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
d50c9bd0
Commit
d50c9bd0
authored
Jul 18, 2023
by
ww-xxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加目标线
parent
e8a3e019
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
14 deletions
+103
-14
attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/BarCharts.vue
...min/src/views/staff/perform/stat/components/BarCharts.vue
+81
-8
attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/LineCharts.vue
...in/src/views/staff/perform/stat/components/LineCharts.vue
+19
-5
attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue
...ce-manager-ui/admin/src/views/staff/perform/stat/list.vue
+3
-1
No files found.
attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/BarCharts.vue
View file @
d50c9bd0
...
@@ -26,6 +26,14 @@ export default {
...
@@ -26,6 +26,14 @@ export default {
parameter
:
{
parameter
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
}
default
:
()
=>
{
}
},
markLine
:
{
type
:
Number
,
default
:
()
=>
0
},
option
:
{
type
:
Object
,
default
:
()
=>
{
}
}
}
},
},
data
()
{
data
()
{
...
@@ -35,7 +43,7 @@ export default {
...
@@ -35,7 +43,7 @@ export default {
},
},
watch
:
{
watch
:
{
title
(
val
)
{
title
(
val
)
{
this
.
myChart
&&
this
.
myChart
.
setOption
({
title
:{
text
:
val
}
})
this
.
myChart
&&
this
.
myChart
.
setOption
({
title
:
{
text
:
val
}
})
},
},
parameter
:
{
parameter
:
{
handler
:
function
(
v
)
{
handler
:
function
(
v
)
{
...
@@ -58,22 +66,48 @@ export default {
...
@@ -58,22 +66,48 @@ export default {
},
},
series
:
[
series
:
[
{
{
data
:
obj
.
y
,
name
:
this
.
legendName
,
data
:
obj
.
y
},
},
]
]
})
})
if
(
this
.
markLine
)
{
this
.
myChart
.
setOption
({
series
:
[
{
markLine
:
{
data
:
[{
name
:
'
目标线
'
,
yAxis
:
this
.
markLine
,
label
:
{
formatter
:
'
{b}:
'
+
this
.
legendName
+
'
不高于20.0%,
'
,
position
:
'
insideStartTop
'
},
lineStyle
:
{
color
:
"
red
"
,
}
}],
label
:
{
color
:
"
red
"
,
distance
:
[
20
,
8
]
}
}
},
]
})
}
return
return
}
}
// 基于dom,初始化echarts实例
// 基于dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
this
.
id
));
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
this
.
id
));
this
.
myChart
=
myChart
this
.
myChart
=
myChart
// 绘制图表
// 绘制图表
myChart
.
setOption
(
{
const
option
=
{
title
:
{
title
:
{
text
:
this
.
title
,
text
:
this
.
title
,
left
:
this
.
legendName
==
"
旷工率
"
?
"
center
"
:
"
left
"
,
left
:
"
left
"
,
textStyle
:
{
textStyle
:
{
fontSize
:
this
.
legendName
==
"
旷工率
"
?
24
:
18
,
fontSize
:
18
,
},
},
},
},
color
:
'
#6e98ed
'
,
color
:
'
#6e98ed
'
,
...
@@ -89,6 +123,20 @@ export default {
...
@@ -89,6 +123,20 @@ export default {
color
:
"
#000
"
,
color
:
"
#000
"
,
},
},
},
},
dataZoom
:
[
{
show
:
true
,
realtime
:
true
,
start
:
0
,
end
:
100
},
{
type
:
'
inside
'
,
realtime
:
true
,
start
:
0
,
end
:
100
}
],
tooltip
:
{},
tooltip
:
{},
xAxis
:
{
xAxis
:
{
data
:
[],
data
:
[],
...
@@ -96,7 +144,7 @@ export default {
...
@@ -96,7 +144,7 @@ export default {
grid
:
{
grid
:
{
left
:
"
5%
"
,
left
:
"
5%
"
,
right
:
"
4%
"
,
right
:
"
4%
"
,
bottom
:
"
2%
"
,
bottom
:
40
,
containLabel
:
true
,
containLabel
:
true
,
},
},
// color:[ "#61a0a8",],
// color:[ "#61a0a8",],
...
@@ -107,14 +155,39 @@ export default {
...
@@ -107,14 +155,39 @@ export default {
type
:
"
bar
"
,
type
:
"
bar
"
,
data
:
[],
data
:
[],
itemStyle
:
{
itemStyle
:
{
lineStyle
:
{
lineStyle
:
{
type
:
"
dotted
"
,
//'dotted'虚线 'solid'实线
type
:
"
dotted
"
,
//'dotted'虚线 'solid'实线
},
},
},
},
},
},
],
],
});
}
myChart
.
setOption
(
Object
.
assign
({},
option
,
this
.
option
));
if
(
this
.
markLine
)
{
myChart
.
setOption
({
series
:
[
{
markLine
:
{
data
:
[{
name
:
'
目标线
'
,
yAxis
:
this
.
markLine
,
label
:
{
formatter
:
'
{b}:旷工率不高于20.0%,
'
,
position
:
'
insideStartTop
'
},
lineStyle
:
{
color
:
"
red
"
,
}
}],
label
:
{
color
:
"
red
"
,
distance
:
[
20
,
8
]
}
}
},
]
})
}
},
},
},
},
};
};
...
...
attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/LineCharts.vue
View file @
d50c9bd0
...
@@ -21,11 +21,11 @@ export default {
...
@@ -21,11 +21,11 @@ export default {
},
},
styleObj
:
{
styleObj
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{},
default
:
()
=>
{
},
},
},
parameter
:
{
parameter
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
}
},
},
data
()
{
data
()
{
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
},
},
watch
:
{
watch
:
{
title
(
val
)
{
title
(
val
)
{
this
.
myChart
&&
this
.
myChart
.
setOption
({
title
:{
text
:
val
}
})
this
.
myChart
&&
this
.
myChart
.
setOption
({
title
:
{
text
:
val
}
})
},
},
parameter
:
{
parameter
:
{
handler
:
function
(
v
)
{
handler
:
function
(
v
)
{
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
},
},
},
},
tooltip
:
{},
tooltip
:
{},
color
:
'
#6e98ed
'
,
color
:
'
#6e98ed
'
,
xAxis
:
{
xAxis
:
{
type
:
"
category
"
,
type
:
"
category
"
,
data
:
[],
data
:
[],
...
@@ -91,9 +91,23 @@ export default {
...
@@ -91,9 +91,23 @@ export default {
grid
:
{
grid
:
{
left
:
"
3%
"
,
left
:
"
3%
"
,
right
:
"
4%
"
,
right
:
"
4%
"
,
bottom
:
"
2%
"
,
bottom
:
40
,
containLabel
:
true
,
containLabel
:
true
,
},
},
dataZoom
:
[
{
show
:
true
,
realtime
:
true
,
start
:
0
,
end
:
100
},
{
type
:
'
inside
'
,
realtime
:
true
,
start
:
0
,
end
:
100
}
],
yAxis
:
{},
yAxis
:
{},
series
:
[
series
:
[
{
{
...
...
attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue
View file @
d50c9bd0
...
@@ -125,7 +125,9 @@
...
@@ -125,7 +125,9 @@
<bar-charts
<bar-charts
:title=
"`$
{type1 == 1 ? '各部门' : '个人'}${StatQuery.month}月${alignmentName}对齐情况`"
:title=
"`$
{type1 == 1 ? '各部门' : '个人'}${StatQuery.month}月${alignmentName}对齐情况`"
:id="'bar_content'"
:id="'bar_content'"
:legendName="'旷工率'"
:legendName="alignmentName"
:option="{title:{left:'center',textStyle:{fontSize:24}}}"
:markLine="0.2"
:parameter="depStatObj.alignment"
:parameter="depStatObj.alignment"
:styleObj="{ width: '1800px', height: '650px' }"
:styleObj="{ width: '1800px', height: '650px' }"
/>
/>
...
...
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