perf: Add Batch Delete Confirm

This commit is contained in:
wangdan-fit2cloud 2024-12-20 11:29:28 +08:00
parent 6c7ae3f79f
commit bfdf7f7498

View File

@ -633,17 +633,28 @@ function syncMulDocument() {
} }
function deleteMulDocument() { function deleteMulDocument() {
const arr: string[] = [] MsgConfirm(
multipleSelection.value.map((v) => { `是否批量删除 ${multipleSelection.value.length} 个文档?`,
if (v) { `所选文档中的分段会跟随删除,请谨慎操作。`,
arr.push(v.id) {
confirmButtonText: '删除',
confirmButtonClass: 'danger'
} }
}) )
documentApi.delMulDocument(id, arr, loading).then(() => { .then(() => {
MsgSuccess('批量删除成功') const arr: string[] = []
multipleTableRef.value?.clearSelection() multipleSelection.value.map((v) => {
getList() if (v) {
}) arr.push(v.id)
}
})
documentApi.delMulDocument(id, arr, loading).then(() => {
MsgSuccess('批量删除成功')
multipleTableRef.value?.clearSelection()
getList()
})
})
.catch(() => {})
} }
function batchRefresh() { function batchRefresh() {