Commit 086fc429 by 姜雷

修改首页其他校区选择

parent c9611609
......@@ -34,8 +34,9 @@
:data="campusRankList"
:changeCampusHandle="changeCampusHandle"
:updateCampusName="updateCampusName"
:showOtherNameHandle="showOtherNameHandle"
/>
<div class="SeviceRatio-title">{{areaInfo.areaName}}</div>
<div class="SeviceRatio-title">{{showOther?'其他校区':areaInfo.areaName}}</div>
</div>
</template>
......@@ -54,6 +55,9 @@ export default {
'loading',
]),
},
data() {
return { showOther: false };
},
methods: {
...mapActions('Dashboard', [
'fetchConsumeList',
......@@ -70,8 +74,12 @@ export default {
updatePercentList: true,
}).then(() => {
this.updateCampusName(data);
this.showOther = false;
});
},
showOtherNameHandle() {
this.showOther = true;
},
},
};
</script>
......@@ -24,6 +24,7 @@ export default {
props: {
changeCampusHandle: { type: Function },
updateCampusName: { type: Function },
showOtherNameHandle: { type: Function },
},
data() {
let total = this.data.reduce((count, item) => count + item.count, 0);
......@@ -115,6 +116,8 @@ export default {
this.changeSelected(data);
if (data.areaId) {
this.changeCampusHandle(data);
} else {
this.showOtherNameHandle();
}
}
},
......
......@@ -135,7 +135,7 @@ export default {
container: 'CustomerRechargeChart',
forceFit: true,
height: this.height,
padding: [30, 70, 20, 120],
padding: [30, 90, 20, 120],
});
this.chart.source(dv, {
......@@ -182,7 +182,7 @@ export default {
top: true,
position: ['100%', '0%'],
content: '(人)',
offsetX: 10,
offsetX: 30,
offsetY: -8,
});
......@@ -190,7 +190,7 @@ export default {
top: true,
position: ['100%', '100%'],
content: '(元)',
offsetX: 10,
offsetX: 30,
offsetY: 8,
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment