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 288386d2
authored
Jul 04, 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
9e398386
055840cb
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
78 additions
and
39 deletions
src/api/request.js
src/assets/css/index.scss
src/components/LineChart.vue
src/components/Marquee.vue
src/components/ViewControl.vue
src/components/ViewTabs.vue
src/config/env.development.js
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/sadayasu.vue
src/views/salesData/flow.vue
src/api/request.js
View file @
288386d
...
...
@@ -20,7 +20,6 @@ class Request {
params
.
req
.
corporateGroupName
=
'广汇'
const
{
reportParams
}
=
window
.
vm
.
$store
.
state
.
app
if
(
reportParams
)
{
params
.
req
.
queryType
=
reportParams
.
reportType
||
0
if
(
reportParams
.
brand
)
params
.
req
.
brandName
=
reportParams
.
brand
.
name
}
if
(
method
===
'GET'
)
{
...
...
src/assets/css/index.scss
View file @
288386d
...
...
@@ -77,7 +77,7 @@ img {
.box
{
background
:
#1d1c1c
;
overflow
:
hidden
;
//
overflow: hidden;
}
.inline
{
...
...
@@ -120,7 +120,7 @@ img {
justify-content
:
center
;
img
{
width
:
20vh
;
max-
width
:
20vh
;
height
:
9
.5vh
;
}
}
\ No newline at end of file
src/components/LineChart.vue
View file @
288386d
...
...
@@ -37,6 +37,10 @@ export default {
type
:
Array
,
default
:
()
=>
[]
},
queryType
:
{
type
:
Number
,
default
:
0
},
tooltipFormatterObj
:
{
type
:
Array
,
default
:
()
=>
{
...
...
@@ -147,7 +151,12 @@ export default {
},
drawLine
()
{
this
.
lineOptions
.
xAxis
.
data
=
this
.
dataList
.
map
(
item
=>
item
.
statDate
)
this
.
lineOptions
.
xAxis
.
data
=
[]
this
.
dataList
.
map
(
e
=>
{
let
month
=
new
Date
(
e
.
statDate
).
getMonth
()
this
.
lineOptions
.
xAxis
.
data
.
push
(
this
.
queryType
==
0
?
`
${
month
==
0
?
'1月'
:
`
${
Number
(
month
)
+
1
}
月`
}
`
:
e
.
statDate
.
split
(
'-'
).
slice
(
1
).
join
(
'-'
))
})
this
.
lineOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
.
num
)
...
...
src/components/Marquee.vue
View file @
288386d
...
...
@@ -22,7 +22,7 @@ export default {
},
delay
:
{
type
:
Number
,
default
:
0
default
:
100
0
}
},
data
()
{
...
...
@@ -66,7 +66,7 @@ export default {
},
500
)
},
reset
()
{
let
awaitTime
=
(
this
.
speed
+
2
)
*
1000
let
awaitTime
=
(
this
.
speed
+
2
)
*
this
.
delay
this
.
target
=
0
setTimeout
(()
=>
{
this
.
run
()
...
...
src/components/ViewControl.vue
View file @
288386d
...
...
@@ -7,7 +7,9 @@
:key="index"
@click="change(index)"
>
{{
i
}}
<div
class=
"text text-hide"
>
{{
i
}}
</div>
<template
v-if=
"index == 1"
>
<div
class=
"arrow"
></div>
</
template
>
...
...
@@ -23,7 +25,9 @@
:class=
"['options-item flex',
{'active':i.active}]"
:key="index"
@click="chooseBrand({i,index})"
>
{{
i
.
brandName
}}
</div>
>
<div
class=
"text-hide"
>
{{
i
.
brandName
}}
</div>
</div>
</
template
>
</div>
</div>
...
...
@@ -105,8 +109,8 @@ export default {
let
{
brands
}
=
this
brands
.
map
(
e
=>
e
.
active
=
false
)
brands
[
index
].
active
=
true
this
.
brandsKey
=
Date
.
now
()
this
.
$refs
.
brands
.
style
.
display
=
'none'
//
this.brandsKey = Date.now()
//
this.$refs.brands.style.display = 'none'
this
.
change
(
1
,
i
)
},
}
...
...
@@ -131,6 +135,9 @@ export default {
.brand
{
padding
:
0
16px
;
border-radius
:
0
4px
4px
0
;
.text
{
width
:
calc
(
100%
-
20px
);
}
&
:hover
~
.options-box
{
display
:
block
;
}
...
...
@@ -201,6 +208,12 @@ export default {
background-color
:
#eb6001
;
}
}
.active
{
position
:
sticky
;
top
:
0
;
z-index
:
2
;
left
:
0
;
}
}
::-webkit-scrollbar
{
background-color
:
#383737
;
...
...
src/components/ViewTabs.vue
View file @
288386d
...
...
@@ -8,8 +8,8 @@
<div
class=
"tab-total-box"
>
<div
class=
"total-title-box flex"
>
<div
class=
"title inline total"
>
客户总数
</div>
<div
class=
"title inline"
>
昨日
新增
</div>
<div
class=
"title inline"
>
上月
到店
</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
...
...
@@ -41,7 +41,7 @@
class="item-total"
/>
<div
class=
"item-incr flex"
>
上月
{{
req
.
queryType
==
0
?
'上月'
:
'昨日'
}}
<transition-number
:num=
"pageData[i.key].incrNum"
:idKey=
"`number-incr-$
{i.key}`"
...
...
@@ -76,7 +76,7 @@
<div
:class=
"['table-head-item flex',
{'active':index == tabIndex}]"
:key="index"
@click="
changeTab(index)
"
@click="
tabIndex = index
"
>
{{
i
}}
</div>
...
...
@@ -175,15 +175,13 @@ export default {
this
.
tabType
=
type
this
.
getOveralltrend
(
type
)
},
changeTab
(
index
)
{
this
.
tabIndex
=
index
},
getOverallbase
(
queryItem
)
{
let
{
req
:
{
queryType
}
}
=
this
const
params
=
{
queryItem
,
queryTime
:
this
.
getCurrentDate
()
queryType
,
queryTime
:
this
.
getNDate
(
-
1
)
}
this
.
tabHead
=
this
.
isGroup
?
[
'前5品牌'
,
'后5品牌'
]
:
[
'前5门店'
,
'后5门店'
]
this
.
api
.
overview
[
this
.
isGroup
?
'getBrandOverallbase'
:
'getMerchantOverallbase'
](
params
).
then
(({
code
,
data
})
=>
{
if
(
code
==
0
)
{
...
...
@@ -206,7 +204,7 @@ export default {
},
ObjectToArray
(
obj
)
{
let
arr
=
[]
JSON
.
parse
(
obj
).
map
(
e
=>
{
if
(
obj
)
JSON
.
parse
(
obj
).
map
(
e
=>
{
Object
.
keys
(
e
).
map
(
name
=>
arr
.
push
({
name
,
num
:
e
[
name
]
}))
})
return
arr
...
...
@@ -215,8 +213,10 @@ export default {
let
{
req
:
{
queryType
}
}
=
this
const
params
=
{
queryItem
,
queryType
,
querystartTime
:
queryType
==
1
?
this
.
getNDate
(
-
30
)
:
this
.
getNMonth
(
-
12
),
queryendTime
:
queryType
==
1
?
this
.
getNDate
(
-
1
)
:
this
.
getNMonth
(
-
1
),
}
this
.
api
.
overview
[
this
.
isGroup
?
'getBrandOveralltrend'
:
'getMerchantOveralltrend'
](
params
).
then
(({
data
,
code
})
=>
{
this
.
flag
=
true
...
...
@@ -238,7 +238,7 @@ export default {
let
data
=
[],
xData
=
[],
title
=
{
'total'
:
'客户数'
,
'total'
:
'客户
总
数'
,
'wechat'
:
'企微客户数'
,
'wechatGroup'
:
'企微群数'
,
'applet'
:
'小程序客户数'
,
...
...
@@ -261,17 +261,22 @@ export default {
},
show
:
true
,
formatter
:
([
value
])
=>
{
return
`
${
title
[
tabType
]}
:
${
value
.
data
}
`
// `${value.name}${title[tabType]}:${value.data}`
return
`
${
value
.
name
}
<br/>
${
title
[
tabType
]}
:
${
value
.
data
}
`
}
},
xAxis
:
{
type
:
'category'
,
axisLabel
:
{
show
:
true
,
interval
:
queryType
==
0
?
0
:
7
,
color
:
'#606266'
,
fontSize
:
'0.8em'
fontSize
:
'0.8em'
,
margin
:
20
},
data
:
xData
data
:
xData
,
axisTick
:
{
alignWithLabel
:
true
}
},
grid
:
{
left
:
'3%'
,
...
...
@@ -429,7 +434,7 @@ export default {
height
:
100%
;
}
.empty-img
{
width
:
20vh
;
max-
width
:
20vh
;
height
:
9.5vh
;
}
}
...
...
src/config/env.development.js
View file @
288386d
...
...
@@ -12,8 +12,7 @@ module.exports = {
title
:
'广汇汽车服务'
,
request
:
{
// baseURL: 'http://192.168.3.126:8081', // 本地测试项目地址,
// baseURL: '/dev', // 本地测试项目地址,
baseURL
:
'/test'
,
// 本地测试项目地址,
baseURL
:
'http://192.168.1.152:8081'
,
// 本地开发项目地址,
// 设置超时时间
timeout
:
180000
,
// 携带凭证
...
...
src/views/afterSales/analyze.vue
View file @
288386d
...
...
@@ -186,6 +186,7 @@ export default {
.analyze-content
{
display
:
flex
;
padding
:
0
8px
1.8vh
;
box-sizing
:
border-box
;
.bg
{
background-color
:
#262525
;
}
...
...
src/views/afterSales/efficient.vue
View file @
288386d
...
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"efficientChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"efficientChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -35,6 +35,7 @@ export default {
return
{
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
dataList
:
[]
}
},
...
...
@@ -42,6 +43,7 @@ export default {
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
this
.
queryType
=
+
this
.
watchReportParams
.
reportType
var
params
=
{
req
:
{
queryItem
:
'valid'
,
...
...
src/views/afterSales/file.vue
View file @
288386d
...
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"fileChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"fileChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -35,6 +35,7 @@ export default {
return
{
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
dataList
:
[]
}
},
...
...
@@ -44,6 +45,7 @@ export default {
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
this
.
queryType
=
+
this
.
watchReportParams
.
reportType
var
params
=
{
req
:
{
queryItem
:
'file'
,
...
...
@@ -97,7 +99,7 @@ export default {
num
:
item
.
num
||
0
,
hrate
:
item
.
hrate
||
0
,
trate
:
item
.
trate
||
0
,
statDate
:
item
.
statDate
.
split
(
'-'
)
,
statDate
:
item
.
statDate
,
topList
:
topList
,
lastList
:
lastList
})
...
...
src/views/afterSales/first.vue
View file @
288386d
...
...
@@ -15,7 +15,7 @@
<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"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"firstChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -35,10 +35,11 @@ export default {
return
{
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
tooltipFormatterObj
:
[
{
label
:
'回店率'
,
attrName
:
'
num
'
,
attrName
:
'
rate
'
,
addSymbol
:
'%'
},
{
...
...
@@ -59,6 +60,7 @@ export default {
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
this
.
queryType
=
+
this
.
watchReportParams
.
reportType
var
params
=
{
req
:
{
queryItem
:
'first'
,
...
...
@@ -110,6 +112,7 @@ export default {
})
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
rate
:
item
.
rate
||
0
,
hrate
:
item
.
hrate
||
0
,
trate
:
item
.
trate
||
0
,
statDate
:
item
.
statDate
,
...
...
src/views/afterSales/keep.vue
View file @
288386d
...
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"keepChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"keepChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -35,6 +35,7 @@ export default {
return
{
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
dataList
:
[]
}
},
...
...
@@ -42,6 +43,7 @@ export default {
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
this
.
queryType
=
+
this
.
watchReportParams
.
reportType
var
params
=
{
req
:
{
queryItem
:
'retain'
,
...
...
src/views/afterSales/lost.vue
View file @
288386d
...
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"lostChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"lostChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -35,6 +35,7 @@ export default {
return
{
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
dataList
:
[]
}
},
...
...
@@ -42,6 +43,7 @@ export default {
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
this
.
queryType
=
+
this
.
watchReportParams
.
reportType
var
params
=
{
req
:
{
queryItem
:
'loss'
,
...
...
src/views/afterSales/sadayasu.vue
View file @
288386d
...
...
@@ -15,7 +15,7 @@
<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"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"sadayasuChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
:queryType=
"queryType"
></LineChart>
</div>
</div>
</
template
>
...
...
@@ -35,10 +35,11 @@ export default {
return
{
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
queryType
:
0
,
tooltipFormatterObj
:
[
{
label
:
'回店率'
,
attrName
:
'
num
'
,
attrName
:
'
rate
'
,
addSymbol
:
'%'
},
{
...
...
@@ -59,6 +60,7 @@ export default {
methods
:
{
init
(
val
)
{
this
.
isEmpty
=
true
this
.
queryType
=
+
this
.
watchReportParams
.
reportType
var
params
=
{
req
:
{
queryItem
:
'regular'
,
...
...
@@ -110,6 +112,7 @@ export default {
})
this
.
dataList
.
push
({
num
:
item
.
num
||
0
,
rate
:
item
.
rate
||
0
,
hrate
:
item
.
hrate
||
0
,
trate
:
item
.
trate
||
0
,
statDate
:
item
.
statDate
,
...
...
src/views/salesData/flow.vue
View file @
288386d
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-01 14:
07:09
* @LastEditTime: 2022-07-01 14:
26:28
-->
<
template
>
<div>
...
...
@@ -190,7 +190,6 @@ export default {
getSaleTrans
(
val
,
queryItem
=
'enter'
)
{
const
params
=
{
req
:
{
corporateGroupName
:
'集团1'
,
queryItem
:
queryItem
,
queryTime
:
this
.
getCurrentDate
(),
queryType
:
val
.
reportType
...
...
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