Skip to content

Commit a0f157c

Browse files
committed
BPM:简化 userGroup 的实现
1 parent 2d424fc commit a0f157c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/api/bpm/userGroup/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type UserGroupVO = {
44
id: number
55
name: string
66
description: string
7-
memberUserIds: number[]
7+
userIds: number[]
88
status: number
99
remark: string
1010
createTime: string
@@ -42,6 +42,6 @@ export const getUserGroupPage = async (params) => {
4242
}
4343

4444
// 获取用户组精简信息列表
45-
export const getSimpleUserGroupList = async (): Promise<UserGroupVO[]> => {
46-
return await request.get({ url: '/bpm/user-group/list-all-simple' })
45+
export const getUserGroupSimpleList = async (): Promise<UserGroupVO[]> => {
46+
return await request.get({ url: '/bpm/user-group/simple-list' })
4747
}

src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ onMounted(async () => {
212212
// 获得用户列表
213213
userOptions.value = await UserApi.getSimpleUserList()
214214
// 获得用户组列表
215-
userGroupOptions.value = await UserGroupApi.getSimpleUserGroupList()
215+
userGroupOptions.value = await UserGroupApi.getUserGroupSimpleList()
216216
})
217217
218218
onBeforeUnmount(() => {

src/views/bpm/group/UserGroupForm.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<el-form-item label="描述">
1414
<el-input v-model="formData.description" placeholder="请输入描述" type="textarea" />
1515
</el-form-item>
16-
<el-form-item label="成员" prop="memberUserIds">
17-
<el-select v-model="formData.memberUserIds" multiple placeholder="请选择成员">
16+
<el-form-item label="成员" prop="userIds">
17+
<el-select v-model="formData.userIds" multiple placeholder="请选择成员">
1818
<el-option
1919
v-for="user in userList"
2020
:key="user.id"
@@ -60,13 +60,13 @@ const formData = ref({
6060
id: undefined,
6161
name: undefined,
6262
description: undefined,
63-
memberUserIds: undefined,
63+
userIds: undefined,
6464
status: CommonStatusEnum.ENABLE
6565
})
6666
const formRules = reactive({
6767
name: [{ required: true, message: '组名不能为空', trigger: 'blur' }],
6868
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
69-
memberUserIds: [{ required: true, message: '成员不能为空', trigger: 'blur' }],
69+
userIds: [{ required: true, message: '成员不能为空', trigger: 'blur' }],
7070
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
7171
})
7272
const formRef = ref() // 表单 Ref
@@ -124,7 +124,7 @@ const resetForm = () => {
124124
id: undefined,
125125
name: undefined,
126126
description: undefined,
127-
memberUserIds: undefined,
127+
userIds: undefined,
128128
status: CommonStatusEnum.ENABLE
129129
}
130130
formRef.value?.resetFields()

src/views/bpm/group/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<el-table-column label="描述" align="center" prop="description" />
6464
<el-table-column label="成员" align="center">
6565
<template #default="scope">
66-
<span v-for="userId in scope.row.memberUserIds" :key="userId" class="pr-5px">
66+
<span v-for="userId in scope.row.userIds" :key="userId" class="pr-5px">
6767
{{ userList.find((user) => user.id === userId)?.nickname }}
6868
</span>
6969
</template>

0 commit comments

Comments
 (0)