Commit aa0e819f by 匡雅琴

核心指标调整

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