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
5b88c815
Commit
5b88c815
authored
Jan 05, 2023
by
liuguorong93
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作犬专业方向统计 改为饼图
parent
afc23b74
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
99 deletions
+88
-99
src/views/dataJq/dataV.vue
+4
-1
src/views/dataJq/dogMajor.vue
+82
-96
src/views/sjfx/components/workDogCount.vue
+2
-2
No files found.
src/views/dataJq/dataV.vue
View file @
5b88c815
...
...
@@ -36,7 +36,10 @@
</div>
<!-- 工作犬专业方向统计 -->
<div
style=
"margin-top: 20px"
>
<dogMajor
:qzCount=
"qzCount"
></dogMajor>
<dogMajor
:qzCount=
"qzCount"
v-if=
"qzCount.major"
></dogMajor>
</div>
</div>
</div>
...
...
src/views/dataJq/dogMajor.vue
View file @
5b88c815
...
...
@@ -13,7 +13,6 @@
</
template
>
<
script
>
import
*
as
echarts
from
"echarts"
;
export
default
{
props
:
{
qzCount
:
{
...
...
@@ -23,119 +22,106 @@ export default {
},
data
()
{
return
{
offsetZero
:
[
"rgba(78, 187, 255, 1)"
,
"rgba(241, 166, 54, 1)"
,
"rgba(255, 102, 78, 1)"
,
"rgba(46, 223, 209, 1)"
,
"rgba(255, 172, 39, 1)"
,
],
offsetOne
:
[
"rgba(134, 223, 255, 0.05)"
,
"rgba(241, 166, 54, 0.05)"
,
"rgba(255, 102, 78, 0.05)"
,
"rgba(46, 223, 209, 0.05)"
,
"rgba(255, 172, 39, 0.05)"
,
myChart
:
null
,
colorDatas
:
[
"#5DECE8"
,
"#F57B92"
,
"#F58B4E"
,
"#FBDD62"
,
"#A29BF0"
,
"#FFEC97"
,
"#398DDB"
,
"#3EBEC2"
,
"#5D52D6"
,
"#1D51D8"
,
"#B52AB5"
,
"#6EF9AA"
,
"#3BC568"
,
"#F25555"
,
"#B4FB62"
,
"#FFBB01"
,
],
seriesDatas
:
[],
};
},
mounted
()
{
this
.
getData
();
},
methods
:
{
xyrzyRender
(
_name
,
_value
)
{
// console.log("_name, _value", _name, _value);
//案件性质发案分析
// debugger;
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"dogMajors"
));
// 绘制图表
myChart
.
setOption
({
// color: ["#4db7f8", "#fa654f", "#ffc64e"],
xAxis
:
{
type
:
"category"
,
data
:
_name
,
axisLabel
:
{
color
:
"#B8BDC6"
,
fontSize
:
"12px"
,
show
:
true
,
interval
:
0
,
// rotate: '-60px',
margin
:
6
,
},
axisLine
:
{
lineStyle
:
{
color
:
"#2C4E86"
,
},
getData
()
{
for
(
let
key
in
this
.
qzCount
.
major
)
{
this
.
seriesDatas
.
push
({
name
:
key
,
value
:
this
.
qzCount
.
major
[
key
],
});
}
setTimeout
(()
=>
{
this
.
drawEcharts
();
},
1
);
},
drawEcharts
()
{
if
(
this
.
myChart
)
this
.
myChart
.
dispose
();
this
.
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"dogMajors"
));
let
options
=
{
color
:
this
.
colorDatas
,
tooltip
:
{
trigger
:
"item"
,
backgroundColor
:
"#FFFFFF"
,
padding
:
[
12
,
8
],
extraCssText
:
"box-shadow: 0px 8px 24px -8px rgba(0,0,0,0.08), 0px 16px 24px 0px rgba(0,0,0,0.08), 0px 8px 24px 0px rgba(0,0,0,0.08);"
,
textStyle
:
{
color
:
"#242424"
,
fontSize
:
12
,
},
},
yAxis
:
{
type
:
"value"
,
splitLine
:
{
show
:
true
,
lineStyle
:
{
type
:
"dashed"
,
color
:
"#2C4E86"
,
},
},
axisLine
:
{
show
:
false
,
legend
:
{
type
:
"scroll"
,
orient
:
"horizontal"
,
left
:
"center"
,
align
:
"left"
,
bottom
:
30
,
itemWidth
:
10
,
itemHeight
:
10
,
itemGap
:
10
,
textStyle
:
{
fontSize
:
12
,
color
:
"#fff"
,
fontFamily
:
"Microsoft YaHei"
,
},
axisLabel
:
{
color
:
"#d7e7ff00"
,
width
:
250
,
pageIconColor
:
"#fff"
,
pageIconInactiveColor
:
"#fff"
,
pageTextStyle
:
{
color
:
"#fff"
,
},
},
series
:
[
{
barWidth
:
24
,
data
:
_value
,
type
:
"bar
"
,
itemStyle
:
{}
,
name
:
"工作犬专业方向统计"
,
type
:
"pie"
,
radius
:
"60%
"
,
center
:
[
"50%"
,
"42%"
]
,
label
:
{
formatter
:
"{c}"
,
show
:
true
,
position
:
"top"
,
fontWeight
:
"bolder"
,
fontSize
:
"12"
,
color
:
"#fff"
,
show
:
false
,
},
emphasis
:
{
scale
:
false
,
},
itemStyle
:
{
borderColor
:
"#fff"
,
borderWidth
:
2
,
},
data
:
this
.
seriesDatas
,
},
],
}
)
;
};
myChart
.
resize
({
width
:
$
(
"#dogMajors"
).
width
(),
height
:
$
(
"#dogMajors"
).
height
(),
});
myChart
.
off
(
"click"
);
myChart
.
on
(
"click"
,
function
(
params
)
{});
this
.
myChart
.
setOption
(
options
);
},
},
mounted
()
{
setTimeout
(()
=>
{
let
_name
=
[],
_value
=
[];
let
index
=
0
;
for
(
let
item
in
this
.
qzCount
.
major
)
{
_name
.
push
(
item
);
_value
.
push
({
name
:
item
,
value
:
this
.
qzCount
.
major
[
item
],
itemStyle
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
this
.
offsetZero
[
index
],
},
{
offset
:
1
,
color
:
this
.
offsetOne
[
index
],
},
]),
},
});
index
++
;
}
this
.
xyrzyRender
(
_name
,
_value
);
},
1000
);
},
};
</
script
>
...
...
src/views/sjfx/components/workDogCount.vue
View file @
5b88c815
...
...
@@ -109,8 +109,8 @@ export default {
fontSize
:
12
,
color
:
"#5E5E5E"
,
fontFamily
:
"Microsoft YaHei"
,
//
interval: 0,
//
rotate: 30,
interval
:
0
,
rotate
:
30
,
},
axisTick
:
{
show
:
false
,
...
...
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