Merge pull request #438 from 1Panel-dev/pr@main@fix-bug

fix: 文档和问题批量删除问题修复
This commit is contained in:
wangdan-fit2cloud 2024-05-13 17:33:48 +08:00 committed by GitHub
commit 4e30c949f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="app-table" :class="quickCreate ? 'table-quick-append' : ''">
<el-table :max-height="tableHeight" v-bind="$attrs">
<el-table :max-height="tableHeight" v-bind="$attrs" ref="appTableRef">
<template #append v-if="quickCreate">
<div v-if="showInput">
<el-input
@ -80,6 +80,7 @@ const paginationConfig = computed(() => props.paginationConfig)
const pageSizes = [10, 20, 50, 100]
const quickInputRef = ref()
const appTableRef = ref()
const loading = ref(false)
const showInput = ref(false)
@ -124,7 +125,13 @@ function handleCurrentChange() {
common.savePage(props.storeKey, props.paginationConfig)
}
}
defineExpose({})
function clearSelection() {
appTableRef.value?.clearSelection()
}
defineExpose({
clearSelection
})
onMounted(() => {
tableHeight.value = window.innerHeight - 300

View File

@ -216,7 +216,7 @@
<ImportDocumentDialog ref="ImportDocumentDialogRef" :title="title" @refresh="refresh" />
<SyncWebDialog ref="SyncWebDialogRef" @refresh="refresh" />
<!-- 选择知识库 -->
<SelectDatasetDialog ref="SelectDatasetDialogRef" @refresh="refresh" />
<SelectDatasetDialog ref="SelectDatasetDialogRef" @refresh="refreshMigrate" />
</div>
</LayoutContainer>
</template>
@ -418,6 +418,7 @@ function deleteMulDocument() {
})
documentApi.delMulDocument(id, arr, loading).then(() => {
MsgSuccess('批量删除成功')
multipleTableRef.value?.clearSelection()
getList()
})
}
@ -501,6 +502,11 @@ function getDetail() {
})
}
function refreshMigrate() {
multipleTableRef.value?.clearSelection()
getList()
}
function refresh() {
paginationConfig.value.current_page = 1
getList()

View File

@ -195,6 +195,7 @@ function deleteMulDocument() {
})
problemApi.delMulProblem(id, arr, loading).then(() => {
MsgSuccess('批量删除成功')
multipleTableRef.value?.clearSelection()
getList()
})
}