edit 框架设计
This commit is contained in:
parent
6d1cc7e21b
commit
3e8f8529fa
|
@ -86,7 +86,7 @@ emitter.on('onShow', (data) => {
|
|||
|
||||
let outline = JSON.parse(data.outline)
|
||||
markeDownAnswer.value = outline.markdown
|
||||
emitter.emit('onResult',outline.json)
|
||||
emitter.emit('onResult',data)
|
||||
Object.assign(curItem, data)
|
||||
})
|
||||
|
||||
|
@ -138,7 +138,6 @@ const createAi = async () => {
|
|||
markeDownAnswer.value = data.answer
|
||||
const res = await createOutlineV2({ query: data.answer })
|
||||
|
||||
|
||||
curItem.outline = JSON.stringify({
|
||||
json: res.outline,
|
||||
markdown: data.answer
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="container-right flex">
|
||||
<div class="right-header flex">
|
||||
<span>课件预览</span>
|
||||
<span>预览</span>
|
||||
<div>
|
||||
<el-button :disabled="!result?.outline" type="danger" @click="onCreate">一键生成</el-button>
|
||||
<el-button :disabled="!result?.parentId" @click="openAiPPT">编辑课件</el-button>
|
||||
<el-button :disabled="!result?.parentId" @click="openAiPPT">编辑</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-con">
|
||||
|
@ -66,6 +66,7 @@ const pptSlides = ref([])
|
|||
emitter.on('onResult', (data)=>{
|
||||
console.log(data)
|
||||
result.value = data
|
||||
result.value.outline = JSON.parse(data.outline).json
|
||||
if (!!result.value.parentId) {
|
||||
listEntpcoursefileNew({parentid: result.value.parentId}).then(res=>{
|
||||
pptSlides.value = res.rows
|
||||
|
|
Loading…
Reference in New Issue