fix: bug#11157

This commit is contained in:
JiangQiming 2023-03-29 20:52:33 +08:00
parent 9f0bc42fb9
commit 95c0409c21
1 changed files with 16 additions and 1 deletions

View File

@ -317,6 +317,13 @@ const table: any = {
const { pageIndex, pageSize, total, data } =
resp.result as resultType;
const ids = data.map((item) => item.id);
// : ///
const idxMap = {
read: 0,
save: 1,
delete: 2,
share: 3,
};
// fix: bug#10706
getBindingsPermission(props.assetType, ids).then(
(perResp: any) => {
@ -329,7 +336,15 @@ const table: any = {
disabled: true,
}));
item.selectPermissions = ['read'];
//
item.permissionList = item.permissionList
.map((m: any) => {
return {
...m,
idx: idxMap[m.value],
};
})
.sort((a: any, b: any) => a.idx - b.idx);
//
if (props.assetType === 'product') {
item.state = {