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