From 9f15cd47ea603036740a21ed6f5f47a89d04ac6e Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Wed, 18 Dec 2024 20:55:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=84=E9=80=81=E9=80=89=E4=BA=BA=20?= =?UTF-8?q?=E6=9C=80=E5=8F=B3=E4=BE=A7=E5=B7=B2=E9=80=89=E4=B8=AD=E5=88=A0?= =?UTF-8?q?=E9=99=A4item=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/workflow/components/user-select-modal.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/workflow/components/user-select-modal.vue b/apps/web-antd/src/views/workflow/components/user-select-modal.vue index 0251838b..7e29738b 100644 --- a/apps/web-antd/src/views/workflow/components/user-select-modal.vue +++ b/apps/web-antd/src/views/workflow/components/user-select-modal.vue @@ -206,14 +206,17 @@ const [RightBasicTable, rightTableApi] = useVbenVxeGrid({ gridOptions: rightGridOptions, }); -function handleRemoveItem(row: any) { +async function handleRemoveItem(row: any) { if (props.mode === 'multiple') { - tableApi.grid.setCheckboxRow(row, false); + await tableApi.grid.setCheckboxRow(row, false); } if (props.mode === 'single') { - tableApi.grid.clearRadioRow(); + await tableApi.grid.clearRadioRow(); } - rightTableApi.grid.remove(row); + const data = rightTableApi.grid.getData(); + await rightTableApi.grid.loadData(data.filter((item) => item !== row)); + // 这个方法有问题 + // await rightTableApi.grid.remove(row); } function handleRemoveAll() { @@ -240,6 +243,7 @@ async function handleDeptQuery() { function handleSubmit() { const records = rightTableApi.grid.getData(); + console.log(records); emit('finish', records); modalApi.close(); }