From a3e6aca89012e039ac5c7f1f2edf1b22ce4f3c83 Mon Sep 17 00:00:00 2001 From: qinqing <775435633@qq.com> Date: Wed, 25 Sep 2024 10:05:10 +0800 Subject: [PATCH 1/8] =?UTF-8?q?PDF=E9=98=85=E8=AF=BB=E5=99=A8=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=B1=82=E7=BA=A7=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/public/pdfjs-dist/web/viewer.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/public/pdfjs-dist/web/viewer.css b/src/renderer/public/pdfjs-dist/web/viewer.css index edd6bf0..19bb070 100644 --- a/src/renderer/public/pdfjs-dist/web/viewer.css +++ b/src/renderer/public/pdfjs-dist/web/viewer.css @@ -3144,7 +3144,7 @@ body{ background-color:var(--toolbar-bg-color); box-shadow:var(--toolbar-box-shadow); border-bottom:var(--toolbar-border-bottom); - z-index: 9; + z-index: 99999; } #toolbarViewer{ From 551bd62ae31a011589203793d67c81eba8defaa1 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, 25 Sep 2024 10:09:09 +0800 Subject: [PATCH 2/8] 1 --- .../src/views/classTask/classTaskAssign.vue | 112 +++++++++++++++--- 1 file changed, 94 insertions(+), 18 deletions(-) diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue index 7af3e3a..9ae1560 100644 --- a/src/renderer/src/views/classTask/classTaskAssign.vue +++ b/src/renderer/src/views/classTask/classTaskAssign.vue @@ -26,9 +26,9 @@ - 设计新作业 - 一键推送 - 删除 + 设计新作业 + 一键推送 + 删除 @@ -71,14 +71,14 @@ - + - 编辑 + 编辑 - 查看详情 + 查看详情 @@ -112,19 +112,19 @@ - - + + - + - 删除 + 删除 @@ -133,9 +133,9 @@ @@ -143,10 +143,10 @@ - + @@ -154,9 +154,12 @@ diff --git a/src/renderer/src/hooks/useGetSubject.js b/src/renderer/src/hooks/useGetSubject.js index 07bbb5e..f7882a2 100644 --- a/src/renderer/src/hooks/useGetSubject.js +++ b/src/renderer/src/hooks/useGetSubject.js @@ -63,7 +63,6 @@ export const useGetSubject = async () =>{ } sessionStore.set('subject.curNode', curNode) } - } // 单元章节数据转为“树”结构 @@ -73,9 +72,7 @@ export const useGetSubject = async () =>{ data.forEach( item => { item.children = unitList.value.filter( item2 => item2.parentid == item.id && item2.level == 2) }) - sessionStore.set('subject.subjectTree', data) return data - } await getSubjectUnit() diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index 710c338..2f9b859 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -175,7 +175,13 @@ function setLayout() { } // 切换学科 const changeSubject = async (command) =>{ - clearBookInfo() + let sessionSubject = { + bookList: null, + curBook: null, + curNode: null, + defaultExpandedKeys: [], + } + sessionStore.set( 'subject', sessionSubject) const { userId, userName, phonenumber, plainpwd } = userStore.user const data = { userId, diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 5de5618..8815b7e 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -512,6 +512,7 @@ export default { }) this.currentFileList.splice(index, 1) }) + ElMessage.success('操作成功') } }) }, From c517fa14afb92def3b32c02cab6afec36540d333 Mon Sep 17 00:00:00 2001 From: qinqing <775435633@qq.com> Date: Wed, 25 Sep 2024 13:44:51 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E8=AF=BE=E6=A0=87=E5=88=86=E6=9E=90?= =?UTF-8?q?=EF=BC=8C=E6=95=99=E6=9D=90=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/layout/components/AppMain.vue | 2 +- src/renderer/src/router/index.js | 8 +- src/renderer/src/views/desktop/index.vue | 3 +- .../views/teach/standardAnalysis/index.vue | 36 +- .../src/views/textbookAnalysis/index.vue | 555 ++++++++++++++++++ 5 files changed, 587 insertions(+), 17 deletions(-) create mode 100644 src/renderer/src/views/textbookAnalysis/index.vue diff --git a/src/renderer/src/layout/components/AppMain.vue b/src/renderer/src/layout/components/AppMain.vue index 67c3d6b..22cc830 100644 --- a/src/renderer/src/layout/components/AppMain.vue +++ b/src/renderer/src/layout/components/AppMain.vue @@ -67,7 +67,7 @@ const title = reactive([ }, { name: '教材分析', - url: '/teaching/chatwithtextbook', + url: '/textbookAnalysis', img: 'iconfont icon-yanjiushi', child1: [] }, diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js index 2fa6890..8796063 100644 --- a/src/renderer/src/router/index.js +++ b/src/renderer/src/router/index.js @@ -54,7 +54,13 @@ export const constantRoutes = [ path: '/standardanalysis', component: () => import('@/views/teach/standardAnalysis/index.vue'), name: 'standardanalysis', - meta: {title: '课标分析'}, + meta: {title: '课标分析'} + }, + { + path: '/textbookAnalysis', + component: () => import('@/views/textbookAnalysis/index.vue'), + name: 'textbookAnalysis', + meta: {title: '教材分析'} }, { path: '/profile', diff --git a/src/renderer/src/views/desktop/index.vue b/src/renderer/src/views/desktop/index.vue index 493cf57..c14411a 100644 --- a/src/renderer/src/views/desktop/index.vue +++ b/src/renderer/src/views/desktop/index.vue @@ -66,8 +66,7 @@ const menuList = [{ { name: '教材分析', icon: 'icon-jiaocaixuanze', - isOuter: true, - path: '/teaching/chatwithtextbook', + path: '/textbookAnalysis', id: '1-2' }, { diff --git a/src/renderer/src/views/teach/standardAnalysis/index.vue b/src/renderer/src/views/teach/standardAnalysis/index.vue index e2e2cbe..cc465a1 100644 --- a/src/renderer/src/views/teach/standardAnalysis/index.vue +++ b/src/renderer/src/views/teach/standardAnalysis/index.vue @@ -70,7 +70,10 @@ - {{item.edustage + item.edusubject}} + + + {{item.fileurl.replace('.txt', '')}} + @@ -237,8 +240,6 @@ const getData = (data) => { } sourceStore.handleQuery() getlistEvaluationclue(levelFirstId, levelSecondId) - // 头部 教材分析打开外部链接需要当前章节ID - localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId})) } // 获取学科 const getAllSubject = async () => { @@ -252,12 +253,16 @@ const getAllSubject = async () => { bookList.value.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar}) } }) - booksel.value = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject) + const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject) + booksel.value = textselidx + booktitle.value = bookList.value[textselidx].fileurl.replace('.txt','') + const filePath = import.meta.env.VITE_APP_RES_FILE_PATH + bookList.value[textselidx].fileurl.replace('.txt','.pdf') + await loadPdfAnimation(filePath) } const bookChange = async (item, idx) => { booksel.value = idx bookInfo.value = {...item} - booktitle.value = `${item.edustage + item.edusubject}课程标准` + booktitle.value = item.fileurl.replace('.txt','') pdfUrl.value = ''; const filepath = import.meta.env.VITE_APP_RES_FILE_PATH + item.fileurl.replace('.txt','.pdf') await loadPdfAnimation(filepath) @@ -271,10 +276,6 @@ const loadPdfAnimation = (path) => { } onMounted(async () => { await getAllSubject(); - const { edustage, edusubject } = userStore.user; - booktitle.value = `${edustage + edusubject}课程标准` - const filePath = `${import.meta.env.VITE_APP_RES_FILE_PATH}${edustage}-${edusubject}-课标.pdf` - await loadPdfAnimation(filePath) if(cardref.value && headref.value){ const cardH = cardref.value.offsetHeight; const headh = headref.value.offsetHeight; @@ -529,13 +530,22 @@ onMounted(async () => { padding-top: 1px; overflow: auto; .item{ - width: 100%; + width: 162px; height: auto; padding: 8px 16px; background-color: #ffffff; - border-top: 1px solid #f1f1f1; - font-size: 14px; - color: #3b3b3b; + float: left; + .bookimg{ + width: 130px; + height: 180px; + } + .name{ + font-size: 14px; + color: #3b3b3b; + } + } + .item:hover{ + cursor: pointer; } .active{ background-color: #409eff; diff --git a/src/renderer/src/views/textbookAnalysis/index.vue b/src/renderer/src/views/textbookAnalysis/index.vue new file mode 100644 index 0000000..0fbad07 --- /dev/null +++ b/src/renderer/src/views/textbookAnalysis/index.vue @@ -0,0 +1,555 @@ + + + + + + + + + + {{booktitle}} + + + 更新2024.9.10 + + + + + + + + + + + + + + + + + + + {{item.username}} + {{item.childcount}}条 + + + {{ item.userentpname }} + {{ item.timeStr }} + + + + + 加载中... + ~没有更多了~ + + + + + + + 文 + 档 + 加 + 载 + 中 + . + . + . + + + + + + + + {{item.fileurl.replace('.txt', '')}} + + + + + + + \ No newline at end of file From 773d0c19573bd1c785a834038ffad26c75edec12 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 25 Sep 2024 14:28:38 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E9=87=8D=E6=96=B0=E7=99=BB=E9=99=86?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/layout/components/Header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index 2f9b859..de4788c 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -190,7 +190,7 @@ const changeSubject = async (command) =>{ edusubject: command.edusubject } await updateUserInfo(data) - await userStore.login({username: phonenumber, password: plainpwd}) + await userStore.login({username: phonenumber ? phonenumber : userName, password: plainpwd}) await userStore.getInfo() router.go() } From 9d18bb2cdf8af652e2fed1c118dd8f704ac89166 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 25 Sep 2024 15:27:41 +0800 Subject: [PATCH 8/8] =?UTF-8?q?PDF=E6=8F=92=E4=BB=B6=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/components/PdfJs/index.vue | 3 ++- src/renderer/src/utils/tool.js | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/components/PdfJs/index.vue b/src/renderer/src/components/PdfJs/index.vue index 58dc927..50e7e8e 100644 --- a/src/renderer/src/components/PdfJs/index.vue +++ b/src/renderer/src/components/PdfJs/index.vue @@ -6,6 +6,7 @@
加载中...
~没有更多了~