Commit a46390b8 by 胡悦

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
...@@ -55,17 +55,19 @@ ...@@ -55,17 +55,19 @@
<div class="tabs-content box"> <div class="tabs-content box">
<div class="tabs-title">客户增长趋势</div> <div class="tabs-title">客户增长趋势</div>
<div class="tabs-content-chart flex"> <div class="tabs-content-chart flex">
<template v-if="isEmpty"> <div class="line">
<div class="empty"> <template v-if="flag">
<img src="@/assets/images/empty.png" /> <template v-if="isEmpty">
</div> <img src="@/assets/images/empty.png" />
</template> </template>
<template v-else> <template v-else>
<div <div
class="line" ref="canvas"
ref="canvas" class="canvas"
></div> ></div>
</template> </template>
</template>
</div>
<div class="table user-select pointer"> <div class="table user-select pointer">
<div class="table-head"> <div class="table-head">
<template v-for="(i,index) in tabHead"> <template v-for="(i,index) in tabHead">
...@@ -145,7 +147,8 @@ export default { ...@@ -145,7 +147,8 @@ export default {
canvas: null, canvas: null,
req: {}, req: {},
isGroup: true, isGroup: true,
isEmpty: true isEmpty: true,
flag: false
} }
}, },
mounted () { mounted () {
...@@ -159,6 +162,7 @@ export default { ...@@ -159,6 +162,7 @@ export default {
if (params.brand) this.isGroup = false if (params.brand) this.isGroup = false
this.req = req this.req = req
this.isEmpty = true this.isEmpty = true
this.flag = false
this.getOverallbase('total') this.getOverallbase('total')
this.getOverallbase('wechat') this.getOverallbase('wechat')
this.getOverallbase('wechatGroup') this.getOverallbase('wechatGroup')
...@@ -181,7 +185,6 @@ export default { ...@@ -181,7 +185,6 @@ export default {
this.api.overview[this.isGroup ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => { this.api.overview[this.isGroup ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => {
if (code == 0) { if (code == 0) {
let [dataList] = data.dataList let [dataList] = data.dataList
console.log(dataList)
if (dataList) { if (dataList) {
dataList.top = this.ObjectToArray(dataList.topList) dataList.top = this.ObjectToArray(dataList.topList)
dataList.last = this.ObjectToArray(dataList.lastList) dataList.last = this.ObjectToArray(dataList.lastList)
...@@ -213,6 +216,7 @@ export default { ...@@ -213,6 +216,7 @@ export default {
queryendTime: queryType == 1 ? this.getNDate(-1) : this.getNMonth(-1), queryendTime: queryType == 1 ? this.getNDate(-1) : this.getNMonth(-1),
} }
this.api.overview[this.isGroup ? 'getBrandOveralltrend' : 'getMerchantOveralltrend'](params).then(({ data, code }) => { this.api.overview[this.isGroup ? 'getBrandOveralltrend' : 'getMerchantOveralltrend'](params).then(({ data, code }) => {
this.flag = true
if (code == 0) { if (code == 0) {
if (!data.dataList.map(item => item.totalNum).every(item => item === 0)) { if (!data.dataList.map(item => item.totalNum).every(item => item === 0)) {
this.isEmpty = false this.isEmpty = false
...@@ -376,7 +380,7 @@ export default { ...@@ -376,7 +380,7 @@ export default {
padding-top: 0.5vh; padding-top: 0.5vh;
} }
&-total { &-total {
font-size: 16px; font-size: 14px;
color: #eb6001; color: #eb6001;
font-weight: 700; font-weight: 700;
} }
...@@ -385,10 +389,13 @@ export default { ...@@ -385,10 +389,13 @@ export default {
color: #606266; color: #606266;
padding-bottom: 0.5vh; padding-bottom: 0.5vh;
&-numer { &-numer {
font-size: 10.5px; font-size: 10px;
color: #e60115; color: #e60115;
} }
} }
> div {
flex-shrink: 0;
}
} }
} }
} }
...@@ -407,9 +414,12 @@ export default { ...@@ -407,9 +414,12 @@ export default {
margin-top: auto; margin-top: auto;
justify-content: space-between; justify-content: space-between;
gap: 0 8px; gap: 0 8px;
.line, .line {
.empty {
flex: 7; flex: 7;
.canvas {
width: 100%;
height: 100%;
}
} }
.table { .table {
flex: 3; flex: 3;
......
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
envVersion: 'trial', envVersion: 'trial',
title: '广汇汽车服务', title: '广汇汽车服务',
request: { request: {
baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址, baseURL: 'http://192.168.3.126:8081', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -15,8 +15,8 @@ export const fetchConfig = function (isEnv = true) { ...@@ -15,8 +15,8 @@ export const fetchConfig = function (isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(config) 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()) /**测试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()) // /**生产 */ 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 = { export const cfg = {
install (vue, config) { install (vue, config) {
......
...@@ -38,8 +38,7 @@ fetchConfig(!isMock).then(res => { ...@@ -38,8 +38,7 @@ fetchConfig(!isMock).then(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() window.$HTTP = new Request(res.request)
// window.$HTTP = new Request(res.request)
Vue.prototype.api = api Vue.prototype.api = api
window.vm = new Vue({ window.vm = new Vue({
el: '#app', el: '#app',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!