Commit 1cd3cd59 by 姜雷

Merge branch 'develop' into 'test'

修改首页其他校区选择 See merge request !27
parents ff96b955 086fc429
...@@ -34,8 +34,9 @@ ...@@ -34,8 +34,9 @@
:data="campusRankList" :data="campusRankList"
:changeCampusHandle="changeCampusHandle" :changeCampusHandle="changeCampusHandle"
:updateCampusName="updateCampusName" :updateCampusName="updateCampusName"
:showOtherNameHandle="showOtherNameHandle"
/> />
<div class="SeviceRatio-title">{{areaInfo.areaName}}</div> <div class="SeviceRatio-title">{{showOther?'其他校区':areaInfo.areaName}}</div>
</div> </div>
</template> </template>
...@@ -54,6 +55,9 @@ export default { ...@@ -54,6 +55,9 @@ export default {
'loading', 'loading',
]), ]),
}, },
data() {
return { showOther: false };
},
methods: { methods: {
...mapActions('Dashboard', [ ...mapActions('Dashboard', [
'fetchConsumeList', 'fetchConsumeList',
...@@ -70,8 +74,12 @@ export default { ...@@ -70,8 +74,12 @@ export default {
updatePercentList: true, updatePercentList: true,
}).then(() => { }).then(() => {
this.updateCampusName(data); this.updateCampusName(data);
this.showOther = false;
}); });
}, },
showOtherNameHandle() {
this.showOther = true;
},
}, },
}; };
</script> </script>
...@@ -24,6 +24,7 @@ export default { ...@@ -24,6 +24,7 @@ export default {
props: { props: {
changeCampusHandle: { type: Function }, changeCampusHandle: { type: Function },
updateCampusName: { type: Function }, updateCampusName: { type: Function },
showOtherNameHandle: { type: Function },
}, },
data() { data() {
let total = this.data.reduce((count, item) => count + item.count, 0); let total = this.data.reduce((count, item) => count + item.count, 0);
...@@ -115,6 +116,8 @@ export default { ...@@ -115,6 +116,8 @@ export default {
this.changeSelected(data); this.changeSelected(data);
if (data.areaId) { if (data.areaId) {
this.changeCampusHandle(data); this.changeCampusHandle(data);
} else {
this.showOtherNameHandle();
} }
} }
}, },
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
container: 'CustomerRechargeChart', container: 'CustomerRechargeChart',
forceFit: true, forceFit: true,
height: this.height, height: this.height,
padding: [30, 70, 20, 120], padding: [30, 90, 20, 120],
}); });
this.chart.source(dv, { this.chart.source(dv, {
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
top: true, top: true,
position: ['100%', '0%'], position: ['100%', '0%'],
content: '(人)', content: '(人)',
offsetX: 10, offsetX: 30,
offsetY: -8, offsetY: -8,
}); });
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
top: true, top: true,
position: ['100%', '100%'], position: ['100%', '100%'],
content: '(元)', content: '(元)',
offsetX: 10, offsetX: 30,
offsetY: 8, 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