Commit ef1379e2 by 李伟康

commit

1 parent a328e23e
......@@ -19,7 +19,7 @@ export default {
},
watch: {
num (n) {
if (n) document.querySelector(`#${this.idKey}`).style = `--step:${n}`
document.querySelector(`#${this.idKey}`).style = `--step:${n}`
}
},
mounted () {
......
......@@ -94,9 +94,10 @@ export default {
reportType: reportIndex == 0 ? 1 : 0 //月表0,日表1
}
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
},
chooseBrand ({ i, index }) {
......
......@@ -143,15 +143,16 @@ export default {
},
methods: {
init (params) {
params.queryType = params.reportType || 0
delete params.reportType
this.req = params
this.getOverallbase('total')
this.getOverallbase('wechat')
this.getOverallbase('wechatGroup')
this.getOverallbase('applet')
this.getOverallbase('publiccus')
this.getOveralltrend('total')
console.log(params)
// params.queryType = params.reportType || 0
// delete params.reportType
// this.req = params
// this.getOverallbase('total')
// this.getOverallbase('wechat')
// this.getOverallbase('wechatGroup')
// this.getOverallbase('applet')
// this.getOverallbase('publiccus')
// this.getOveralltrend('total')
},
changeType (type) {
this.tabType = type
......@@ -165,15 +166,25 @@ export default {
const params = {
queryItem,
queryTime: '2022-06-23',
// queryTime: this.getCurrentDate(),
corporateGroupName: '集团1',
...req
}
this.api.overview[queryType == 0 ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => {
if (code == 0) {
console.log(`________________${queryItem}_______________________`, data)
let [dataList] = data.dataList
dataList.top = this.ObjectToArray(dataList.topList)
dataList.last = this.ObjectToArray(dataList.lastList)
if (dataList) {
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
}
})
......@@ -194,7 +205,6 @@ export default {
...req
}
this.api.overview[queryType == 0 ? 'getBrandOveralltrend' : 'getMerchantOveralltrend'](params).then(({ data, code }) => {
console.log(`________________${queryItem}_______________________`, data)
if (code == 0) {
this.canvas = echarts.init(this.$refs.canvas)
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!