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 9371579a
authored
Jun 29, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
4cb04bd9
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
66 additions
and
41 deletions
src/api/modules/afterSales.js
src/assets/css/index.scss
src/components/PieChart.vue
src/components/RanKing.vue
src/views/afterSales/analyze.vue
src/views/afterSales/file.vue
src/views/afterSales/mileage.vue
src/views/salesData/customerCategory.vue
src/views/salesData/enterCategory.vue
src/views/salesData/flow.vue
src/views/salesData/infoFrom.vue
src/api/modules/afterSales.js
View file @
9371579
/*
* @Description: 售后数据
* @Author: huyue
* @Date: 2022-06-28 16:55:48
* @LastEditors: huyue
* @LastEditTime: 2022-06-28 19:13:34
*/
import
Request
from
'../request'
var
request
=
new
Request
()
...
...
@@ -6,4 +13,9 @@ const getAfterSale = params => {
return
request
.
get
(
'brand/aftersale'
,
params
)
}
export
default
{
getAfterSale
}
// 获取品牌售后其他信息
const
aftersaleother
=
params
=>
{
return
request
.
get
(
'brand/aftersaleother'
,
params
)
}
export
default
{
getAfterSale
,
aftersaleother
}
src/assets/css/index.scss
View file @
9371579
...
...
@@ -97,7 +97,6 @@ img {
margin-right
:
6px
;
}
}
.container
{
margin-top
:
0
.5vh
;
.container
{
margin
:
0
8px
;
}
src/components/PieChart.vue
View file @
9371579
<
template
>
<div
class=
"pie-box"
>
<div
:id=
"id"
:style=
"
{
width: width,
height: height }" class="pie-chart">
</div>
<div
:id=
"id"
:style=
"
{ height: height }" class="pie-chart">
</div>
<div
class=
"center-content"
>
<div
:class=
"[id, 'center-content-num']"
></div>
<div
class=
"center-content-desc"
>
{{
numDesc
}}
</div>
...
...
src/components/RanKing.vue
View file @
9371579
<
template
>
<div
class=
"ranking-container"
>
<div
class=
"title"
>
品牌排名
</div>
<div
class=
"
ranking-
title"
>
品牌排名
</div>
<div
class=
"ranking"
>
<div
class=
"brand flex"
v-for=
"(item, index) in brandList"
:key=
"index"
>
<span
class=
"brand-num"
>
{{
index
+
1
}}
</span>
...
...
@@ -36,27 +36,27 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.ranking-container
{
margin-left
:
0.6vw
;
flex
:
1
;
margin-left
:
8px
;
box-sizing
:
border-box
;
height
:
12.7vh
;
background
:
#262525
;
.title
{
width
:
6.7vw
;
.
ranking-
title
{
width
:
100%
;
background
:
rgba
(
53
,
53
,
53
,
0.6
);
font-size
:
10px
;
color
:
#eb6001
;
font-weight
:
400
;
text-align
:
center
;
line-height
:
2.4vh
;
padding
:
0.4vh
0
;
box-sizing
:
border-box
;
}
.ranking
{
font-size
:
10px
;
color
:
#ffffff
;
letter-spacing
:
0
;
font-weight
:
400
;
padding-left
:
0.6vw
;
padding-top
:
0.1vh
;
padding-bottom
:
0.4vh
;
padding
:
0.1vh
0
0.4vh
8px
;
.brand
{
line-height
:
1.9vh
;
.brand-num
{
...
...
@@ -64,7 +64,7 @@ export default {
margin-right
:
0.6vw
;
}
.marquee
{
width
:
calc
(
100%
-
2.2vw
);
//
width
:
calc
(
100%
-
2.2vw
);
height
:
1.9vh
;
}
}
...
...
src/views/afterSales/analyze.vue
View file @
9371579
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-2
8 11:40:13
* @LastEditTime: 2022-06-2
9 11:30:36
-->
<
template
>
<div>
...
...
@@ -13,8 +13,9 @@
<div
id=
"analyzeBar"
style=
"height: 100%"
></div>
</div>
<div
class=
"contetn-right bg"
>
<pie-chart
:id=
"chart.id"
:list=
"analyzeData"
:height=
"height - 4.9 + 'vh'"
:radius=
"chart.radius"
@
pieAction=
"pieAction"
></pie-chart>
</div>
<!--
<pie-chart
:id=
"chart.id"
:list=
"analyzeData"
:height=
"height - 4.9 + 'vh'"
:radius=
"chart.radius"
@
pieAction=
"pieAction"
>
</pie-chart>
-->
</div>
</div>
</div>
</
template
>
...
...
@@ -27,25 +28,40 @@ export default {
props
:
[
'height'
],
data
()
{
return
{
barChart
:
''
,
analyzeData
:
[]
,
chart
:
{
id
:
'analyzePie'
,
radius
:[
'60%'
,
'78%'
]
radius
:
[
'60%'
,
'78%'
]
},
analyzeData
:[]
,
barChart
:
''
,
option
:
{},
barData
:
[]
}
},
mounted
()
{
this
.
getChart
()
this
.
barChart
=
echarts
.
init
(
document
.
getElementById
(
'analyzeBar'
))
// resize
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
barChart
.
resize
()
})
this
.
init
()
},
methods
:
{
pieAction
(
data
)
{
// let distributionRank = this.distributionRank[data.name]
// for (const key in distributionRank) {
// this.rankingData.push({
// brand: key,
// value: distributionRank[key]
// })
// }
// console.log(this.rankingData, '================')
},
init
()
{
this
.
getValueType
()
},
getChart
()
{
var
chartDom
=
document
.
getElementById
(
'analyzeBar'
)
var
myChart
=
echarts
.
init
(
chartDom
)
var
option
option
=
{
this
.
option
=
{
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
...
...
@@ -55,7 +71,7 @@ export default {
},
yAxis
:
{
type
:
'category'
,
data
:
this
.
yData
,
data
:
datas
.
Customer
.
valueType
.
value
.
map
(
item
=>
item
.
name
)
,
splitLine
:
{
show
:
false
},
...
...
@@ -77,7 +93,8 @@ export default {
},
series
:
[
{
data
:
[
120
,
200
,
150
,
80
,
70
,
110
,
130
,
300
],
// data: [120, 200, 150, 80, 70, 110, 130, 300],
data
:
this
.
barData
,
type
:
'bar'
,
barWidth
:
12
,
itemStyle
:
{
...
...
@@ -119,20 +136,17 @@ export default {
}
}
this
.
api
.
afterSales
.
aftersaleother
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
const
reqData
=
JSON
.
parse
(
res
.
data
.
dataList
[
0
].
distribution
)
console
.
log
(
reqData
)
this
.
barData
=
[]
for
(
let
i
in
reqData
)
{
this
.
barData
.
push
(
reqData
[
i
])
}
console
.
log
(
this
.
barData
)
this
.
getChart
()
})
},
pieAction
(
data
){
}
}
}
...
...
src/views/afterSales/file.vue
View file @
9371579
...
...
@@ -77,7 +77,7 @@ export default {
})
},
handleRankChange
(
value
)
{
console
.
log
(
value
)
//
console.log(value)
}
}
}
...
...
src/views/afterSales/mileage.vue
View file @
9371579
...
...
@@ -53,7 +53,7 @@ export default {
})
})
this
.
distributionRank
=
JSON
.
parse
(
res
.
data
.
dataList
[
0
].
distributionRank
)
console
.
log
(
this
.
distributionRank
,
'mileage'
)
//
console.log(this.distributionRank, 'mileage')
})
},
pieAction
(
data
)
{
...
...
@@ -64,7 +64,7 @@ export default {
value
:
distributionRank
[
key
]
})
}
console
.
log
(
this
.
rankingData
,
'================'
)
//
console.log(this.rankingData, '================')
}
}
}
...
...
src/views/salesData/customerCategory.vue
View file @
9371579
...
...
@@ -12,7 +12,7 @@
<span>
客户级别
</span>
</div>
<div
class=
"flex container"
>
<
pie-chart
:id=
"chart.id"
></pie-chart
>
<
!--
<pie-chart
:id=
"chart.id"
></pie-chart>
--
>
<ran-king></ran-king>
</div>
</div>
...
...
src/views/salesData/enterCategory.vue
View file @
9371579
...
...
@@ -12,7 +12,7 @@
<span>
进店类型
</span>
</div>
<div
class=
"container flex"
>
<
pie-chart
:id=
"chart.id"
:list=
"salesData"
@
pieAction=
"pieAction"
></pie-chart
>
<
!--
<pie-chart
:id=
"chart.id"
:list=
"salesData"
@
pieAction=
"pieAction"
></pie-chart>
--
>
<ran-king
:list=
"brandList"
></ran-king>
</div>
</div>
...
...
src/views/salesData/flow.vue
View file @
9371579
...
...
@@ -123,7 +123,7 @@ export default {
}
}
this
.
api
.
sales
.
saleTotal
(
params
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
//
console.log(res.data)
if
(
res
.
code
===
'0'
)
{
res
.
data
.
dataList
[
0
].
num
.
forEach
((
item
,
index
)
=>
{
this
.
funnelData
[
index
].
value
=
item
...
...
@@ -193,7 +193,7 @@ export default {
this
.
echartsFunnel
.
setOption
(
this
.
option
)
// 鼠标划入
this
.
echartsFunnel
.
on
(
'mouseover'
,
data
=>
{
console
.
log
(
data
.
data
)
//
console.log(data.data)
})
}
}
...
...
src/views/salesData/infoFrom.vue
View file @
9371579
...
...
@@ -12,7 +12,7 @@
<span>
信息来源
</span>
</div>
<div
class=
"container flex"
>
<
pie-chart
:id=
"chart.id"
></pie-chart
>
<
!--
<pie-chart
:id=
"chart.id"
></pie-chart>
--
>
<ran-king></ran-king>
</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