From fb48984e7f73f1ff3ae847e8af424de4b86c45d9 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 18 Sep 2024 11:29:39 +0800 Subject: [PATCH 01/25] =?UTF-8?q?APT=E4=B8=8A=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/renderer/src/views/prepare/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b7c1f41..578bc20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "1.2.3", + "version": "1.2.5", "description": "An Electron application with Vue", "main": "./out/main/index.js", "author": "example.com", diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 859843b..c410ea0 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -68,7 +68,7 @@
-   +   diff --git a/src/renderer/src/components/move-file/index.vue b/src/renderer/src/components/move-file/index.vue index f2fec19..6689e4a 100644 --- a/src/renderer/src/components/move-file/index.vue +++ b/src/renderer/src/components/move-file/index.vue @@ -137,7 +137,7 @@ const getSubjectContent = async () => { } const getSubject = async () => { - subjectList.value = JSON.parse(localStorage.getItem('subjectList')) + if (localStorage.getItem('subjectList')) { subjectList.value = JSON.parse(localStorage.getItem('subjectList')) diff --git a/src/renderer/src/hooks/useGetSubject.js b/src/renderer/src/hooks/useGetSubject.js new file mode 100644 index 0000000..e164e3e --- /dev/null +++ b/src/renderer/src/hooks/useGetSubject.js @@ -0,0 +1,82 @@ +import { ref } from 'vue' +import useUserStore from '@/store/modules/user' +import { listEvaluation } from '@/api/subject' + +export const useGetSubject = async () =>{ + + // user store + const userStore = useUserStore() + const { edustage, edusubject, userId } = userStore.user + const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH + // 章节List + const unitList = ref([]) + // 教材List + let subjectList = null + // 单元章节树结构 + let treeData = null + + + // 根据 学科 + 学段 获取所有单元章节 + const getSubjectUnit = async () =>{ + let strUnit = localStorage.getItem('unitList') + if(strUnit){ + unitList.value = JSON.parse(strUnit) + } + else{ + const unitParams = { + edusubject, + edustage, + itemgroup: 'textbook', + orderby: 'orderidx asc', + pageSize: 10000 + } + const { rows } = await listEvaluation(unitParams) + unitList.value = rows + localStorage.setItem('unitList', JSON.stringify(rows)) + } + + await getSubject() + } + + // 获取 学科 + 学段 获取教材 + const getSubject = async () =>{ + + let strSubject = localStorage.getItem('subjectList') + if(strSubject){ + subjectList = JSON.parse(strSubject) + } + else{ + const subjectParams = { + itemkey: "version", + edusubject, + edustage, + pageSize: 10000, + orderby: 'orderidx asc' + } + const { rows } = await listEvaluation(subjectParams) + subjectList = rows + localStorage.setItem('subjectList', JSON.stringify(rows)) + } + + // 默认选中第一个教材 + if(subjectList && subjectList.length){ + treeData = getTreeData(subjectList[0].id) + } + } + + // 单元章节数据转为“树”结构 + const getTreeData = (bookId) =>{ + // 根据当前教材的id 查找出对应的章节 + let data = unitList.value.filter(item => item.rootid == bookId && item.level == 1) + data.forEach( item => { + item.children = unitList.value.filter( item2 => item2.parentid == item.id && item2.level == 2) + }) + return data + + } + + await getSubjectUnit() + + return { subjectList, treeData, getTreeData } + +} \ No newline at end of file diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index e9b53c6..5e3ad3a 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -37,7 +37,7 @@ @@ -72,6 +73,7 @@ import { updateUserInfo } from '@/api/system/user' import outLink from '@/utils/linkConfig' import logoIco from '@/assets/images/logo.png' import { listEvaluation } from '@/api/classManage/index' +import { clearBookInfo } from '@/utils/ruoyi' const { ipcRenderer } = window.electron || {} const userStore = useUserStore() @@ -190,6 +192,7 @@ function setLayout() { } // 切换学科 const changeSubject = async (command) =>{ + clearBookInfo() const { userId, userName, phonenumber, plainpwd } = userStore.user const data = { userId, @@ -200,8 +203,6 @@ const changeSubject = async (command) =>{ await updateUserInfo(data) await userStore.login({username: phonenumber, password: plainpwd}) await userStore.getInfo() - localStorage.removeItem('subjectList') - localStorage.removeItem('evaluationList') router.go() } @@ -331,7 +332,7 @@ onMounted(() => { justify-content: space-around; .user-depname { - margin-right: 5px; + margin-right: 0; } .user-subject { @@ -351,8 +352,8 @@ onMounted(() => { align-items: center; .user-avatar { - width: 35px; - height: 35px; + width: 45px; + height: 45px; border-radius: 10px; margin-right: 10px; } diff --git a/src/renderer/src/utils/ruoyi.js b/src/renderer/src/utils/ruoyi.js index e51b433..8d7971e 100644 --- a/src/renderer/src/utils/ruoyi.js +++ b/src/renderer/src/utils/ruoyi.js @@ -257,3 +257,17 @@ export const getFileName = (filename) => { if(!filename) return return filename.replace(/\.[^/.]+$/, ""); } + +// 清除当前选中的教材 章节 相关信息 +export const clearBookInfo = () =>{ + //当前选中的教材 + localStorage.removeItem('curBook') + // 当前选中的节点 + localStorage.removeItem('curNode') + // 所有章节单元数据 + localStorage.removeItem('unitList') + // 所有教材数据 + localStorage.removeItem('subjectList') + // 展开的节点 + localStorage.removeItem('defaultExpandedKeys') +} \ No newline at end of file diff --git a/src/renderer/src/views/profile/userInfo.vue b/src/renderer/src/views/profile/userInfo.vue index 158392d..18e7dc5 100644 --- a/src/renderer/src/views/profile/userInfo.vue +++ b/src/renderer/src/views/profile/userInfo.vue @@ -45,6 +45,7 @@ import {updateUserInfo } from '@/api/system/user' import { listEvaluation } from '@/api/subject/index' import useUserStore from '@/store/modules/user' import {ElMessage} from 'element-plus' +import { clearBookInfo } from '@/utils/ruoyi' const props = defineProps({ user: { @@ -137,8 +138,7 @@ function submit() { userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => { userStore.getInfo().then(res => { if(res.code === 200){ - localStorage.removeItem('subjectList') - localStorage.removeItem('evaluationList') + clearBookInfo() ElMessage.success('修改成功') }else{ ElMessage.error(response.msg) diff --git a/src/renderer/src/views/tool/components/lesson.vue b/src/renderer/src/views/tool/components/lesson.vue index 75241ae..a111467 100644 --- a/src/renderer/src/views/tool/components/lesson.vue +++ b/src/renderer/src/views/tool/components/lesson.vue @@ -38,7 +38,7 @@ const curBookId = ref('') const evaluationList = ref([]) const getTreeData = () => { - evaluationList.value = JSON.parse(localStorage.getItem('evaluationList')) + evaluationList.value = JSON.parse(localStorage.getItem('unitList')) //上册 /** From b5fd1f2a9d56fd47ef8ed4992dc0df9f557ebf39 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 20 Sep 2024 14:42:58 +0800 Subject: [PATCH 07/25] edit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77b31bb..bc6282a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "2.0.1", + "version": "2.0.2", "description": "An Electron application with Vue", "main": "./out/main/index.js", "author": "example.com", From 1a9b426ec3e4c54c3bbf219aa7b3b9f07723754e Mon Sep 17 00:00:00 2001 From: zdg Date: Fri, 20 Sep 2024 14:56:48 +0800 Subject: [PATCH 08/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8D-=E4=B8=8A=E8=AF=BE=20?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/prepare/container/reserv.vue | 4 +++- src/renderer/src/views/prepare/index.vue | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/views/prepare/container/reserv.vue b/src/renderer/src/views/prepare/container/reserv.vue index 49660dc..e21c949 100644 --- a/src/renderer/src/views/prepare/container/reserv.vue +++ b/src/renderer/src/views/prepare/container/reserv.vue @@ -86,7 +86,7 @@ import useUserStore from '@/store/modules/user' import { ElMessage } from 'element-plus' import { getCurrentTime, getAfterMinutes } from '@/utils/date' -const emit = defineEmits(['addSuccess']) +const emit = defineEmits(['addSuccess','close']) const props = defineProps({ bookId: { type: Number, @@ -217,6 +217,8 @@ const closeDialog = () => { ruleFormDialog.value.resetFields() centerDialogVisible.value = false form.name = props.currentNode.label + emit('close') + } const classList = ref([]) onMounted(() => { diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 85fc0ad..81766ec 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -158,6 +158,7 @@ :current-node="currentNode" :book-id="uploadData.textbookId" @add-success="initReserv" + @close="closeChange" > @@ -319,6 +320,7 @@ export default { this.activeClass = item }, closeChange() { // 上课弹窗被关闭-触发 + console.log('关闭上课弹窗') this.activeClass = null sessionStore.delete('activeClass') }, From ca57e72e9c3b149b7f649b11844cf6446409960f Mon Sep 17 00:00:00 2001 From: zdg Date: Fri, 20 Sep 2024 15:04:14 +0800 Subject: [PATCH 09/25] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20=E5=80=BC=E4=B8=BAnu?= =?UTF-8?q?ll=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/plugins/shareStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/plugins/shareStore.js b/src/renderer/src/plugins/shareStore.js index caa5e52..d846f1f 100644 --- a/src/renderer/src/plugins/shareStore.js +++ b/src/renderer/src/plugins/shareStore.js @@ -61,7 +61,7 @@ function stateSyncWatch(storeName, newState) { // console.log('state-change-diffData', diffData) try { for(const key in diffData) { - const value = diffData[key] + const value = diffData[key] || null const newValue = {} // 重新组装pinia需要的数据 {a:{b:1}} 这种 const keyArr = key.split('.') || [] keyArr.reduce((o,c,i)=>{o[c] = i === keyArr.length-1 ? value : {};return o[c]}, newValue) From c93eeeb308b2e1a959f301ab06c231725ddafd3b Mon Sep 17 00:00:00 2001 From: zdg Date: Fri, 20 Sep 2024 15:16:34 +0800 Subject: [PATCH 10/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/plugins/shareStore.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/src/plugins/shareStore.js b/src/renderer/src/plugins/shareStore.js index d846f1f..0db8119 100644 --- a/src/renderer/src/plugins/shareStore.js +++ b/src/renderer/src/plugins/shareStore.js @@ -172,6 +172,8 @@ const getObjValue = (obj, key) => { const findDifferences = (obj1, obj2) => { const differences = {}; function compareObjects(o1, o2, path = '') { + if (o1 == null) return + if (o2 == null) return for (const key in o1) { if (o1.hasOwnProperty(key)) { const newPath = path ? `${path}.${key}` : key; From f9a87143aaff3afdcc2d3b8f14af79a251fe81e8 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 20 Sep 2024 15:19:33 +0800 Subject: [PATCH 11/25] edit --- src/renderer/src/components/choose-textbook/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 3c9a66a..5a78a22 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -169,7 +169,7 @@ const handleNodeClick = (data, node) => { } else { // 否则 点击的为二级节点 parentNode 为它的父级节点 - nodeData.parentNode = parentNode + nodeData.parentNode = toRaw(parentNode) } let curData = { From 00871797bff0acca80b7d25607f2688057f2365e Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 20 Sep 2024 15:24:23 +0800 Subject: [PATCH 12/25] edit --- src/renderer/src/components/choose-textbook/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 5a78a22..fbb4b1b 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -96,7 +96,7 @@ const changeBook = (data) => { const emitChangeBook = async () => { let curData = cloneDeep(toRaw(curNode.data)) - let parentNode = findParentByChildId(treeData.value, curNode.id) + let parentNode = findParentByChildId(treeData.value, curData.id) curData.parentNode = toRaw(parentNode) const data = { textBook: { From ac599a2c3956438f1d134247bf53dabe8521b838 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Fri, 20 Sep 2024 15:29:21 +0800 Subject: [PATCH 13/25] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/prepare/container/reserv.vue | 4 ++-- src/renderer/src/views/prepare/index.vue | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/views/prepare/container/reserv.vue b/src/renderer/src/views/prepare/container/reserv.vue index e21c949..eaaf74e 100644 --- a/src/renderer/src/views/prepare/container/reserv.vue +++ b/src/renderer/src/views/prepare/container/reserv.vue @@ -115,7 +115,7 @@ const updateForm = ref({}) watch( () => props.currentNode, (newValue, oldValue) => { - form.name = newValue.label + form.name = newValue.itemtitle } ) const ruleForm = reactive({ @@ -216,7 +216,7 @@ const openDialog = (data) => { const closeDialog = () => { ruleFormDialog.value.resetFields() centerDialogVisible.value = false - form.name = props.currentNode.label + form.name = props.currentNode.itemtitle emit('close') } diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 81766ec..09e9abd 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -368,7 +368,7 @@ export default { this.downloadNum = num }, createFile() { - creatPPT(this.currentNode.label + '.pptx', this.uploadData).then((res) => { + creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => { this.currentFileList.unshift(res.resData) }) }, @@ -448,7 +448,7 @@ export default { creatAPT({ ...this.uploadData, fileId: slideid, - fileShowName: this.currentNode.label + '.apt' + fileShowName: this.currentNode.itemtitle + '.apt' }).then((res) => { this.currentFileList.unshift(res.resData) }) @@ -665,7 +665,7 @@ export default { '/tool/sphere?entpcourseid=' + this.entpcourseid + '&label=' + - this.currentNode.label + + this.currentNode.itemtitle + '&reservId=' + id }) From ef771f4e0b85d80b869a1fb591c69acccb31f585 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 20 Sep 2024 15:38:37 +0800 Subject: [PATCH 14/25] edit --- src/renderer/src/components/choose-textbook/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index fbb4b1b..2436521 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -98,6 +98,8 @@ const emitChangeBook = async () => { let curData = cloneDeep(toRaw(curNode.data)) let parentNode = findParentByChildId(treeData.value, curData.id) curData.parentNode = toRaw(parentNode) + //怎加一个label 之前取的label + curData.label = curData.itemtitle const data = { textBook: { curBookId: curBook.data.id, @@ -160,7 +162,9 @@ const handleNodeClick = (data, node) => { * data : 当前节点数据 * node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象 */ - const nodeData = cloneDeep(toRaw(data)); + let nodeData = cloneDeep(toRaw(data)); + //怎加一个label 之前取的label + nodeData.label = nodeData.itemtitle const parentNode = node.parent.data; // parentNode 为数组 则点击的是一级节点 if (Array.isArray(parentNode)) { From 8975784ce045f0a7d7a15601bb531a552412a2fb Mon Sep 17 00:00:00 2001 From: zhangxuelin <959231531@qq.com> Date: Fri, 20 Sep 2024 16:27:12 +0800 Subject: [PATCH 15/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=8B=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/tool/sphere.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/renderer/src/views/tool/sphere.vue b/src/renderer/src/views/tool/sphere.vue index a2f69a9..f46966e 100644 --- a/src/renderer/src/views/tool/sphere.vue +++ b/src/renderer/src/views/tool/sphere.vue @@ -16,8 +16,7 @@
+ @v-drag-start="dragtime = Date.now()"> From ef9fe838a388c6bb9c0b5f3262cf8473b5fc6441 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Fri, 20 Sep 2024 16:56:26 +0800 Subject: [PATCH 16/25] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron.vite.config.mjs | 9 ++++++++- package.json | 4 +++- src/main/index.js | 25 +++++++++++++++++++++++-- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs index d5d6421..cc1eedc 100644 --- a/electron.vite.config.mjs +++ b/electron.vite.config.mjs @@ -3,7 +3,14 @@ import path from 'path' import { defineConfig, externalizeDepsPlugin } from 'electron-vite' import vue from '@vitejs/plugin-vue' import WindiCSS from "vite-plugin-windicss" - +/*import electron from 'vite-plugin-electron' +plugins: [electron({ + main: { + builderOptions: { + asar: false + } + } +})],*/ export default defineConfig({ main: { plugins: [externalizeDepsPlugin()] diff --git a/package.json b/package.json index bc6282a..8bc6d8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "2.0.2", + "version": "2.0.4", "description": "An Electron application with Vue", "main": "./out/main/index.js", "author": "example.com", @@ -45,10 +45,12 @@ "jsencrypt": "^3.3.2", "jsondiffpatch": "0.6.0", "lodash": "^4.17.21", + "node-addon-api": "^8.1.0", "pdfjs-dist": "4.4.168", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "spark-md5": "^3.0.2", + "vite-plugin-electron": "^0.28.8", "vue-qr": "^4.0.9", "vue-router": "^4.4.0", "xgplayer": "^3.0.19", diff --git a/src/main/index.js b/src/main/index.js index ac96916..49433ec 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -21,6 +21,27 @@ File({ app, shell, BrowserWindow, ipcMain }) process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true' let mainWindow, loginWindow +const additionalData = {myKey:'ys_axi_smarttalk'} +const gotTheLock = app.requestSingleInstanceLock(additionalData) + +if(!gotTheLock){ + app.quit() +}else{ + app.on('second-instance',(event,commandLine,workingDirectory,additionalData)=>{ + //输入从第二个实例中接收到的数据 + console.log(additionalData) + //有人试图运行第二个实例,我们应该关注我们的窗口 + if(mainWindow){ + if(mainWindow.isMinimized()) mainWindow.restore() + mainWindow.focus() + } + if(loginWindow){ + if(loginWindow.isMinimized()) loginWindow.restore() + loginWindow.focus() + } + }) +} + //登录窗口 function createLoginWindow() { if (loginWindow) return @@ -53,7 +74,7 @@ function createLoginWindow() { updateInit(loginWindow) } - loginWindow.webContents.openDevTools() + // loginWindow.webContents.openDevTools() loginWindow.once('ready-to-show', () => { loginWindow.show() }) @@ -101,7 +122,7 @@ function createMainWindow() { shell.openExternal(details.url) return { action: 'deny' } }) - mainWindow.webContents.openDevTools() + // mainWindow.webContents.openDevTools() if (is.dev && process.env['ELECTRON_RENDERER_URL']) { mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL']) From 71f7e4e5a159889bcf5b1a407c26b163d3eb8672 Mon Sep 17 00:00:00 2001 From: lyc Date: Sun, 22 Sep 2024 10:38:31 +0800 Subject: [PATCH 17/25] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E8=B4=A6=E5=8F=B7-?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=8F=AF=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/login/components/Register.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/renderer/src/views/login/components/Register.vue b/src/renderer/src/views/login/components/Register.vue index f61a870..53bc7f5 100644 --- a/src/renderer/src/views/login/components/Register.vue +++ b/src/renderer/src/views/login/components/Register.vue @@ -211,12 +211,6 @@ const rules = reactive({ message: '请选择地址', trigger: 'change', },], - class:[ { - type:'array', - required: true, - message: '请选择班级', - trigger: 'change', - },], discipline:[ { type: 'array', required: true, From 78b795bf4f8b55f596793b64bdeae05df3340dcf Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Sun, 22 Sep 2024 10:53:23 +0800 Subject: [PATCH 18/25] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D=20#801,V2.0.3=20?= =?UTF-8?q?=E6=95=99=E5=AD=A6=E5=AE=9E=E8=B7=B5-=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=EF=BC=8C=E7=BA=A2=E6=A1=86=E9=83=A8=E5=88=86=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/prepare/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 09e9abd..4ea167c 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -115,13 +115,13 @@ -
+
Date: Sun, 22 Sep 2024 11:14:19 +0800 Subject: [PATCH 19/25] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D=20#811,V2.0.3=20APT?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1-=E6=B7=BB=E5=8A=A0=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E4=B8=8E=E5=BD=93=E5=89=8D=E9=80=89=E6=8B=A9=E7=9A=84?= =?UTF-8?q?=E7=AB=A0=E8=8A=82=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/prepare/container/kj-list-item.vue | 10 ++++++++-- src/renderer/src/views/prepare/index.vue | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/views/prepare/container/kj-list-item.vue b/src/renderer/src/views/prepare/container/kj-list-item.vue index 7841e07..4cd468b 100644 --- a/src/renderer/src/views/prepare/container/kj-list-item.vue +++ b/src/renderer/src/views/prepare/container/kj-list-item.vue @@ -108,6 +108,12 @@ export default { name: 'FileListItem', components: { FileImage }, props: { + curNode: { + type: Object, + default: function () { + return {} + } + }, item: { type: Object, default: function () { @@ -201,8 +207,8 @@ export default { }, openFileWin(items) { if (items.fileFlag === 'apt') { - console.log(items); - const path="/teaching/aptindex?id="+items.fileId + console.log(this.curNode); + const path="/teaching/aptindex?id="+items.fileId + "&cataId=" + this.curNode.id; let configObj = outLink().getBaseData() let fullPath = configObj.fullPath + path fullPath = fullPath.replaceAll('//', '/') diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 4ea167c..d675bcb 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -20,6 +20,7 @@ :key="index" :item="item" :index="index" + :curNode="currentNode" @on-delete="deleteTalk" @on-start-class="startClass" > From 19a3b948c5f3e85c1b81b3c92fbf469bf52beade Mon Sep 17 00:00:00 2001 From: lyc Date: Sun, 22 Sep 2024 12:34:15 +0800 Subject: [PATCH 20/25] =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=AB=A0=E8=8A=82=20?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E7=AB=A0=E8=8A=82id=20=EF=BC=88=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/choose-textbook/index.vue | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 2436521..b71d22d 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -109,6 +109,19 @@ const emitChangeBook = async () => { }, node: curData } + /** + * 临时用 后续删除 unitId + */ + let levelFirstId = null + let levelSecondId = null + if (curData.parentNode) { + levelFirstId = curData.parentNode.id + levelSecondId = curData.id + } else { + levelFirstId = curData.id + levelSecondId = '' + } + localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId})) emit('changeBook', data) } @@ -187,6 +200,21 @@ const handleNodeClick = (data, node) => { } localStorage.setItem('defaultExpandedKeys', parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id])) localStorage.setItem('curNode', JSON.stringify(nodeData)) + + /** + * 临时用 后续删除 unitId + */ + let levelFirstId = null + let levelSecondId = null + if (nodeData.parentNode) { + levelFirstId = nodeData.parentNode.id + levelSecondId = nodeData.id + } else { + levelFirstId = nodeData.id + levelSecondId = '' + } + localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId})) + emit('nodeClick', curData) } From a64ba247428834ae76750ca6b913c3dfcc90fd13 Mon Sep 17 00:00:00 2001 From: yangws <1607839436@qq.com> Date: Sun, 22 Sep 2024 12:51:58 +0800 Subject: [PATCH 21/25] =?UTF-8?q?fix:2.0.4bug=E4=BF=AE=E6=94=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/classManage/basicGroup.vue | 10 +++---- src/renderer/src/views/classManage/index.vue | 11 +++---- src/renderer/src/views/profile/index.vue | 6 ++-- src/renderer/src/views/profile/userInfo.vue | 29 +++++++++++++------ 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/renderer/src/views/classManage/basicGroup.vue b/src/renderer/src/views/classManage/basicGroup.vue index 148553a..879385a 100644 --- a/src/renderer/src/views/classManage/basicGroup.vue +++ b/src/renderer/src/views/classManage/basicGroup.vue @@ -1,10 +1,10 @@