Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
data-view
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3ccbcc9f
authored
Jul 04, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commi
1 parent
36d24bb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
src/components/PieChart.vue
src/views/afterSales/first.vue
src/components/PieChart.vue
View file @
3ccbcc9
<
template
>
<div
class=
"pie-box"
>
<div
:id=
"id"
:style=
"
{ height: height }" class="pie-chart">
</div>
<div
class=
"center-content"
:style=
"
{
fontSize:size
}">
<div
:class=
"[id, 'center-content-num']"
></div>
<div
class=
"center-content"
:style=
"
{
fontSize: size
}">
<div
:class=
"[id, 'center-content-num']"
></div>
<div
class=
"center-content-desc"
>
{{
numDesc
}}
</div>
</div>
</div>
...
...
@@ -36,11 +36,11 @@ export default {
},
colors
:
{
type
:
Array
,
default
:
()
=>
[
'#4FA0FF'
,
'#FF6E76'
,
'#7CFFB2'
,
'#FDF006'
,
'#EB6001'
,
'#F5AA01'
,
'#BF98FF'
,
'#4FA0FF'
]
default
:
()
=>
[
'#4FA0FF'
,
'#FF6E76'
,
'#7CFFB2'
,
'#FDF006'
,
'#EB6001'
,
'#F5AA01'
,
'#BF98FF'
,
'#4FA0FF'
]
},
size
:{
type
:
String
,
default
:
'0.6vw'
size
:
{
type
:
String
,
default
:
'0.6vw'
}
},
...
...
@@ -136,12 +136,12 @@ export default {
this
.
numDesc
=
''
this
.
setAnamiteText
()
this
.
echartsPie
.
setOption
(
this
.
option
)
this
.
mTime
=
setInterval
(
this
.
pieActive
,
3
000
)
this
.
pieActive
()
this
.
mTime
=
setInterval
(
this
.
pieActive
,
10
000
)
// 鼠标划出
this
.
echartsPie
.
on
(
'mouseout'
,
()
=>
{
if
(
this
.
mTime
)
clearInterval
(
this
.
mTime
)
this
.
mTime
=
setInterval
(
this
.
pieActive
,
3
000
)
this
.
mTime
=
setInterval
(
this
.
pieActive
,
10
000
)
})
this
.
echartsPie
.
on
(
'mouseover'
,
data
=>
{
this
.
mainValue
=
data
.
data
.
value
...
...
@@ -182,7 +182,11 @@ export default {
this
.
setAnamiteText
()
},
setAnamiteText
()
{
if
(
document
.
querySelector
(
`.
${
this
.
id
}
`
))
document
.
querySelector
(
`.
${
this
.
id
}
`
).
style
=
`--step:
${
this
.
mainValue
}
`
document
.
querySelector
(
`.
${
this
.
id
}
`
).
nextElementSibling
.
style
=
'animation: rotateIn 3s infinite'
if
(
document
.
querySelector
(
`.
${
this
.
id
}
`
))
document
.
querySelector
(
`.
${
this
.
id
}
`
).
style
=
`--step:
${
this
.
mainValue
}
`
setTimeout
(()
=>
{
document
.
querySelector
(
`.
${
this
.
id
}
`
).
nextElementSibling
.
style
=
'animation: none;'
},
3000
)
},
//高亮
pieActive
()
{
...
...
@@ -211,7 +215,7 @@ export default {
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
//
font-size
:
0.6vw
;
//
font-size
:
0.6vw
;
color
:
#fff
;
--step
:
0
;
counter-reset
:
count
var
(
--step
);
...
...
@@ -227,7 +231,7 @@ export default {
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
animation
:
rotateIn
2
s
infinite
;
animation
:
rotateIn
3
s
infinite
;
}
}
.pie-chart
{
...
...
src/views/afterSales/first.vue
View file @
3ccbcc9
...
...
@@ -101,7 +101,7 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
].
num
)
value
:
t
opTempList
[
item
].
num
?
this
.
numAddSymbol
(
topTempList
[
item
].
num
):
'- -'
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment