Browse Source

补充固定资产权限问题

master
ljlong_2630 7 months ago
parent
commit
13a153bac7
  1. 5
      src/views/eam/basic/fixedAssets/index.vue

5
src/views/eam/basic/fixedAssets/index.vue

@ -172,9 +172,12 @@ const formsSuccess = async (formType,data) => {
const userStore = useUserStore() // const userStore = useUserStore() //
const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.SPECIAL_DEPT_ROLE) const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.SPECIAL_DEPT_ROLE)
// userStore.rolesdeviceMoldTypeList // userStore.rolesdeviceMoldTypeList
const matchingRole = userStore.roles.find(role => let matchingRole = userStore.roles.find(role =>
deviceMoldTypeList.some(deviceMold => deviceMold.value === role) deviceMoldTypeList.some(deviceMold => deviceMold.value === role)
); );
if(matchingRole == null || matchingRole == ''){
matchingRole = userStore.getUser.id
}
if (formType === 'create') { if (formType === 'create') {
data.manageDept = matchingRole data.manageDept = matchingRole
await FixedAssetsApi.createFixedAssets(data) await FixedAssetsApi.createFixedAssets(data)

Loading…
Cancel
Save