Commit 8f0d536f by 胡悦

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

2 parents 302b6188 e91d2eaa
......@@ -18,8 +18,6 @@
to continue.</strong>
</noscript>
<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下 -->
<% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
......
......@@ -55,10 +55,12 @@
<div class="tabs-content box">
<div class="tabs-title">客户增长趋势</div>
<div class="tabs-content-chart flex">
<div class="line">
<div class="line flex">
<template v-if="flag">
<template v-if="isEmpty">
<img src="@/assets/images/empty.png" />
<div class="empty-img">
<img src="@/assets/images/empty.png" />
</div>
</template>
<template v-else>
<div
......@@ -123,7 +125,6 @@ const tabs = [
key: 'publiccus'
}
]
let tabHead = ['前5品牌', '后5品牌']
import { changeMixin } from '@/mixins'
import * as echarts from 'echarts'
export default {
......@@ -132,7 +133,7 @@ export default {
data () {
return {
tabs,
tabHead,
tabHead: [],
tabType: 'total',
tabIndex: 0,
delayTimer: 3000,
......@@ -162,7 +163,7 @@ export default {
if (params.brand) this.isGroup = false
this.req = req
this.isEmpty = true
this.flag = false
// this.flag = false
this.getOverallbase('total')
this.getOverallbase('wechat')
this.getOverallbase('wechatGroup')
......@@ -180,8 +181,10 @@ export default {
getOverallbase (queryItem) {
const params = {
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 }) => {
if (code == 0) {
let [dataList] = data.dataList
......@@ -227,6 +230,8 @@ export default {
}
}
}).catch(() => {
this.flag = true
})
},
draw (lineData, queryType) {
......@@ -254,6 +259,7 @@ export default {
color: '#FFFFFF',
fontSize: '8px'
},
show: true,
formatter: ([value]) => {
return `${title[tabType]}:${value.data}`
// `${value.name}${title[tabType]}:${value.data}`
......@@ -285,13 +291,14 @@ export default {
series: [
{
type: 'line',
symbol: 'circle',
itemStyle: {
color: '#F5AA01'
},
// 节点,平滑曲线
symbol: 'none',
smooth: true,
showSymbol: false,
// 折线背景色
areaStyle: {
color: {
......@@ -416,10 +423,15 @@ export default {
gap: 0 8px;
.line {
flex: 7;
justify-content: center;
.canvas {
width: 100%;
height: 100%;
}
.empty-img {
width: 20vh;
height: 9.5vh;
}
}
.table {
flex: 3;
......
......@@ -19,8 +19,7 @@ export default {
const params = {
req: {
queryItem: this.type,
// queryTime: this.getCurrentDate,
queryTime: '2022-06-23',
queryTime: this.getCurrentDate
}
}
if (this.isBrand) params.req.brandName = this.brandName
......
......@@ -19,8 +19,7 @@ export default {
const params = {
req: {
queryItem: this.type,
// queryTime: this.getCurrentDate,
queryTime: '2022-06-23',
queryTime: this.getCurrentDate,
queryType: this.watchReportParams.reportType
}
}
......
......@@ -48,12 +48,8 @@ export default {
}
},
mounted() {
this.init()
},
methods: {
init() {
this.getValueType()
},
getChart() {
this.barChart = echarts.init(document.getElementById('analyzeBar'))
// resize
......@@ -135,8 +131,7 @@ export default {
const params = {
req: {
queryItem: 'valueanalyse',
// queryTime: this.getCurrentDate,
queryTime: '2022-06-23',
queryTime: this.getCurrentDate,
queryType: this.watchReportParams.reportType
}
}
......
......@@ -63,8 +63,7 @@ export default {
const params = {
req: {
queryItem: 'mileage',
// queryTime: this.getCurrentDate,
queryTime: '2022-06-23',
queryTime: this.getCurrentDate,
queryType: this.watchReportParams.reportType
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!