Commit e91d2eaa by 王志慧

Merge branch 'dev_v1.0.0' of http://192.168.3.233:8090/gh/data-view into dev_v1.0.0

2 parents d630ac2c a92950bb
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
to continue.</strong> to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
<!-- 使用CDN加速的JS文件,配置在vue.config.js下 --> <!-- 使用CDN加速的JS文件,配置在vue.config.js下 -->
<% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %> <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script> <script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
......
...@@ -55,10 +55,12 @@ ...@@ -55,10 +55,12 @@
<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">
<div class="line"> <div class="line flex">
<template v-if="flag"> <template v-if="flag">
<template v-if="isEmpty"> <template v-if="isEmpty">
<div class="empty-img">
<img src="@/assets/images/empty.png" /> <img src="@/assets/images/empty.png" />
</div>
</template> </template>
<template v-else> <template v-else>
<div <div
...@@ -123,7 +125,6 @@ const tabs = [ ...@@ -123,7 +125,6 @@ const tabs = [
key: 'publiccus' key: 'publiccus'
} }
] ]
let tabHead = ['前5品牌', '后5品牌']
import { changeMixin } from '@/mixins' import { changeMixin } from '@/mixins'
import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
...@@ -132,7 +133,7 @@ export default { ...@@ -132,7 +133,7 @@ export default {
data () { data () {
return { return {
tabs, tabs,
tabHead, tabHead: [],
tabType: 'total', tabType: 'total',
tabIndex: 0, tabIndex: 0,
delayTimer: 3000, delayTimer: 3000,
...@@ -162,7 +163,7 @@ export default { ...@@ -162,7 +163,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.flag = false
this.getOverallbase('total') this.getOverallbase('total')
this.getOverallbase('wechat') this.getOverallbase('wechat')
this.getOverallbase('wechatGroup') this.getOverallbase('wechatGroup')
...@@ -180,8 +181,10 @@ export default { ...@@ -180,8 +181,10 @@ export default {
getOverallbase (queryItem) { getOverallbase (queryItem) {
const params = { const params = {
queryItem, queryItem,
queryTime: this.getCurrentDate(), queryTime: this.getCurrentDate()
} }
this.tabHead = this.isGroup ? ['前5品牌', '后5品牌'] : ['前5门店', '后5门店']
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
...@@ -227,7 +230,7 @@ export default { ...@@ -227,7 +230,7 @@ export default {
} }
} }
}).catch(()=>{ }).catch(() => {
this.flag = true this.flag = true
}) })
}, },
...@@ -256,6 +259,7 @@ export default { ...@@ -256,6 +259,7 @@ export default {
color: '#FFFFFF', color: '#FFFFFF',
fontSize: '8px' fontSize: '8px'
}, },
show: true,
formatter: ([value]) => { formatter: ([value]) => {
return `${title[tabType]}:${value.data}` return `${title[tabType]}:${value.data}`
// `${value.name}${title[tabType]}:${value.data}` // `${value.name}${title[tabType]}:${value.data}`
...@@ -287,13 +291,14 @@ export default { ...@@ -287,13 +291,14 @@ export default {
series: [ series: [
{ {
type: 'line', type: 'line',
symbol: 'circle',
itemStyle: { itemStyle: {
color: '#F5AA01' color: '#F5AA01'
}, },
// 节点,平滑曲线 // 节点,平滑曲线
symbol: 'none',
smooth: true, smooth: true,
showSymbol: false,
// 折线背景色 // 折线背景色
areaStyle: { areaStyle: {
color: { color: {
...@@ -418,10 +423,15 @@ export default { ...@@ -418,10 +423,15 @@ export default {
gap: 0 8px; gap: 0 8px;
.line { .line {
flex: 7; flex: 7;
justify-content: center;
.canvas { .canvas {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.empty-img {
width: 20vh;
height: 9.5vh;
}
} }
.table { .table {
flex: 3; flex: 3;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!