diff --git a/src/router/index.js b/src/router/index.js index e045f38..71a2acf 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -73,21 +73,22 @@ export const constantRoutes = [{ // icon: 'dashboard' // } // }] - // }, - { - path: '/course/txl', - component: Layout, - redirect: '/dashboard', - children: [{ - path: '/course/txl', - name: '通讯录', - component: () => import('@/views/course/txl'), - meta: { - title: '通讯录', - icon: '' - } - }], - hidden: true + // }, + { + path: '/course/txl', + component: Layout, + redirect: '/dashboard', + children: [{ + path: '/course/txl', + name: '通讯录', + component: () => import('@/views/course/txl'), + meta: { + title: '通讯录', + icon: '', + activeMenu: '/course/class' + } + }], + hidden: true }, { path: '/course/apply_list', @@ -99,7 +100,8 @@ export const constantRoutes = [{ component: () => import('@/views/course/apply_list'), meta: { title: '报名管理', - icon: '' + icon: '', + activeMenu: '/course/apply' } }], hidden: true @@ -110,29 +112,31 @@ export const constantRoutes = [{ redirect: '/dashboard', children: [{ path: '/course/pay', - name: '缴费列表', + name: '缴费记录', component: () => import('@/views/course/pay'), meta: { - title: '缴费列表', - icon: '' + title: '缴费记录', + icon: '', + activeMenu: '/course/class' + } + }], + hidden: true + }, + { + path: '/course/attendance', + component: Layout, + redirect: '/dashboard', + children: [{ + path: '/course/attendance', + name: '考勤管理', + component: () => import('@/views/course/attendance'), + meta: { + title: '考勤管理', + icon: '', + activeMenu: '/course/class' } }], hidden: true - }, - { - path: '/course/attendance', - component: Layout, - redirect: '/dashboard', - children: [{ - path: '/course/attendance', - name: '考勤管理', - component: () => import('@/views/course/attendance'), - meta: { - title: '考勤管理', - icon: '' - } - }], - hidden: true } ] diff --git a/src/views/component/imports.vue b/src/views/component/imports.vue index 258099a..2955c89 100644 --- a/src/views/component/imports.vue +++ b/src/views/component/imports.vue @@ -163,7 +163,8 @@ // 学员导入 if (this.tableName === 'users') { response.map(item => { - item.is_schoolmate = 1 + item.is_schoolmate = 1 + item.username = item.name }) } this.tableList = response; @@ -193,12 +194,7 @@ ); }, - imports() { - if(this.tableName=='users'){ - this.tableList.map(item=>{ - item.username = item.name - }) - } + imports() { request({ method: "post", url: this.import_action, diff --git a/src/views/course/class.vue b/src/views/course/class.vue index 41e2ed4..beb2d7f 100644 --- a/src/views/course/class.vue +++ b/src/views/course/class.vue @@ -59,12 +59,15 @@