From 41b0660559047298582707b6b77f311fe72aca62 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 14 Aug 2024 14:03:06 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=89=93=E5=BC=80=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=20url=20=E5=A2=9E=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prepare/container/file-list-item.vue | 7 +++++-- src/renderer/src/views/prepare/index.vue | 21 ++++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/views/prepare/container/file-list-item.vue b/src/renderer/src/views/prepare/container/file-list-item.vue index 92bc0af..96302ab 100644 --- a/src/renderer/src/views/prepare/container/file-list-item.vue +++ b/src/renderer/src/views/prepare/container/file-list-item.vue @@ -168,7 +168,7 @@ export default { } } }, - emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null }, + emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null }, data() { return { listenList: [], @@ -266,15 +266,18 @@ export default { }, // 文件资源打开web AIX 布置作业 openFileLink(item){ + let unitId = item.levelSecondId ? item.levelSecondId : item.levelFirstId // key 对应的 linkConfig.js 外部链接配置 let key = 'filehomework' let configObj = outLink()[key] // 通知主进程 ipcRenderer.send('openWindow', { key, - fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`, + fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}&unitId=${unitId}`, cookieData: { ...configObj.data } }) + + this.$emit('on-filearg', item) } }, mounted() { diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 489c993..61e57ca 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -79,6 +79,7 @@ @on-delete="deleteTalk" @on-set="openSet" @on-delhomework="delhomework" + @on-filearg="isOpenHomework = true" > @@ -91,6 +92,7 @@ @on-delete="deleteTalk" @on-set="openSet" @on-delhomework="delhomework" + > @@ -227,8 +229,8 @@ export default { const curWin = Remote.getCurrentWindow() curWin.on('focus', ()=>{ if(!this.isOpenHomework) return - console.log(100) this.initHomeWork() + this.asyncAllFile() this.isOpenHomework = false }) @@ -475,10 +477,21 @@ export default { } // key 对应的 linkConfig.js 外部链接配置 let configObj = outLink()[key] + let fullPath = configObj.fullPath + //打开作业 高考 url增加unitId 章节ID + if(key != 'standard' && key != 'aiModel'){ + let unitId = this.uploadData.levelSecondId ? this.uploadData.levelSecondId : this.uploadData.levelFirstId + if(key == 'gk'){ + fullPath += `?unitId=${unitId}` + } + else{ + fullPath += `&unitId=${unitId}` + } + } // 通知主进程 ipcRenderer.send('openWindow', { key, - fullPath: configObj.fullPath, + fullPath: fullPath, cookieData: { ...configObj.data } }) }, @@ -551,10 +564,8 @@ export default { res.rows[i].entpcourseworklistarray = [] } } - // 去重 - let ary = uniqBy([...this.currentFileList, ...list], 'id') // 深度克隆 - this.currentWorkList = cloneDeep(ary) + this.currentWorkList = cloneDeep(list) }) }, getWeekday1(date) { From bf783cf940f5c594b58d9e6db212b6e547d09937 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 14 Aug 2024 14:07:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/prepare/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 1a6e7c3..a26068a 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -147,7 +147,7 @@ import FileOperBatch from '@/views/prepare/container/file-oper-batch.vue' import SetHomework from './container/set-homework.vue' import outLink from '@/utils/linkConfig' import { createWindow } from '@/utils/tool' -import { uniqBy, cloneDeep } from 'lodash' +import { cloneDeep } from 'lodash' import { delClasswork, addEntpcourse } from '@/api/teaching/classwork' import { getSelfReserv, startClass } from '@/api/classManage' const toolStore = useToolState() From 1e52abc17092fda74c0fc2895270742c395f6544 Mon Sep 17 00:00:00 2001 From: yangws <1607839436@qq.com> Date: Wed, 14 Aug 2024 15:58:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=E6=96=B0=E5=8A=A0=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E4=BF=AE=E6=94=B9=E5=AD=A6=E6=AE=B5;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/choose-textbook/index.vue | 17 +++--- src/renderer/src/views/profile/userInfo.vue | 53 +++++++++++++++---- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index bdd14b9..9c02172 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -42,7 +42,7 @@ From 3c2dbb722a9f5b0ad08305f55d6b1887a2320555 Mon Sep 17 00:00:00 2001 From: yangws <1607839436@qq.com> Date: Wed, 14 Aug 2024 16:31:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=E4=B8=8A=E4=BC=A0=E5=AD=98=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E8=B7=AF=E5=BE=84;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/profile/userInfo.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/src/views/profile/userInfo.vue b/src/renderer/src/views/profile/userInfo.vue index 5358e00..de7ea81 100644 --- a/src/renderer/src/views/profile/userInfo.vue +++ b/src/renderer/src/views/profile/userInfo.vue @@ -126,6 +126,7 @@ setTimeout(() => { function submit() { proxy.$refs.userRef.validate((valid) => { if (valid) { + props.user.avatar = userStore.user.avatar updateUserInfo(props.user).then((response) => { if(response.code == 200){ userStore.login({username:props.user.phonenumber,password:props.user.plainpwd}).then(() => {