diff --git a/src/components/Process/multiInstance-user.vue b/src/components/Process/multiInstance-user.vue index eb80775..71a70db 100644 --- a/src/components/Process/multiInstance-user.vue +++ b/src/components/Process/multiInstance-user.vue @@ -1,40 +1,30 @@ - + @@ -65,17 +56,12 @@ - + - {{user.userName}} + {{ user.userName }} @@ -157,13 +143,12 @@ const queryParams = ref>({ nickName: '', taskId: '' }); - /** 查询用户列表 */ const getAddMultiInstanceList = async (taskId: string, userIdList: Array) => { deptOptions.value = []; + getTreeSelect(); multiInstance.value = 'add'; userIds.value = userIdList; - getTreeSelect(); visible.value = true; queryParams.value.taskId = taskId; loading.value = true; @@ -187,6 +172,28 @@ const getAddMultiInstanceList = async (taskId: string, userIdList: Array { + loading.value = true; + const res = await getWorkflowAddMultiListByPage(queryParams.value); + loading.value = false; + userList.value = res.rows; + total.value = res.total; + if (userList.value && userIds.value.length > 0) { + const data = await getUserListByIds(userIds.value); + if (data.data && data.data.length > 0) { + chooseUserList.value = data.data; + data.data.forEach((user: UserVO) => { + multipleTableRef.value!.toggleRowSelection( + userList.value.find((item) => { + return item.userId == user.userId; + }), + true + ); + }); + } + } +}; + const getDeleteMultiInstanceList = async (taskId: string) => { deptOptions.value = []; loading.value = true; @@ -248,6 +255,7 @@ const getTreeSelect = async () => { const res = await deptTreeSelect(); deptOptions.value = res.data; }; + /** 通过条件过滤节点 */ const filterNode = (value: string, data: any) => { if (!value) return true; @@ -267,7 +275,7 @@ watchEffect( /** 节点单击事件 */ const handleNodeClick = (data: DeptVO) => { queryParams.value.deptId = data.id; - handleQuery(); + getList(); }; //删除tag const handleCloseTag = (user: UserVO, index: any) => { @@ -342,7 +350,9 @@ const submitFileForm = async () => { } } }; +//事件 const emits = defineEmits(['submitCallback']); + /** * 对外暴露子组件方法 */