From 49914bcbbe322595f1bcd62787be42f7d1984755 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 14 七月 2023 11:12:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
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