Commit 8845482e by 李伟康

提交代码

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