From 68df866db54218b69b0e12b88f5a2e0fb9932bab Mon Sep 17 00:00:00 2001 From: yangws <1607839436@qq.com> Date: Tue, 10 Sep 2024 17:55:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=9A=84=E7=8F=AD=E7=BA=A7;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/router/index.js | 2 +- src/renderer/src/views/classManage/index.vue | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js index 4a8a2f4..6bdcac9 100644 --- a/src/renderer/src/router/index.js +++ b/src/renderer/src/router/index.js @@ -71,7 +71,7 @@ export const constantRoutes = [ { path: '/classTask', component: () => import('@/views/classTask/classTask.vue'), - name: 'class', + name: 'classCorrect', meta: {title: '作业批改'}, }, { diff --git a/src/renderer/src/views/classManage/index.vue b/src/renderer/src/views/classManage/index.vue index d83e8e6..8a21df0 100644 --- a/src/renderer/src/views/classManage/index.vue +++ b/src/renderer/src/views/classManage/index.vue @@ -192,13 +192,16 @@ classList.value = [] listClassmain({ classuserid: userStore.userId, pageSize: 100, status: 'open' }).then(response => { classList.value = [...response.rows] - //这里获取组装所有班级 - gradeTree.value = groupByCondition(response.rows, item => item.agekey); if(classList.value.length > 0){ classId.value = classList.value[0].id currentIndex.value = 0 } }); + listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => { + //这里获取组装所有班级 + gradeTree.value = groupByCondition(response.rows, item => item.agekey); + console.log(gradeTree.value,'gradeTree.value') + }) } //将所有班级筛选成二级的数组 function groupByCondition(arr, condition) {