From 2e2ebbd47fbf7280ca0cd48623e8fb39d25ea1d4 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 18 Dec 2024 11:17:09 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/api/ai/index.js | 3 +- .../container/adjust-dialog.vue | 24 +- .../template-study/container/right.vue | 149 +++++++++-- .../views/teachingDesign/container/right.vue | 250 ++++++++++++------ 4 files changed, 300 insertions(+), 126 deletions(-) diff --git a/src/renderer/src/api/ai/index.js b/src/renderer/src/api/ai/index.js index ef5cfd6..5e491d3 100644 --- a/src/renderer/src/api/ai/index.js +++ b/src/renderer/src/api/ai/index.js @@ -10,11 +10,10 @@ export const createChart = ({ headers, data }) => { }) } // 大模型对话 -export const sendChart = ({ headers, data }) => { +export const sendChart = (data) => { return request({ url: '/qf/sendTalk', method: 'post', - headers, data, }) } \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/adjust-dialog.vue b/src/renderer/src/components/template-study/container/adjust-dialog.vue index 65316c3..a5fa027 100644 --- a/src/renderer/src/components/template-study/container/adjust-dialog.vue +++ b/src/renderer/src/components/template-study/container/adjust-dialog.vue @@ -30,7 +30,7 @@
- + {{ curFile.fileName }} @@ -54,7 +54,7 @@ diff --git a/src/renderer/src/components/grid-pic/viewer-item.vue b/src/renderer/src/components/grid-pic/viewer-item.vue new file mode 100644 index 0000000..f62bbfc --- /dev/null +++ b/src/renderer/src/components/grid-pic/viewer-item.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/renderer/src/main.js b/src/renderer/src/main.js index fbf0a59..ab4962c 100644 --- a/src/renderer/src/main.js +++ b/src/renderer/src/main.js @@ -17,14 +17,14 @@ import log from 'electron-log/renderer' // 渲染进程日志-文件记录 import customComponent from '@/components/common' // 自定义组件 import plugins from './plugins' // plugins插件 import useUserStore from '@/store/modules/user' - +import VueViewer from 'v-viewer' +import 'viewerjs/dist/viewer.css' if(process.env.NODE_ENV != 'development') { // 非开发环境,将日志打印到日志文件 Object.assign(console, log.functions) // 渲染进程日志-控制台替换 } const app = createApp(App) - //专为菁优网配置的请求转发 app.config.globalProperties.$requestGetJYW = (url,config)=>{ config.params = config.params?config.params:{} @@ -42,6 +42,7 @@ import Directive from '@/AixPPTist/src/plugins/directive' app.use(router) .use(store) + .use(VueViewer) .use(ElementPlus, { locale: zhLocale }) .use(customComponent) // 自定义组件 .use(plugins) diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js index 470b3b9..8f982da 100644 --- a/src/renderer/src/router/index.js +++ b/src/renderer/src/router/index.js @@ -31,6 +31,11 @@ export const constantRoutes = [ component: () => import('@/AixPPTist/src/App.vue'), hidden: true }, + { + path: '/gridPic', + component: () => import('@/components/grid-pic/index.vue'), + hidden: true + }, { path: '/model', component: Layout, diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index c593d06..ca770aa 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -10,6 +10,7 @@ 新建文枢课件 AI一键生成 + 打开宫格 导入PPT @@ -341,6 +342,14 @@ export default { // } // }, methods: { + openGridPic() { + createWindow('open-win', { + url: '/gridPic', // 窗口关闭时,清除缓存 + option: { + maximizable: true + } + }) + }, // 延时 sleep(ms){return new Promise(resolve => setTimeout(resolve, ms))}, addAiPPT(item) {