From 0ac2d43fce4d74f6eea5a51a2e16af4e6a536c7c Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 14 八月 2024 14:19:24 +0800
Subject: [PATCH] 11
---
src/store/modules/user.js | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 20c0e33..efaed5b 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -1,6 +1,8 @@
import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { Message } from 'element-ui'
+import { listOrganization } from "@/api/project/organization";
+
const user = {
@@ -11,7 +13,8 @@
code: '',
msg: '',
roles: [],
- permissions: []
+ permissions: [],
+ organization:[],
},
mutations: {
@@ -35,6 +38,9 @@
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
+ },
+ SET_organization: (state, organization) => {
+ state.organization = organization
}
},
@@ -101,6 +107,21 @@
})
})
},
+ // 鎷垮彇鏈烘瀯淇℃伅
+ getdataList({commit}){
+ return new Promise((resolve, reject) => {
+ listOrganization({
+ organizationtype: 4, //浼犲叆鐨勭被鍨�
+ pageNum: 1,
+ pageSize: 100000
+ }).then((res) => {
+ commit('SET_organization', res.rows)
+ resolve()
+ }).catch(error => {
+ reject(error)
+ })
+ })
+ },
// 鍓嶇 鐧诲嚭
FedLogOut({ commit }) {
--
Gitblit v1.9.3