From e87406986520c7cda04f32b7a3a40909460c9084 Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Fri, 25 Aug 2023 20:12:21 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E9=83=A8=E9=97=A8=E6=9F=A5=E8=AF=A2=E4=BA=BA?= =?UTF-8?q?=E5=91=98=EF=BC=8C=E9=83=A8=E9=97=A8=E5=88=B7=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Process/multiInstance-user.vue | 80 +++++++++++-------- 1 file changed, 45 insertions(+), 35 deletions(-) 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']); + /** * 对外暴露子组件方法 */