Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
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
常超
founder_vue
Commits
30733d59
Commit
30733d59
authored
Jan 25, 2022
by
lp784568205
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了阵地的统计图标
parent
5da3f275
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
383 additions
and
104 deletions
+383
-104
src/views/zdxx/zdjyhd/zdfxcdtj.vue
+61
-15
src/views/zdxx/zdjyhd/zdglryhyhftj.vue
+62
-16
src/views/zdxx/zdjyhd/zdgmtj.vue
+62
-16
src/views/zdxx/zdjyhd/zdgzrytjt.vue
+60
-15
src/views/zdxx/zdjyhd/zdjycstj.vue
+76
-26
src/views/zdxx/zdjyhd/zdjywptjt.vue
+62
-16
No files found.
src/views/zdxx/zdjyhd/zdfxcdtj.vue
View file @
30733d59
...
...
@@ -2,9 +2,15 @@
<div
id=
"dytj"
>
<div
class=
"searchItem"
v-show=
"type == 'map'"
>
<el-form
label-width=
"100px"
ref=
"queryForm"
:model=
"formData"
>
<el-col
:span=
"8"
>
<el-col
:span=
"3"
>
<span
style=
"font-size: 20px; font-family: PingFang SC; font-weight: blod"
>
阵地风险程度统计
</span
>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"
开始时间
"
label=
"
统计时间段
"
prop=
"djsjStart"
style=
"margin-bottom: 0"
>
...
...
@@ -19,10 +25,11 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"
结束时间
"
label=
"
至
"
prop=
"djsjEnd"
label-width=
"20px"
style=
"margin-bottom: 0"
>
<el-date-picker
...
...
@@ -205,15 +212,15 @@ export default {
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
));
myChart
.
setOption
({
title
:
{
text
:
"阵地风险程度统计"
,
padding
:
[
20
,
24
],
textStyle
:
{
color
:
"#333333"
,
fontSize
:
16
,
fontWeight
:
"bold"
,
},
},
//
title: {
//
text: "阵地风险程度统计",
//
padding: [20, 24],
//
textStyle: {
//
color: "#333333",
//
fontSize: 16,
//
fontWeight: "bold",
//
},
//
},
tooltip
:
{
trigger
:
"item"
,
formatter
:
"{a} <br/>{b}: {c} ({d}%)"
,
...
...
@@ -222,13 +229,30 @@ export default {
orient
:
"vertical"
,
left
:
"85%"
,
//图例距离左的距离
y
:
"70%"
,
//图例上下居中
//回调函数
formatter
:
function
(
name
)
{
console
.
log
(
pieD
);
var
data
=
pieD
;
var
total
=
0
;
var
tarValue
;
for
(
var
i
=
0
,
l
=
pieD
.
length
;
i
<
l
;
i
++
)
{
total
+=
data
[
i
].
value
;
if
(
data
[
i
].
name
==
name
)
{
tarValue
=
data
[
i
].
value
;
}
}
var
p
=
((
tarValue
/
total
)
*
100
).
toFixed
(
2
);
return
(
name
+
" "
+
" "
+
" "
+
p
+
"%"
+
" "
+
" "
+
" "
+
tarValue
);
},
},
series
:
[
{
name
:
""
,
type
:
"pie"
,
radius
:
[
"
0
"
,
"60%"
],
center
:
[
"
51
%"
,
"55%"
],
radius
:
[
"
50%
"
,
"60%"
],
center
:
[
"
30
%"
,
"55%"
],
//avoidLabelOverlap => 避免标签重叠
avoidLabelOverlap
:
true
,
// label: {
...
...
@@ -243,6 +267,28 @@ export default {
},
},
label
:
{
normal
:
{
show
:
true
,
position
:
"center"
,
formatter
:
function
()
{
var
totalValue
=
0
pieD
.
map
((
item
)
=>
{
totalValue
+=
item
.
value
})
return
totalValue
;
},
textStyle
:
{
fontSize
:
40
,
color
:
"#000"
,
},
},
emphasis
:
{
show
:
false
,
textStyle
:
{
fontSize
:
"30"
,
fontWeight
:
"bold"
,
},
},
/*数据为0不显示*/
formatter
:
function
(
item
)
{
if
(
item
.
value
>
0
)
{
...
...
src/views/zdxx/zdjyhd/zdglryhyhftj.vue
View file @
30733d59
...
...
@@ -2,9 +2,15 @@
<div
id=
"dytj"
>
<div
class=
"searchItem"
v-show=
"type == 'map'"
>
<el-form
label-width=
"100px"
ref=
"queryForm"
:model=
"formData"
>
<el-col
:span=
"8"
>
<el-col
:span=
"4"
>
<span
style=
"font-size: 20px; font-family: PingFang SC; font-weight: blod"
>
阵地关联人员行业划分统计
</span
>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"
开始时间
"
label=
"
统计时间段s
"
prop=
"djsjStart"
style=
"margin-bottom: 0"
>
...
...
@@ -19,11 +25,12 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"
结束时间
"
label=
"
至
"
prop=
"djsjEnd"
style=
"margin-bottom: 0"
label-width=
"20px"
style=
"margin-bottom: 0; margin-left: -40px"
>
<el-date-picker
v-model=
"formData.djsjEnd"
...
...
@@ -245,15 +252,15 @@ export default {
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
));
myChart
.
setOption
({
title
:
{
text
:
"阵地关联人员行业划分统计"
,
padding
:
[
20
,
24
],
textStyle
:
{
color
:
"#333333"
,
fontSize
:
16
,
fontWeight
:
"bold"
,
},
},
//
title: {
//
text: "阵地关联人员行业划分统计",
//
padding: [20, 24],
//
textStyle: {
//
color: "#333333",
//
fontSize: 16,
//
fontWeight: "bold",
//
},
//
},
tooltip
:
{
trigger
:
"item"
,
formatter
:
"{a} <br/>{b}: {c} ({d}%)"
,
...
...
@@ -262,13 +269,30 @@ export default {
orient
:
"vertical"
,
left
:
"85%"
,
//图例距离左的距离
y
:
"70%"
,
//图例上下居中
//回调函数
formatter
:
function
(
name
)
{
console
.
log
(
pieD
);
var
data
=
pieD
;
var
total
=
0
;
var
tarValue
;
for
(
var
i
=
0
,
l
=
pieD
.
length
;
i
<
l
;
i
++
)
{
total
+=
data
[
i
].
value
;
if
(
data
[
i
].
name
==
name
)
{
tarValue
=
data
[
i
].
value
;
}
}
var
p
=
((
tarValue
/
total
)
*
100
).
toFixed
(
2
);
return
(
name
+
" "
+
" "
+
" "
+
p
+
"%"
+
" "
+
" "
+
" "
+
tarValue
);
},
},
series
:
[
{
name
:
""
,
type
:
"pie"
,
radius
:
[
"
0
"
,
"60%"
],
center
:
[
"
51
%"
,
"55%"
],
radius
:
[
"
50%
"
,
"60%"
],
center
:
[
"
30
%"
,
"55%"
],
//avoidLabelOverlap => 避免标签重叠
avoidLabelOverlap
:
true
,
// label: {
...
...
@@ -283,6 +307,28 @@ export default {
},
},
label
:
{
normal
:
{
show
:
true
,
position
:
"center"
,
formatter
:
function
()
{
var
totalValue
=
0
pieD
.
map
((
item
)
=>
{
totalValue
+=
item
.
value
})
return
totalValue
;
},
textStyle
:
{
fontSize
:
40
,
color
:
"#000"
,
},
},
emphasis
:
{
show
:
false
,
textStyle
:
{
fontSize
:
"30"
,
fontWeight
:
"bold"
,
},
},
/*数据为0不显示*/
formatter
:
function
(
item
)
{
if
(
item
.
value
>
0
)
{
...
...
src/views/zdxx/zdjyhd/zdgmtj.vue
View file @
30733d59
...
...
@@ -2,9 +2,15 @@
<div
id=
"dytj"
>
<div
class=
"searchItem"
v-show=
"type == 'map'"
>
<el-form
label-width=
"100px"
ref=
"queryForm"
:model=
"formData"
>
<el-col
:span=
"8"
>
<el-col
:span=
"2"
>
<span
style=
"font-size: 20px; font-family: PingFang SC; font-weight: blod"
>
阵地规模统计
</span
>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"
开始时间
"
label=
"
统计时间段
"
prop=
"djsjStart"
style=
"margin-bottom: 0"
>
...
...
@@ -19,11 +25,12 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"
结束时间
"
label=
"
至
"
prop=
"djsjEnd"
style=
"margin-bottom: 0"
label-width=
"20px"
style=
"margin-bottom: 0; margin-left: -40px"
>
<el-date-picker
v-model=
"formData.djsjEnd"
...
...
@@ -205,15 +212,15 @@ export default {
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
));
myChart
.
setOption
({
title
:
{
text
:
"阵地规模统计"
,
padding
:
[
20
,
24
],
textStyle
:
{
color
:
"#333333"
,
fontSize
:
16
,
fontWeight
:
"bold"
,
},
},
//
title: {
// //
text: "阵地规模统计",
//
padding: [20, 24],
//
textStyle: {
//
color: "#333333",
//
fontSize: 16,
//
fontWeight: "bold",
//
},
//
},
tooltip
:
{
trigger
:
"item"
,
formatter
:
"{a} <br/>{b}: {c} ({d}%)"
,
...
...
@@ -222,13 +229,30 @@ export default {
orient
:
"vertical"
,
left
:
"85%"
,
//图例距离左的距离
y
:
"70%"
,
//图例上下居中
//回调函数
formatter
:
function
(
name
)
{
console
.
log
(
pieD
);
var
data
=
pieD
;
var
total
=
0
;
var
tarValue
;
for
(
var
i
=
0
,
l
=
pieD
.
length
;
i
<
l
;
i
++
)
{
total
+=
data
[
i
].
value
;
if
(
data
[
i
].
name
==
name
)
{
tarValue
=
data
[
i
].
value
;
}
}
var
p
=
((
tarValue
/
total
)
*
100
).
toFixed
(
2
);
return
(
name
+
" "
+
" "
+
" "
+
p
+
"%"
+
" "
+
" "
+
" "
+
tarValue
);
},
},
series
:
[
{
name
:
""
,
type
:
"pie"
,
radius
:
[
"
0
"
,
"60%"
],
center
:
[
"
51
%"
,
"55%"
],
radius
:
[
"
50%
"
,
"60%"
],
center
:
[
"
30
%"
,
"55%"
],
//avoidLabelOverlap => 避免标签重叠
avoidLabelOverlap
:
true
,
// label: {
...
...
@@ -243,6 +267,28 @@ export default {
},
},
label
:
{
normal
:
{
show
:
true
,
position
:
"center"
,
formatter
:
function
()
{
var
totalValue
=
0
pieD
.
map
((
item
)
=>
{
totalValue
+=
item
.
value
})
return
totalValue
;
},
textStyle
:
{
fontSize
:
40
,
color
:
"#000"
,
},
},
emphasis
:
{
show
:
false
,
textStyle
:
{
fontSize
:
"30"
,
fontWeight
:
"bold"
,
},
},
/*数据为0不显示*/
formatter
:
function
(
item
)
{
if
(
item
.
value
>
0
)
{
...
...
src/views/zdxx/zdjyhd/zdgzrytjt.vue
View file @
30733d59
...
...
@@ -2,9 +2,15 @@
<div
id=
"dytj"
>
<div
class=
"searchItem"
v-show=
"type == 'map'"
>
<el-form
label-width=
"100px"
ref=
"queryForm"
:model=
"formData"
>
<el-col
:span=
"8"
>
<el-col
:span=
"3"
>
<span
style=
"font-size: 20px; font-family: PingFang SC; font-weight: blod"
>
阵地是否关注人员统计
</span
>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"
开始时间
"
label=
"
统计时间段
"
prop=
"djsjStart"
style=
"margin-bottom: 0"
>
...
...
@@ -21,9 +27,10 @@
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"
结束时间
"
label=
"
至
"
prop=
"djsjEnd"
style=
"margin-bottom: 0"
label-width=
"20px"
style=
"margin-bottom: 0; margin-left: -40px"
>
<el-date-picker
v-model=
"formData.djsjEnd"
...
...
@@ -245,15 +252,15 @@ export default {
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
));
myChart
.
setOption
({
title
:
{
text
:
"阵地是否关注人员统计"
,
padding
:
[
20
,
24
],
textStyle
:
{
color
:
"#333333"
,
fontSize
:
16
,
fontWeight
:
"bold"
,
},
},
//
title: {
//
text: "阵地是否关注人员统计",
//
padding: [20, 24],
//
textStyle: {
//
color: "#333333",
//
fontSize: 16,
//
fontWeight: "bold",
//
},
//
},
tooltip
:
{
trigger
:
"item"
,
formatter
:
"{a} <br/>{b}: {c} ({d}%)"
,
...
...
@@ -262,13 +269,29 @@ export default {
orient
:
"vertical"
,
left
:
"85%"
,
//图例距离左的距离
y
:
"70%"
,
//图例上下居中
formatter
:
function
(
name
)
{
console
.
log
(
pieD
);
var
data
=
pieD
;
var
total
=
0
;
var
tarValue
;
for
(
var
i
=
0
,
l
=
pieD
.
length
;
i
<
l
;
i
++
)
{
total
+=
data
[
i
].
value
;
if
(
data
[
i
].
name
==
name
)
{
tarValue
=
data
[
i
].
value
;
}
}
var
p
=
((
tarValue
/
total
)
*
100
).
toFixed
(
2
);
return
(
name
+
" "
+
" "
+
" "
+
p
+
"%"
+
" "
+
" "
+
" "
+
tarValue
);
},
},
series
:
[
{
name
:
""
,
type
:
"pie"
,
radius
:
[
"
0
"
,
"60%"
],
center
:
[
"
51
%"
,
"55%"
],
radius
:
[
"
50%
"
,
"60%"
],
center
:
[
"
30
%"
,
"55%"
],
//avoidLabelOverlap => 避免标签重叠
avoidLabelOverlap
:
true
,
// label: {
...
...
@@ -283,6 +306,28 @@ export default {
},
},
label
:
{
normal
:
{
show
:
true
,
position
:
"center"
,
formatter
:
function
()
{
var
totalValue
=
0
pieD
.
map
((
item
)
=>
{
totalValue
+=
item
.
value
})
return
totalValue
;
},
textStyle
:
{
fontSize
:
40
,
color
:
"#000"
,
},
},
emphasis
:
{
show
:
false
,
textStyle
:
{
fontSize
:
"30"
,
fontWeight
:
"bold"
,
},
},
/*数据为0不显示*/
formatter
:
function
(
item
)
{
if
(
item
.
value
>
0
)
{
...
...
src/views/zdxx/zdjyhd/zdjycstj.vue
View file @
30733d59
...
...
@@ -2,9 +2,15 @@
<div
id=
"dytj"
>
<div
class=
"searchItem"
v-show=
"type == 'map'"
>
<el-form
label-width=
"100px"
ref=
"queryForm"
:model=
"formData"
>
<el-col
:span=
"8"
>
<el-col
:span=
"2"
>
<span
style=
"font-size: 20px; font-family: PingFang SC; font-weight: blod"
>
阵地场所统计
</span
>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"
开始时间
"
label=
"
统计时间段
"
prop=
"djsjStart"
style=
"margin-bottom: 0"
>
...
...
@@ -19,11 +25,12 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"
结束时间
"
label=
"
至
"
prop=
"djsjEnd"
style=
"margin-bottom: 0"
label-width=
"20px"
style=
"margin-bottom: 0; margin-left: -40px"
>
<el-date-picker
v-model=
"formData.djsjEnd"
...
...
@@ -73,8 +80,8 @@ export default {
cxUrl
:
"/zdxx/selectZdxxglNew"
,
historyArr
:
[],
formData
:
{
djsjStart
:
''
,
djsjEnd
:
''
djsjStart
:
""
,
djsjEnd
:
""
,
},
cxFormData
:
{
limit
:
10
,
...
...
@@ -243,15 +250,15 @@ export default {
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
));
myChart
.
setOption
({
title
:
{
text
:
"阵地场所统计"
,
padding
:
[
20
,
24
],
textStyle
:
{
color
:
"#333333"
,
fontSize
:
16
,
fontWeight
:
"bold"
,
},
},
//
title: {
//
text: "阵地场所统计",
//
padding: [20, 24],
//
textStyle: {
//
color: "#333333",
//
fontSize: 16,
//
fontWeight: "bold",
//
},
//
},
tooltip
:
{
trigger
:
"item"
,
formatter
:
"{a} <br/>{b}: {c} ({d}%)"
,
...
...
@@ -260,13 +267,30 @@ export default {
orient
:
"vertical"
,
left
:
"85%"
,
//图例距离左的距离
y
:
"70%"
,
//图例上下居中
//回调函数
formatter
:
function
(
name
)
{
console
.
log
(
pieD
);
var
data
=
pieD
;
var
total
=
0
;
var
tarValue
;
for
(
var
i
=
0
,
l
=
pieD
.
length
;
i
<
l
;
i
++
)
{
total
+=
data
[
i
].
value
;
if
(
data
[
i
].
name
==
name
)
{
tarValue
=
data
[
i
].
value
;
}
}
var
p
=
((
tarValue
/
total
)
*
100
).
toFixed
(
2
);
return
(
name
+
" "
+
" "
+
" "
+
p
+
"%"
+
" "
+
" "
+
" "
+
tarValue
);
},
},
series
:
[
{
name
:
""
,
type
:
"pie"
,
radius
:
[
"
0
"
,
"60%"
],
center
:
[
"
51
%"
,
"55%"
],
radius
:
[
"
50%
"
,
"60%"
],
center
:
[
"
30
%"
,
"55%"
],
//avoidLabelOverlap => 避免标签重叠
avoidLabelOverlap
:
true
,
// label: {
...
...
@@ -281,6 +305,28 @@ export default {
},
},
label
:
{
normal
:
{
show
:
true
,
position
:
"center"
,
formatter
:
function
()
{
var
totalValue
=
0
pieD
.
map
((
item
)
=>
{
totalValue
+=
item
.
value
})
return
totalValue
;
},
textStyle
:
{
fontSize
:
40
,
color
:
"#000"
,
},
},
emphasis
:
{
show
:
false
,
textStyle
:
{
fontSize
:
"30"
,
fontWeight
:
"bold"
,
},
},
/*数据为0不显示*/
formatter
:
function
(
item
)
{
if
(
item
.
value
>
0
)
{
...
...
@@ -331,8 +377,8 @@ export default {
// params.append("djsjStart", this.formData.djsjStart);
// params.append("djsjEnd", this.formData.djsjEnd);
getZdcsResult
({
djsjStart
:
this
.
formData
.
djsjStart
,
djsjEnd
:
this
.
formData
.
djsjEnd
djsjStart
:
this
.
formData
.
djsjStart
,
djsjEnd
:
this
.
formData
.
djsjEnd
,
}).
then
((
res
)
=>
{
obj
=
res
.
data
.
result
;
for
(
let
key
in
obj
)
{
...
...
@@ -355,11 +401,11 @@ export default {
},
watch
:
{
"formData.djsjStart"
(
val
)
{
this
.
$echarts
.
init
(
document
.
getElementById
(
'charts'
)).
dispose
();
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
)).
dispose
();
this
.
getCode
();
},
"formData.djsjEnd"
(
val
)
{
this
.
$echarts
.
init
(
document
.
getElementById
(
'charts'
)).
dispose
();
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
)).
dispose
();
this
.
getCode
();
},
},
...
...
@@ -369,10 +415,14 @@ export default {
this
.
getCode
();
},
created
()
{
this
.
$set
(
this
.
formData
,
'djsjStart'
,
this
.
$moment
(
new
Date
().
getTime
()
-
3600
*
1000
*
24
*
30
).
format
(
"YYYY-MM-DD"
))
this
.
$set
(
this
.
formData
,
'djsjEnd'
,
this
.
$moment
().
format
(
"YYYY-MM-DD"
))
this
.
$set
(
this
.
formData
,
"djsjStart"
,
this
.
$moment
(
new
Date
().
getTime
()
-
3600
*
1000
*
24
*
30
).
format
(
"YYYY-MM-DD"
)
);
this
.
$set
(
this
.
formData
,
"djsjEnd"
,
this
.
$moment
().
format
(
"YYYY-MM-DD"
));
// this.$store.commit("user/SET_Menu", this.Menu);
},
};
...
...
src/views/zdxx/zdjyhd/zdjywptjt.vue
View file @
30733d59
...
...
@@ -2,9 +2,15 @@
<div
id=
"dytj"
>
<div
class=
"searchItem"
v-show=
"type == 'map'"
>
<el-form
label-width=
"100px"
ref=
"queryForm"
:model=
"formData"
>
<el-col
:span=
"8"
>
<el-col
:span=
"3"
>
<span
style=
"font-size: 20px; font-family: PingFang SC; font-weight: blod"
>
阵地交易物品统计
</span
>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"
开始时间
"
label=
"
统计时间段
"
prop=
"djsjStart"
style=
"margin-bottom: 0"
>
...
...
@@ -19,11 +25,12 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"
结束时间
"
label=
"
至
"
prop=
"djsjEnd"
style=
"margin-bottom: 0"
label-width=
"20px"
style=
"margin-bottom: 0; margin-left: -40px"
>
<el-date-picker
v-model=
"formData.djsjEnd"
...
...
@@ -245,15 +252,15 @@ export default {
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"charts"
));
myChart
.
setOption
({
title
:
{
text
:
"阵地交易物品统计"
,
padding
:
[
20
,
24
],
textStyle
:
{
color
:
"#333333"
,
fontSize
:
16
,
fontWeight
:
"bold"
,
},
},
//
title: {
//
text: "阵地交易物品统计",
//
padding: [20, 24],
//
textStyle: {
//
color: "#333333",
//
fontSize: 16,
//
fontWeight: "bold",
//
},
//
},
tooltip
:
{
trigger
:
"item"
,
formatter
:
"{a} <br/>{b}: {c} ({d}%)"
,
...
...
@@ -262,13 +269,30 @@ export default {
orient
:
"vertical"
,
left
:
"85%"
,
//图例距离左的距离
y
:
"70%"
,
//图例上下居中
//回调函数
formatter
:
function
(
name
)
{
console
.
log
(
pieD
);
var
data
=
pieD
;
var
total
=
0
;
var
tarValue
;
for
(
var
i
=
0
,
l
=
pieD
.
length
;
i
<
l
;
i
++
)
{
total
+=
data
[
i
].
value
;
if
(
data
[
i
].
name
==
name
)
{
tarValue
=
data
[
i
].
value
;
}
}
var
p
=
((
tarValue
/
total
)
*
100
).
toFixed
(
2
);
return
(
name
+
" "
+
" "
+
" "
+
p
+
"%"
+
" "
+
" "
+
" "
+
tarValue
);
},
},
series
:
[
{
name
:
""
,
type
:
"pie"
,
radius
:
[
"
0
"
,
"60%"
],
center
:
[
"
51
%"
,
"55%"
],
radius
:
[
"
50%
"
,
"60%"
],
center
:
[
"
30
%"
,
"55%"
],
//avoidLabelOverlap => 避免标签重叠
avoidLabelOverlap
:
true
,
// label: {
...
...
@@ -283,6 +307,28 @@ export default {
},
},
label
:
{
normal
:
{
show
:
true
,
position
:
"center"
,
formatter
:
function
()
{
var
totalValue
=
0
pieD
.
map
((
item
)
=>
{
totalValue
+=
item
.
value
})
return
totalValue
;
},
textStyle
:
{
fontSize
:
40
,
color
:
"#000"
,
},
},
emphasis
:
{
show
:
false
,
textStyle
:
{
fontSize
:
"30"
,
fontWeight
:
"bold"
,
},
},
/*数据为0不显示*/
formatter
:
function
(
item
)
{
if
(
item
.
value
>
0
)
{
...
...
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