Browse Source

修复客服角色判断

pre-production
马远东 4 months ago
parent
commit
1fdf7fae38
  1. 27
      src/views/aftersales/aftersalesWorkOrdermodify.vue

27
src/views/aftersales/aftersalesWorkOrdermodify.vue

@ -1121,11 +1121,28 @@ const PageState = () => {
myData.value = JSON.parse(localStorage.getItem('my_data')); //
}
//
getDictionaryBiz('after_sales_visits').then(res => {
const matchingItem = res.data.data.find(
item => item.dictValue == JSON.parse(localStorage.getItem('TWMS-userInfo')).content.role_name
);
form.value.UserPermissions = matchingItem.dictValue;
getDictionaryBiz('after_sales_visits').then(async res => {
// const matchingItem = res.data.data.find(
// item => item.dictValue == JSON.parse(localStorage.getItem('TWMS-userInfo')).content.role_name
// );
// form.value.UserPermissions = matchingItem.dictValue;
//
const roleNames = await JSON.parse(localStorage.getItem('TWMS-userInfo')).content.role_name.split(
','
);
//
const matchingItem = res.data.data.find(item => roleNames.includes(item.dictValue));
if (matchingItem) {
form.value.UserPermissions = matchingItem.dictValue;
} else {
form.value.UserPermissions = '仓库客服';
}
});
//
responsibilities();

Loading…
Cancel
Save