🌈 style: 删除console.log
This commit is contained in:
@@ -18,6 +18,7 @@ const getters = {
|
||||
sidebarRouters:state => state.permission.sidebarRouters,
|
||||
productList: state => state.category.productList,
|
||||
rawMaterialList: state => state.category.rawMaterialList,
|
||||
bomMap: state => state.category.bomMap
|
||||
bomMap: state => state.category.bomMap,
|
||||
financialAccounts: state => state.finance.financialAccounts,
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -7,6 +7,7 @@ import tagsView from './modules/tagsView'
|
||||
import permission from './modules/permission'
|
||||
import settings from './modules/settings'
|
||||
import category from './modules/category'
|
||||
import finance from './modules/finance'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex)
|
||||
@@ -19,7 +20,8 @@ const store = new Vuex.Store({
|
||||
tagsView,
|
||||
permission,
|
||||
settings,
|
||||
category
|
||||
category,
|
||||
finance
|
||||
},
|
||||
getters
|
||||
})
|
||||
|
||||
26
klp-ui/src/store/modules/finance.js
Normal file
26
klp-ui/src/store/modules/finance.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { listAccount } from "@/api/finance/account";
|
||||
|
||||
const state = {
|
||||
financialAccounts: [],
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
SET_FINANCIAL_ACCOUNTS(state, financialAccounts) {
|
||||
state.financialAccounts = financialAccounts;
|
||||
},
|
||||
}
|
||||
|
||||
const actions = {
|
||||
getFinancialAccounts({ commit }) {
|
||||
listAccount().then(response => {
|
||||
commit('SET_FINANCIAL_ACCOUNTS', response.data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
Reference in New Issue
Block a user