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 fb803fe2
authored
Jul 04, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_v1.0.0' of
http://192.168.3.233:8090/gh/data-view
into dev_v1.0.0
2 parents
f31b7a68
edf15d3c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
74 additions
and
60 deletions
src/components/LineChart.vue
src/components/ViewTitle.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/views/salesData/flow.vue
src/views/salesData/trend.vue
src/components/LineChart.vue
View file @
fb803fe
...
...
@@ -97,7 +97,6 @@ export default {
},
tooltipFormatter
(
obj
)
{
var
currentItem
=
this
.
dataList
[
obj
[
0
].
dataIndex
]
console
.
log
(
currentItem
,
'currentItem'
)
var
txt
=
''
txt
=
currentItem
.
statDate
this
.
tooltipFormatterObj
.
forEach
(
item
=>
{
...
...
@@ -133,18 +132,18 @@ export default {
})
// 移除图表
this
[
this
.
domId
].
on
(
'globalout'
,
()
=>
{
this
.
chartAction
()
})
//
this[this.domId].on('globalout', () => {
//
this.chartAction()
//
})
},
chartAction
(
type
)
{
this
[
this
.
domId
].
dispatchAction
({
type
:
type
||
'showTip'
,
seriesIndex
:
+
this
.
moveAttr
.
seriesIndex
,
dataIndex
:
+
this
.
moveAttr
.
dataIndex
})
},
//
chartAction(type) {
//
this[this.domId].dispatchAction({
//
type: type || 'showTip',
//
seriesIndex: +this.moveAttr.seriesIndex,
//
dataIndex: +this.moveAttr.dataIndex
//
})
//
},
getRankList
(
idx
,
attrName
=
'topList'
)
{
this
.
dataList
[
idx
][
attrName
].
length
?
this
.
$set
(
this
,
'rankList'
,
this
.
dataList
[
idx
][
attrName
])
:
this
.
resetRankList
()
...
...
@@ -162,7 +161,7 @@ export default {
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
// 默认展示tooltip
this
.
chartAction
()
//
this.chartAction()
this
.
getRankList
(
0
)
},
...
...
@@ -242,4 +241,18 @@ p {
}
}
}
::v-deep
.line-chart
{
width
:
100%
;
height
:
100%
;
div
{
&:nth-child(1)
{
width
:
100%
!important
;
height
:
100%
!important
;
canvas
{
width
:
100%
!important
;
height
:
100%
!important
;
}
}
}
}
</
style
>
src/components/ViewTitle.vue
View file @
fb803fe
...
...
@@ -13,7 +13,7 @@
src=
"@/assets/images/time.svg"
class=
"icon"
/>
{{
now
}}
<div
class=
"now"
>
{{
now
}}
</div>
</div>
<div
class=
"bottom flex"
>
<div
class=
"merchant"
>
已同步门店数:68
</div>
...
...
src/components/lineOptions.js
View file @
fb803fe
...
...
@@ -10,7 +10,6 @@ function getLineOptions(obj) {
color
:
'#FFFFFF'
,
fontSize
:
'8px'
},
extraCssText
:
'width: 100px;'
,
formatter
:
tooltipFormatter
||
''
},
grid
:
{
...
...
@@ -34,7 +33,8 @@ function getLineOptions(obj) {
lineStyle
:
{
color
:
'#606266'
}
}
},
splitNumber
:
3
},
series
:
[
{
...
...
src/views/afterSales/efficient.vue
View file @
fb803fe
...
...
@@ -84,13 +84,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
this
.
dataList
.
push
({
...
...
src/views/afterSales/file.vue
View file @
fb803fe
...
...
@@ -86,13 +86,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
this
.
dataList
.
push
({
...
...
src/views/afterSales/first.vue
View file @
fb803fe
...
...
@@ -101,13 +101,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
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
=>
{
lastList
.
push
({
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
value
:
lastTempList
[
item
].
num
?
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
:
'- -'
})
})
this
.
dataList
.
push
({
...
...
src/views/afterSales/keep.vue
View file @
fb803fe
...
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</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>
</
template
>
...
...
@@ -101,13 +101,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
this
.
dataList
.
push
({
...
...
src/views/afterSales/lost.vue
View file @
fb803fe
...
...
@@ -37,23 +37,24 @@ export default {
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
dataList
:
[],
tooltipFormatterObj
:[
{
label
:
'流失率'
,
attrName
:
'rate'
,
addSymbol
:
'%'
},
{
label
:
'环比'
,
attrName
:
'hrate'
,
addSymbol
:
'%'
},
{
label
:
'同比'
,
attrName
:
'trate'
,
addSymbol
:
'%'
}
]
tooltipFormatterObj
:
[
{
label
:
'流失率'
,
attrName
:
'rate'
,
addSymbol
:
'%'
},
{
label
:
'环比'
,
attrName
:
'hrate'
,
addSymbol
:
'%'
},
{
label
:
'同比'
,
attrName
:
'trate'
,
addSymbol
:
'%'
}
]
}
},
mounted
()
{
},
...
...
@@ -101,13 +102,13 @@ export default {
Object
.
keys
(
topTempList
).
forEach
(
item
=>
{
topList
.
push
({
label
:
item
,
value
:
t
his
.
numAddSymbol
(
topTempList
[
item
])
value
:
t
opTempList
[
item
]
?
this
.
numAddSymbol
(
topTempList
[
item
])
:
'- -'
})
})
Object
.
keys
(
lastTempList
).
forEach
(
item
=>
{
lastList
.
push
({
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
])
value
:
lastTempList
[
item
]
?
this
.
numAddSymbol
(
lastTempList
[
item
])
:
'- -'
})
})
this
.
dataList
.
push
({
...
...
src/views/afterSales/sadayasu.vue
View file @
fb803fe
...
...
@@ -84,13 +84,13 @@ 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
=>
{
lastList
.
push
({
label
:
item
,
value
:
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
value
:
lastTempList
[
item
].
num
?
this
.
numAddSymbol
(
lastTempList
[
item
].
num
)
:
'- -'
})
})
this
.
dataList
.
push
({
...
...
src/views/salesData/flow.vue
View file @
fb803fe
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-04 1
7:32:35
* @LastEditTime: 2022-07-04 1
8:39:00
-->
<
template
>
<div>
...
...
@@ -183,15 +183,13 @@ export default {
]
}
this
.
echartsFunnel
.
setOption
(
this
.
option
)
// 鼠标划入
utils
.
debounce
(
this
.
echartsFunnel
.
on
(
'mouseover'
,
data
=>
{
this
.
echartsFunnel
.
on
(
'mouseover'
,
utils
.
debounce
(
data
=>
{
this
.
getSaleTrans
(
this
.
paramsData
,
data
.
data
.
type
)
})
}),
1000
/
60
)
// this.echartsFunnel.on('mouseover', data => {
// this.getSaleTrans(this.paramsData, data.data.type)
// })
},
getSaleTrans
(
val
,
queryItem
=
'enter'
)
{
const
params
=
{
...
...
src/views/salesData/trend.vue
View file @
fb803fe
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-04 1
7:40:52
* @LastEditTime: 2022-07-04 1
8:25:19
-->
<
template
>
<div>
...
...
@@ -132,12 +132,14 @@ export default {
},
extraCssText
:
'width: 80px;'
,
formatter
:
e
=>
{
var
txt
=
''
const
index
=
e
[
0
].
dataIndex
const
date
=
this
.
dataList
[
0
][
index
].
statDate
var
txt
=
date
+
'<br />'
e
.
forEach
(
item
=>
{
if
(
txt
)
{
txt
=
txt
+
'<br />'
}
txt
=
txt
+
item
.
seriesName
+
':'
+
item
.
value
//
if (txt) {
//
txt = txt + '<br />'
//
}
txt
=
txt
+
item
.
seriesName
+
':'
+
item
.
value
+
'<br />'
})
return
txt
}
...
...
@@ -165,7 +167,7 @@ export default {
color
:
'#606266'
}
},
splitNumber
:
4
splitNumber
:
3
},
series
:
[
{
...
...
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