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 e86627b6
authored
Jul 11, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_v1.0.0' into v1.1.0
2 parents
2dc8cd1d
105b5353
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
116 additions
and
89 deletions
src/components/LineChart.vue
src/components/ViewTabs.vue
src/components/ViewTitle.vue
src/views/afterSales/analyze.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/mileage.vue
src/views/afterSales/sadayasu.vue
src/views/salesData/flow.vue
src/views/salesData/trend.vue
src/components/LineChart.vue
View file @
e86627b
...
...
@@ -110,24 +110,36 @@ export default {
this
[
this
.
domId
].
resize
()
})
// 鼠标划入
this
[
this
.
domId
].
on
(
'mouseover'
,
data
=>
{
this
.
moveAttr
.
dataIndex
=
data
.
dataIndex
this
.
getRankList
(
this
.
moveAttr
.
dataIndex
,
this
.
rankFlag
+
'List'
)
})
// this[this.domId].on('mouseover', data => {
// console.log(data,'data')
// this.moveAttr.dataIndex = data.dataIndex
// console.log(2222222222)
// this.getRankList(this.moveAttr.dataIndex, this.rankFlag + 'List')
// })
// 绑定点击事件
this
[
this
.
domId
].
getZr
().
on
(
'mouse
over
'
,
params
=>
{
this
[
this
.
domId
].
getZr
().
on
(
'mouse
move
'
,
params
=>
{
const
pointInPixel
=
[
params
.
offsetX
,
params
.
offsetY
]
if
(
this
[
this
.
domId
].
containPixel
(
'grid'
,
pointInPixel
))
{
this
[
this
.
domId
].
getZr
().
setCursorStyle
(
'pointer'
)
var
xIndex
=
this
[
this
.
domId
].
convertFromPixel
({
seriesIndex
:
0
},
[
params
.
offsetX
,
params
.
offsetY
])[
0
]
/* 事件处理代码书写位置 */
this
.
moveAttr
.
dataIndex
=
xIndex
this
.
getRankList
(
this
.
moveAttr
.
dataIndex
,
this
.
rankFlag
+
'List'
)
}
})
this
[
this
.
domId
].
on
(
'mouseout'
,
params
=>
{
var
pointInPixel
=
[
params
.
offsetX
,
params
.
offsetY
]
if
(
!
this
[
this
.
domId
].
containPixel
(
'grid'
,
pointInPixel
))
{
this
[
this
.
domId
].
getZr
().
setCursorStyle
(
'default'
)
}
})
// 移除图表
// this[this.domId].on('globalout', () => {
// this.chartAction()
// })
this
[
this
.
domId
].
on
(
'globalout'
,
()
=>
{
// this.chartAction()
this
.
getRankList
(
this
.
dataList
.
length
-
1
,
this
.
rankFlag
+
'List'
)
})
},
// chartAction(type) {
// this[this.domId].dispatchAction({
...
...
@@ -149,7 +161,7 @@ export default {
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
// 默认展示tooltip
// this.chartAction()
this
.
getRankList
(
0
)
this
.
getRankList
(
this
.
dataList
.
length
-
1
)
},
handleRankChange
(
value
)
{
this
.
rankFlag
=
value
...
...
src/components/ViewTabs.vue
View file @
e86627b
<
template
>
<div
class=
"tabs"
>
<div
class=
"tab pointer"
>
<div
class=
"tab-left box"
@
click=
"changeType('total')"
>
<div
class=
"tab-left box"
@
click=
"changeType('total')"
>
<div
class=
"tab-total-box"
>
<div
class=
"total-title-box flex"
>
<div
class=
"title inline total"
>
客户总数
</div>
<div
class=
"title inline"
>
{{
req
.
queryType
==
0
?
'上月'
:
'昨日'
}}
新增
</div>
<div
class=
"title inline"
>
{{
req
.
queryType
==
0
?
'上月'
:
'昨日'
}}
到店
</div>
<div
class=
"title inline"
>
{{
req
.
queryType
==
0
?
'上月'
:
'昨日'
}}
新增
</div>
<div
class=
"title inline"
>
{{
req
.
queryType
==
0
?
'上月'
:
'昨日'
}}
到店
</div>
</div>
<div
class=
"total-number-box flex"
>
<transition-number
:num=
"pageData.total.totalNum"
idKey=
"number-total"
class=
"number-total"
/>
<transition-number
:num=
"pageData.total.incrNum"
idKey=
"number-incr"
/>
<transition-number
:num=
"pageData.total.returnNum"
idKey=
"number-return"
/>
<transition-number
:num=
"pageData.total.totalNum"
idKey=
"number-total"
class=
"number-total"
/>
<transition-number
:num=
"pageData.total.incrNum"
idKey=
"number-incr"
/>
<transition-number
:num=
"pageData.total.returnNum"
idKey=
"number-return"
/>
</div>
</div>
</div>
<div
class=
"tab-right box"
>
<template
v-for=
"(i,index) in tabs"
>
<div
:key=
"index"
class=
"item flex"
@
click=
"changeType(i.key)"
>
<div
class=
"item-title"
>
{{
i
.
title
}}
</div>
<transition-number
:num=
"pageData[i.key].totalNum"
:idKey=
"`number-$
{i.key}`"
class="item-total"
/>
<div
:class=
"['item-incr flex',
{'up':pageData[i.key].up},{'down':pageData[i.key].down}]">
{{
req
.
queryType
==
0
?
'上月'
:
'昨日'
}}
<template
v-for=
"(i, index) in tabs"
>
<div
:key=
"index"
class=
"item flex"
@
click=
"changeType(i.key)"
>
<div
class=
"item-title"
>
{{
i
.
title
}}
</div>
<transition-number
:num=
"pageData[i.key].totalNum"
:idKey=
"`number-$
{i.key}`" class="item-total" />
<div
:class=
"['item-incr flex',
{ up: pageData[i.key].up }, { down: pageData[i.key].down }]">
{{
req
.
queryType
==
0
?
'上月'
:
'昨日'
}}
<template
v-if=
"pageData[i.key].up || pageData[i.key].down"
>
<div
class=
"arrow"
></div>
</
template
>
<transition-number
:num=
"pageData[i.key].incrNum"
:idKey=
"`number-incr-${i.key}`"
class=
"item-incr-numer"
/>
<transition-number
:num=
"pageData[i.key].incrNum"
:idKey=
"`number-incr-${i.key}`"
class=
"item-incr-numer"
/>
</div>
</div>
</template>
</div>
</div>
<div
class=
"tabs-content box"
>
<div
class=
"tabs-title"
>
客户增长趋势
</div>
<div
class=
"tabs-title title-icon"
>
<span
class=
"icon"
></span>
<span>
客户增长趋势
</span>
</div>
<div
class=
"tabs-content-chart flex"
>
<div
class=
"line flex"
>
<
template
v-if=
"flag"
>
...
...
@@ -67,40 +45,26 @@
</div>
</
template
>
<
template
v-else
>
<div
ref=
"canvas"
class=
"canvas"
></div>
<div
ref=
"canvas"
class=
"canvas"
></div>
</
template
>
</template>
</div>
<div
class=
"table user-select pointer"
>
<div
class=
"table-head"
>
<
template
v-for=
"(i,index) in tabHead"
>
<div
:class=
"['table-head-item flex',
{'active':index == tabIndex}]"
:key="index"
@click="tabIndex = index"
>
{{
i
}}
<
template
v-for=
"(i, index) in tabHead"
>
<div
:class=
"['table-head-item flex',
{ active: index == tabIndex }]" :key="index" @click="tabIndex = index">
{{
i
}}
</div>
</
template
>
</div>
<div
class=
"table-body flex"
>
<
template
v-for=
"(i,index) in tabIndex == 0 ? pageData[tabType].top : pageData[tabType].last"
>
<div
class=
"table-body-item flex"
:key=
"index"
>
<div
class=
"table-num flex"
>
{{
index
+
1
}}
</div>
<
template
v-for=
"(i, index) in tabIndex == 0 ? pageData[tabType].top : pageData[tabType].last"
>
<div
class=
"table-body-item flex"
:key=
"index"
>
<div
class=
"table-num flex"
>
{{
index
+
1
}}
</div>
<div
class=
"table-key"
>
<marquee
:direction=
"directionTimer"
:delay=
"delayTimer"
:text=
"i.name"
/>
<marquee
:direction=
"directionTimer"
:delay=
"delayTimer"
:text=
"i.name"
/>
</div>
<div
class=
"table-value"
>
{{
i
.
num
}}
</div>
<div
class=
"table-value"
>
{{
i
.
num
}}
</div>
</div>
</
template
>
</div>
...
...
@@ -429,12 +393,14 @@ export default {
&-numer
{
font-size
:
10px
;
color
:
#fff
;
margin-left
:
2px
;
}
.arrow
{
border-top
:
2.5px
solid
transparent
;
border-right
:
2.5px
solid
transparent
;
border-bottom
:
2.5px
solid
transparent
;
border-left
:
2.5px
solid
transparent
;
margin-left
:
2px
;
}
}
.up
{
...
...
@@ -443,6 +409,7 @@ export default {
}
.item-incr-numer
{
color
:
#e60115
;
margin-left
:
2px
;
}
}
.down
{
...
...
@@ -451,6 +418,7 @@ export default {
}
.item-incr-numer
{
color
:
#00b900
;
margin-left
:
2px
;
}
}
>
div
{
...
...
src/components/ViewTitle.vue
View file @
e86627b
...
...
@@ -56,7 +56,8 @@ export default {
color
:
transparent
;
background
:
linear-gradient
(
left
,
#e60115
10%
,
#eb6001
25%
,
#f5aa01
50%
,
#fdf006
100%
);
-webkit-background-clip
:
text
;
font-size
:
24px
;
font-size
:
22px
;
font-weight
:
600
;
&::before
{
content
:
''
;
display
:
block
;
...
...
src/views/afterSales/analyze.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
售后客户价值分析
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
售后客户价值分析
</span>
</div>
<template
v-if=
"barData.length > 0"
>
<div
class=
"analyze-content"
:style=
"
{ height: height - 5 + 'vh' }">
<div
class=
"content-left"
>
...
...
@@ -38,7 +41,7 @@ export default {
chart
:
{
id
:
'analyzePie'
,
radius
:
[
'60%'
,
'78%'
],
size
:
'0.8vw'
size
:
'0.8vw'
},
barChart
:
''
,
option
:
{},
...
...
src/views/afterSales/efficient.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
有效客户
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
有效客户
</span>
</div>
<div
v-if=
"!dataList.length"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
...
...
src/views/afterSales/file.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
售后档案客户
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
售后档案客户
</span>
</div>
<div
v-if=
"!dataList.length"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
...
...
src/views/afterSales/first.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
首保回店
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
首保回店
</span>
</div>
<div
v-if=
"!dataList.length"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
...
...
@@ -15,7 +18,15 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"firstChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
:queryType=
"queryType"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"firstChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -60,7 +71,7 @@ export default {
dataList
:
[]
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
...
...
src/views/afterSales/keep.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
客户保持
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
客户保持
</span>
</div>
<div
v-if=
"!dataList.length"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
...
...
src/views/afterSales/lost.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
客户流失
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
客户流失
</span>
</div>
<div
v-if=
"!dataList.length"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
...
...
src/views/afterSales/mileage.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
售后车辆里程
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
售后车辆里程
</span>
</div>
<template
v-if=
"mileageData.length > 0"
>
<div
class=
"flex container"
>
<pie-chart
:id=
"chart.id"
:list=
"mileageData"
:height=
"height - 5 + 'vh'"
:radius=
"chart.radius"
@
pieAction=
"pieAction"
:size=
"chart.size"
></pie-chart>
...
...
src/views/afterSales/sadayasu.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
定保回店
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
定保回店
</span>
</div>
<div
v-if=
"!dataList.length"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
...
...
src/views/salesData/flow.vue
View file @
e86627b
...
...
@@ -9,7 +9,10 @@
<div>
<div
v-show=
"hasData"
class=
"flow-box"
>
<div
class=
"flow-left"
>
<div
class=
"title inline"
style=
"padding-left: 0"
>
客流转化
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
客流转化
</span>
</div>
<div
class=
"chart-box"
>
<div
id=
"flow"
:style=
"
{ height: height - 4.1 + 'vh' }">
</div>
</div>
...
...
@@ -31,7 +34,10 @@
</div>
</div>
<div
v-show=
"!hasData"
>
<div
class=
"title"
>
客流转化
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
客流转化
</span>
</div>
<div
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
...
...
@@ -240,11 +246,14 @@ export default {
<
style
lang=
"scss"
scoped
>
.flow-box
{
display
:
flex
;
padding
:
0
8px
1vh
;
padding
:
0
8px
1vh
0
;
box-sizing
:
border-box
;
.flow-left
{
padding-bottom
:
0.9vh
;
width
:
50%
;
.title
{
text-align
:
left
;
}
}
.flow-right
{
flex
:
1
;
...
...
@@ -269,13 +278,15 @@ export default {
}
.ranking-content
{
background-color
:
#262525
;
padding
:
0.4vh
0
;
}
.ranking-item
{
display
:
flex
;
width
:
100%
;
align-items
:
center
;
line-height
:
2.1vh
;
height
:
2.1vh
;
line-height
:
2.2vh
;
height
:
2.2vh
;
.ranking-sort
{
display
:
inline-block
;
width
:
0.3vw
;
...
...
src/views/salesData/trend.vue
View file @
e86627b
...
...
@@ -7,7 +7,10 @@
-->
<
template
>
<div>
<div
class=
"title"
>
转化趋势
</div>
<div
class=
"title title-icon"
>
<span
class=
"icon"
></span>
<span>
转化趋势
</span>
</div>
<div
v-show=
"hasData"
class=
"linetrend-box"
>
<div
id=
"lineTrend"
:style=
"
{ height: height - 4.1 + 'vh' }">
</div>
</div>
...
...
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