fix: 1051957

--bug=1051957 --user=王孝刚 【知识库】在预览时修改添加标题,勾选导入时添加分段标题为关联问题,问题未和分段关联 https://www.tapd.cn/57709429/s/1650244
This commit is contained in:
wxg0103 2025-01-23 16:31:18 +08:00 committed by wxg
parent 2732323c6d
commit 3801d482cd

View File

@ -101,7 +101,9 @@
</el-checkbox>
</div>
<div class="text-right mt-8">
<el-button @click="splitDocument"> {{ $t('views.document.buttons.preview') }}</el-button>
<el-button @click="splitDocument">
{{ $t('views.document.buttons.preview') }}</el-button
>
</div>
</div>
</el-col>
@ -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
}
}