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&*#@'; }