Commit 1255d06d by 李伟康

修复BUG

1 parent a18f6225
......@@ -226,4 +226,18 @@ p {
}
}
}
::v-deep.line-chart {
width: 100%;
height: 100%;
div {
&:nth-child(1) {
width: 100% !important;
height: 100% !important;
canvas {
width: 100% !important;
height: 100% !important;
}
}
}
}
</style>
......@@ -168,7 +168,6 @@ export default {
if (params.brand) this.isGroup = false
this.req = req
this.isEmpty = true
// this.flag = false
this.getOverallbase('total')
this.getOverallbase('wechat')
this.getOverallbase('wechatGroup')
......@@ -189,6 +188,13 @@ export default {
}
this.tabHead = this.isGroup ? ['前5品牌', '后5品牌'] : ['前5门店', '后5门店']
this.api.overview[this.isGroup ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => {
this.pageData[queryItem] = {
top: [],
last: [],
incrNum: 0,
returnNum: 0,
totalNum: 0
}
if (code == 0) {
let [dataList] = data.dataList
if (dataList) {
......@@ -211,21 +217,18 @@ export default {
this.pageData[queryItem] = dataList
}
}).catch(() => {
this.pageData[queryItem] = {
top: [],
last: [],
incrNum: 0,
returnNum: 0,
totalNum: 0
}
})
},
ObjectToArray (obj) {
let arr = []
if (obj && obj != 'null') JSON.parse(obj).map(e => {
Object.keys(e).map(name => arr.push({ name, num: e[name] }))
})
if (obj && obj !== 'null') {
obj = obj.replace('null', '"未知"')
let item = JSON.parse(obj)
if (Array.isArray(item)) item.map(e => {
Object.keys(e).map(name => arr.push({ name, num: e[name] }))
})
else Object.keys(item).map(name => arr.push({ name, num: item[name] }))
}
return arr
},
getOveralltrend (queryItem) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!