From 57af105c9028eda23082c9ec8737c477d9862290 Mon Sep 17 00:00:00 2001 From: lyc Date: Mon, 20 Jan 2025 09:49:02 +0800 Subject: [PATCH] edit --- src/renderer/src/api/ai/index.js | 4 +- src/renderer/src/api/mode/index.js | 14 ++ src/renderer/src/main.js | 11 +- src/renderer/src/views/mindMap/index.vue | 164 +++++++++++++++--- src/renderer/src/views/model/index.vue | 1 + .../views/teachingDesign/container/center.vue | 4 +- 6 files changed, 164 insertions(+), 34 deletions(-) diff --git a/src/renderer/src/api/ai/index.js b/src/renderer/src/api/ai/index.js index 5e491d3..13e0ff5 100644 --- a/src/renderer/src/api/ai/index.js +++ b/src/renderer/src/api/ai/index.js @@ -1,12 +1,10 @@ import request from '@/utils/request' // 创建对话 -export const createChart = ({ headers, data }) => { +export const createChart = () => { return request({ url: '/qf/createChart', method: 'post', - headers, - data, }) } // 大模型对话 diff --git a/src/renderer/src/api/mode/index.js b/src/renderer/src/api/mode/index.js index 40c4ce5..a0e7b9d 100644 --- a/src/renderer/src/api/mode/index.js +++ b/src/renderer/src/api/mode/index.js @@ -29,6 +29,20 @@ export function completion(data) { }) } +// 大模型对话 +export function modelChat(data) { + return axios({ + url: '/mind/chat', + method: 'post', + headers: { + Authorization: 'Bearer ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm', + 'Content-Type': 'application/json', + Accept: '*/*' + }, + data: data + }) +} + // 添加提示词 (系统预设) export function addKeyWords(data) { return request({ diff --git a/src/renderer/src/main.js b/src/renderer/src/main.js index 16f16ec..49da22f 100644 --- a/src/renderer/src/main.js +++ b/src/renderer/src/main.js @@ -11,10 +11,9 @@ import 'virtual:windi.css' import request from "@/utils/request"; //v-md-editor -import VMdPreview from '@kangc/v-md-editor/lib/preview'; -import '@kangc/v-md-editor/lib/style/preview.css'; -// 引入你所使用的主题 此处以 github 主题为例 -import githubTheme from '@kangc/v-md-editor/lib/theme/github'; +import VMdEditor from '@kangc/v-md-editor'; +import '@kangc/v-md-editor/lib/style/base-editor.css'; +import githubTheme from '@kangc/v-md-editor/lib/theme/github.js'; import '@kangc/v-md-editor/lib/theme/style/github.css'; // highlightjs import hljs from 'highlight.js'; @@ -51,7 +50,7 @@ app.config.globalProperties.$requestGetJYW = (url,config)=>{ import Icon from '@/AixPPTist/src/plugins/icon' import Directive from '@/AixPPTist/src/plugins/directive' -VMdPreview.use(githubTheme, { +VMdEditor.use(githubTheme, { Hljs: hljs, }); @@ -63,7 +62,7 @@ app.use(router) .use(Icon) .use(Directive) .use(aiAudio) - .use(VMdPreview) + .use(VMdEditor) .mount('#app') const isStadium = (user) => { diff --git a/src/renderer/src/views/mindMap/index.vue b/src/renderer/src/views/mindMap/index.vue index 97f4bbd..d792f0e 100644 --- a/src/renderer/src/views/mindMap/index.vue +++ b/src/renderer/src/views/mindMap/index.vue @@ -1,17 +1,35 @@ \ No newline at end of file +} + diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index 41de465..eadeb32 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -68,6 +68,7 @@
{{item.name}}
+ AI思维导图 diff --git a/src/renderer/src/views/teachingDesign/container/center.vue b/src/renderer/src/views/teachingDesign/container/center.vue index f3efd8b..c9f8166 100644 --- a/src/renderer/src/views/teachingDesign/container/center.vue +++ b/src/renderer/src/views/teachingDesign/container/center.vue @@ -17,8 +17,8 @@
- - + +