From 58e84408a3cdcd57a349fcd7faadf832361965ff Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 17 七月 2023 14:17:37 +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