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 @@ ...@@ -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,6 +230,8 @@ export default { ...@@ -227,6 +230,8 @@ export default {
} }
} }
}).catch(() => {
this.flag = true
}) })
}, },
draw (lineData, queryType) { draw (lineData, queryType) {
...@@ -254,6 +259,7 @@ export default { ...@@ -254,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}`
...@@ -285,13 +291,14 @@ export default { ...@@ -285,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: {
...@@ -416,10 +423,15 @@ export default { ...@@ -416,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;
......
...@@ -19,8 +19,7 @@ export default { ...@@ -19,8 +19,7 @@ export default {
const params = { const params = {
req: { req: {
queryItem: this.type, queryItem: this.type,
// queryTime: this.getCurrentDate, queryTime: this.getCurrentDate
queryTime: '2022-06-23',
} }
} }
if (this.isBrand) params.req.brandName = this.brandName if (this.isBrand) params.req.brandName = this.brandName
......
...@@ -19,8 +19,7 @@ export default { ...@@ -19,8 +19,7 @@ export default {
const params = { const params = {
req: { req: {
queryItem: this.type, queryItem: this.type,
// queryTime: this.getCurrentDate, queryTime: this.getCurrentDate,
queryTime: '2022-06-23',
queryType: this.watchReportParams.reportType queryType: this.watchReportParams.reportType
} }
} }
......
...@@ -48,12 +48,8 @@ export default { ...@@ -48,12 +48,8 @@ export default {
} }
}, },
mounted() { mounted() {
this.init()
}, },
methods: { methods: {
init() {
this.getValueType()
},
getChart() { getChart() {
this.barChart = echarts.init(document.getElementById('analyzeBar')) this.barChart = echarts.init(document.getElementById('analyzeBar'))
// resize // resize
...@@ -135,8 +131,7 @@ export default { ...@@ -135,8 +131,7 @@ export default {
const params = { const params = {
req: { req: {
queryItem: 'valueanalyse', queryItem: 'valueanalyse',
// queryTime: this.getCurrentDate, queryTime: this.getCurrentDate,
queryTime: '2022-06-23',
queryType: this.watchReportParams.reportType queryType: this.watchReportParams.reportType
} }
} }
......
...@@ -63,8 +63,7 @@ export default { ...@@ -63,8 +63,7 @@ export default {
const params = { const params = {
req: { req: {
queryItem: 'mileage', queryItem: 'mileage',
// queryTime: this.getCurrentDate, queryTime: this.getCurrentDate,
queryTime: '2022-06-23',
queryType: this.watchReportParams.reportType 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!