From 560e6f0e7056722d156f20d6e7af98b46a910d25 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 6 Dec 2024 16:39:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E5=85=A5=E7=B4=A0=E6=9D=90-pptlist?= 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 @@ + + + + + \ 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 + +}