From ffd0af47ee31a9592cfab56a907e9841a9113c52 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 20 七月 2023 10:37:17 +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