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 f5c2d8b7
authored
Jul 22, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
8f20ebe3
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
41 deletions
src/components/LineChart.vue
src/components/PieChart.vue
src/components/ViewTabs.vue
src/views/afterSales/efficient.vue
src/views/afterSales/file.vue
src/views/afterSales/first.vue
src/views/afterSales/keep.vue
src/views/afterSales/lost.vue
src/views/afterSales/sadayasu.vue
src/components/LineChart.vue
View file @
f5c2d8b
...
@@ -11,9 +11,13 @@
...
@@ -11,9 +11,13 @@
<div
class=
"line-item"
>
<div
class=
"line-item"
>
<marquee
:direction=
"directionTimer"
:delay=
"delayTimer"
:text=
"item.label"
></marquee>
<marquee
:direction=
"directionTimer"
:delay=
"delayTimer"
:text=
"item.label"
></marquee>
</div>
</div>
<div
class=
"line-item"
>
<div
class=
"line-item"
>
<
marquee
class=
"txt-orange"
:direction=
"directionTimer"
:delay=
"delayTimer"
:text=
"item.value"
></marquee
>
<
span
class=
"txt-orange"
:direction=
"directionTimer"
:delay=
"delayTimer"
>
{{
item
.
value
}}
</span
>
</div>
</div>
<!--
<div
class=
"line-item"
>
<marquee
class=
"txt-orange"
:direction=
"directionTimer"
:delay=
"delayTimer"
:text=
"item.value"
></marquee>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -137,17 +141,17 @@ export default {
...
@@ -137,17 +141,17 @@ export default {
// 移除图表
// 移除图表
this
[
this
.
domId
].
on
(
'globalout'
,
()
=>
{
this
[
this
.
domId
].
on
(
'globalout'
,
()
=>
{
//
this.chartAction()
this
.
chartAction
()
this
.
getRankList
(
this
.
dataList
.
length
-
1
,
this
.
rankFlag
+
'List'
)
this
.
getRankList
(
this
.
dataList
.
length
-
1
,
this
.
rankFlag
+
'List'
)
})
})
},
},
//
chartAction(type) {
chartAction
(
type
)
{
//
this[this.domId].dispatchAction({
this
[
this
.
domId
].
dispatchAction
({
//
type: type || 'showTip',
type
:
type
||
'showTip'
,
// seriesIndex: +this.moveAttr.seriesIndex
,
seriesIndex
:
0
,
// dataIndex: +this.moveAttr.dataIndex
dataIndex
:
this
.
dataList
.
length
-
1
//
})
})
//
},
},
getRankList
(
idx
,
attrName
=
'topList'
)
{
getRankList
(
idx
,
attrName
=
'topList'
)
{
this
.
dataList
[
idx
][
attrName
].
length
?
this
.
$set
(
this
,
'rankList'
,
this
.
dataList
[
idx
][
attrName
])
:
this
.
resetRankList
()
this
.
dataList
[
idx
][
attrName
].
length
?
this
.
$set
(
this
,
'rankList'
,
this
.
dataList
[
idx
][
attrName
])
:
this
.
resetRankList
()
},
},
...
@@ -160,7 +164,7 @@ export default {
...
@@ -160,7 +164,7 @@ export default {
this
.
lineOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
.
num
)
this
.
lineOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
.
num
)
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
// 默认展示tooltip
// 默认展示tooltip
//
this.chartAction()
this
.
chartAction
()
this
.
getRankList
(
this
.
dataList
.
length
-
1
)
this
.
getRankList
(
this
.
dataList
.
length
-
1
)
},
},
handleRankChange
(
value
)
{
handleRankChange
(
value
)
{
...
...
src/components/PieChart.vue
View file @
f5c2d8b
...
@@ -3,7 +3,10 @@
...
@@ -3,7 +3,10 @@
<div
:id=
"id"
:style=
"
{ height: height }" class="pie-chart">
</div>
<div
:id=
"id"
:style=
"
{ height: height }" class="pie-chart">
</div>
<div
class=
"center-content"
:style=
"
{ fontSize: size }">
<div
class=
"center-content"
:style=
"
{ fontSize: size }">
<div
:class=
"[id, 'center-content-num']"
></div>
<div
:class=
"[id, 'center-content-num']"
></div>
<div
class=
"center-content-desc"
>
{{
numDesc
}}
</div>
</div>
<div
class=
"content-desc"
>
<div
class=
"content-desc-icon"
:style=
"
{ background: descColor }">
</div>
{{
numDesc
}}
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -54,7 +57,8 @@ export default {
...
@@ -54,7 +57,8 @@ export default {
subtext
:
''
,
subtext
:
''
,
currentIndex
:
-
1
,
currentIndex
:
-
1
,
mainValue
:
0
,
mainValue
:
0
,
numDesc
:
''
numDesc
:
''
,
descColor
:
''
}
}
},
},
watch
:
{
watch
:
{
...
@@ -145,8 +149,10 @@ export default {
...
@@ -145,8 +149,10 @@ export default {
this
.
mTime
=
setInterval
(
this
.
pieActive
,
15000
)
this
.
mTime
=
setInterval
(
this
.
pieActive
,
15000
)
})
})
this
.
echartsPie
.
on
(
'mouseover'
,
data
=>
{
this
.
echartsPie
.
on
(
'mouseover'
,
data
=>
{
console
.
log
(
data
,
'data'
)
this
.
mainValue
=
data
.
data
.
value
this
.
mainValue
=
data
.
data
.
value
this
.
numDesc
=
data
.
data
.
name
this
.
numDesc
=
data
.
data
.
name
this
.
descColor
=
data
.
color
this
.
setAnamiteText
()
this
.
setAnamiteText
()
// 停止定时器,清除之前的高亮
// 停止定时器,清除之前的高亮
clearInterval
(
this
.
mTime
)
clearInterval
(
this
.
mTime
)
...
@@ -178,16 +184,18 @@ export default {
...
@@ -178,16 +184,18 @@ export default {
dataIndex
:
this
.
currentIndex
dataIndex
:
this
.
currentIndex
})
})
//高亮项this.currentIndex
//高亮项this.currentIndex
this
.
mainValue
=
this
.
option
.
series
[
0
].
data
[
this
.
currentIndex
].
value
this
.
mainValue
=
this
.
option
.
series
[
0
].
data
[
this
.
currentIndex
].
value
this
.
numDesc
=
this
.
option
.
series
[
0
].
data
[
this
.
currentIndex
].
name
this
.
numDesc
=
this
.
option
.
series
[
0
].
data
[
this
.
currentIndex
].
name
this
.
descColor
=
this
.
option
.
color
[
this
.
currentIndex
]
this
.
setAnamiteText
()
this
.
setAnamiteText
()
},
},
setAnamiteText
()
{
setAnamiteText
()
{
document
.
querySelector
(
`.
${
this
.
id
}
`
).
nextElementSibling
.
style
=
'animation-iteration-count:infinite;'
//
document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iteration-count:infinite;'
if
(
document
.
querySelector
(
`.
${
this
.
id
}
`
))
document
.
querySelector
(
`.
${
this
.
id
}
`
).
style
=
`--step:
${
this
.
mainValue
}
`
if
(
document
.
querySelector
(
`.
${
this
.
id
}
`
))
document
.
querySelector
(
`.
${
this
.
id
}
`
).
style
=
`--step:
${
this
.
mainValue
}
`
setTimeout
(()
=>
{
//
setTimeout(() => {
document
.
querySelector
(
`.
${
this
.
id
}
`
).
nextElementSibling
.
style
=
'animation-iteration-count:0'
//
document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iteration-count:0'
},
3000
)
//
}, 3000)
},
},
//高亮
//高亮
pieActive
()
{
pieActive
()
{
...
@@ -235,7 +243,26 @@ export default {
...
@@ -235,7 +243,26 @@ export default {
animation
:
rotateIn
3s
infinite
;
animation
:
rotateIn
3s
infinite
;
}
}
}
}
.pie-chart
{
.content-desc
{
display
:
flex
;
align-items
:
center
;
font-size
:
8px
;
color
:
#c8c8c8
;
text-align
:
center
;
font-weight
:
400
;
position
:
absolute
;
top
:
93%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
text-align
:
center
;
height
:
14px
!important
;
white-space
:
nowrap
;
&-icon
{
width
:
8px
;
height
:
4px
;
border-radius
:
2px
;
margin-right
:
4px
;
}
}
}
}
}
@property
--step
{
@property
--step
{
...
...
src/components/ViewTabs.vue
View file @
f5c2d8b
...
@@ -140,6 +140,7 @@ export default {
...
@@ -140,6 +140,7 @@ export default {
this
.
getOveralltrend
(
'total'
)
this
.
getOveralltrend
(
'total'
)
},
},
changeType
(
type
)
{
changeType
(
type
)
{
console
.
log
(
type
,
'type'
)
this
.
tabType
=
type
this
.
tabType
=
type
this
.
getOveralltrend
(
type
)
this
.
getOveralltrend
(
type
)
},
},
...
...
src/views/afterSales/efficient.vue
View file @
f5c2d8b
...
@@ -98,8 +98,8 @@ export default {
...
@@ -98,8 +98,8 @@ export default {
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
num
:
item
.
num
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
2
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
4
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
2
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
4
)
||
0
,
statDate
:
item
.
statDate
,
statDate
:
item
.
statDate
,
topList
:
topList
,
topList
:
topList
,
lastList
:
lastList
lastList
:
lastList
...
...
src/views/afterSales/file.vue
View file @
f5c2d8b
...
@@ -100,8 +100,8 @@ export default {
...
@@ -100,8 +100,8 @@ export default {
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
num
:
item
.
num
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
2
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
4
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
2
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
4
)
||
0
,
statDate
:
item
.
statDate
,
statDate
:
item
.
statDate
,
topList
:
topList
,
topList
:
topList
,
lastList
:
lastList
lastList
:
lastList
...
...
src/views/afterSales/first.vue
View file @
f5c2d8b
...
@@ -116,20 +116,20 @@ export default {
...
@@ -116,20 +116,20 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
num
:
item
.
num
||
0
,
rate
:
item
.
rate
.
toFixed
(
2
)
||
0
,
rate
:
item
.
rate
.
toFixed
(
4
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
2
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
4
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
2
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
4
)
||
0
,
statDate
:
item
.
statDate
,
statDate
:
item
.
statDate
,
topList
:
topList
,
topList
:
topList
,
lastList
:
lastList
lastList
:
lastList
...
...
src/views/afterSales/keep.vue
View file @
f5c2d8b
...
@@ -108,20 +108,20 @@ export default {
...
@@ -108,20 +108,20 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
num
:
item
.
num
||
0
,
rate
:
item
.
rate
.
toFixed
(
2
)
||
0
,
rate
:
item
.
rate
.
toFixed
(
4
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
2
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
4
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
2
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
4
)
||
0
,
statDate
:
item
.
statDate
,
statDate
:
item
.
statDate
,
topList
:
topList
,
topList
:
topList
,
lastList
:
lastList
lastList
:
lastList
...
...
src/views/afterSales/lost.vue
View file @
f5c2d8b
...
@@ -108,20 +108,20 @@ export default {
...
@@ -108,20 +108,20 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
num
:
item
.
num
||
0
,
rate
:
item
.
rate
.
toFixed
(
2
)
||
0
,
rate
:
item
.
rate
.
toFixed
(
4
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
2
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
4
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
2
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
4
)
||
0
,
statDate
:
item
.
statDate
,
statDate
:
item
.
statDate
,
topList
:
topList
,
topList
:
topList
,
lastList
:
lastList
lastList
:
lastList
...
...
src/views/afterSales/sadayasu.vue
View file @
f5c2d8b
...
@@ -116,20 +116,20 @@ export default {
...
@@ -116,20 +116,20 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
topTempList
[
item
].
rate
?
topTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
2
)
+
'%'
:
'- -'
value
:
lastTempList
[
item
].
rate
?
lastTempList
[
item
].
rate
.
toFixed
(
4
)
+
'%'
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
num
:
item
.
num
||
0
,
rate
:
item
.
rate
.
toFixed
(
2
)
||
0
,
rate
:
item
.
rate
.
toFixed
(
4
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
2
)
||
0
,
hrate
:
item
.
hrate
.
toFixed
(
4
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
2
)
||
0
,
trate
:
item
.
trate
.
toFixed
(
4
)
||
0
,
statDate
:
item
.
statDate
,
statDate
:
item
.
statDate
,
topList
:
topList
,
topList
:
topList
,
lastList
:
lastList
lastList
:
lastList
...
...
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