Commit 6b668c7f by 姜雷

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

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