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