From 029f4a1bffadb87b3cf776f6d2c99bf65cf32b34 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Tue, 23 Apr 2024 10:17:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E8=B5=84=E4=BA=A7=E6=9D=83?= =?UTF-8?q?=E9=99=90=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basic/fixedAssets/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/api/eam/basic/fixedAssets/index.ts b/src/api/eam/basic/fixedAssets/index.ts index d09730c..6911147 100644 --- a/src/api/eam/basic/fixedAssets/index.ts +++ b/src/api/eam/basic/fixedAssets/index.ts @@ -30,9 +30,19 @@ export const getFixedAssetsPage = async (params) => { deviceMoldTypeList.some(deviceMold => deviceMold.value === role) ); + const admin = userStore.roles.find(role => { + if (role == 'gdzc_admin') { + return true; + } else { + return false; + } + }); + // 如果找到了匹配的角色,将它作为manageDept的值加入到params中 if (matchingRole) { params.manageDept = matchingRole; // 这里只添加第一个匹配的角色 + } else if(admin){ + params.manageDept = null; } else { params.manageDept = 'bukenengpipeidedao@3&*#@'; }