From 5b92d7b92cdafdabafd169bfa6be397d7d0f382f Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 23 Jan 2025 16:31:18 +0800 Subject: [PATCH] fix: 1051957 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1051957 --user=王孝刚 【知识库】在预览时修改添加标题,勾选导入时添加分段标题为关联问题,问题未和分段关联 https://www.tapd.cn/57709429/s/1650244 --- ui/src/views/dataset/component/SetRules.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui/src/views/dataset/component/SetRules.vue b/ui/src/views/dataset/component/SetRules.vue index 847a7216f3a..a377af44eab 100644 --- a/ui/src/views/dataset/component/SetRules.vue +++ b/ui/src/views/dataset/component/SetRules.vue @@ -101,7 +101,9 @@
- {{ $t('views.document.buttons.preview') }} + + {{ $t('views.document.buttons.preview') }}
@@ -147,19 +149,19 @@ const form = reactive<{ function changeHandle(val: boolean) { if (val && firstChecked.value) { - const list = paragraphList.value - list.map((item: any) => { - item.content.map((v: any) => { - v['problem_list'] = v.title.trim() + paragraphList.value = paragraphList.value.map((item: any) => ({ + ...item, + content: item.content.map((v: any) => ({ + ...v, + problem_list: v.title.trim() ? [ { content: v.title.trim() } ] : [] - }) - }) - paragraphList.value = list + })) + })) firstChecked.value = false } }