You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
taicangZongzhi/src/store/modules/dict.js

31 lines
701 B

import { getDictList } from '@/api/zongzhi/common.js'
const dict = {
state: {
dictObject: {}
},
mutations: {
SET_DICT: (state, dict) => {
state.dictObject = dict
}
},
actions: {
getDictType({ commit }) {
return new Promise((resolve, reject) => {
const query = {
list: 'sys_user_sex,tc_net_sx,tc_yq_media,tc_enter_type,tc_inlet_yewu,tc_item_type,tc_yq_type,tc_event_type,tc_cy_type,tc_yq_state'
}
getDictList(query)
.then((res) => {
commit('SET_DICT', res.data)
resolve()
})
.catch((error) => {
reject(error)
})
})
}
}
}
export default dict