From 0eee6264b01ce554a6082468a6a11d0b0da8e622 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期四, 11 七月 2024 09:43:30 +0800
Subject: [PATCH] feat:菜单调整、添加部门bug修复
---
src/views/education/department/edit.vue | 4
src/views/education/subject/list.vue | 4
src/router.js | 206 +++++++++++++++++++++++++-------------------------
3 files changed, 108 insertions(+), 106 deletions(-)
diff --git a/src/router.js b/src/router.js
index 2fbb02d..ba0699d 100644
--- a/src/router.js
+++ b/src/router.js
@@ -99,26 +99,40 @@
]
},
{
- path: '/online/study',
+ path: '/education',
component: Layout,
- name: 'OnLineStudy',
+ name: 'EducationPage',
meta: {
- title: '鍦ㄧ嚎瀛︿範',
- icon: 'exam'
+ title: '閮ㄩ棬绠$悊',
+ icon: 'education'
},
alwaysShow: true,
children: [
{
- path: 'type',
- component: () => import('@/views/onlineStudy/type'),
- name: 'Type',
- meta: { title: '瀛︿範绫诲瀷', noCache: true }
+ path: 'subject/list',
+ component: () => import('@/views/education/subject/list'),
+ name: 'EducationSubjectPage',
+ meta: { title: '閮ㄩ棬璇剧洰', noCache: true }
},
{
- path: 'file',
- component: () => import('@/views/onlineStudy/file'),
- name: 'File',
- meta: { title: '瀛︿範鏂囦欢', noCache: true }
+ path: 'department/list',
+ component: () => import('@/views/education/department/list'),
+ name: 'EducationDepartmentPage',
+ meta: { title: '閮ㄩ棬鍒楄〃', noCache: true }
+ },
+ {
+ path: 'subject/edit',
+ component: () => import('@/views/education/subject/edit'),
+ name: 'EducationSubjectEditPage',
+ meta: { title: '璇剧洰缂栬緫', noCache: true, activeMenu: '/education/subject/list' },
+ hidden: true
+ },
+ {
+ path: 'department/edit',
+ component: () => import('@/views/education/department/edit'),
+ name: 'EducationSubjectEditPage',
+ meta: { title: '閮ㄩ棬缂栬緫', noCache: true, activeMenu: '/education/department/list' },
+ hidden: true
}
]
},
@@ -239,68 +253,6 @@
]
},
{
- path: '/task',
- component: Layout,
- name: 'TaskPage',
- meta: {
- title: '浠诲姟绠$悊',
- icon: 'task'
- },
- alwaysShow: true,
- children: [
- {
- path: 'list',
- component: () => import('@/views/task/list'),
- name: 'TaskListPage',
- meta: { title: '浠诲姟鍒楄〃', noCache: true }
- },
- {
- path: 'edit',
- component: () => import('@/views/task/edit'),
- name: 'TaskEditPage',
- meta: { title: '浠诲姟鍒涘缓', noCache: true }
- }
- ]
- },
- {
- path: '/education',
- component: Layout,
- name: 'EducationPage',
- meta: {
- title: '閮ㄩ棬绠$悊',
- icon: 'education'
- },
- alwaysShow: true,
- children: [
- {
- path: 'subject/list',
- component: () => import('@/views/education/subject/list'),
- name: 'EducationSubjectPage',
- meta: { title: '閮ㄩ棬璇剧洰', noCache: true }
- },
- {
- path: 'department/list',
- component: () => import('@/views/education/department/list'),
- name: 'EducationDepartmentPage',
- meta: { title: '閮ㄩ棬鍒楄〃', noCache: true }
- },
- {
- path: 'subject/edit',
- component: () => import('@/views/education/subject/edit'),
- name: 'EducationSubjectEditPage',
- meta: { title: '璇剧洰缂栬緫', noCache: true, activeMenu: '/education/subject/list' },
- hidden: true
- },
- {
- path: 'department/edit',
- component: () => import('@/views/education/department/edit'),
- name: 'EducationSubjectEditPage',
- meta: { title: '閮ㄩ棬缂栬緫', noCache: true, activeMenu: '/education/department/list' },
- hidden: true
- }
- ]
- },
- {
path: '/answer',
component: Layout,
name: 'AnswerPage',
@@ -344,6 +296,30 @@
]
},
{
+ path: '/online/study',
+ component: Layout,
+ name: 'OnLineStudy',
+ meta: {
+ title: '鍦ㄧ嚎瀛︿範',
+ icon: 'exam'
+ },
+ alwaysShow: true,
+ children: [
+ {
+ path: 'type',
+ component: () => import('@/views/onlineStudy/type'),
+ name: 'Type',
+ meta: { title: '瀛︿範绫诲瀷', noCache: true }
+ },
+ {
+ path: 'file',
+ component: () => import('@/views/onlineStudy/file'),
+ name: 'File',
+ meta: { title: '瀛︿範鏂囦欢', noCache: true }
+ }
+ ]
+ },
+ {
path: '/questionAnswer',
component: Layout,
name: 'questionAnswerPage',
@@ -369,47 +345,71 @@
]
},
{
- path: '/message',
+ path: '/task',
component: Layout,
- name: 'MessagePage',
+ name: 'TaskPage',
meta: {
- title: '娑堟伅涓績',
- icon: 'message'
+ title: '浠诲姟绠$悊',
+ icon: 'task'
},
alwaysShow: true,
children: [
{
path: 'list',
- component: () => import('@/views/message/list'),
- name: 'MessageListPage',
- meta: { title: '娑堟伅鍒楄〃', noCache: true }
+ component: () => import('@/views/task/list'),
+ name: 'TaskListPage',
+ meta: { title: '浠诲姟鍒楄〃', noCache: true }
},
{
- path: 'send',
- component: () => import('@/views/message/send'),
- name: 'MessageSendPage',
- meta: { title: '娑堟伅鍙戦��', noCache: true }
+ path: 'edit',
+ component: () => import('@/views/task/edit'),
+ name: 'TaskEditPage',
+ meta: { title: '浠诲姟鍒涘缓', noCache: true }
}
]
},
- {
- path: '/log',
- component: Layout,
- name: 'LogPage',
- meta: {
- title: '鏃ュ織涓績',
- icon: 'log'
- },
- alwaysShow: true,
- children: [
- {
- path: 'user/list',
- component: () => import('@/views/log/list'),
- name: 'LogUserPage',
- meta: { title: '鐢ㄦ埛鏃ュ織', noCache: true }
- }
- ]
- },
+ // {
+ // path: '/message',
+ // component: Layout,
+ // name: 'MessagePage',
+ // meta: {
+ // title: '娑堟伅涓績',
+ // icon: 'message'
+ // },
+ // alwaysShow: true,
+ // children: [
+ // {
+ // path: 'list',
+ // component: () => import('@/views/message/list'),
+ // name: 'MessageListPage',
+ // meta: { title: '娑堟伅鍒楄〃', noCache: true }
+ // },
+ // {
+ // path: 'send',
+ // component: () => import('@/views/message/send'),
+ // name: 'MessageSendPage',
+ // meta: { title: '娑堟伅鍙戦��', noCache: true }
+ // }
+ // ]
+ // },
+ // {
+ // path: '/log',
+ // component: Layout,
+ // name: 'LogPage',
+ // meta: {
+ // title: '鏃ュ織涓績',
+ // icon: 'log'
+ // },
+ // alwaysShow: true,
+ // children: [
+ // {
+ // path: 'user/list',
+ // component: () => import('@/views/log/list'),
+ // name: 'LogUserPage',
+ // meta: { title: '鐢ㄦ埛鏃ュ織', noCache: true }
+ // }
+ // ]
+ // },
// {
// path: '/meeting',
// component: Layout,
diff --git a/src/views/education/department/edit.vue b/src/views/education/department/edit.vue
index 211855f..2ef4c75 100644
--- a/src/views/education/department/edit.vue
+++ b/src/views/education/department/edit.vue
@@ -98,7 +98,9 @@
// let obj = {
// name: this.form.name
// }
- _this.form.parentId = _this.form.parentId[0]
+ if (_this.form.parentId) {
+ _this.form.parentId = _this.form.parentId[0];
+ }
if (_this.fig === 1) {
departmentApi.addData(this.form).then(res => {
console.log(res)
diff --git a/src/views/education/subject/list.vue b/src/views/education/subject/list.vue
index 58971fb..7267884 100644
--- a/src/views/education/subject/list.vue
+++ b/src/views/education/subject/list.vue
@@ -9,9 +9,9 @@
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">鏌ヨ</el-button>
- <router-link :to="{path:'/education/subject/edit'}" class="link-left">
+ <!-- <router-link :to="{path:'/education/subject/edit'}" class="link-left">
<el-button type="primary">娣诲姞</el-button>
- </router-link>
+ </router-link> -->
</el-form-item>
</el-form>
--
Gitblit v1.8.0