Commit aa0e819f by 匡雅琴

核心指标调整

1 parent 36246a8e
......@@ -4,7 +4,7 @@
<div class="core-box-content">
<!-- <StatisticsBox :list="coreIndexList"></StatisticsBox> -->
<PullDownSelect class="down-select" :selectList="selectList" @selectVal="selectVal"></PullDownSelect>
<inner-tab class="tab-box" :list="tabList" :width="innerTabWidth" :itemPadding="0.5" @changeTab="changeTab"></inner-tab>
<inner-tab ref="innerTabCoreRef" class="tab-box" :list="tabList" :width="innerTabWidth" :itemPadding="0.5" @changeTab="changeTab"></inner-tab>
<BarChart ref="coreChartRef" :label="'statYear'" height="28vh" domId="coreChart" :colorList="colorList" :barWidth="'50'" :valueName="valueName"></BarChart>
</div>
</div>
......@@ -60,20 +60,25 @@ export default {
methods: {
selectVal(val) {
console.log(val)
this.$refs.innerTabCoreRef.tabActive = 0
switch (val.val) {
case 'activeMerchant':
this.tabList = ['SaaS+门店总数', '有成交门店数', '活跃门店数']
this.selectActive = 0
this.innerTabWidth = 18.3
this.valueName = 'saasMerchantNum'
this.$refs.coreChartRef.drawBar(this.activeMerchant)
this.$nextTick(() => {
this.$refs.coreChartRef.drawBar(this.activeMerchant)
})
break
case 'coreRetention':
this.tabList = ['当年留存门店数', '上半年活跃门店数', '门店留存率']
this.selectActive = 1
this.innerTabWidth = 19.9
this.tooltips.attrName = 'retentionNum'
this.$refs.coreChartRef.drawBar(this.coreRetention)
this.valueName = 'retentionNum'
this.$nextTick(() => {
this.$refs.coreChartRef.drawBar(this.coreRetention)
})
break
}
},
......@@ -93,7 +98,9 @@ export default {
break
}
_dataList = this.selectActive === 0 ? this.activeMerchant : this.coreRetention
this.$refs.coreChartRef.drawBar(_dataList)
this.$nextTick(() => {
this.$refs.coreChartRef.drawBar(_dataList)
})
},
async getCoreActiveMerchant() {
const _data = await this.api.internal.getCoreActiveMerchant()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!