From 8ad041e963c5fc426e9a143958028f9fb840bcc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Wed, 4 Dec 2024 14:34:25 +0800 Subject: [PATCH 1/6] 1 --- src/renderer/src/views/model/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index f39fc99..7435edf 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -52,7 +52,7 @@ import { useRouter } from 'vue-router' import { Plus, Refresh, Upload, Files, UploadFilled } from '@element-plus/icons-vue' import useUserStore from '@/store/modules/user' // 用户信息 import msgUtils from '@/plugins/modal' // 消息工具 -import { createWindow, sessionStore } from '@/utils/tool' // 相关工具 +import { createWindow } from '@/utils/tool' // 相关工具 import * as API_entpcourse from '@/api/education/entpcourse' // 相关api import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api import { dataSetJson } from '@/utils/comm' // 数据集id文生图 From df474db4a55772d3beb5217de2fcca2b22c333c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Wed, 4 Dec 2024 14:38:28 +0800 Subject: [PATCH 2/6] 1 --- src/renderer/src/views/model/index.vue | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index 3af46e0..0617ab3 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -52,12 +52,8 @@ import { useRouter } from 'vue-router' import { Plus, Refresh, Upload, Files, UploadFilled } from '@element-plus/icons-vue' import useUserStore from '@/store/modules/user' // 用户信息 import msgUtils from '@/plugins/modal' // 消息工具 -<<<<<<< HEAD import { createWindow } from '@/utils/tool' // 相关工具 -======= -import { createWindow, sessionStore } from '@/utils/tool' // 相关工具 import * as API_smarttalk from '@/api/file' // 文件相关api ->>>>>>> c22b360e0fc344cad791625894423981d45c5cb2 import * as API_entpcourse from '@/api/education/entpcourse' // 相关api import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api import { dataSetJson } from '@/utils/comm' // 数据集id文生图 @@ -201,19 +197,6 @@ const getResourceList = async () => { // 统一HTTP处理 const HTTP_SERVER_API = (type, params = {}) => { switch (type) { - case 'addSmarttalk': { // 获取课程 - const def = { - fileId: '', // 文件id - Entpcoursefile 对应id - fileFlag: 'aptist', - fileShowName: courseObj.coursetitle + '.aptist', - textbookId: courseObj.textbookId, - levelFirstId: courseObj.levelFirstId, - levelSecondId: courseObj.levelSecondId, - fileSource: '个人', - fileRoot: '备课' - } - return API_smarttalk.creatAPT({...def, ...params}) - } case 'addEntpcourse': { // 添加课程 const node = courseObj.node || {} if (!node) return msgUtils.msgWarning('请选择章节?') @@ -296,8 +279,6 @@ const handleAll = async(type, row) =>{ } // 生成ppt课件-子级(slide) await HTTP_SERVER_API('addEntpcoursefile', params) - // 生成备课资源-Smarttalk - await HTTP_SERVER_API('addSmarttalk',{fileId: id}) // 刷新资源列表 await getResourceList() } else { From edabc0336f481fbb5abb2de2344535b07e5f2e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Wed, 4 Dec 2024 14:57:56 +0800 Subject: [PATCH 3/6] =?UTF-8?q?add=EF=BC=9A=E6=96=B0=E5=A2=9Epptlist?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=97=E8=A1=A8;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/AixPPTist/src/api/index.ts | 10 +- .../src/AixPPTist/src/store/slides.ts | 11 + .../src/AixPPTist/src/types/toolbar.ts | 1 + .../src/views/Editor/Thumbnails/index.vue | 11 +- .../ElementStylePanel/Active/index.vue | 291 ++++++++++++++++++ .../src/views/Editor/Toolbar/index.vue | 4 + .../classTask/newClassTaskAssign/index.vue | 52 +++- 7 files changed, 369 insertions(+), 11 deletions(-) create mode 100644 src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue diff --git a/src/renderer/src/AixPPTist/src/api/index.ts b/src/renderer/src/AixPPTist/src/api/index.ts index 658ba69..236f171 100644 --- a/src/renderer/src/AixPPTist/src/api/index.ts +++ b/src/renderer/src/AixPPTist/src/api/index.ts @@ -53,7 +53,8 @@ export class PPTApi { return new Promise(async (resolve, reject) => { const params: object = { parentid, orderByColumn: 'fileidx', isAsc: 'asc', pageSize: 9999 } const res: Result = await API_entpcoursefile.listEntpcoursefileNew(params) - if (res.code === 200) { + console.log(res.rows,'res.rows'); + if (res.code === 200) { const slides = (res.rows || []).map(o => { if (!!o.datacontent) { const json = JSON.parse(o.datacontent) @@ -63,8 +64,15 @@ export class PPTApi { // 如果没有数据,默认空白页 return {id: o.id,elements:[],background:{type:"solid",color:"#fff"}} }) + // 活动列表处理 + const workList = (res.rows || []).map(o => o.activityContent) + const workItem = [...res.rows] slidesStore.updateSlideIndex(0) // 下标0 为第一页 slidesStore.setSlides(slides) // 写入数据 + // 写入作业列表数据 + slidesStore.setWorkList(workList) + // 获取所有的pptlist的数据 + slidesStore.setWorkItem(workItem) resolve(true) } else msgUtils.msgError(res.msg || '获取数据失败');resolve(false) }) diff --git a/src/renderer/src/AixPPTist/src/store/slides.ts b/src/renderer/src/AixPPTist/src/store/slides.ts index c5a0def..78e9d02 100644 --- a/src/renderer/src/AixPPTist/src/store/slides.ts +++ b/src/renderer/src/AixPPTist/src/store/slides.ts @@ -31,6 +31,8 @@ export interface SlidesState { slideIndex: number viewportSize: number viewportRatio: number + workList:Object[], + workItem:Object[], } export const useSlidesStore = defineStore('slides', { @@ -41,6 +43,8 @@ export const useSlidesStore = defineStore('slides', { slideIndex: 0, // 当前页面索引 viewportSize: 1000, // 可视区域宽度基数 viewportRatio: 0.5625, // 可视区域比例,默认16:9 + workList:[],// 活动的列表 + workItem:[],// 获取到的所有pptlist }), getters: { @@ -131,6 +135,13 @@ export const useSlidesStore = defineStore('slides', { setSlides(slides: Slide[]) { this.slides = slides }, + // 更新活动列表 + setWorkList(list: Object[]) { + this.workList = list + }, + setWorkItem(list: Object[]) { + this.workItem = list + }, addSlide(slide: Slide | Slide[]) { const slides = Array.isArray(slide) ? slide : [slide] diff --git a/src/renderer/src/AixPPTist/src/types/toolbar.ts b/src/renderer/src/AixPPTist/src/types/toolbar.ts index 5e87881..5746777 100644 --- a/src/renderer/src/AixPPTist/src/types/toolbar.ts +++ b/src/renderer/src/AixPPTist/src/types/toolbar.ts @@ -6,4 +6,5 @@ export const enum ToolbarStates { SLIDE_DESIGN = 'slideDesign', SLIDE_ANIMATION = 'slideAnimation', MULTI_POSITION = 'multiPosition', + EL_ACTIVE = 'elActive', } \ No newline at end of file diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue index 9edc344..e61e623 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/Thumbnails/index.vue @@ -66,6 +66,9 @@
幻灯片 {{slideIndex + 1}} / {{slides.length}}
+ + + @@ -85,12 +88,13 @@ import ThumbnailSlide from '../../../views/components/ThumbnailSlide/index.vue' import LayoutPool from './LayoutPool.vue' import Popover from '../../../components/Popover.vue' import Draggable from 'vuedraggable' +import Active from '../Toolbar/ElementStylePanel/Active/index.vue' const mainStore = useMainStore() const slidesStore = useSlidesStore() const keyboardStore = useKeyboardStore() const { selectedSlidesIndex: _selectedSlidesIndex, thumbnailsFocus } = storeToRefs(mainStore) -const { slides, slideIndex, currentSlide } = storeToRefs(slidesStore) +const { slides, slideIndex, currentSlide, workList, workItem } = storeToRefs(slidesStore) const { ctrlKeyState, shiftKeyState } = storeToRefs(keyboardStore) const { slidesLoadLimit } = useLoadSlides() @@ -123,6 +127,8 @@ const { updateSectionTitle, } = useSectionHandler() +const activeRef = ref() + // 页面被切换时 const thumbnailsRef = ref>() watch(() => slideIndex.value, () => { @@ -145,6 +151,9 @@ watch(() => slideIndex.value, () => { // 切换页面 const changeSlideIndex = (index: number) => { + console.log(workItem.value[index],'hasSection'); + activeRef.value.clickPPTList(workItem.value[index]) + mainStore.setActiveElementIdList([]) if (slideIndex.value === index) return diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue new file mode 100644 index 0000000..9bf72ac --- /dev/null +++ b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/Active/index.vue @@ -0,0 +1,291 @@ + + + \ No newline at end of file diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue index 49bfd8e..ea16b24 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/index.vue @@ -25,6 +25,8 @@ import SlideDesignPanel from './SlideDesignPanel.vue' import SlideAnimationPanel from './SlideAnimationPanel.vue' import MultiPositionPanel from './MultiPositionPanel.vue' import SymbolPanel from './SymbolPanel.vue' +// 新增的活动页面 +import SymbolActivePanel from './ElementStylePanel/Active/index.vue' import Tabs from '../../../components/Tabs.vue' interface ElementTabs { @@ -54,6 +56,7 @@ const slideTabs = [ { label: '设计', key: ToolbarStates.SLIDE_DESIGN }, { label: '切换', key: ToolbarStates.SLIDE_ANIMATION }, { label: '动画', key: ToolbarStates.EL_ANIMATION }, + { label: '活动', key: ToolbarStates.EL_ACTIVE }, ] const multiSelectTabs = [ { label: '样式', key: ToolbarStates.EL_STYLE }, @@ -86,6 +89,7 @@ const currentPanelComponent = computed(() => { [ToolbarStates.SLIDE_ANIMATION]: SlideAnimationPanel, [ToolbarStates.MULTI_POSITION]: MultiPositionPanel, [ToolbarStates.SYMBOL]: SymbolPanel, + [ToolbarStates.EL_ACTIVE]: SymbolActivePanel,// 新增的活动页面 } return panelMap[toolbarState.value] || null }) diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue index 55ff885..b1a52f2 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue @@ -1,6 +1,6 @@ +
@@ -110,6 +111,17 @@ @update="data => { createLatexElement(data); latexEditorVisible = false }" /> + + + + +
@@ -178,6 +190,7 @@ const chartPoolVisible = ref(false) const tableGeneratorVisible = ref(false) const mediaInputVisible = ref(false) const latexEditorVisible = ref(false) +const classWorkTaskVisible = ref(false) const textTypeSelectVisible = ref(false) const shapeMenuVisible = ref(false) const moreVisible = ref(false) From ea204de407f0abca60022f5a87184f5f6171e89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Wed, 4 Dec 2024 15:05:48 +0800 Subject: [PATCH 5/6] 1 --- src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue | 1 + 1 file changed, 1 insertion(+) 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 e0c8ab9..749e1ab 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue @@ -147,6 +147,7 @@ import Modal from '../../../components/Modal.vue' import Divider from '../../../components/Divider.vue' import Popover from '../../../components/Popover.vue' import PopoverMenuItem from '../../../components/PopoverMenuItem.vue' +import SearchQuestion from '@/views/classTask/newClassTaskAssign/searchQuestion/index.vue' const mainStore = useMainStore() const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore) From be9d33fcd37f72551593d69143124144f79ae7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Wed, 4 Dec 2024 17:30:01 +0800 Subject: [PATCH 6/6] =?UTF-8?q?pptist=EF=BC=9A=20canvasTool=20=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=20=E6=96=B0=E5=A2=9E=E6=8F=92=E5=85=A5=E8=AF=95?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + .../src/views/Editor/CanvasTool/index.vue | 16 ++- .../newClassTaskAssign/myQuestion/index.vue | 34 +++++- .../questToPPTist/index.vue | 115 ++++++++++++++++++ .../searchQuestion/index.vue | 31 ++++- 5 files changed, 181 insertions(+), 16 deletions(-) create mode 100644 src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue diff --git a/package.json b/package.json index 5034c80..0f251bf 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "file-saver": "^2.0.5", "hfmath": "^0.0.2", "html-to-image": "^1.11.11", + "html2canvas": "^1.4.1", "im_electron_sdk": "^8.0.5904", "js-cookie": "^3.0.5", "jsencrypt": "^3.3.2", 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 749e1ab..a0d73aa 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue @@ -81,7 +81,7 @@ - +
@@ -116,9 +116,10 @@ v-model:visible="classWorkTaskVisible" :width="880" > - @@ -147,7 +148,7 @@ import Modal from '../../../components/Modal.vue' import Divider from '../../../components/Divider.vue' import Popover from '../../../components/Popover.vue' import PopoverMenuItem from '../../../components/PopoverMenuItem.vue' -import SearchQuestion from '@/views/classTask/newClassTaskAssign/searchQuestion/index.vue' +import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue' const mainStore = useMainStore() const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore) @@ -185,6 +186,10 @@ const insertImageElement = (files: FileList) => { getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL)) } +const onhtml2canvas = (imgbs64: string) => { + createImageElement(imgbs64) +} + const shapePoolVisible = ref(false) const linePoolVisible = ref(false) const chartPoolVisible = ref(false) @@ -357,6 +362,9 @@ const toggleNotesPanel = () => { font-size: 13px; } } +.class-work-task-modal{ + height: 80vh; +} @media screen and (width <= 1200px) { .right-handler .text { diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue index e605b51..23970f4 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue @@ -40,7 +40,7 @@ 查找 - 添加习题 + 添加习题 @@ -58,9 +58,9 @@