diff --git a/src/renderer/src/AixPPTist/src/api/index.ts b/src/renderer/src/AixPPTist/src/api/index.ts index f54a141..611efb6 100644 --- a/src/renderer/src/AixPPTist/src/api/index.ts +++ b/src/renderer/src/AixPPTist/src/api/index.ts @@ -73,7 +73,6 @@ export class PPTApi { // 活动列表处理 const workList = (res.rows || []).map(o => o.activityContent) const workItem = [...res.rows] - // 加入活动后刷新ppt数据内容,不跟换为第一页 // slidesStore.updateSlideIndex(0) // 下标0 为第一页 slidesStore.setSlides(slides) // 写入数据 // 写入作业列表数据 @@ -110,11 +109,9 @@ export class PPTApi { const rid = await API_entpcoursefile.addEntpcoursefileReturnId(params) if (!!rid) { data.id = rid - params.id = rid - params.activityContent = null - slidesStore.addWorkItem(params) slidesStore.updateSlide(data) // msgUtils.msgSuccess('新增成功') + PPTApi.getSlideList(resource.id) this.isUpdate = false // 新增后会触发监听,不再更新数据 resolve(true) } else msgUtils.msgError('新增失败');resolve(false) 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 index d55e688..cddd334 100644 --- 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 @@ -305,10 +305,10 @@ const upDateData = async () => { // await PPTApi.updateSlide(paramData.value) loadingActive.value = true await updateEntpcoursefileNew(paramData.value) - const res = await homeworklist({ ids: paramData.value.activityContent, pageSize: 100 }) - await formatClassWorkFile(res.rows) const resource = sessionStore.get('curr.resource') await PPTApi.getSlideList(resource.id) + const res = await homeworklist({ ids: paramData.value.activityContent, pageSize: 100 }) + await formatClassWorkFile(res.rows) } // 判断是否做操作 const objectsAreEqual = (obj1: Record, obj2: Record) => {