Commit de088d7e by 李伟康

修改样式

1 parent 84280f84
...@@ -55,17 +55,19 @@ ...@@ -55,17 +55,19 @@
<div class="tabs-content box"> <div class="tabs-content box">
<div class="tabs-title">客户增长趋势</div> <div class="tabs-title">客户增长趋势</div>
<div class="tabs-content-chart flex"> <div class="tabs-content-chart flex">
<div class="line">
<template v-if="flag">
<template v-if="isEmpty"> <template v-if="isEmpty">
<div class="empty">
<img src="@/assets/images/empty.png" /> <img src="@/assets/images/empty.png" />
</div>
</template> </template>
<template v-else> <template v-else>
<div <div
class="line"
ref="canvas" ref="canvas"
class="canvas"
></div> ></div>
</template> </template>
</template>
</div>
<div class="table user-select pointer"> <div class="table user-select pointer">
<div class="table-head"> <div class="table-head">
<template v-for="(i,index) in tabHead"> <template v-for="(i,index) in tabHead">
...@@ -145,7 +147,8 @@ export default { ...@@ -145,7 +147,8 @@ export default {
canvas: null, canvas: null,
req: {}, req: {},
isGroup: true, isGroup: true,
isEmpty: true isEmpty: true,
flag: false
} }
}, },
mounted () { mounted () {
...@@ -159,6 +162,7 @@ export default { ...@@ -159,6 +162,7 @@ export default {
if (params.brand) this.isGroup = false if (params.brand) this.isGroup = false
this.req = req this.req = req
this.isEmpty = true this.isEmpty = true
this.flag = false
this.getOverallbase('total') this.getOverallbase('total')
this.getOverallbase('wechat') this.getOverallbase('wechat')
this.getOverallbase('wechatGroup') this.getOverallbase('wechatGroup')
...@@ -181,7 +185,6 @@ export default { ...@@ -181,7 +185,6 @@ export default {
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) {
let [dataList] = data.dataList let [dataList] = data.dataList
console.log(dataList)
if (dataList) { if (dataList) {
dataList.top = this.ObjectToArray(dataList.topList) dataList.top = this.ObjectToArray(dataList.topList)
dataList.last = this.ObjectToArray(dataList.lastList) dataList.last = this.ObjectToArray(dataList.lastList)
...@@ -213,6 +216,7 @@ export default { ...@@ -213,6 +216,7 @@ export default {
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
if (code == 0) { if (code == 0) {
if (!data.dataList.map(item => item.totalNum).every(item => item === 0)) { if (!data.dataList.map(item => item.totalNum).every(item => item === 0)) {
this.isEmpty = false this.isEmpty = false
...@@ -389,7 +393,7 @@ export default { ...@@ -389,7 +393,7 @@ export default {
color: #e60115; color: #e60115;
} }
} }
>div{ > div {
flex-shrink: 0; flex-shrink: 0;
} }
} }
...@@ -410,9 +414,12 @@ export default { ...@@ -410,9 +414,12 @@ export default {
margin-top: auto; margin-top: auto;
justify-content: space-between; justify-content: space-between;
gap: 0 8px; gap: 0 8px;
.line, .line {
.empty {
flex: 7; flex: 7;
.canvas {
width: 100%;
height: 100%;
}
} }
.table { .table {
flex: 3; flex: 3;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!