+
+
+ {{ valueShow ? (item.value + ' - ' + item.label) : item.label }}
+
+
+
+ {{ items.map(item => valueShow ? (item.value + ' - ' + item.label) : item.label).join('、')}}
+
+
+
+
+
diff --git a/admin/src/store/getters.js b/admin/src/store/getters.js
index 8d70256..198e729 100644
--- a/admin/src/store/getters.js
+++ b/admin/src/store/getters.js
@@ -11,6 +11,7 @@
const getters = {
sidebar: state => state.app.sidebar,
size: state => state.app.size,
+ dict: state => state.dict.dict,
device: state => state.app.device,
visitedViews: state => state.tagsView.visitedViews,
cachedViews: state => state.tagsView.cachedViews,
diff --git a/admin/src/store/modules/dict.js b/admin/src/store/modules/dict.js
new file mode 100644
index 0000000..2f31044
--- /dev/null
+++ b/admin/src/store/modules/dict.js
@@ -0,0 +1,51 @@
+const state = {
+ dict: new Array(),
+ dictData: {}
+}
+const mutations = {
+ SET_DICT: (state, { key, value }) => {
+ if (key !== null && key !== "") {
+ state.dict.push({
+ key: key,
+ value: value
+ })
+ }
+ },
+ REMOVE_DICT: (state, key) => {
+ try {
+ for (let i = 0; i < state.dict.length; i++) {
+ if (state.dict[i].key == key) {
+ state.dict.splice(i, i)
+ return true
+ }
+ }
+ } catch (e) {
+ }
+ },
+ CLEAN_DICT: (state) => {
+ state.dict = new Array()
+ }
+}
+
+const actions = {
+ // 设置字典
+ setDict({ commit }, data) {
+ commit('SET_DICT', data)
+ },
+ // 删除字典
+ removeDict({ commit }, key) {
+ commit('REMOVE_DICT', key)
+ },
+ // 清空字典
+ cleanDict({ commit }) {
+ commit('CLEAN_DICT')
+ }
+}
+
+export default {
+ namespaced: true,
+ state,
+ mutations,
+ actions
+}
+
diff --git a/admin/src/utils/dict/Dict.js b/admin/src/utils/dict/Dict.js
new file mode 100644
index 0000000..5dea086
--- /dev/null
+++ b/admin/src/utils/dict/Dict.js
@@ -0,0 +1,84 @@
+import Vue from 'vue'
+import { mergeRecursive } from "@/utils";
+import DictMeta from './DictMeta'
+import DictData from './DictData'
+
+const DEFAULT_DICT_OPTIONS = {
+ types: [],
+}
+
+/**
+ * @classdesc 字典
+ * @property {Object} label 标签对象,内部属性名为字典类型名称
+ * @property {Object} dict 字段数组,内部属性名为字典类型名称
+ * @property {Array.