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 8cd7b357
authored
Jul 07, 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
eb97fa86
df8ac0d8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
97 deletions
src/assets/css/index.scss
src/components/LineChart.vue
src/components/PieChart.vue
src/views/afterSales/analyze.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/assets/css/index.scss
View file @
8cd7b35
...
...
@@ -84,7 +84,7 @@ img {
}
.title
{
font-size
:
12px
;
font-size
:
0
.75vw
;
color
:
#e8e8e8
;
// line-height: 2.1vh;
font-weight
:
400
;
...
...
src/components/LineChart.vue
View file @
8cd7b35
...
...
@@ -213,8 +213,8 @@ p {
.line-item
{
height
:
1.8vh
;
width
:
100%
;
font-size
:
10px
;
padding-bottom
:
0.
6
vh
;
font-size
:
0.55vw
;
padding-bottom
:
0.
3
vh
;
}
.line-item
:last-of-type
{
padding-bottom
:
0
;
...
...
src/components/PieChart.vue
View file @
8cd7b35
...
...
@@ -202,7 +202,7 @@ document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iter
<
style
lang=
"scss"
scoped
>
.pie-box
{
background
:
#262525
;
//
background
:
#262525
;
position
:
relative
;
flex
:
1
;
.center-content
{
...
...
src/views/afterSales/analyze.vue
View file @
8cd7b35
...
...
@@ -10,10 +10,10 @@
<div
class=
"title"
>
售后客户价值分析
</div>
<template
v-if=
"barData.length > 0"
>
<div
class=
"analyze-content"
:style=
"
{ height: height - 5 + 'vh' }">
<div
class=
"content-left
bg
"
>
<div
class=
"content-left"
>
<div
id=
"analyzeBar"
style=
"height: 100%"
></div>
</div>
<div
class=
"contetn-right
bg
"
>
<div
class=
"contetn-right"
>
<pie-chart
:id=
"chart.id"
:list=
"analyzeData"
:height=
"height - 5 + 'vh'"
:radius=
"chart.radius"
:size=
"chart.size"
></pie-chart>
</div>
</div>
...
...
src/views/afterSales/first.vue
View file @
8cd7b35
...
...
@@ -38,6 +38,10 @@ export default {
queryType
:
0
,
tooltipFormatterObj
:
[
{
label
:
'回店数'
,
attrName
:
'num'
},
{
label
:
'回店率'
,
attrName
:
'rate'
,
addSymbol
:
'%'
...
...
src/views/afterSales/keep.vue
View file @
8cd7b35
...
...
@@ -39,6 +39,10 @@ export default {
dataList
:
[],
tooltipFormatterObj
:
[
{
label
:
'保持数'
,
attrName
:
'num'
},
{
label
:
'保持率'
,
attrName
:
'rate'
,
addSymbol
:
'%'
...
...
@@ -56,7 +60,7 @@ export default {
]
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
...
...
src/views/afterSales/lost.vue
View file @
8cd7b35
...
...
@@ -37,27 +37,30 @@ export default {
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
dataList
:
[],
tooltipFormatterObj
:
[
{
label
:
'流失率'
,
attrName
:
'rate'
,
addSymbol
:
'%'
},
{
label
:
'环比'
,
attrName
:
'hrate'
,
addSymbol
:
'%'
},
{
label
:
'同比'
,
attrName
:
'trate'
,
addSymbol
:
'%'
}
]
tooltipFormatterObj
:
[
{
label
:
'流失数'
,
attrName
:
'num'
},
{
label
:
'流失率'
,
attrName
:
'rate'
,
addSymbol
:
'%'
},
{
label
:
'环比'
,
attrName
:
'hrate'
,
addSymbol
:
'%'
},
{
label
:
'同比'
,
attrName
:
'trate'
,
addSymbol
:
'%'
}
]
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
...
...
src/views/afterSales/sadayasu.vue
View file @
8cd7b35
...
...
@@ -15,7 +15,15 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"sadayasuChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
:queryType=
"queryType"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"sadayasuChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -38,6 +46,10 @@ export default {
queryType
:
0
,
tooltipFormatterObj
:
[
{
label
:
'回店数'
,
attrName
:
'num'
},
{
label
:
'回店率'
,
attrName
:
'rate'
,
addSymbol
:
'%'
...
...
@@ -56,7 +68,7 @@ export default {
dataList
:
[]
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
...
...
src/views/salesData/flow.vue
View file @
8cd7b35
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-0
5 17:16:2
3
* @LastEditTime: 2022-07-0
7 17:27:5
3
-->
<
template
>
<div>
...
...
@@ -119,7 +119,7 @@ export default {
res
.
data
.
dataList
[
0
].
num
.
forEach
((
item
,
index
)
=>
{
this
.
funnelData
[
index
].
num
=
item
})
this
.
hasData
=
res
.
data
.
dataList
[
0
].
num
.
every
(
i
=>
i
!
=
0
)
this
.
hasData
=
!
res
.
data
.
dataList
[
0
].
num
.
every
(
i
=>
i
=
=
0
)
if
(
this
.
hasData
)
this
.
draw
()
}
else
{
this
.
hasData
=
false
...
...
@@ -159,7 +159,8 @@ export default {
gap
:
2
,
label
:
{
show
:
true
,
position
:
'inside'
position
:
'inside'
,
color
:
'#fff'
},
labelLine
:
{
length
:
10
,
...
...
@@ -187,7 +188,6 @@ export default {
'mouseover'
,
utils
.
debounce
(
data
=>
{
this
.
getSaleTrans
(
this
.
paramsData
,
data
.
data
.
type
)
this
.
isActive
=
1
}),
1000
/
60
)
...
...
@@ -225,8 +225,7 @@ export default {
})
}
}
this
.
flowData
=
this
.
topList
this
.
flowData
=
this
.
isActive
==
1
?
this
.
topList
:
this
.
lastList
})
},
// 切换品牌排序
...
...
@@ -303,7 +302,6 @@ export default {
width
:
100%
;
box-sizing
:
border-box
;
//
height
:
11.7vh
;
background-color
:
#262525
;
padding
:
0
25px
;
}
</
style
>
src/views/salesData/trend.vue
View file @
8cd7b35
...
...
@@ -3,28 +3,16 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-0
4 18:25:19
* @LastEditTime: 2022-07-0
6 15:07:56
-->
<
template
>
<div>
<div
class=
"title"
>
转化趋势
</div>
<div
v-show=
"hasData"
class=
"linetrend-box"
>
<div
id=
"lineTrend"
:style=
"
{ height: height - 4.1 + 'vh' }"
>
</div>
<div
v-show=
"hasData"
class=
"linetrend-box"
>
<div
id=
"lineTrend"
:style=
"
{ height: height - 4.1 + 'vh' }">
</div>
</div>
<div
v-show=
"!hasData"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
<div
v-show=
"!hasData"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
</div>
</
template
>
...
...
@@ -36,7 +24,7 @@ export default {
name
:
'Trend'
,
props
:
[
'height'
],
mixins
:
[
changeMixin
],
data
()
{
data
()
{
return
{
echartsTrend
:
{},
option
:
{},
...
...
@@ -46,17 +34,17 @@ export default {
hasData
:
true
}
},
mounted
()
{
mounted
()
{
this
.
echartsTrend
=
echarts
.
init
(
document
.
getElementById
(
'lineTrend'
))
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
echartsTrend
.
resize
()
})
},
methods
:
{
init
(
val
)
{
init
(
val
)
{
this
.
getChartData
(
val
)
},
getChartData
(
val
)
{
getChartData
(
val
)
{
var
params
=
{
req
:
{
// queryItem: 'enter',
...
...
@@ -76,8 +64,8 @@ export default {
.
then
(
res
=>
{
resolve
(
res
.
data
.
dataList
)
})
.
catch
(
()
=>
{
reject
()
.
catch
(
err
=>
{
reject
(
err
)
})
})
})
...
...
@@ -98,7 +86,7 @@ export default {
this
.
hasData
=
false
})
},
draw
(
reportType
)
{
draw
(
reportType
)
{
this
.
option
=
{
tooltip
:
{
trigger
:
'axis'
,
...
...
@@ -106,39 +94,6 @@ export default {
borderWidth
:
0
,
backgroundColor
:
'rgba(68,68,68,0.80)'
,
confine
:
true
,
// position: (point, params, dom, rect, size) => {
// var x = 0 // x坐标位置
// var y = 0 // y坐标位置
// // 当前鼠标位置
// var pointX = point[0]
// var pointY = point[1]
// // 外层div大小
// // var viewWidth = size.viewSize[0];
// // var viewHeight = size.viewSize[1];
// // 提示框大小
// var boxWidth = size.contentSize[0]
// var boxHeight = size.contentSize[1]
// // boxWidth > pointX 说明鼠标左边放不下提示框
// if (boxWidth > pointX) {
// x = 5
// } else {
// // 左边放的下
// x = pointX - boxWidth
// }
// // boxHeight > pointY 说明鼠标上边放不下提示框
// if (boxHeight > pointY) {
// y = 5
// } else {
// // 上边放得下
// y = pointY - boxHeight
// }
// return [x, y]
// },
textStyle
:
{
color
:
'#FFFFFF'
,
fontSize
:
8
...
...
@@ -149,15 +104,12 @@ export default {
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
+
'<br />'
})
return
txt
}
},
color
:
[
'#4FA0FF'
,
'#
7CFFB2'
,
'#FDF006'
,
'#EB6001'
,
'#F5AA01'
,
'#BF98FF'
,
'#58D9F9
'
],
color
:
[
'#4FA0FF'
,
'#
FF6E76'
,
'#7CFFB2'
,
'#FDF006'
,
'#EB6001
'
],
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
...
...
@@ -180,7 +132,7 @@ export default {
color
:
'#606266'
}
},
splitNumber
:
3
splitNumber
:
4
},
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