mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
Merge pull request #438 from 1Panel-dev/pr@main@fix-bug
fix: 文档和问题批量删除问题修复
This commit is contained in:
commit
4e30c949f4
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ function deleteMulDocument() {
|
|||
})
|
||||
problemApi.delMulProblem(id, arr, loading).then(() => {
|
||||
MsgSuccess('批量删除成功')
|
||||
multipleTableRef.value?.clearSelection()
|
||||
getList()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue