Commit 6cdfbc85 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

chore: 问答知识库分片表格列表调整&&删除逻辑调整

See merge request !190
parents f1a01198 e20ed67b
......@@ -147,6 +147,7 @@ common_module:
download_fail: 'Download failed'
unfold: 'Unfold'
fold: 'Fold'
function: 'Function'
dialogue_module:
continue_question_message: 'You can keep asking questions'
......
......@@ -146,6 +146,7 @@ common_module:
download_fail: '下载失败'
unfold: '展开'
fold: '收起'
function: '功能'
dialogue_module:
continue_question_message: '你可以继续提问'
......
......@@ -146,6 +146,7 @@ common_module:
download_fail: '下載失敗'
unfold: '展開'
fold: '收起'
function: '功能'
dialogue_module:
continue_question_message: '你可以繼續提問'
......
......@@ -62,14 +62,14 @@ export function createQAKnowledgeChunkColumn(
}
}),
{
title: '',
title: () => <span class='font-family-medium pl-1.5'>{t('common_module.function')}</span>,
key: 'action',
align: '',
align: 'left',
fixed: 'right',
width: 0,
width: 200,
render(row: QAKnowledgeChunkContentItem) {
return (
<div class='top-4.5 flex-center absolute right-[24px] z-10 gap-[10px]'>
<div class='flex-center gap-[10px]'>
<NPopover
v-slots={{
trigger: () => (
......
......@@ -73,7 +73,7 @@ const knowledgeChunkColumn = computed(() => {
})
const dataTableScrollX = computed(() => {
return chunkKeyList.value.length * 246 + 40 + 92
return chunkKeyList.value.length * 246 + 40 + 92 + 200
})
const tableContentY = computed(() => {
......@@ -287,6 +287,11 @@ async function handleDeleteQAKnowledgeChunk(chunkRelationId: string) {
if (res.code === 0) {
window.$message.success(t('common_module.delete_success_message'))
if (knowledgeChunkList.value.length <= 1 && paginationData.pageNo === paginationData.totalPages) {
paginationData.pageNo = paginationData.pageNo - 1 || 1
}
await handleQAKnowledgeChunkList()
}
})
......@@ -329,6 +334,13 @@ function handleBatchDeleteKnowledgeChunk() {
})
if (res.code === 0) {
if (
knowledgeChunkList.value.length <= checkedChunkIdList.value.length &&
paginationData.pageNo === paginationData.totalPages
) {
paginationData.pageNo = paginationData.pageNo - 1 || 1
}
window.$message.success(t('common_module.delete_success_message'))
checkedChunkIdList.value = []
await userStore.fetchUpdateEquityInfo()
......@@ -462,20 +474,7 @@ function handleBatchDeleteKnowledgeChunk() {
</template>
<style lang="scss" scoped>
:deep(.qa-knowledge-chunk-selection.n-data-table-td .n-checkbox) {
margin-top: 46px;
}
:deep(.qa-knowledge-chunk-index.n-data-table-td) {
padding-top: 56px;
}
:deep(.qa-knowledge-chunk-item.n-data-table-td) {
padding-top: 56px;
vertical-align: top;
}
:deep(.n-data-table-tr) {
position: relative;
}
</style>
......@@ -146,6 +146,7 @@ declare namespace I18n {
download_fail: string
unfold: string
fold: string
function: string
dialogue_module: {
continue_question_message: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment