From 7be60a3d72c6434fe255e18b45d6635b99b0ac70 Mon Sep 17 00:00:00 2001 From: lyc Date: Mon, 6 Jan 2025 17:24:56 +0800 Subject: [PATCH] edit --- src/renderer/src/utils/ppt-request.js | 8 +- .../views/teachingDesign/container/center.vue | 6 +- .../views/teachingDesign/container/left2.vue | 218 +++++++++--------- 3 files changed, 119 insertions(+), 113 deletions(-) diff --git a/src/renderer/src/utils/ppt-request.js b/src/renderer/src/utils/ppt-request.js index f080ece..642d9a9 100644 --- a/src/renderer/src/utils/ppt-request.js +++ b/src/renderer/src/utils/ppt-request.js @@ -107,9 +107,13 @@ const getBackGroundV2 = async () => { } }; -const createOutlineV2 = async (data) => { +const createOutlineV2 = async (params) => { try { - const response = await req("/api/aipptV2/createOutlineV2", "POST", data); + const response = await request({ + url:"/api/aipptV2/createOutlineV2", + method: "POST", + params + }); console.log("createOutline response:", response); return response.data; diff --git a/src/renderer/src/views/teachingDesign/container/center.vue b/src/renderer/src/views/teachingDesign/container/center.vue index ae9fa30..96515a1 100644 --- a/src/renderer/src/views/teachingDesign/container/center.vue +++ b/src/renderer/src/views/teachingDesign/container/center.vue @@ -36,6 +36,7 @@ import emitter from '@/utils/mitt' import * as commUtils from '@/utils/comm.js' import { createChart, sendChart } from '@/api/ai/index' import { completion, addSyllabus, syllabuss, removeSyllabus } from '@/api/mode/index.js' +import { createOutlineV2 } from '@/utils/ppt-request.js' import TypingEffect from '@/components/typing-effect/index.vue' import useUserStore from '@/store/modules/user' @@ -59,6 +60,7 @@ const modeOptions = ref([ // 选中的环节 const selectedData = ref([]) emitter.on('selected', (data)=>{ + console.log(data,3000) selectedData.value = data }) // 回显大纲 @@ -119,9 +121,11 @@ const createAi = async ()=>{ // 知识库模型 else { const res = await completion(params) + data = res.data } - console.log(data) + const res = await createOutlineV2({query: data.answer}) + console.log(res) emitter.emit('onResult', data.answer) answer.value = getResult(data.answer) diff --git a/src/renderer/src/views/teachingDesign/container/left2.vue b/src/renderer/src/views/teachingDesign/container/left2.vue index 3f4a612..def98d7 100644 --- a/src/renderer/src/views/teachingDesign/container/left2.vue +++ b/src/renderer/src/views/teachingDesign/container/left2.vue @@ -4,8 +4,11 @@ 教学模式
重置 - 新增 + 新增
@@ -13,33 +16,34 @@
- {{ item.name }} - -
- 添加 - 编辑 -
+ {{ item.name }} + +
+ 添加 + 编辑 +
- - + +
-
+
{{ child.name }} - - 编辑 + + 编辑
- - + +
+ style="border-radius: 10px; padding: 10px 15px"> - -
+ +
删除
@@ -64,7 +68,6 @@
- \ No newline at end of file +