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 d122a3d2
authored
Jul 04, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
折线图-前5/后5
1 parent
beb57e01
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
27 deletions
src/components/LineChart.vue
src/components/lineOptions.js
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 @
d122a3d
...
@@ -133,18 +133,18 @@ export default {
...
@@ -133,18 +133,18 @@ export default {
})
})
// 移除图表
// 移除图表
this
[
this
.
domId
].
on
(
'globalout'
,
()
=>
{
//
this[this.domId].on('globalout', () => {
this
.
chartAction
()
//
this.chartAction()
})
//
})
},
},
chartAction
(
type
)
{
//
chartAction(type) {
this
[
this
.
domId
].
dispatchAction
({
//
this[this.domId].dispatchAction({
type
:
type
||
'showTip'
,
//
type: type || 'showTip',
seriesIndex
:
+
this
.
moveAttr
.
seriesIndex
,
//
seriesIndex: +this.moveAttr.seriesIndex,
dataIndex
:
+
this
.
moveAttr
.
dataIndex
//
dataIndex: +this.moveAttr.dataIndex
})
//
})
},
//
},
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
()
...
@@ -163,7 +163,7 @@ export default {
...
@@ -163,7 +163,7 @@ export default {
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
// 默认展示tooltip
// 默认展示tooltip
this
.
chartAction
()
//
this.chartAction()
this
.
getRankList
(
0
)
this
.
getRankList
(
0
)
},
},
...
...
src/components/lineOptions.js
View file @
d122a3d
...
@@ -10,7 +10,6 @@ function getLineOptions(obj) {
...
@@ -10,7 +10,6 @@ function getLineOptions(obj) {
color
:
'#FFFFFF'
,
color
:
'#FFFFFF'
,
fontSize
:
'8px'
fontSize
:
'8px'
},
},
extraCssText
:
'width: 100px;'
,
formatter
:
tooltipFormatter
||
''
formatter
:
tooltipFormatter
||
''
},
},
grid
:
{
grid
:
{
...
@@ -34,7 +33,8 @@ function getLineOptions(obj) {
...
@@ -34,7 +33,8 @@ function getLineOptions(obj) {
lineStyle
:
{
lineStyle
:
{
color
:
'#606266'
color
:
'#606266'
}
}
}
},
splitNumber
:
4
},
},
series
:
[
series
:
[
{
{
...
...
src/views/afterSales/efficient.vue
View file @
d122a3d
...
@@ -84,13 +84,13 @@ export default {
...
@@ -84,13 +84,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
...
...
src/views/afterSales/file.vue
View file @
d122a3d
...
@@ -86,13 +86,13 @@ export default {
...
@@ -86,13 +86,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
...
...
src/views/afterSales/first.vue
View file @
d122a3d
...
@@ -101,13 +101,13 @@ export default {
...
@@ -101,13 +101,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
topTempList
[
item
].
num
?
this
.
numAddSymbol
(
topTempList
[
item
].
num
):
'- -'
value
:
topTempList
[
item
].
num
?
this
.
numAddSymbol
(
topTempList
[
item
].
num
)
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
value
:
lastTempList
[
item
].
num
?
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
...
...
src/views/afterSales/keep.vue
View file @
d122a3d
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"keepChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:queryType=
"queryType"
:tooltipFormatterObj=
"tooltipFormatterObj"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"keepChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -101,13 +101,13 @@ export default {
...
@@ -101,13 +101,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
...
...
src/views/afterSales/lost.vue
View file @
d122a3d
...
@@ -37,7 +37,8 @@ export default {
...
@@ -37,7 +37,8 @@ export default {
storeOrBrandTxt
:
'品牌'
,
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
queryType
:
0
,
dataList
:
[],
dataList
:
[],
tooltipFormatterObj
:[
tooltipFormatterObj
:
[
{
{
label
:
'流失率'
,
label
:
'流失率'
,
attrName
:
'rate'
,
attrName
:
'rate'
,
...
@@ -101,13 +102,13 @@ export default {
...
@@ -101,13 +102,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
...
...
src/views/afterSales/sadayasu.vue
View file @
d122a3d
...
@@ -84,13 +84,13 @@ export default {
...
@@ -84,13 +84,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
topList
.
push
({
label
:
item
,
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
].
num
)
value
:
t
opTempList
[
item
].
num
?
this
.
numAddSymbol
(
topTempList
[
item
].
num
)
:
'- -'
})
})
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
lastList
.
push
({
label
:
item
,
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
value
:
lastTempList
[
item
].
num
?
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
:
'- -'
})
})
})
})
this
.
dataList
.
push
({
this
.
dataList
.
push
({
...
...
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