Commit 8845482e by 李伟康

提交代码

1 parent 5ac6e1db
......@@ -20,7 +20,6 @@ class Request {
params.req.corporateGroupName = '广汇'
const { reportParams } = window.vm.$store.state.app
if (reportParams) {
params.req.queryType = reportParams.reportType || 0
if (reportParams.brand) params.req.brandName = reportParams.brand.name
}
if (method === 'GET') {
......
......@@ -76,7 +76,7 @@
<div
:class="['table-head-item flex',{'active':index == tabIndex}]"
:key="index"
@click="changeTab(index)"
@click="tabIndex = index"
>
{{i}}
</div>
......@@ -175,15 +175,13 @@ export default {
this.tabType = type
this.getOveralltrend(type)
},
changeTab (index) {
this.tabIndex = index
},
getOverallbase (queryItem) {
let { req: { queryType } } = this
const params = {
queryItem,
queryTime: this.getCurrentDate()
queryType,
queryTime: this.getNDate(-1)
}
this.tabHead = this.isGroup ? ['前5品牌', '后5品牌'] : ['前5门店', '后5门店']
this.api.overview[this.isGroup ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => {
if (code == 0) {
......@@ -215,8 +213,10 @@ export default {
let { req: { queryType } } = this
const params = {
queryItem,
queryType,
querystartTime: queryType == 1 ? this.getNDate(-30) : this.getNMonth(-12),
queryendTime: queryType == 1 ? this.getNDate(-1) : this.getNMonth(-1),
}
this.api.overview[this.isGroup ? 'getBrandOveralltrend' : 'getMerchantOveralltrend'](params).then(({ data, code }) => {
this.flag = true
......@@ -238,7 +238,7 @@ export default {
let data = [],
xData = [],
title = {
'total': '客户数',
'total': '客户总数',
'wechat': '企微客户数',
'wechatGroup': '企微群数',
'applet': '小程序客户数',
......@@ -261,17 +261,22 @@ export default {
},
show: true,
formatter: ([value]) => {
return `${title[tabType]}:${value.data}`
// `${value.name}${title[tabType]}:${value.data}`
return `${value.name}<br/>${title[tabType]}:${value.data}`
}
},
xAxis: {
type: 'category',
axisLabel: {
show: true,
interval: queryType == 0 ? 0 : 7,
color: '#606266',
fontSize: '0.8em'
fontSize: '0.8em',
margin: 20
},
data: xData
data: xData,
axisTick: {
alignWithLabel: true
}
},
grid: {
left: '3%',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!