From 9803c09c434b805c4b688799f1cafde9d4378697 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 4 Dec 2024 17:04:20 +0800 Subject: [PATCH 1/6] =?UTF-8?q?s=E7=94=9F=E6=88=90PPT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/prepare/container/ai-pptistV2.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/renderer/src/views/prepare/container/ai-pptistV2.vue b/src/renderer/src/views/prepare/container/ai-pptistV2.vue index 674c65a..f92eca6 100644 --- a/src/renderer/src/views/prepare/container/ai-pptistV2.vue +++ b/src/renderer/src/views/prepare/container/ai-pptistV2.vue @@ -158,7 +158,7 @@ const outlineCreatePPT = () => { const checkProgress = () => { getProgressV2(res.sid).then(response => { - percentage.value = Math.round(response?.donePages/response?.totalPages)*100; + percentage.value = Math.round(response?.donePages*100/response?.totalPages); if (response.pptStatus === "done") { emit('addSuccess',{...res,url:response.pptUrl}) ElMessage.success("生成成功"); @@ -267,7 +267,6 @@ function webSocketSend(ws, data) { function result1(resultData) { let jsonData = JSON.parse(resultData); - console.log(jsonData) outputText.value += jsonData.payload.choices.text[0].content; const div = document.querySelector('.paragraphs'); if (div) { From 65670af54fdf67b75db01fc2e994f111b16f8e3a Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Fri, 6 Dec 2024 14:21:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?s=E7=94=9F=E6=88=90PPT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/AixPPTist/src/App.vue | 5 ++++- src/renderer/src/views/model/index.vue | 2 +- src/renderer/src/views/teachingDesign/container/right.vue | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/AixPPTist/src/App.vue b/src/renderer/src/AixPPTist/src/App.vue index 5214d9b..7cb504f 100644 --- a/src/renderer/src/AixPPTist/src/App.vue +++ b/src/renderer/src/AixPPTist/src/App.vue @@ -81,5 +81,8 @@ const initLoad: Function = () => { \ 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 6085346..95f3c39 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -10,7 +10,7 @@ 作业管理 教材研读 教学框架设计 - 打开PPTist + 考试分析 测试 文生图片 diff --git a/src/renderer/src/views/teachingDesign/container/right.vue b/src/renderer/src/views/teachingDesign/container/right.vue index 6fae50c..289b39b 100644 --- a/src/renderer/src/views/teachingDesign/container/right.vue +++ b/src/renderer/src/views/teachingDesign/container/right.vue @@ -114,6 +114,7 @@ const params = reactive( const addAiPPT = async(res) => { let node = courseObj.node + pptDialog.value = false; if (!node) return msgUtils.msgWarning('请选择章节?') //TODO res中有PPT地址 const params = { evalid: node.id, edituserid: userStore.id, pageSize: 1 } From 560e6f0e7056722d156f20d6e7af98b46a910d25 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 6 Dec 2024 16:39:47 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=8F=92=E5=85=A5=E7=B4=A0=E6=9D=90-pptlis?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/AixPPTist/src/plugins/icon.ts | 2 + .../Editor/CanvasTool/MaterialDialog.vue | 173 ++++++++++++++++++ .../src/views/Editor/CanvasTool/index.vue | 27 +++ src/renderer/src/utils/ruoyi.js | 53 ++++-- 4 files changed, 243 insertions(+), 12 deletions(-) create mode 100644 src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue diff --git a/src/renderer/src/AixPPTist/src/plugins/icon.ts b/src/renderer/src/AixPPTist/src/plugins/icon.ts index da9ce97..2bffc0e 100644 --- a/src/renderer/src/AixPPTist/src/plugins/icon.ts +++ b/src/renderer/src/AixPPTist/src/plugins/icon.ts @@ -125,6 +125,7 @@ import { User, Switch, More, + Material } from '@icon-park/vue-next' export interface Icons { @@ -255,6 +256,7 @@ export const icons: Icons = { IconUser: User, IconSwitch: Switch, IconMore: More, + IconMaterial: Material } export default { diff --git a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue new file mode 100644 index 0000000..8295fe0 --- /dev/null +++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue @@ -0,0 +1,173 @@ + + + 选择素材 + + + + + + + {{ item.fileShowName }} + + 插入 + + + + + + + \ No newline at end of file diff --git a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue index a0d73aa..dcd6eb0 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue @@ -82,6 +82,7 @@ + @@ -123,6 +124,13 @@ /> + + + + + @@ -149,6 +157,7 @@ import Divider from '../../../components/Divider.vue' import Popover from '../../../components/Popover.vue' import PopoverMenuItem from '../../../components/PopoverMenuItem.vue' import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue' +import MaterialDialog from './MaterialDialog.vue' const mainStore = useMainStore() const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore) @@ -200,6 +209,7 @@ const classWorkTaskVisible = ref(false) const textTypeSelectVisible = ref(false) const shapeMenuVisible = ref(false) const moreVisible = ref(false) +const materiaVisible = ref(false) // 绘制文字范围 const drawText = (vertical = false) => { @@ -246,6 +256,23 @@ const toggleSraechPanel = () => { const toggleNotesPanel = () => { mainStore.setNotesPanelState(!showNotesPanel.value) } + +// 插入素材 +interface MaterialParams { + type: string, + data: string +} +const insertMaterial = (item: MaterialParams) =>{ + const { type, data } = item + if(type == 'video'){ + createVideoElement(data) + } + else{ + createImageElement(data) + } + materiaVisible.value = false + +} \ 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 95f3c39..ef727b5 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -230,7 +230,7 @@ const HTTP_SERVER_API = (type, params = {}) => { ppttype: 'file', title: enpt.coursetitle, fileurl: '', - filetype: 'aptist', + filetype: 'aippt', datacontent: '', filekey: '', filetag: '', @@ -287,7 +287,7 @@ const handleAll = async(type, row) =>{ break; } case 'open': { // 打开资源-pptist - if (row.filetype != 'aptist') return msgUtils.msgWarning('暂不支持该类型文件操作!') + if (row.filetype != 'aippt') return msgUtils.msgWarning('暂不支持该类型文件操作!') sessionStore.set('curr.resource', row) // 缓存当前资源信息 createWindow('open-win', { url: '/pptist', // 窗口关闭时,清除缓存 @@ -312,7 +312,7 @@ const handleAll = async(type, row) =>{ // icons 处理 type 代表传递svg const getIcon = (o, type) => { let icon = typeof o == 'string' ? o : o?.filetype - if (['aptist'].includes(o?.filetype)) icon = 'pptx' + if (['aippt'].includes(o?.filetype)) icon = 'pptx' if (!!type) { // 其他格式icon switch(type) { case 'svg': // 返回svg格式 diff --git a/src/renderer/src/views/prepare/container/class-start.vue b/src/renderer/src/views/prepare/container/class-start.vue index 3829064..3fa408b 100644 --- a/src/renderer/src/views/prepare/container/class-start.vue +++ b/src/renderer/src/views/prepare/container/class-start.vue @@ -262,7 +262,7 @@ const createClasscourse = async () => { // getClasscourseList('update') // 更新列表 ElMessage.success('创建课程-成功') // 新版-pptList 打开公屏 - if (myClassActive.value.filetype == 'aptist') { + if (myClassActive.value.filetype == 'aippt') { const msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0}) setTimeout(() => { msgEl.close() diff --git a/src/renderer/src/views/prepare/container/kj-list-item.vue b/src/renderer/src/views/prepare/container/kj-list-item.vue index fc1cc6d..b874549 100644 --- a/src/renderer/src/views/prepare/container/kj-list-item.vue +++ b/src/renderer/src/views/prepare/container/kj-list-item.vue @@ -341,7 +341,7 @@ export default { cookieData: { ...configObj.data } }) return - } else if(items.fileFlag === 'aptist') { // aptist 被点击 打开PPT-List 课件 + } else if(items.fileFlag === 'aippt') { // aippt 被点击 打开PPT-List 课件 return this.$emit('change', 'click', items) } if (!items||!items.fileSuffix) return; diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index ca44ba8..43ff14a 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -2,8 +2,20 @@ + + + 新建 + + + + 新建文枢课件 + AI一键生成 + 导入PPT + + + - + 创建APT @@ -145,7 +157,7 @@