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 ef7a2781
authored
Oct 26, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
561ebfdb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
22 deletions
src/api/modules/customer.js
src/api/request.js
src/components/ViewTabs.vue
src/main.js
src/mixins/clientMixin.js
vue.config.js
src/api/modules/customer.js
View file @
ef7a278
// 获取
品牌年龄/性别/购车年限
// 获取
企业客户总览数据
const
overalldistribution
=
params
=>
{
const
getEnterpriseOverview
=
params
=>
{
return
window
.
$HTTP
.
get
(
'
brand/overalldistribution
'
,
params
)
return
window
.
$HTTP
.
get
(
'
enterpriseCustomer/getEnterpriseOverview
'
,
params
)
}
}
// 获取门店年龄/性别/购车年限
// 获取门店年龄/性别/购车年限
...
@@ -8,6 +8,6 @@ const merchantOveralldistribution = params => {
...
@@ -8,6 +8,6 @@ const merchantOveralldistribution = params => {
return
window
.
$HTTP
.
get
(
'merchant/overalldistribution'
,
params
)
return
window
.
$HTTP
.
get
(
'merchant/overalldistribution'
,
params
)
}
}
export
default
{
export
default
{
overalldistribution
,
getEnterpriseOverview
,
merchantOveralldistribution
merchantOveralldistribution
}
}
src/api/request.js
View file @
ef7a278
...
@@ -19,7 +19,7 @@ class Request {
...
@@ -19,7 +19,7 @@ class Request {
}
}
if
(
method
===
'GET'
)
{
if
(
method
===
'GET'
)
{
var
paramsArray
=
[]
var
paramsArray
=
[]
Object
.
keys
(
params
.
req
).
forEach
(
key
=>
paramsArray
.
push
(
'req.'
+
key
+
'='
+
params
.
req
[
key
]))
params
&&
Object
.
keys
(
params
.
req
).
forEach
(
key
=>
paramsArray
.
push
(
'req.'
+
key
+
'='
+
params
.
req
[
key
]))
if
(
url
.
search
(
/
\?
/
)
===
-
1
)
{
if
(
url
.
search
(
/
\?
/
)
===
-
1
)
{
url
+=
'?'
+
paramsArray
.
join
(
'&'
)
url
+=
'?'
+
paramsArray
.
join
(
'&'
)
}
else
{
}
else
{
...
...
src/components/ViewTabs.vue
View file @
ef7a278
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"tabs flex box"
>
<div
class=
"tabs flex box"
>
<div
class=
"tab"
v-for=
"item in tabs"
:key=
"item.key"
>
<div
class=
"tab"
v-for=
"item in tabs"
:key=
"item.key"
>
<div
class=
"tab-title"
>
{{
item
.
title
}}
</div>
<div
class=
"tab-title"
>
{{
item
.
title
}}
</div>
<div
class=
"tab-text text-linear"
>
2,1744
</div>
<div
class=
"tab-text text-linear"
>
{{
dataList
[
item
.
key
]
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -13,41 +13,53 @@ export default {
...
@@ -13,41 +13,53 @@ export default {
name
:
'ViewTabs'
,
name
:
'ViewTabs'
,
data
()
{
data
()
{
return
{
return
{
dataList
:{},
tabs
:
[
tabs
:
[
{
{
title
:
'总门店数'
,
title
:
'总门店数'
,
key
:
'
wechat
'
key
:
'
totalNum
'
},
},
{
{
title
:
'当年新增'
,
title
:
'当年新增'
,
key
:
'
wechatGroup
'
key
:
'
incrNum
'
},
},
{
{
title
:
'
总门店数
'
,
title
:
'
留存率
'
,
key
:
'
applet
'
key
:
'
retention
'
},
},
{
{
title
:
'
总门店数
'
,
title
:
'
单店产值
'
,
key
:
'
publiccus
'
key
:
'
outputValue
'
}
}
]
]
}
}
},
},
mounted
()
{},
created
()
{
methods
:
{}
this
.
getEnterpriseOverview
()
},
methods
:
{
getEnterpriseOverview
()
{
this
.
api
.
customer
.
getEnterpriseOverview
().
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
0
){
this
.
dataList
=
res
.
data
.
dataList
[
0
]
}
})
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.tabs
{
.tabs
{
margin
:
1.22vh
0
0.98vh
0
;
margin
:
1.22vh
0
0.98vh
0
;
padding
:
0
1.67vw
;
padding
:
0
1.67vw
;
height
:
6.95vh
;
height
:
6.95vh
;
width
:
100%
;
width
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
justify-content
:
space-between
;
justify-content
:
space-between
;
.tab
{
.tab
{
margin
:
0.61vh
0
;
margin
:
0.61vh
0
;
.tab-title
{
.tab-title
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
12px
;
font-size
:
12px
;
...
...
src/main.js
View file @
ef7a278
...
@@ -35,14 +35,13 @@ Vue.prototype.to = function (name, params) {
...
@@ -35,14 +35,13 @@ Vue.prototype.to = function (name, params) {
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
const
isMock
=
[
'prod'
,
'production'
].
includes
(
process
.
env
.
NODE_ENV
)
const
isMock
=
[
'prod'
,
'production'
].
includes
(
process
.
env
.
NODE_ENV
)
console
.
log
(
isMock
,
'----------------'
)
fetchConfig
(
!
isMock
).
then
(
res
=>
{
fetchConfig
(
!
isMock
).
then
(
res
=>
{
console
.
log
(
res
)
// 从配置服务器获取动态配置
// 从配置服务器获取动态配置
// 设置 js中可以访问 $cdn
// 设置 js中可以访问 $cdn
Vue
.
use
(
cfg
)
Vue
.
use
(
cfg
)
// if (res.vconsole) new VConsole()
// if (res.vconsole) new VConsole()
window
.
$HTTP
=
new
Request
(
res
.
request
)
// window.$HTTP = new Request(res.request)
window
.
$HTTP
=
new
Request
()
Vue
.
prototype
.
api
=
api
Vue
.
prototype
.
api
=
api
window
.
vm
=
new
Vue
({
window
.
vm
=
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
...
...
src/mixins/clientMixin.js
View file @
ef7a278
...
@@ -57,7 +57,7 @@ export default {
...
@@ -57,7 +57,7 @@ export default {
this
.
isBrand
=
true
this
.
isBrand
=
true
this
.
brandName
=
newVal
.
brand
.
name
this
.
brandName
=
newVal
.
brand
.
name
}
}
this
.
getClientData
()
//
this.getClientData()
},
},
pieAction
(
data
)
{
pieAction
(
data
)
{
this
.
brandList
=
[]
this
.
brandList
=
[]
...
...
vue.config.js
View file @
ef7a278
...
@@ -29,7 +29,7 @@ module.exports = {
...
@@ -29,7 +29,7 @@ module.exports = {
},
},
proxy
:
{
proxy
:
{
'/dev'
:
{
'/dev'
:
{
target
:
'http://192.168.1.152:808
1
'
,
target
:
'http://192.168.1.152:808
0
'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
ws
:
true
,
ws
:
true
,
pathRewrite
:
{
pathRewrite
:
{
...
...
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