From 437c097a0699dba0a23689e741e941b987d56eb1 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期四, 25 九月 2025 20:53:54 +0800
Subject: [PATCH] gx错误文件

---
 src/stores/userInfo.ts |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/stores/userInfo.ts b/src/stores/userInfo.ts
index 3272e74..b6878b6 100644
--- a/src/stores/userInfo.ts
+++ b/src/stores/userInfo.ts
@@ -17,7 +17,8 @@
 			roles: [],
 			authBtnList: [],
 			clientCode:'',
-			clientName:''
+			clientName:'',
+			clientInfos:[],
 		},
 	}),
 	actions: {
@@ -46,6 +47,7 @@
 					const userCode = userRet.code
 					// 模拟数据
 					let defaultRoles: Array<string> = [];
+					let defClients:Array<object>=[];
 					let defaultAuthBtnList: Array<string> = [];
 					// admin 页面权限标识,对应路由 meta.roles,用于控制路由的显示/隐藏
 					let adminRoles: Array<string> = ['admin'];
@@ -69,9 +71,13 @@
 					if (isadmin) {
 						defaultRoles = adminRoles;
 						defaultAuthBtnList = adminAuthBtnList;
+						defClients=userRet?.管理员能看到的客户列表
+
 					} else {
 						defaultRoles = testRoles;
 						defaultAuthBtnList = testAuthBtnList;
+						defClients=userRet.clientInfos
+
 					}
 					// 用户信息模拟数据
 					const userInfos = {
@@ -85,13 +91,18 @@
 						authBtnList: defaultAuthBtnList,
 						clientCode:userRet.currentClientInfo.code,
 						clientName:userRet.currentClientInfo.clientName,
+						clientInfos:defClients
 					};
 					console.log('-----------------2222------------------------------')
-					console.log(defaultRoles)
+					console.log(userInfos)
 					// Session.set('userInfo', userInfos);
 					resolve(userInfos);
 				}, 0);
 			});
 		},
+		async setUserCilent(client:clientInfo){
+			this.userInfos.clientCode=client.code
+			this.userInfos.clientName=client.clientName
+		}	
 	},
 });

--
Gitblit v1.8.0