Commit 9c076302 by 向童

'服务添加参数'

parent b080e42f
...@@ -13,6 +13,10 @@ export default { ...@@ -13,6 +13,10 @@ export default {
type: Number, type: Number,
default: null, default: null,
}, },
isAll: {
type: Number,
default: null,
},
}, },
created() { created() {
store.install(this.$store); store.install(this.$store);
...@@ -20,6 +24,7 @@ export default { ...@@ -20,6 +24,7 @@ export default {
this.fetchServiceTypeList({ this.fetchServiceTypeList({
serviceType: this.ServiceType, serviceType: this.ServiceType,
serviceState: this.ServiceState, serviceState: this.ServiceState,
isAll: this.isAll,
}); });
} }
}, },
......
...@@ -21,11 +21,14 @@ const getters = { ...@@ -21,11 +21,14 @@ const getters = {
}; };
const actions = { const actions = {
fetchServiceTypeList({ state, commit }, { serviceType, serviceState }) { fetchServiceTypeList(
{ state, commit },
{ serviceType, serviceState, isAll }
) {
if (state.fetching[serviceType]) return; if (state.fetching[serviceType]) return;
commit(FETCH_STATE, { value: true, index: serviceType }); commit(FETCH_STATE, { value: true, index: serviceType });
return fetchServiceList({ return fetchServiceList({
params: { serviceType, state: serviceState }, params: { serviceType, state: serviceState, isAll: isAll },
}).then(res => { }).then(res => {
const { selfService } = res; const { selfService } = res;
commit(SERVICE_TYPE_LIST, { list: selfService, index: serviceType }); commit(SERVICE_TYPE_LIST, { list: selfService, index: serviceType });
......
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