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 a46390b8
authored
Jun 30, 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
adc71002
0328208d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
22 deletions
src/components/ViewTabs.vue
src/config/env.development.js
src/config/index.js
src/main.js
src/components/ViewTabs.vue
View file @
a46390b
...
...
@@ -55,17 +55,19 @@
<div
class=
"tabs-content box"
>
<div
class=
"tabs-title"
>
客户增长趋势
</div>
<div
class=
"tabs-content-chart flex"
>
<
template
v-if=
"isEmpty"
>
<div
class=
"empty"
>
<img
src=
"@/assets/images/empty.png"
/>
</div>
</
template
>
<
template
v-else
>
<div
class=
"line"
ref=
"canvas"
></div>
</
template
>
<div
class=
"line"
>
<
template
v-if=
"flag"
>
<template
v-if=
"isEmpty"
>
<img
src=
"@/assets/images/empty.png"
/>
</
template
>
<
template
v-else
>
<div
ref=
"canvas"
class=
"canvas"
></div>
</
template
>
</template>
</div>
<div
class=
"table user-select pointer"
>
<div
class=
"table-head"
>
<
template
v-for=
"(i,index) in tabHead"
>
...
...
@@ -145,7 +147,8 @@ export default {
canvas
:
null
,
req
:
{},
isGroup
:
true
,
isEmpty
:
true
isEmpty
:
true
,
flag
:
false
}
},
mounted
()
{
...
...
@@ -159,6 +162,7 @@ export default {
if
(
params
.
brand
)
this
.
isGroup
=
false
this
.
req
=
req
this
.
isEmpty
=
true
this
.
flag
=
false
this
.
getOverallbase
(
'total'
)
this
.
getOverallbase
(
'wechat'
)
this
.
getOverallbase
(
'wechatGroup'
)
...
...
@@ -181,7 +185,6 @@ export default {
this
.
api
.
overview
[
this
.
isGroup
?
'getBrandOverallbase'
:
'getMerchantOverallbase'
](
params
).
then
(({
code
,
data
})
=>
{
if
(
code
==
0
)
{
let
[
dataList
]
=
data
.
dataList
console
.
log
(
dataList
)
if
(
dataList
)
{
dataList
.
top
=
this
.
ObjectToArray
(
dataList
.
topList
)
dataList
.
last
=
this
.
ObjectToArray
(
dataList
.
lastList
)
...
...
@@ -213,6 +216,7 @@ export default {
queryendTime
:
queryType
==
1
?
this
.
getNDate
(
-
1
)
:
this
.
getNMonth
(
-
1
),
}
this
.
api
.
overview
[
this
.
isGroup
?
'getBrandOveralltrend'
:
'getMerchantOveralltrend'
](
params
).
then
(({
data
,
code
})
=>
{
this
.
flag
=
true
if
(
code
==
0
)
{
if
(
!
data
.
dataList
.
map
(
item
=>
item
.
totalNum
).
every
(
item
=>
item
===
0
))
{
this
.
isEmpty
=
false
...
...
@@ -376,7 +380,7 @@ export default {
padding-top
:
0.5vh
;
}
&
-total
{
font-size
:
1
6
px
;
font-size
:
1
4
px
;
color
:
#eb6001
;
font-weight
:
700
;
}
...
...
@@ -385,10 +389,13 @@ export default {
color
:
#606266
;
padding-bottom
:
0.5vh
;
&-numer
{
font-size
:
10
.5
px
;
font-size
:
10px
;
color
:
#e60115
;
}
}
>
div
{
flex-shrink
:
0
;
}
}
}
}
...
...
@@ -407,9 +414,12 @@ export default {
margin-top
:
auto
;
justify-content
:
space-between
;
gap
:
0
8px
;
.line,
.empty
{
.line
{
flex
:
7
;
.canvas
{
width
:
100%
;
height
:
100%
;
}
}
.table
{
flex
:
3
;
...
...
src/config/env.development.js
View file @
a46390b
...
...
@@ -11,7 +11,7 @@ module.exports = {
envVersion
:
'trial'
,
title
:
'广汇汽车服务'
,
request
:
{
baseURL
:
'http://
scrm.dev.glsx.com.cn
'
,
// 本地测试项目地址,
baseURL
:
'http://
192.168.3.126:8081
'
,
// 本地测试项目地址,
// 设置超时时间
timeout
:
180000
,
// 携带凭证
...
...
src/config/index.js
View file @
a46390b
...
...
@@ -15,8 +15,8 @@ export const fetchConfig = function (isEnv = true) {
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
config
)
}
// /**测试mock */ return window.fetch('https://oss-config.dev.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-
config', {}).then(res => res.json())
/**生产 */
return
window
.
fetch
(
'https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config'
,
{}).
then
(
res
=>
res
.
json
())
/**测试mock */
return
window
.
fetch
(
'https://oss-config.dev.glsx.com.cn/mock/62bd8142304f1311a3b76a04/data-view/
config'
,
{}).
then
(
res
=>
res
.
json
())
/
/ /
**生产 */ return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json())
}
export
const
cfg
=
{
install
(
vue
,
config
)
{
...
...
src/main.js
View file @
a46390b
...
...
@@ -38,8 +38,7 @@ fetchConfig(!isMock).then(res => {
// 设置 js中可以访问 $cdn
Vue
.
use
(
cfg
)
// if (res.vconsole) new VConsole()
window
.
$HTTP
=
new
Request
()
// window.$HTTP = new Request(res.request)
window
.
$HTTP
=
new
Request
(
res
.
request
)
Vue
.
prototype
.
api
=
api
window
.
vm
=
new
Vue
({
el
:
'#app'
,
...
...
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