From a4d7993d0b44faffe2e548250a9d2bc27c77e521 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 19 七月 2023 12:27:46 +0800
Subject: [PATCH] 集成获取分类接口(包含编码规则码段码值信息)

---
 Source/UBCS-WEB/dist/src/store/modules/dict.js |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/Source/UBCS-WEB/dist/src/store/modules/dict.js b/Source/UBCS-WEB/dist/src/store/modules/dict.js
new file mode 100644
index 0000000..837dbe6
--- /dev/null
+++ b/Source/UBCS-WEB/dist/src/store/modules/dict.js
@@ -0,0 +1,35 @@
+import {getStore, setStore} from '@/util/store'
+
+import {getDictionary} from '@/api/system/dict'
+
+const dict = {
+  state: {
+    flowRoutes: getStore({name: 'flowRoutes'}) || {},
+  },
+  actions: {
+    FlowRoutes({commit}) {
+      return new Promise((resolve, reject) => {
+        getDictionary({code: 'flow'}).then(res => {
+          commit('SET_FLOW_ROUTES', res.data.data);
+          resolve();
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+  },
+  mutations: {
+    SET_FLOW_ROUTES: (state, data) => {
+      state.flowRoutes = data.map(item => {
+        return {
+          routeKey: `${item.code}_${item.dictKey}`,
+          routeValue: item.remark,
+        };
+      });
+      setStore({name: 'flowRoutes', content: state.flowRoutes})
+    },
+  }
+
+};
+
+export default dict;

--
Gitblit v1.9.3