Commit ef1379e2 by 李伟康

commit

1 parent a328e23e
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
}, },
watch: { watch: {
num (n) { num (n) {
if (n) document.querySelector(`#${this.idKey}`).style = `--step:${n}` document.querySelector(`#${this.idKey}`).style = `--step:${n}`
} }
}, },
mounted () { mounted () {
......
...@@ -94,9 +94,10 @@ export default { ...@@ -94,9 +94,10 @@ export default {
reportType: reportIndex == 0 ? 1 : 0 //月表0,日表1 reportType: reportIndex == 0 ? 1 : 0 //月表0,日表1
} }
if (tabIndex == 1) brands.map(e => { if (tabIndex == 1) brands.map(e => {
if (e.active) params.brandName = e.brandName if (e.active) params.brand = {
name: e.brandName
}
}) })
console.log(params)
this.$store.state.app.reportParams = params this.$store.state.app.reportParams = params
}, },
chooseBrand ({ i, index }) { chooseBrand ({ i, index }) {
......
...@@ -143,15 +143,16 @@ export default { ...@@ -143,15 +143,16 @@ export default {
}, },
methods: { methods: {
init (params) { init (params) {
params.queryType = params.reportType || 0 console.log(params)
delete params.reportType // params.queryType = params.reportType || 0
this.req = params // delete params.reportType
this.getOverallbase('total') // this.req = params
this.getOverallbase('wechat') // this.getOverallbase('total')
this.getOverallbase('wechatGroup') // this.getOverallbase('wechat')
this.getOverallbase('applet') // this.getOverallbase('wechatGroup')
this.getOverallbase('publiccus') // this.getOverallbase('applet')
this.getOveralltrend('total') // this.getOverallbase('publiccus')
// this.getOveralltrend('total')
}, },
changeType (type) { changeType (type) {
this.tabType = type this.tabType = type
...@@ -165,15 +166,25 @@ export default { ...@@ -165,15 +166,25 @@ export default {
const params = { const params = {
queryItem, queryItem,
queryTime: '2022-06-23', queryTime: '2022-06-23',
// queryTime: this.getCurrentDate(),
corporateGroupName: '集团1', corporateGroupName: '集团1',
...req ...req
} }
this.api.overview[queryType == 0 ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => { this.api.overview[queryType == 0 ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => {
if (code == 0) { if (code == 0) {
console.log(`________________${queryItem}_______________________`, data)
let [dataList] = data.dataList let [dataList] = data.dataList
dataList.top = this.ObjectToArray(dataList.topList) if (dataList) {
dataList.last = this.ObjectToArray(dataList.lastList) dataList.top = this.ObjectToArray(dataList.topList)
dataList.last = this.ObjectToArray(dataList.lastList)
} else {
dataList = {
top: [],
last: [],
incrNum: 0,
returnNum: 0,
totalNum: 0
}
}
this.pageData[queryItem] = dataList this.pageData[queryItem] = dataList
} }
}) })
...@@ -194,7 +205,6 @@ export default { ...@@ -194,7 +205,6 @@ export default {
...req ...req
} }
this.api.overview[queryType == 0 ? 'getBrandOveralltrend' : 'getMerchantOveralltrend'](params).then(({ data, code }) => { this.api.overview[queryType == 0 ? 'getBrandOveralltrend' : 'getMerchantOveralltrend'](params).then(({ data, code }) => {
console.log(`________________${queryItem}_______________________`, data)
if (code == 0) { if (code == 0) {
this.canvas = echarts.init(this.$refs.canvas) this.canvas = echarts.init(this.$refs.canvas)
this.draw(data.dataList, queryType) this.draw(data.dataList, queryType)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!