Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
dj-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 80a2e260
authored
Oct 27, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
7d1adb73
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
167 additions
and
54 deletions
src/api/modules/customer.js
src/api/modules/sass.js
src/components/ViewSurface.vue
src/components/lineBar.vue
src/components/options.js
src/mixins/clientMixin.js
src/views/saas/business.vue
src/views/saas/businessView.vue
src/views/saas/project.vue
src/api/modules/customer.js
View file @
80a2e26
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-27 09:43:15
* @FilePath: \dj-data-view\src\api\modules\customer.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// 获取企业客户总览数据
const
getEnterpriseOverview
=
params
=>
{
return
window
.
$HTTP
.
get
(
'enterpriseCustomer/getEnterpriseOverview'
,
params
)
}
const
getEnterpriseOverview
=
params
=>
{
return
window
.
$HTTP
.
get
(
'enterpriseCustomer/getEnterpriseOverview'
,
params
)
}
// 获取门店区域/品牌/类型
const
getEnterpriseDistribution
=
params
=>
{
// 获取门店区域/品牌/类型
const
getEnterpriseDistribution
=
params
=>
{
return
window
.
$HTTP
.
get
(
'enterpriseCustomer/getEnterpriseDistribution'
,
params
)
}
// 获取企业客户数据近12个月趋势图(包括:总客户数、新增客户数)
const
getEnterpriseOverviewTrend
=
params
=>
{
return
window
.
$HTTP
.
get
(
'enterpriseCustomer/getEnterpriseOverviewTrend'
,
params
)
}
export
default
{
getEnterpriseOverview
,
getEnterpriseDistribution
getEnterpriseDistribution
,
getEnterpriseOverviewTrend
}
src/api/modules/sass.js
0 → 100644
View file @
80a2e26
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-27 10:20:25
* @FilePath: \dj-data-view\src\api\modules\customer.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// 新车洽谈、新车交付、0~12个月、12个月以上(累计展业门店数、当年新增、转化率、客单价、产值)
const
getBusinessType
=
params
=>
{
return
window
.
$HTTP
.
get
(
'saasValueaddedTransformation/getBusinessType'
,
params
)
}
// 已展业省份--区域(省份_地图)分布(参数:新车洽谈/新车交付/0~12个月/12个月以上)
const
getDevelopedProvinces
=
params
=>
{
return
window
.
$HTTP
.
get
(
'saasValueaddedTransformation/getDevelopedProvinces'
,
params
)
}
// 当月进行中门店--区域(省份_地图)分布(参数:新车洽谈/新车交付/0~12个月/12个月以上)
const
getMerchantInProgressThisMonth
=
params
=>
{
return
window
.
$HTTP
.
get
(
'saasValueaddedTransformation/getMerchantInProgressThisMonth'
,
params
)
}
// 当月进行中门店--区域(省份_地图)分布(参数:新车洽谈/新车交付/0~12个月/12个月以上)
const
getSaasValueaddedTransformationOverview
=
params
=>
{
return
window
.
$HTTP
.
get
(
'/saasValueaddedTransformation/getSaasValueaddedTransformationOverview'
,
params
)
}
export
default
{
getBusinessType
,
getDevelopedProvinces
,
getMerchantInProgressThisMonth
,
getSaasValueaddedTransformationOverview
}
src/components/ViewSurface.vue
View file @
80a2e26
...
...
@@ -2,24 +2,35 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-2
5 16:28:06
* @LastEditTime: 2022-10-2
7 10:58:34
* @FilePath: \dj-data-view\src\components\ViewSurface.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div
class=
"surface box"
>
<line-bar
domId=
"surfaceChart"
boxHeight=
"19.5vh"
></line-bar>
<line-bar
domId=
"surfaceChart"
boxHeight=
"19.5vh"
:dataList=
"dataList"
></line-bar>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
*
as
echarts
from
'echarts'
export
default
{
name
:
'ViewSurface'
,
data
()
{
return
{}
return
{
dataList
:
[]
}
},
mounted
()
{},
methods
:
{}
mounted
()
{
this
.
getEnterpriseOverviewTrend
()
},
methods
:
{
getEnterpriseOverviewTrend
()
{
this
.
api
.
customer
.
getEnterpriseOverviewTrend
().
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
dataList
=
res
.
data
.
dataList
}
})
}
}
}
</
script
>
...
...
src/components/lineBar.vue
View file @
80a2e26
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-2
6 16:36:56
* @LastEditTime: 2022-10-2
7 10:06:49
* @FilePath: \dj-data-view\src\components\barChart.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -82,7 +82,7 @@ export default {
}
},
created
()
{
this
.
lineOptions
=
lineAndBarOptions
()
this
.
lineOptions
=
lineAndBarOptions
(
this
.
dataList
)
},
mounted
()
{
this
.
lineDom
=
document
.
getElementById
(
this
.
domId
)
...
...
@@ -91,9 +91,9 @@ export default {
},
methods
:
{
chartBindEvent
()
{
window
.
addEventListener
(
'resize'
,
()
=>
{
this
[
this
.
domId
].
resize
()
})
//
window.addEventListener('resize', () => {
//
this[this.domId].resize()
//
})
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
}
}
...
...
src/components/options.js
View file @
80a2e26
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:46:24
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-2
6 13:48:15
* @LastEditTime: 2022-10-2
7 11:00:22
* @FilePath: \dj-data-view\src\components\barOptions.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -124,6 +124,21 @@ function getBarReverseOptions(obj) {
backgroundStyle
:
{
color
:
'#6578FF'
},
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
position
:
'center'
,
textStyle
:
{
fontSize
:
10
,
color
:
'#fff'
,
height
:
16
,
padding
:
[
0
,
2
,
2
,
4
],
lineHeight
:
16
}
}
}
},
data
:
[
30
,
120
,
200
,
150
,
80
,
70
,
110
,
130
]
}
]
...
...
@@ -140,7 +155,7 @@ function getLineOptions() {
}
},
padding
:
5
,
borderWidth
:
0
,
borderWidth
:
0
.5
,
backgroundColor
:
'rgba(35, 45, 152, 1)'
,
borderRadius
:
4
,
textStyle
:
{
...
...
@@ -225,7 +240,10 @@ function getLineOptions() {
}
return
options
}
function
lineAndBarOptions
()
{
function
lineAndBarOptions
(
list
)
{
const
statDate
=
list
.
map
(
item
=>
item
.
statDate
)
const
totalNum
=
list
.
map
(
item
=>
item
.
totalNum
)
const
increNum
=
list
.
map
(
item
=>
item
.
increNum
)
var
options
=
{
tooltip
:
{
trigger
:
'axis'
,
...
...
@@ -235,7 +253,7 @@ function lineAndBarOptions() {
}
},
padding
:
5
,
borderWidth
:
0
,
borderWidth
:
0
.5
,
backgroundColor
:
'rgba(35, 45, 152, 1)'
,
borderRadius
:
4
,
textStyle
:
{
...
...
@@ -261,7 +279,7 @@ function lineAndBarOptions() {
axisLine
:
{
show
:
false
},
data
:
[
'1月'
,
'2月'
,
'3月'
,
'4月'
,
'5月'
,
'6月'
,
'7月'
,
'8月'
,
'9月'
,
'10月'
,
'11月'
,
'12月'
]
data
:
statDate
},
grid
:
{
left
:
'3%'
,
...
...
@@ -292,7 +310,7 @@ function lineAndBarOptions() {
color
:
'#6578FF'
},
barWidth
:
'30%'
,
data
:
[
120
,
200
,
150
,
80
,
70
,
110
,
130
,
5
,
6
,
98
,
4
,
3
,
5
,
555
]
data
:
increNum
},
{
type
:
'line'
,
...
...
@@ -323,7 +341,7 @@ function lineAndBarOptions() {
]
}
},
data
:
[
666
,
200
,
150
,
80
,
70
,
110
,
130
,
554
,
3
,
44
,
33
,
5
,
666
]
data
:
totalNum
}
]
}
...
...
src/mixins/clientMixin.js
View file @
80a2e26
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-27 09:44:37
* @FilePath: \dj-data-view\src\mixins\clientMixin.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export
default
{
data
()
{
return
{
areaData
:[],
brandData
:[],
storeData
:[]
areaData
:
[],
brandData
:
[],
storeData
:
[]
}
},
created
()
{
...
...
@@ -12,14 +20,13 @@ export default {
methods
:
{
getClientData
()
{
this
.
api
.
customer
.
getEnterpriseDistribution
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
res
.
data
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
queryitem
==
'区域排名'
)
this
.
areaData
=
item
.
rankDistributions
if
(
item
.
queryitem
==
'品牌分布'
)
this
.
brandData
=
item
.
rankDistributions
if
(
item
.
queryitem
==
'门店类型'
)
this
.
storeData
=
item
.
rankDistributions
});
}
if
(
item
.
queryitem
==
'区域排名'
)
this
.
areaData
=
item
.
rankDistributions
if
(
item
.
queryitem
==
'品牌分布'
)
this
.
brandData
=
item
.
rankDistributions
if
(
item
.
queryitem
==
'门店类型'
)
this
.
storeData
=
item
.
rankDistributions
})
}
})
}
}
...
...
src/views/saas/business.vue
View file @
80a2e26
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 1
7:52:31
* @LastEditTime: 2022-10-26 1
8:08:57
* @FilePath: \dj-data-view\src\views\saas\business.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -38,6 +38,7 @@ export default {
margin-bottom
:
0.98vh
;
.business-data
{
margin-right
:
4px
;
margin-top
:
2.5vh
;
width
:
36.11vw
;
height
:
100%
;
}
...
...
src/views/saas/businessView.vue
View file @
80a2e26
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-2
6 18:03:58
* @LastEditTime: 2022-10-2
7 11:09:54
* @FilePath: \dj-data-view\src\views\saas\business.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -41,8 +41,21 @@ export default {
data
()
{
return
{}
},
mounted
()
{},
methods
:
{}
mounted
()
{
this
.
getBusinessType
()
},
methods
:
{
toFixNum
(
val
)
{
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
},
getBusinessType
()
{
this
.
api
.
sass
.
getBusinessType
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
projectList
=
res
.
data
.
dataList
}
})
}
}
}
</
script
>
...
...
src/views/saas/project.vue
View file @
80a2e26
...
...
@@ -2,37 +2,37 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-2
6 14:25:05
* @LastEditTime: 2022-10-2
7 11:09:06
* @FilePath: \dj-data-view\src\views\saas\project.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div
class=
"project-wrap flex"
>
<div
class=
"project-item flex"
v-for=
"(item, index) in
4
"
:key=
"index"
>
<div
class=
"project-item flex"
v-for=
"(item, index) in
projectList
"
:key=
"index"
>
<div
class=
"project-left"
>
<div
class=
"project-title"
>
新车洽谈
</div>
<div
:class=
"['project-title',
{ fontSmall: index == 3 }]">
{{
item
.
name
}}
</div>
<div
class=
"project-icon"
><img
src=
"@/assets/images/arrow.png"
alt=
""
/></div>
</div>
<div
class=
"project-right flex"
>
<div
class=
"project-content-item"
>
<div
class=
"project-content-desc"
>
累计展业门店数
</div>
<div
class=
"project-content-num"
>
2,173
</div>
<div
class=
"project-content-num"
>
{{
item
.
totalNum
}}
</div>
</div>
<div
class=
"project-content-item"
>
<div
class=
"project-content-desc"
>
当
前
新增
</div>
<div
class=
"project-content-num"
>
2,173
</div>
<div
class=
"project-content-desc"
>
当
年
新增
</div>
<div
class=
"project-content-num"
>
{{
item
.
incrNum
}}
</div>
</div>
<div
class=
"project-content-item"
>
<div
class=
"project-content-desc"
>
转化率
</div>
<div
class=
"project-content-num"
>
2,173
</div>
<div
class=
"project-content-num"
>
{{
toFixNum
(
item
.
conversionrate
)
}}
</div>
</div>
<div
class=
"project-content-item"
>
<div
class=
"project-content-desc"
>
客单价
</div>
<div
class=
"project-content-num"
>
2,173
</div>
<div
class=
"project-content-num"
>
{{
numAddSymbol
(
item
.
atv
)
}}
</div>
</div>
<div
class=
"project-content-item"
>
<div
class=
"project-content-desc"
>
产值
</div>
<div
class=
"project-content-num"
>
2,173
</div>
<div
class=
"project-content-num"
>
{{
numAddSymbol
(
item
.
outputValue
)
}}
</div>
</div>
</div>
</div>
...
...
@@ -45,15 +45,31 @@ import datas from '../../utils/data'
export
default
{
name
:
'Project'
,
data
()
{
return
{}
return
{
projectList
:
[]
}
},
mounted
()
{
this
.
getBusinessType
()
},
mounted
()
{},
methods
:
{}
methods
:
{
toFixNum
(
val
)
{
return
(
val
*
100
).
toFixed
(
2
)
+
'%'
},
getBusinessType
()
{
this
.
api
.
sass
.
getBusinessType
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
projectList
=
res
.
data
.
dataList
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.project-wrap
{
margin-top
:
1.5vh
;
height
:
11.71vh
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
...
...
@@ -70,6 +86,9 @@ export default {
font-size
:
10px
;
line-height
:
12px
;
margin-top
:
0.4vh
;
&.fontSmall
{
font-size
:
9px
;
}
}
.project-icon
{
width
:
1.25vw
;
...
...
@@ -84,16 +103,16 @@ export default {
width
:
28%
;
}
&
:nth-child
(
2
)
{
width
:
1
8
%
;
width
:
1
4
%
;
}
&
:nth-child
(
3
)
{
width
:
1
8
%
;
width
:
1
4
%
;
}
&
:nth-child
(
4
)
{
width
:
18
%
;
width
:
22
%
;
}
&
:nth-child
(
5
)
{
width
:
18
%
;
width
:
22
%
;
}
padding-left
:
0
.5vw
;
.project-content-desc
{
...
...
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