diff --git a/src/renderer/src/AixPPTist/src/api/index.ts b/src/renderer/src/AixPPTist/src/api/index.ts index 43bec28..aa255d2 100644 --- a/src/renderer/src/AixPPTist/src/api/index.ts +++ b/src/renderer/src/AixPPTist/src/api/index.ts @@ -60,7 +60,6 @@ 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) - console.log(res.rows,'res.rows'); if (res.code === 200) { const slides = (res.rows || []).map(o => { if (!!o.datacontent) { @@ -74,7 +73,8 @@ export class PPTApi { // 活动列表处理 const workList = (res.rows || []).map(o => o.activityContent) const workItem = [...res.rows] - slidesStore.updateSlideIndex(0) // 下标0 为第一页 + // 加入活动后刷新ppt数据内容,不跟换为第一页 + // slidesStore.updateSlideIndex(0) // 下标0 为第一页 slidesStore.setSlides(slides) // 写入数据 // 写入作业列表数据 slidesStore.setWorkList(workList) 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 c5f5c31..bc658cf 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 @@ -30,7 +30,7 @@ -
+
- - - + + +
+ +
@@ -142,7 +144,6 @@ const currentCourse = reactive({ worktype: '', }) -const dataList = ref([]) const dialogVisible = ref(false) const tasklist_loading = ref(false) @@ -152,11 +153,6 @@ const taskList = ref([]) // 活动引用的弹窗 const activeVisible = ref(false) -const params = reactive({ - parentid: 14766, - pageSize: 500, - orderby: 'fileidx' -}) const type = ref([ { @@ -179,6 +175,8 @@ const workList = ref([]) // 获取所选择的作业列表 const selectedWorkList = ref([]) +// 活动页面的loading框 +const loadingActive = ref(false) const paramData = ref<{ id: number, activityContent: string }>({} as { id: number, activityContent: string }) @@ -196,7 +194,6 @@ const formatClassWorkFile = async (postData: WorkItem[]): Promise => { } break; case '习题训练': { - console.log(item,'item'); // let workIds = item.quizlist!.map(items => items.id).join(','); // let ress = await listEntpcoursework({ ids: workIds }); // const arr = ress.rows.map((item:{id:number}) => { @@ -213,23 +210,20 @@ const formatClassWorkFile = async (postData: WorkItem[]): Promise => { case '常规作业': { // item.prevData = JSON.parse(item.workcodes); } - } - const arr = paramData.value.activityContent.split(',') - arr.push(item.id.toString()) - await PPTApi.updateSlide(paramData.value) - addWorkList(item) + } + workList.value.push(item) + loadingActive.value = false } await nextTick(); -} -// 添加的活动回显到页面上面去 -const addWorkList = (item: WorkItem) => { - workList.value.push(item) -} -// 删除作业 +}// 删除作业 const handleRemoveDemoActivityClassWork = (item: WorkItem) => { ElMessageBox.confirm('是否确认删除?') .then(() => { - workList.value.splice(workList.value.indexOf(item), 1); + workList.value = [] + const arr = paramData.value.activityContent.split(',') + const filterArr = arr.filter(itemId => itemId!== item.id.toString()) + paramData.value.activityContent = filterArr.join(',') + upDateData() }) .catch(() => { }); } @@ -269,13 +263,51 @@ const savePPtData = async () => { ElMessage.warning('请选择活动') return } + workList.value = [] const arr = selectedWorkList.value.map(item => item.id) // 应该是新加而不是覆盖 - paramData.value.activityContent = arr.join(',') - await PPTApi.updateSlide(paramData.value) + const existingIds = paramData.value.activityContent ? paramData.value.activityContent.split(',') : [] + paramData.value.activityContent = Array.from(new Set([...existingIds, ...arr])).join(',') + upDateData() activeVisible.value = false } +// 获取当前ppt页的数据 +const getCurrentPPtData = async () => { + workList.value = [] + objItem.value = workItem.value[slideIndex.value] + paramData.value.id = objItem.value.id + paramData.value.activityContent = objItem.value?.activityContent + if (objItem.value?.activityContent) { + loadingActive.value = true + const res = await homeworklist({ ids: objItem.value?.activityContent, pageSize: 100 }) + await formatClassWorkFile(res.rows) + } +} + +// 接收习题训练的值 +const getData = async (data: WorkItem) => { + workList.value = [] + if(paramData.value.activityContent){ + const arr = paramData.value.activityContent.split(',') + arr.push(data.id.toString()) + const unitArr = Array.from(new Set(arr)) + paramData.value.activityContent = unitArr.join(',') + }else{ + paramData.value.activityContent = data.id.toString() + } + upDateData() + dialogVisible.value = false +} +const upDateData = async () => { + await PPTApi.updateSlide(paramData.value) + loadingActive.value = true + 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) +} + onMounted(() => { const curNode = sessionStore.get('subject.curNode') as CourseNode currentCourse.textbookId = curNode.rootid @@ -283,33 +315,12 @@ onMounted(() => { currentCourse.levelSecondId = curNode.id currentCourse.coursetitle = curNode.itemtitle currentCourse.node = curNode - listEntpcoursefile(params).then((res: { rows: WorkItem[] }) => { - dataList.value = [...res.rows] - }) objItem.value = workItem.value[slideIndex.value] getCurrentPPtData() }) watch(() => slideIndex.value, () => { getCurrentPPtData() }) -// 获取当前ppt页的数据 -const getCurrentPPtData = async () => { - workList.value = [] - objItem.value = workItem.value[slideIndex.value] - paramData.value.id = objItem.value.id - if (objItem.value?.activityContent) { - paramData.value.activityContent = objItem.value?.activityContent - const res = await homeworklist({ ids: objItem.value?.activityContent, pageSize: 100 }) - await formatClassWorkFile(res.rows) - } -} - -// 接收习题训练的值 -const getData = async (data: WorkItem) => { - console.log(data, 'data') - await formatClassWorkFile([data]) -} - \ No newline at end of file diff --git a/src/renderer/src/assets/iconfont/iconfont.css b/src/renderer/src/assets/iconfont/iconfont.css index ea364a2..48ced18 100644 --- a/src/renderer/src/assets/iconfont/iconfont.css +++ b/src/renderer/src/assets/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 4723712 */ - src: url('iconfont.woff2?t=1732240267757') format('woff2'), - url('iconfont.woff?t=1732240267757') format('woff'), - url('iconfont.ttf?t=1732240267757') format('truetype'); + src: url('iconfont.woff2?t=1733880548695') format('woff2'), + url('iconfont.woff?t=1733880548695') format('woff'), + url('iconfont.ttf?t=1733880548695') format('truetype'); } .iconfont { @@ -13,6 +13,26 @@ -moz-osx-font-smoothing: grayscale; } +.icon-yuyin:before { + content: "\e648"; +} + +.icon-dianying:before { + content: "\e693"; +} + +.icon-jiqirenfushi:before { + content: "\e624"; +} + +.icon-xiangmuicon_maobishufa:before { + content: "\e651"; +} + +.icon-meishu-F:before { + content: "\e638"; +} + .icon-shangchuan:before { content: "\e61b"; } diff --git a/src/renderer/src/assets/iconfont/iconfont.js b/src/renderer/src/assets/iconfont/iconfont.js index a4efe1b..55c5cce 100644 --- a/src/renderer/src/assets/iconfont/iconfont.js +++ b/src/renderer/src/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_4723712='',(l=>{var h=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,v,t,i,z,p=function(h,c){c.parentNode.insertBefore(h,c)};if(h&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_4723712,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(h=document.body).firstChild?p(c,h.firstChild):h.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),a()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=a,i=l.document,z=!1,o(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,M())})}function M(){z||(z=!0,t())}function o(){try{i.documentElement.doScroll("left")}catch(h){return void setTimeout(o,50)}M()}})(window); \ No newline at end of file +window._iconfont_svg_string_4723712='',(l=>{var h=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,v,t,i,z,p=function(h,c){c.parentNode.insertBefore(h,c)};if(h&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_4723712,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(h=document.body).firstChild?p(c,h.firstChild):h.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),a()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=a,i=l.document,z=!1,o(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,M())})}function M(){z||(z=!0,t())}function o(){try{i.documentElement.doScroll("left")}catch(h){return void setTimeout(o,50)}M()}})(window); \ No newline at end of file diff --git a/src/renderer/src/assets/iconfont/iconfont.json b/src/renderer/src/assets/iconfont/iconfont.json index fc6689f..7e335cb 100644 --- a/src/renderer/src/assets/iconfont/iconfont.json +++ b/src/renderer/src/assets/iconfont/iconfont.json @@ -5,6 +5,41 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "6338162", + "name": "语音生成", + "font_class": "yuyin", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "6880941", + "name": "视频生成", + "font_class": "dianying", + "unicode": "e693", + "unicode_decimal": 59027 + }, + { + "icon_id": "11532042", + "name": "数字人生成", + "font_class": "jiqirenfushi", + "unicode": "e624", + "unicode_decimal": 58916 + }, + { + "icon_id": "13522843", + "name": "文生图片", + "font_class": "xiangmuicon_maobishufa", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "37635062", + "name": "文生连环画", + "font_class": "meishu-F", + "unicode": "e638", + "unicode_decimal": 58936 + }, { "icon_id": "4942656", "name": "上传", diff --git a/src/renderer/src/assets/iconfont/iconfont.ttf b/src/renderer/src/assets/iconfont/iconfont.ttf index 04dd21f..51df6e8 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.ttf and b/src/renderer/src/assets/iconfont/iconfont.ttf differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff b/src/renderer/src/assets/iconfont/iconfont.woff index 0771012..e9b9ac1 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff and b/src/renderer/src/assets/iconfont/iconfont.woff differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff2 b/src/renderer/src/assets/iconfont/iconfont.woff2 index dd21fa9..ac355d5 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff2 and b/src/renderer/src/assets/iconfont/iconfont.woff2 differ diff --git a/src/renderer/src/components/file-image/index.vue b/src/renderer/src/components/file-image/index.vue index c68ee78..427a53a 100644 --- a/src/renderer/src/components/file-image/index.vue +++ b/src/renderer/src/components/file-image/index.vue @@ -36,6 +36,11 @@ const getFileTypeIcon = () => { rar: 'icon-rar', apt: 'icon-A', aippt: 'icon-A', + aiyuyin: 'icon-yuyin', // 语音生成 + aivideo: 'icon-dianying', // 视频生成 + airobot: 'icon-jiqirenfushi', // 数字人生成 + aiimg: 'icon-xiangmuicon_maobishufa', // 文生图片 + aidraw: 'icon-meishu-F', // 文生连环画 } if (iconObj[name]) { return '#' + iconObj[name] diff --git a/src/renderer/src/components/template-study/container/adjust-dialog.vue b/src/renderer/src/components/template-study/container/adjust-dialog.vue index 5cf6251..65316c3 100644 --- a/src/renderer/src/components/template-study/container/adjust-dialog.vue +++ b/src/renderer/src/components/template-study/container/adjust-dialog.vue @@ -29,6 +29,20 @@
+
+ + + {{ curFile.fileName }} + + + + +
@@ -40,13 +54,15 @@ +const clickItem = (index, item) => { + activeIndex.value = index + Object.assign(curFile, item) + emitter.emit('changeCurFile', item) +} +const prevItem = reactive({}) +const onPrevItem = (item) => { + Object.assign(prevItem, item) + prevVisible.value = true +} + +onMounted(() => { + let data = sessionStore.get('subject.curNode') + Object.assign(curNode, data); + // 暂时写死"考试-" 目前只有考试分析才会弹出来 + let jsonKey = `考试-${curNode.edustage}-${curNode.edusubject}` + dataset_id.value = dataSetJson[jsonKey] + getList() +}) + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/left.vue b/src/renderer/src/components/template-study/container/left.vue index ae67aed..02db0d4 100644 --- a/src/renderer/src/components/template-study/container/left.vue +++ b/src/renderer/src/components/template-study/container/left.vue @@ -2,12 +2,13 @@
- {{ curNode.edustage }}{{ curNode.edusubject }}{{ type == 1 ? '课标研读' : '教材分析' }}
+
@@ -24,7 +25,7 @@ const props = defineProps(['curNode', 'type']) const showDialog = ref(false) const onClick = () => { - if (props.type == 1) return + if (props.type != 3) return showDialog.value = true } @@ -37,7 +38,9 @@ onMounted(async () => { if(props.type == 1){ fileurl = `${data.edustage}-${data.edusubject}-课标.txt` } + if(fileurl == '') return pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt', '.pdf') + }) diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index d62793a..8bc77e1 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -39,7 +39,7 @@ @@ -79,7 +79,7 @@ - + diff --git a/src/renderer/src/views/examination-analysis/container/dialog.vue b/src/renderer/src/views/examination-analysis/container/dialog.vue deleted file mode 100644 index 5e41740..0000000 --- a/src/renderer/src/views/examination-analysis/container/dialog.vue +++ /dev/null @@ -1,268 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/edit-dialog.vue b/src/renderer/src/views/examination-analysis/container/edit-dialog.vue deleted file mode 100644 index 06548d6..0000000 --- a/src/renderer/src/views/examination-analysis/container/edit-dialog.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/header.vue b/src/renderer/src/views/examination-analysis/container/header.vue deleted file mode 100644 index 880debf..0000000 --- a/src/renderer/src/views/examination-analysis/container/header.vue +++ /dev/null @@ -1,143 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/keyword-dialog.vue b/src/renderer/src/views/examination-analysis/container/keyword-dialog.vue deleted file mode 100644 index 4821d6e..0000000 --- a/src/renderer/src/views/examination-analysis/container/keyword-dialog.vue +++ /dev/null @@ -1,161 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/pdf.vue b/src/renderer/src/views/examination-analysis/container/pdf.vue deleted file mode 100644 index c871a8d..0000000 --- a/src/renderer/src/views/examination-analysis/container/pdf.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/renderer/src/views/examination-analysis/container/result.vue b/src/renderer/src/views/examination-analysis/container/result.vue deleted file mode 100644 index 304d70a..0000000 --- a/src/renderer/src/views/examination-analysis/container/result.vue +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - diff --git a/src/renderer/src/views/examination-analysis/index.vue b/src/renderer/src/views/examination-analysis/index.vue index 7461e1c..ce74808 100644 --- a/src/renderer/src/views/examination-analysis/index.vue +++ b/src/renderer/src/views/examination-analysis/index.vue @@ -1,52 +1,11 @@ \ No newline at end of file