diff --git a/env.d.ts b/env.d.ts new file mode 100644 index 0000000..32b911d --- /dev/null +++ b/env.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import { ComponentOptions } from 'vue' + const componentOptions: ComponentOptions + export default componentOptions +} \ No newline at end of file diff --git a/src/renderer/src/AixPPTist/src/App.vue b/src/renderer/src/AixPPTist/src/App.vue index d18e59d..77b800d 100644 --- a/src/renderer/src/AixPPTist/src/App.vue +++ b/src/renderer/src/AixPPTist/src/App.vue @@ -82,5 +82,8 @@ const initLoad: Function = () => { \ No newline at end of file + diff --git a/src/renderer/src/AixPPTist/src/plugins/icon.ts b/src/renderer/src/AixPPTist/src/plugins/icon.ts index 2bffc0e..bc6e035 100644 --- a/src/renderer/src/AixPPTist/src/plugins/icon.ts +++ b/src/renderer/src/AixPPTist/src/plugins/icon.ts @@ -125,7 +125,8 @@ import { User, Switch, More, - Material + Material, + AddPicture } from '@icon-park/vue-next' export interface Icons { @@ -256,7 +257,8 @@ export const icons: Icons = { IconUser: User, IconSwitch: Switch, IconMore: More, - IconMaterial: Material + IconMaterial: Material, + IconAddPicture: AddPicture } 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 index 8295fe0..dd648a3 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/MaterialDialog.vue @@ -11,6 +11,7 @@ 插入 + @@ -93,11 +94,9 @@ const GetUrlParameters = (parameters) => { } } } - return resData; } - const proxyToBase64 = (url)=> { const dourl = GetUrlParameters(url) console.log(dourl,'dourl') 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 1334688..6896137 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue @@ -83,6 +83,7 @@ +
@@ -121,14 +122,18 @@ @update="data => { onhtml2canvas(data); classWorkTaskVisible = false }" /> - + - - + + + +
@@ -156,6 +161,7 @@ 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' +import TextCreateImg from '@/components/ai-kolors/index.vue' const mainStore = useMainStore() const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore) @@ -269,8 +275,10 @@ const insertMaterial = (item: MaterialParams) =>{ createImageElement(data) } materiaVisible.value = false - } + +// 文生图 +const imgVisible = ref(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 e387797..1fc5642 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -10,7 +10,7 @@ 作业管理 教材研读 教学框架设计 - 打开PPTist + 考试分析 测试 文生图片 @@ -245,7 +245,7 @@ const HTTP_SERVER_API = (type, params = {}) => { ppttype: 'file', title: enpt.coursetitle, fileurl: '', - filetype: 'aptist', + filetype: 'aippt', datacontent: '', filekey: '', filetag: '', @@ -304,7 +304,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', // 窗口关闭时,清除缓存 @@ -329,7 +329,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/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) { diff --git a/src/renderer/src/views/prepare/container/class-start.vue b/src/renderer/src/views/prepare/container/class-start.vue index af1e75a..77eb615 100644 --- a/src/renderer/src/views/prepare/container/class-start.vue +++ b/src/renderer/src/views/prepare/container/class-start.vue @@ -263,7 +263,7 @@ const createClasscourse = async () => { // getClasscourseList('update') // 更新列表 let msgEl = ElMessage.success('创建课程-成功') // 新版-pptList 打开公屏 - if (myClassActive.value.filetype == 'aptist') { + if (myClassActive.value.filetype == 'aippt') { setTimeout(() => { msgEl.close() msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0}) 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 637e92c..4e9be4e 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -2,8 +2,20 @@
+ + + 新建 + + + - +
@@ -145,7 +157,7 @@