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 0ac75913
authored
Jun 29, 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
e441c520
06262297
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
102 deletions
src/utils/data.js
src/views/afterSales/analyze.vue
src/views/afterSales/efficient.vue
src/views/afterSales/file.vue
src/views/salesData/flow.vue
src/utils/data.js
View file @
0ac7591
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 17:38:33
* @LastEditors: huyue
* @LastEditTime: 2022-06-2
7 14:42:09
* @LastEditTime: 2022-06-2
9 19:47:34
*/
const
DefaultData
=
{
defaultLineHeight
:
'19.8'
,
...
...
@@ -83,14 +83,14 @@ const Customer = {
valueType
:
{
name
:
'价值类型'
,
value
:
[
{
name
:
'
一般发展'
,
value
:
37
},
{
name
:
'
一般价值'
,
value
:
37
},
{
name
:
'
一般挽留'
,
value
:
37
},
{
name
:
'重要挽留'
,
value
:
37
},
{
name
:
'
重要价值'
,
value
:
37
},
{
name
:
'
重要发展'
,
value
:
37
},
{
name
:
'一般
保持'
,
value
:
3
7
},
{
name
:
'
重要保持'
,
value
:
37
}
{
name
:
'
重要价值'
,
value
:
1
},
{
name
:
'
重要发展'
,
value
:
2
},
{
name
:
'
重要召回'
,
value
:
3
},
{
name
:
'重要挽留'
,
value
:
4
},
{
name
:
'
一般价值'
,
value
:
5
},
{
name
:
'
一般发展'
,
value
:
6
},
{
name
:
'一般
召回'
,
value
:
7
},
{
name
:
'
一般挽留'
,
value
:
8
}
]
}
}
...
...
src/views/afterSales/analyze.vue
View file @
0ac7591
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-29 1
1:30:36
* @LastEditTime: 2022-06-29 1
9:47:17
-->
<
template
>
<div>
...
...
@@ -61,7 +61,7 @@ export default {
},
yAxis
:
{
type
:
'category'
,
data
:
datas
.
Customer
.
valueType
.
value
.
map
(
item
=>
item
.
name
),
data
:
datas
.
Customer
.
valueType
.
value
.
map
(
item
=>
item
.
name
)
.
reverse
()
,
splitLine
:
{
show
:
false
},
...
...
@@ -84,7 +84,7 @@ export default {
series
:
[
{
// data: [120, 200, 150, 80, 70, 110, 130, 300],
data
:
this
.
barData
,
data
:
this
.
barData
.
reverse
()
,
type
:
'bar'
,
barWidth
:
12
,
itemStyle
:
{
...
...
@@ -115,6 +115,10 @@ export default {
]
}
this
.
barChart
.
setOption
(
this
.
option
)
// 鼠标划入
this
.
barChart
.
on
(
'mouseover'
,
data
=>
{
this
.
initPieData
(
data
.
name
)
})
},
getValueType
()
{
const
params
=
{
...
...
@@ -137,7 +141,7 @@ export default {
this
.
initPieData
()
})
},
initPieData
()
{
initPieData
(
name
)
{
const
distributionRank
=
this
.
distributionRank
[
this
.
key
]
Object
.
keys
(
distributionRank
).
forEach
(
item
=>
{
this
.
analyzeData
.
push
({
...
...
@@ -161,7 +165,7 @@ export default {
flex
:
1
;
}
.contetn-right
{
width
:
43
%
;
width
:
50
%
;
margin-left
:
8px
;
}
}
...
...
src/views/afterSales/efficient.vue
View file @
0ac7591
...
...
@@ -54,18 +54,6 @@ export default {
},
methods
:
{
init
(
val
)
{
// console.log(val)
var
params
=
{
req
:
{
corporateGroupName
:
'广汇'
,
queryItem
:
'file'
,
queryTime
:
'2022-06-25'
,
queryType
:
0
}
}
this
.
api
.
afterSales
.
getAfterSale
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
})
},
// 折线图数据
getList
()
{
},
...
...
src/views/afterSales/file.vue
View file @
0ac7591
...
...
@@ -8,7 +8,15 @@
<
template
>
<div>
<div
class=
"title"
>
售后档案客户
</div>
<LineChart
:dataList=
"dataList"
></LineChart>
<div
v-if=
"!dataList.length"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<div
v-else
>
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<LineChart
v-else
:dataList=
"dataList"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -25,6 +33,7 @@ export default {
},
data
()
{
return
{
isEmpty
:
true
,
dataList
:
[]
}
},
...
...
@@ -33,10 +42,11 @@ export default {
},
methods
:
{
init
(
val
)
{
//
console.log(val)
console
.
log
(
val
)
var
params
=
{
req
:
{
corporateGroupName
:
'广汇'
,
// corporateGroupName: '广汇',
corporateGroupName
:
'集团1'
,
queryItem
:
'file'
,
querystartTime
:
+
val
.
reportType
===
1
?
this
.
getNDate
(
-
30
)
:
this
.
getNMonth
(
-
12
),
queryendTime
:
+
val
.
reportType
===
1
?
this
.
getNDate
(
-
1
)
:
this
.
getNMonth
(
-
1
),
...
...
@@ -44,14 +54,18 @@ export default {
}
}
this
.
api
.
afterSales
.
getAfterSale
(
params
).
then
(
res
=>
{
var
{
code
,
data
,
message
}
=
res
var
{
code
,
data
}
=
res
switch
(
+
code
)
{
case
0
:
this
.
dataList
=
[]
this
.
dealList
(
data
.
dataList
)
console
.
log
(
!
data
.
dataList
.
map
(
item
=>
item
.
num
).
every
(
item
=>
item
===
0
))
if
(
!
data
.
dataList
.
map
(
item
=>
item
.
num
).
every
(
item
=>
item
===
0
))
{
this
.
isEmpty
=
false
this
.
dealList
(
data
.
dataList
)
}
break
default
:
// alert(message)
//
default:
// alert(message)
}
})
},
...
...
src/views/salesData/flow.vue
View file @
0ac7591
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-29 1
5:47:23
* @LastEditTime: 2022-06-29 1
9:45:27
-->
<
template
>
<div>
...
...
@@ -16,8 +16,8 @@
</div>
<div
class=
"flow-right"
>
<div
class=
"ranking-title"
>
<div
@
click=
"changeRank(1)"
:class=
"isActive == 1 ? 'active' : ''"
>
前5
品牌
</div>
<div
@
click=
"changeRank(2)"
:class=
"isActive == 2 ? 'active' : ''"
>
后5
品牌
</div>
<div
@
click=
"changeRank(1)"
:class=
"isActive == 1 ? 'active' : ''"
>
前5
{{
isBrand
?
'门店'
:
'品牌'
}}
</div>
<div
@
click=
"changeRank(2)"
:class=
"isActive == 2 ? 'active' : ''"
>
后5
{{
isBrand
?
'门店'
:
'品牌'
}}
</div>
</div>
<div
class=
"ranking-content"
>
<div
class=
"ranking-item"
v-for=
"(item, index) in flowData"
:key=
"index"
>
...
...
@@ -82,16 +82,15 @@ export default {
],
option
:
{},
echartsFunnel
:
''
,
funnelDom
:
''
,
hasData
:
true
,
paramsData
:
{},
topList
:
[],
lastList
:
[]
lastList
:
[],
isBrand
:
false
}
},
mounted
()
{
this
.
funnelDom
=
document
.
getElementById
(
'flow'
)
this
.
echartsFunnel
=
echarts
.
init
(
this
.
funnelDom
)
this
.
echartsFunnel
=
echarts
.
init
(
document
.
getElementById
(
'flow'
))
// resize
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
echartsFunnel
.
resize
()
...
...
@@ -100,10 +99,10 @@ export default {
},
methods
:
{
init
(
val
)
{
console
.
log
(
val
)
this
.
paramsData
=
val
this
.
getSaletTotal
(
val
)
this
.
getSaleTrans
(
val
)
this
.
paramsData
=
this
.
$store
.
state
.
app
.
reportParams
this
.
isBrand
=
this
.
paramsData
.
brand
&&
this
.
paramsData
.
brand
.
name
this
.
getSaletTotal
(
this
.
paramsData
)
this
.
getSaleTrans
(
this
.
paramsData
)
},
getSaletTotal
(
val
)
{
const
params
=
{
...
...
@@ -113,8 +112,12 @@ export default {
queryType
:
val
.
reportType
}
}
this
.
api
.
sales
.
saleTotal
(
params
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
let
api
=
'saleTotal'
if
(
val
.
brand
&&
val
.
brand
.
name
)
{
params
.
req
.
brandName
=
'品牌1'
api
=
'storeTotal'
}
this
.
api
.
sales
[
api
](
params
).
then
(
res
=>
{
if
(
res
.
code
===
'0'
)
{
res
.
data
.
dataList
[
0
].
num
.
forEach
((
item
,
index
)
=>
{
this
.
funnelData
[
index
].
value
=
item
...
...
@@ -184,7 +187,6 @@ export default {
this
.
echartsFunnel
.
setOption
(
this
.
option
)
// 鼠标划入
this
.
echartsFunnel
.
on
(
'mouseover'
,
data
=>
{
console
.
log
(
data
.
data
,
'---------'
)
this
.
getSaleTrans
(
this
.
paramsData
,
data
.
data
.
type
)
})
},
...
...
@@ -197,61 +199,69 @@ export default {
queryType
:
val
.
reportType
}
}
this
.
api
.
sales
.
saleTrans
(
params
).
then
(
res
=>
{
this
.
topList
=
[
{
id
:
1
,
name
:
'林则徐:苟利国家生死以岂因祸福避趋之'
,
num
:
3323425
},
{
id
:
2
,
name
:
'林则徐'
,
num
:
9999999
},
{
id
:
3
,
name
:
'fg'
,
num
:
33234
},
{
id
:
4
,
name
:
'售后客户价值分析'
,
num
:
33234
},
{
id
:
5
,
name
:
'林则徐:苟利国家生死以岂因祸福避趋之'
,
num
:
33234
}
]
this
.
lastList
=
[
{
id
:
1
,
name
:
'广汇集团BI数据看板-前端-交互'
,
num
:
3323425
},
{
id
:
2
,
name
:
'广汇集团BI数据看板-前端-交互广汇集团BI数据看板-前端-交互'
,
num
:
9999999
},
{
id
:
3
,
name
:
'fsdfasdg'
,
num
:
33234
},
{
id
:
4
,
name
:
'广汇集团BI数据看板-前端-交互'
,
num
:
33234
},
{
id
:
5
,
name
:
'广汇集团BI数据看板-前端-交互'
,
num
:
33234
}
]
let
api
=
'saleTrans'
if
(
val
.
brand
&&
val
.
brand
.
name
)
{
params
.
req
.
brandName
=
'品牌1'
api
=
'storeSaleTrans'
}
this
.
api
.
sales
[
api
](
params
).
then
(
res
=>
{
const
{
topList
,
lastList
}
=
res
.
data
.
dataList
[
0
]
this
.
topList
=
topList
?
JSON
.
parse
(
topList
)
:
[]
this
.
lastList
=
lastList
?
JSON
.
parse
(
lastList
)
:
[]
// this.topList = [
// {
// id: 1,
// name: '林则徐:苟利国家生死以岂因祸福避趋之',
// num: 3323425
// },
// {
// id: 2,
// name: '林则徐',
// num: 9999999
// },
// {
// id: 3,
// name: 'fg',
// num: 33234
// },
// {
// id: 4,
// name: '售后客户价值分析',
// num: 33234
// },
// {
// id: 5,
// name: '林则徐:苟利国家生死以岂因祸福避趋之',
// num: 33234
// }
// ]
// this.lastList = [
// {
// id: 1,
// name: '广汇集团BI数据看板-前端-交互',
// num: 3323425
// },
// {
// id: 2,
// name: '广汇集团BI数据看板-前端-交互广汇集团BI数据看板-前端-交互',
// num: 9999999
// },
// {
// id: 3,
// name: 'fsdfasdg',
// num: 33234
// },
// {
// id: 4,
// name: '广汇集团BI数据看板-前端-交互',
// num: 33234
// },
// {
// id: 5,
// name: '广汇集团BI数据看板-前端-交互',
// num: 33234
// }
// ]
this
.
flowData
=
this
.
topList
})
},
...
...
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