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,