Commit 6b668c7f by 姜雷

修复调整消费占比时运营商更新错误

parent f55b32e0
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<operator-select <operator-select
:accessType="1" :accessType="1"
:value="filters.operateId" :value="filters.operateId"
@input="val => fetchConsumeList({ operateId: val })" @input="val => changeFilterHandle({ operateId: val })"
/> />
</search-item> </search-item>
<el-radio-group <el-radio-group
class="Dashboard-Radio" class="Dashboard-Radio"
:value="filters.timeType" :value="filters.timeType"
@input="val => fetchConsumeList({ timeType: val })" @input="val => changeFilterHandle({ timeType: val })"
> >
<el-radio <el-radio
class="Dashboard-Radio-item" class="Dashboard-Radio-item"
...@@ -47,7 +47,17 @@ export default { ...@@ -47,7 +47,17 @@ export default {
...mapGetters('Dashboard', ['campusRankList', 'filters', 'areaName']), ...mapGetters('Dashboard', ['campusRankList', 'filters', 'areaName']),
}, },
methods: { methods: {
...mapActions('Dashboard', ['fetchConsumeList', 'updateCampusName']), ...mapActions('Dashboard', [
'fetchConsumeList',
'updateCampusName',
'updateFilters',
]),
changeFilterHandle(data) {
this.updateFilters(data);
this.fetchConsumeList().then(() => {
this.updateCampusName(data.areaName);
});
},
changeCampusHandle(data) { changeCampusHandle(data) {
this.fetchConsumeList({ this.fetchConsumeList({
areaId: data.areaId, areaId: data.areaId,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
前十校区:<span>{{topTen}}</span> 前十校区:<span>{{topTen}}</span>
</template> </template>
<template v-else-if="this.data.length"> <template v-else-if="this.data.length">
校区汇总:<span>{{topTen}}</span> 校区汇总:<span>{{topTen.toFixed(2)}}</span>
</template> </template>
</div> </div>
</div> </div>
......
...@@ -60,17 +60,7 @@ const getters = { ...@@ -60,17 +60,7 @@ const getters = {
}; };
const actions = { const actions = {
fetchConsumeList({ commit, dispatch, getters }, data) { fetchConsumeList({ commit, getters }, data) {
if (data) {
const { timeType, operateId } = data;
(timeType || timeType == 0) &&
dispatch('updateFilters', {
timeType: timeType,
});
dispatch('updateFilters', {
operateId,
});
}
let entity = getFilters(getters.filters); let entity = getFilters(getters.filters);
switch (entity.timeType) { switch (entity.timeType) {
case 1: case 1:
......
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