Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
613bf9a0
authored
2023-02-10 11:43:42 +0800
by
yangwei
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
图表数据数量显示
1 parent
7cacbee6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
17 deletions
src/views/jktj/bsxljk/index.vue
src/views/jktj/cgltj/index.vue
src/views/jktj/ywltj/index.vue
src/views/jktj/bsxljk/index.vue
View file @
613bf9a
...
...
@@ -57,7 +57,7 @@ import efficient from "@/api/efficient";
import
{
getFirstDayOfSeason
,
timeFormat
}
from
"@/utils/operation"
;
export
default
{
name
:
"jktj"
,
data
()
{
data
()
{
return
{
// 开始日期限制
pickerOptionsStart
:
{
...
...
@@ -83,7 +83,7 @@ export default {
pieChartsData
:
[],
};
},
created
()
{},
created
()
{},
mounted
()
{
this
.
getProcessCounts
();
},
...
...
@@ -91,11 +91,11 @@ export default {
...
mapGetters
([
"dicData"
]),
},
methods
:
{
endTimeChange
(
val
){
this
.
form
.
endTime
=
timeFormat
(
new
Date
(
val
),
true
)
endTimeChange
(
val
)
{
this
.
form
.
endTime
=
timeFormat
(
new
Date
(
val
),
true
);
},
//查询各区县办件数量
async
getProcessCounts
()
{
async
getProcessCounts
()
{
this
.
pieChartsData
=
[];
let
{
result
:
res
}
=
await
efficient
.
getProcessCounts
(
this
.
form
.
startTime
,
...
...
@@ -113,14 +113,15 @@ export default {
groupId
:
item
.
recType
,
});
});
res
.
length
&&
this
.
$nextTick
(()
=>
{
// 初始化图表
this
.
echartInit
();
this
.
barChartInit
(
res
[
0
].
recType
);
});
res
.
length
&&
this
.
$nextTick
(()
=>
{
// 初始化图表
this
.
echartInit
();
this
.
barChartInit
(
res
[
0
].
recType
);
});
},
// 重置
resetForm
()
{
resetForm
()
{
this
.
form
=
{
startTime
:
getFirstDayOfSeason
(),
endTime
:
timeFormat
(
new
Date
(),
true
),
...
...
@@ -128,7 +129,7 @@ export default {
this
.
getProcessCounts
();
},
//玫瑰图初始化
echartInit
()
{
echartInit
()
{
let
_this
=
this
;
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"myChart"
));
...
...
@@ -189,7 +190,7 @@ export default {
});
},
//柱图初始化
async
barChartInit
(
recType
)
{
async
barChartInit
(
recType
)
{
//请求recType对应业务的各区县数据
let
{
result
:
res
}
=
await
efficient
.
getProcessDays
(
recType
,
...
...
@@ -274,19 +275,46 @@ export default {
series
:
[
{
type
:
"bar"
,
barMaxWidth
:
'60'
,
//显示数值
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
//开启显示
position
:
"top"
,
//在上方显示
},
},
},
barMaxWidth
:
"60"
,
name
:
"最短用时"
,
data
:
dealArr
.
map
((
item
)
=>
item
.
minDay
),
},
{
type
:
"bar"
,
barMaxWidth
:
'60'
,
//显示数值
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
//开启显示
position
:
"top"
,
//在上方显示
},
},
},
barMaxWidth
:
"60"
,
name
:
"平均用时"
,
data
:
dealArr
.
map
((
item
)
=>
item
.
avgDay
),
},
{
type
:
"bar"
,
barMaxWidth
:
'60'
,
//显示数值
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
//开启显示
position
:
"top"
,
//在上方显示
},
},
},
barMaxWidth
:
"60"
,
name
:
"最长用时"
,
data
:
dealArr
.
map
((
item
)
=>
item
.
maxDay
),
},
...
...
src/views/jktj/cgltj/index.vue
View file @
613bf9a
...
...
@@ -246,6 +246,15 @@ export default {
{
name
:
"成功"
,
type
:
"bar"
,
//显示数值
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
//开启显示
position
:
"top"
,
//在上方显示
},
},
},
barMaxWidth
:
'60'
,
data
:
this
.
chartData
.
map
((
item
)
=>
{
return
item
.
success
;
...
...
@@ -254,6 +263,15 @@ export default {
{
name
:
"失败"
,
type
:
"bar"
,
//显示数值
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
//开启显示
position
:
"top"
,
//在上方显示
},
},
},
barMaxWidth
:
'60'
,
data
:
this
.
chartData
.
map
((
item
)
=>
{
return
item
.
failure
;
...
...
@@ -261,6 +279,15 @@ export default {
},
{
name
:
"成功率"
,
//显示数值
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
//开启显示
position
:
"top"
,
//在上方显示
},
},
},
type
:
"line"
,
barMaxWidth
:
'60'
,
yAxisIndex
:
1
,
...
...
src/views/jktj/ywltj/index.vue
View file @
613bf9a
...
...
@@ -210,9 +210,18 @@ export default {
],
series
:
[
{
data
:
chartArr
.
map
(
item
=>
item
.
counts
),
type
:
"bar"
,
//显示数值
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
//开启显示
position
:
"top"
,
//在上方显示
},
},
},
barMaxWidth
:
'60'
,
data
:
chartArr
.
map
(
item
=>
item
.
counts
),
},
],
});
...
...
Please
register
or
sign in
to post a comment