fix: 抄送选人 最右侧已选中删除item无效

This commit is contained in:
dap 2024-12-18 20:55:07 +08:00
parent 9a259642af
commit 9f15cd47ea

View File

@ -206,14 +206,17 @@ const [RightBasicTable, rightTableApi] = useVbenVxeGrid({
gridOptions: rightGridOptions, gridOptions: rightGridOptions,
}); });
function handleRemoveItem(row: any) { async function handleRemoveItem(row: any) {
if (props.mode === 'multiple') { if (props.mode === 'multiple') {
tableApi.grid.setCheckboxRow(row, false); await tableApi.grid.setCheckboxRow(row, false);
} }
if (props.mode === 'single') { 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() { function handleRemoveAll() {
@ -240,6 +243,7 @@ async function handleDeptQuery() {
function handleSubmit() { function handleSubmit() {
const records = rightTableApi.grid.getData(); const records = rightTableApi.grid.getData();
console.log(records);
emit('finish', records); emit('finish', records);
modalApi.close(); modalApi.close();
} }