refactor: 优化 BPM 工作流相关组件,更新用户组显示逻辑,调整图标样式

This commit is contained in:
ziye
2025-05-13 01:04:32 +08:00
parent d5321bc34a
commit acf3d9a6f0
6 changed files with 56 additions and 39 deletions

View File

@@ -42,6 +42,21 @@ const [Grid, gridApi] = useVbenVxeGrid({
...formValues,
});
},
querySuccess: (params) => {
const { list } = params.response;
const userMap = new Map(
userList.value.map((user) => [user.id, user.nickname]),
);
list.forEach(
(item: BpmUserGroupApi.UserGroupVO & { nicknames?: string }) => {
item.nicknames = item.userIds
.map((userId) => userMap.get(userId))
.filter(Boolean)
.join('、');
},
);
},
},
},
rowConfig: {
@@ -126,16 +141,8 @@ onMounted(async () => {
</Button>
</template>
<!-- TODO @ziye可以在 data 里翻译哈 -->
<template #userIds-cell="{ row }">
<span
v-for="(userId, index) in row.userIds"
:key="userId"
class="pr-5px"
>
{{ userList.find((user) => user.id === userId)?.nickname }}
<span v-if="index < row.userIds.length - 1"></span>
</span>
<span>{{ row.nicknames }}</span>
</template>
</Grid>
</Page>