From 13a153bac749c5c8c7239e95d41cadcaf469487a Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Tue, 23 Apr 2024 10:03:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=9B=BA=E5=AE=9A=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/basic/fixedAssets/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/eam/basic/fixedAssets/index.vue b/src/views/eam/basic/fixedAssets/index.vue index 6562244..6b61ea1 100644 --- a/src/views/eam/basic/fixedAssets/index.vue +++ b/src/views/eam/basic/fixedAssets/index.vue @@ -172,9 +172,12 @@ const formsSuccess = async (formType,data) => { const userStore = useUserStore() // 用户信息 const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.SPECIAL_DEPT_ROLE) // 查找第一个同时存在于userStore.roles和deviceMoldTypeList中的值 - const matchingRole = userStore.roles.find(role => + let matchingRole = userStore.roles.find(role => deviceMoldTypeList.some(deviceMold => deviceMold.value === role) ); + if(matchingRole == null || matchingRole == ''){ + matchingRole = userStore.getUser.id + } if (formType === 'create') { data.manageDept = matchingRole await FixedAssetsApi.createFixedAssets(data)