-
-
-
- {{ item.label }}
-
- {{ item.label }}
-
-
-
-
+ {{valueLabel}}
-
\ No newline at end of file
diff --git a/src/store/getters.js b/src/store/getters.js
index a823148..b69eec1 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -15,6 +15,7 @@ const getters = {
defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters,
- dictMap: state => state.dict.dictMap
+ dictMap: state => state.dict.dictMap,
+ productCategories: state => state.dict.productCategories,
}
export default getters
diff --git a/src/store/modules/dict.js b/src/store/modules/dict.js
index d3d5c8d..7d3f1e9 100644
--- a/src/store/modules/dict.js
+++ b/src/store/modules/dict.js
@@ -1,15 +1,20 @@
import {allByTypes} from "@/api/system/dict/data";
import {dict_types} from "@/config/business";
+import {listPmsProductCategory} from "@/api/pms/productCategory";
const dict = {
state: {
- dictMap: {}
+ dictMap: {},
+ productCategories: []
},
mutations: {
SET_DICT_MAP: (state, map) => {
state.dictMap = map
},
+ SET_PRODUCT_CATEGORIES: (state, value) => {
+ state.productCategories = value
+ },
},
actions: {
loadDictionaries({ commit, state }, force = false) {
@@ -31,6 +36,14 @@ const dict = {
commit('SET_DICT_MAP', map)
})
},
+ loadProductCategories({ commit, state }, force = false) {
+ if (!force && state.productCategories.length > 0) {
+ return Promise.resolve();
+ }
+ return listPmsProductCategory({}).then(res => {
+ commit('SET_PRODUCT_CATEGORIES', res);
+ })
+ }
}
}
diff --git a/src/views/components/ProdCategory.vue b/src/views/components/ProdCategory.vue
new file mode 100644
index 0000000..cd29627
--- /dev/null
+++ b/src/views/components/ProdCategory.vue
@@ -0,0 +1,61 @@
+