From 250f73cce6b9dfc742c19587e0cb304ff01c104e Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 10 Jan 2025 15:14:24 +0800 Subject: [PATCH] =?UTF-8?q?edit=20=E6=A1=86=E6=9E=B6=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/teachingDesign/container/center.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/views/teachingDesign/container/center.vue b/src/renderer/src/views/teachingDesign/container/center.vue index 97ffb8e..b8db88f 100644 --- a/src/renderer/src/views/teachingDesign/container/center.vue +++ b/src/renderer/src/views/teachingDesign/container/center.vue @@ -62,7 +62,6 @@ emitter.on('selected', (data) => { // 回显大纲 const curItem = reactive({}) emitter.on('onShow', (data) => { - let outline = cloneDeep(JSON.parse(data.outline)) markeDownAnswer.value = outline.markdown emitter.emit('onResult', cloneDeep(data)) @@ -124,8 +123,9 @@ const createAi = async () => { }) Object.assign(curItem, {...curItem, outline}) + emitter.emit('onResult', curItem) - onSaveTemp() + onSaveTemp(outline) } finally { loading.value = false } @@ -173,12 +173,8 @@ const createAi = async () => { // }) // 保存模板 -const onSaveTemp = async () => { +const onSaveTemp = async (outline) => { let modelIds = selectedData.value.map(item => item.id).join(',') - let outline = JSON.stringify({ - markdown: markeDownAnswer.value, - json:curItem.outline - }) const data = { eduId: curNode.id, outline, -- 2.44.0.windows.1