From b007c7c1346508a643b37423e13a5628cd8a589d Mon Sep 17 00:00:00 2001 From: yangzhi <765157588@qq.com> Date: Tue, 25 Oct 2022 19:06:43 +0800 Subject: [PATCH] 冲突了 志哥解决了 志哥牛批 --- src/utils/routerList.js | 1325 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/views/AnswerResult/detail.vue | 3 ++- 2 files changed, 492 insertions(+), 836 deletions(-) diff --git a/src/utils/routerList.js b/src/utils/routerList.js index d56f2c9..1685c8c 100644 --- a/src/utils/routerList.js +++ b/src/utils/routerList.js @@ -1,861 +1,516 @@ import Layout from '@/layout' import { getInfo } from '../store/modules/user.js' -import { GetMenueRole } from '@/api/role' -export function getRoutes(permissions) { + +export function getRoutes() { + let userInfo = {} if (localStorage.userinfo) { userInfo = JSON.parse(localStorage.userinfo) } - var permissions = userInfo.permissions || []; - - // var roles = await GetMenueRole(); - // roles = roles.data.map(o=>o.code); - + console.log(userInfo) let constantRoutes1 = [] - if (userInfo.UserId == 1 || 1 == 1) { + if (userInfo.UserId == 1) { constantRoutes1 = [{ - path: '/login', + path: '/login', + component: () => + import ('@/views/login/index'), + hidden: true + }, + + { + path: '/404', + component: () => + import ('@/views/404'), + hidden: true + }, + { + path: '/answerDetail', + name: '答题详情', + component: () => + import ('@/views/AnswerResult/detail.vue'), + hidden: true + }, + { + path: '/', + component: Layout, + redirect: '/dashboard', + children: [{ + path: 'dashboard', + name: '首页', component: () => - import ('@/views/login/index'), - hidden: true + import ('@/views/dashboard/index'), + meta: { + title: '首页', + icon: 'dashboard' + } + }] + }, + + { + path: '/example', + component: Layout, + redirect: '/example/table', + name: 'Example', + meta: { + title: '题库管理', + icon: 'el-icon-s-help' }, - - { - path: '/404', + children: [{ + path: 'QuestionBank', + name: 'Table', component: () => - import ('@/views/404'), - hidden: true + import ('@/views/QuestionBank/index'), + meta: { + title: '题库', + icon: 'table' + } + }] + }, + + { + path: '/views', + component: Layout, + redirect: '/views/TestPaper', + name: 'TestPaper', + meta: { + title: '试卷管理', + icon: 'el-icon-s-help' }, - - { - path: '/answerDetail', - name: '答题详情', - component: () => - import ('@/views/AnswerResult/detail.vue'), - hidden: true + children: [{ + path: 'TestPaperList', + name: 'Table', + component: () => + import ('@/views/TestPaper/TestPaperList'), + meta: { + title: '试卷列表', + icon: 'table' + } + }, + { + path: 'ManualTestPaper', + name: 'Table', + component: () => + import ('@/views/TestPaper/ManualTestPaper'), + meta: { + title: '组卷', + icon: 'table' + } + }, + + ] + }, + { + code: '用户管理', + path: '/user', + component: Layout, + redirect: '/', + name: 'user', + meta: { + title: '用户管理', + icon: 'el-icon-s-help' }, + children: [{ + code: '人才库', + path: 'user', + name: 'User', + component: () => + import ('@/views/user/userlist'), + meta: { + title: '人才库', + } + }, + { + code: '面试时间表', + path: 'interviewSchedule', + name: 'interviewSchedule', + component: () => + import ('@/views/user/InterviewSchedule'), + meta: { + title: '面试时间表', + } + }, + { + code: 'importuser', + path: 'importuser', + name: 'importuser', - << - << << < HEAD { - path: '/', - component: Layout, - redirect: '/dashboard', - children: [{ - path: 'dashboard', - name: '首页', component: () => - import ('@/views/dashboard/index'), + import ('@/views/user/picuserimport'), meta: { - title: '首页', - icon: 'dashboard' + title: '图片导入用户', } - }, { - path: 'live', - name: '直播观看', + }, + { + code: 'admin', + path: 'admin', + name: 'admin', component: () => - import ('@/views/live/index'), + import ('@/views/user/adminList'), meta: { - title: '直播', - icon: 'video' - }, - hidden: true - }] + title: '管理员列表', + permissions: ['admin'] + } + }, + + ] + }, { + path: '/password', + component: Layout, + redirect: '/', + name: 'password', + meta: { + title: '系统管理', + icon: 'el-icon-s-platform' }, + children: [{ + path: 'userdimset', + name: 'impouserdimsetrtuser', - { - path: '/example', - component: Layout, - redirect: '/example/table', - name: 'Example', - === - === = { - code: 'home', - path: '/', - component: Layout, - redirect: '/dashboard', - children: [{ - path: 'dashboard', - name: '首页', - component: () => - import ('@/views/dashboard/index'), - >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - meta: { - title: '题库管理', - icon: 'el-icon-s-help', - permissions: ['admin'] - }, - children: [{ - path: 'QuestionBank', - name: 'Table', - component: () => - import ('@/views/QuestionBank/index'), - meta: { - title: '题库', - icon: 'table', - permissions: ['admin'] - } - }, ] - }, - // { - // path: '/moduleIndex', - // component: Layout, - // redirect: '/module/index', - // name: 'module', - // meta: { - // title: '面试题', - // icon: 'el-icon-s-help' - // }, - // children: [{ - // path: 'index', - // name: 'index', - // component: () => - // import ('@/views/TestPaper/index'), - // hidden: true, - // meta: { - // title: '试卷维护', - // icon: 'table' - // } - // }, ] - // }, - // { - // path: '/realQuestion', - // component: Layout, - // redirect: '/module/realQuestion', - // name: 'realQuestion', - // meta: { - // title: '历年真题', - // icon: 'el-icon-s-help' - // }, - // children: [{ - // path: 'recharge', - // name: 'recharge', - // component: () => - // import ('@/views/module/realQuestion'), - // meta: { - // title: '历年真题', - // icon: 'el-icon-s-management' - // } - // }] - // }, - - { - path: '/views', - component: Layout, - redirect: '/views/TestPaper', - name: 'TestPaper', - meta: { - title: '试卷管理', - icon: 'el-icon-s-help' - }, - children: [{ - path: 'TestPaperList', - name: 'Table', - component: () => - import ('@/views/TestPaper/TestPaperList'), - meta: { - title: '试卷列表', - icon: 'table' - } - }, - { - path: 'index', - name: 'index', - component: () => - import ('@/views/TestPaper/index'), - hidden: true, - meta: { - title: '试卷维护', - icon: 'table' - } - }, - { - path: 'ManualTestPaper', - name: 'Table', - component: () => - import ('@/views/TestPaper/ManualTestPaper'), - meta: { - title: '组卷', - icon: 'table' - } - }, - - << - << << < HEAD - ] - }, - // { - // path: '/order', - // component: Layout, - // redirect: '/', - // name: 'order', - // meta: { - // title: '订单管理', - // icon: 'el-icon-s-marketing' - // }, - // children: [{ - // path: 'recharge', - // name: 'recharge', - // component: () => - // import('@/views/order/rechargeList'), - // meta: { - // title: '充值记录', - // } - // }, { - // path: 'shop', - // name: 'shop', - // component: () => - // import('@/views/order/shopList'), - // meta: { - // title: '购买记录', - // } - // }] - // }, - { - path: '/user', - component: Layout, - redirect: '/', - name: 'user', - === - === = { - code: 'example', - path: '/example', - component: Layout, - redirect: '/example/table', - name: 'Example', - meta: { - title: '题库管理', - icon: 'el-icon-s-help', - permissions: ['admin'] - }, - children: [{ - code: '题库', - path: 'QuestionBank', - name: 'Table', - component: () => - import ('@/views/QuestionBank/index'), - >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - meta: { - title: '用户管理', - icon: 'el-icon-s-help' - }, - children: [{ - path: 'user', - name: 'User', - component: () => - import ('@/views/user/userlist'), - meta: { - title: '人才库', - } - }, - { - path: 'interviewSchedule', - name: 'interviewSchedule', - component: () => - import ('@/views/user/InterviewSchedule'), - meta: { - title: '面试时间表', - } - }, - - << - << << < HEAD { - path: 'importuser', - name: 'importuser', - - component: () => - import ('@/views/user/picuserimport'), - meta: { - title: '图片导入用户', - } - }, - { - path: 'admin', - name: 'admin', - component: () => - import ('@/views/user/adminList'), - meta: { - title: '管理员列表', - permissions: ['admin'] - } - }, - - ] - }, { - path: '/password', - component: Layout, - redirect: '/', - name: 'password', - === - === = { - code: '试卷管理', - path: '/views', - component: Layout, - redirect: '/views/TestPaper', - name: 'TestPaper', - meta: { - title: '试卷管理', - icon: 'el-icon-s-help' - }, - children: [{ - code: '试卷列表', - path: 'TestPaperList', - name: 'Table', - component: () => - import ('@/views/TestPaper/TestPaperList'), - >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - meta: { - title: '系统管理', - icon: 'el-icon-s-platform' - }, - children: [{ - path: 'userdimset', - name: 'impouserdimsetrtuser', - - component: () => - import ('@/views/user/userdimset'), - meta: { - title: '维度规则设置', - permissions: ['admin'] - } - }, - { - path: 'index', - name: 'index', - component: () => - import ('@/views/password/index'), - meta: { - title: '忘记密码', - } - }, { - path: 'TestPaperClass', - name: 'Table', - component: () => - import ('@/views/TestPaper/TestPaperClass'), - meta: { - title: '分类管理', - permissions: ['admin'] - } - }, { - path: 'carousel', - name: 'carousel', - component: () => - import ('@/views/carousel/index'), - meta: { - title: '轮播图', - permissions: ['admin'] - } - }, { - path: 'new', - name: 'new', - component: () => - import ('@/views/carousel/new'), - meta: { - title: '最新资讯', - permissions: ['admin'] - } - } - ] - }, - // 404 page must be placed at the end !!! - { - path: '*', - redirect: '/404', - hidden: true - } - ] - } - else { - return; - constantRoutes1 = [{ - path: '/login', - component: () => - import ('@/views/login/index'), - hidden: true - }, - - { << - << << < HEAD - path: '/404', - === - === = - code: '组卷', - path: 'ManualTestPaper', - name: 'Table', - >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - component: () => - import ('@/views/404'), - hidden: true - }, - - << - << << < HEAD { - path: '/example', - component: Layout, - redirect: '/example/table', - name: 'Example', - === - === = - ] - }, - // { - // path: '/order', - // component: Layout, - // redirect: '/', - // name: 'order', - // meta: { - // title: '订单管理', - // icon: 'el-icon-s-marketing' - // }, - // children: [{ - // path: 'recharge', - // name: 'recharge', - // component: () => - // import('@/views/order/rechargeList'), - // meta: { - // title: '充值记录', - // } - // }, { - // path: 'shop', - // name: 'shop', - // component: () => - // import('@/views/order/shopList'), - // meta: { - // title: '购买记录', - // } - // }] - // }, - { - code: '用户管理', - path: '/user', - component: Layout, - redirect: '/', - name: 'user', - meta: { - title: '用户管理', - icon: 'el-icon-s-help' - }, - children: [{ - code: '人才库', - path: 'user', - name: 'User', - component: () => - import ('@/views/user/userlist'), - >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - meta: { - title: '题库管理', - icon: 'el-icon-s-help', - permissions: ["admin", "user"], - }, - children: [{ - path: 'QuestionBank', - name: 'Table', - component: () => - import ('@/views/QuestionBank/index'), - meta: { - title: '题库', - icon: 'table' - } - }, ] - }, - { << - << << < HEAD - path: '/moduleIndex', - component: Layout, - redirect: '/module/index', - name: 'module', - === - === = - code: '面试时间表', - path: 'interviewSchedule', - name: 'interviewSchedule', - component: () => - import ('@/views/user/InterviewSchedule'), - >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - meta: { - title: '面试题', - icon: 'el-icon-s-help' - }, - children: [{ - path: 'recharge', - name: 'recharge', - component: () => - import ('@/views/module/index'), - meta: { - title: '面试题', - icon: 'el-icon-s-operation' - } - }, - { - path: 'index', - name: 'index', - component: () => - import ('@/views/TestPaper/index'), - hidden: true, - meta: { - title: '试卷维护', - icon: 'table' - } - }, - ] - }, - // { - // path: '/realQuestion', - // component: Layout, - // redirect: '/module/realQuestion', - // name: 'realQuestion', - // meta: { - // title: '历年真题', - // icon: 'el-icon-s-help' - // }, - // children: [{ - // path: 'recharge', - // name: 'recharge', - // component: () => - // import ('@/views/module/realQuestion'), - // meta: { - // title: '历年真题', - // icon: 'el-icon-s-management' - // } - // }] - // }, - - { << - << << < HEAD - path: '/views', - component: Layout, - redirect: '/views/TestPaper', - name: 'TestPaper', - === - === = - code: 'importuser', - path: 'importuser', - name: 'importuser', - - component: () => - import ('@/views/user/picuserimport'), - >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - meta: { - title: '试卷管理', - icon: 'el-icon-s-help' - }, - children: [{ - path: 'TestPaperList', - name: 'Table', - component: () => - import ('@/views/TestPaper/TestPaperList'), - meta: { - title: '试卷列表', - icon: 'table' - } - }, - { - path: 'index', - name: 'index', - component: () => - import ('@/views/TestPaper/index'), - hidden: true, - meta: { - title: '试卷维护', - icon: 'table' - } - }, - // { - // path: 'ManualTestPaper', - // name: 'Table', - // component: () => import('@/views/TestPaper/ManualTestPaper'), - // meta: { - // title: '组卷', - // icon: 'table' - // } - // }, - - ] - }, - // { - // path: '/order', - // component: Layout, - // redirect: '/', - // name: 'order', - // meta: { - // title: '订单管理', - // icon: 'el-icon-s-marketing' - // }, - // children: [{ - // path: 'recharge', - // name: 'recharge', - // component: () => - // import('@/views/order/rechargeList'), - // meta: { - // title: '充值记录', - // } - // }, { - // path: 'shop', - // name: 'shop', - // component: () => - // import('@/views/order/shopList'), - // meta: { - // title: '购买记录', - // } - // }] - // }, - { << - << << < HEAD - path: '/user', - component: Layout, - redirect: '/', - name: 'user', - meta: { - title: '用户管理', - icon: 'el-icon-s-help' - }, - children: [{ - path: 'user', - name: 'User', - component: () => - import ('@/views/user/userlist'), - meta: { - title: '人才库', - } === - === = - code: 'admin', - path: 'admin', - name: 'admin', - component: () => - import ('@/views/user/adminList'), - meta: { - title: '管理员列表', - permissions: ['admin'] - } - }, - - ] - }, { - code: '系统管理', - path: '/system', - component: Layout, - redirect: '/', - name: 'password', - meta: { - title: '系统管理', - icon: 'el-icon-s-platform' - }, - children: [{ - code: 'userdimset', - path: 'userdimset', - name: 'impouserdimsetrtuser', - - component: () => - import ('@/views/user/userdimset'), - meta: { - title: '维度规则设置', - permissions: ['admin'] >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - } - - ] - }, - { - path: '/password', - component: Layout, - redirect: '/', - name: 'password', - meta: { - title: '系统管理', - icon: 'el-icon-s-platform', - permissions: ['admin', 'user'] - }, - children: [{ - path: 'index', - name: 'index', - component: () => - import ('@/views/password/index'), - meta: { - title: '忘记密码', - } - }, - { - code: 'settings', - path: 'settings', - name: 'settings', - component: () => - import ('@/views/settings/index'), - meta: { - title: '系统设置', - } - }, - { - code: 'TestPaperClass', - path: 'TestPaperClass', - name: 'Table', - component: () => - import ('@/views/TestPaper/TestPaperClass'), - meta: { - title: '分类管理', - permissions: ['admin'] - } - }, { - code: 'carousel', - path: 'carousel', - name: 'carousel', - component: () => - import ('@/views/carousel/index'), - meta: { - title: '轮播图', - permissions: ['admin'] - } - }, { - code: 'new', - path: 'new', - name: 'new', - component: () => - import ('@/views/carousel/new'), - meta: { - title: '最新资讯', - permissions: ['admin'] - } << - << << < HEAD - } - ] === - === = - }, - { - code: 'rolelist', - path: 'role', - name: 'rolelist', - component: () => - import ('@/views/user/rolelist'), - meta: { - title: '角色权限', - permissions: ['admin'] - } - }, - { - code: 'logs', - path: 'logs', - name: 'logs', - - component: () => - import ('@/views/user/loglist'), - meta: { - title: '系统日志', - } - }, - - - ] - }, - // 404 page must be placed at the end !!! - { - path: '*', - redirect: '/404', - hidden: true - } - ] - } else { - return; - constantRoutes1 = [{ - path: '/login', - component: () => - import ('@/views/login/index'), - hidden: true - }, - - { - path: '/404', - component: () => - import ('@/views/404'), - hidden: true - }, - - { - path: '/example', - component: Layout, - redirect: '/example/table', - name: 'Example', - meta: { - title: '题库管理', - icon: 'el-icon-s-help', - permissions: ["admin", "user"], - }, - children: [{ - path: 'QuestionBank', - name: 'Table', - component: () => - import ('@/views/QuestionBank/index'), - meta: { - title: '题库', - icon: 'table' - } - }, ] - }, - { - path: '/moduleIndex', - component: Layout, - redirect: '/module/index', - name: 'module', - meta: { - title: '面试题', - icon: 'el-icon-s-help' - }, - children: [{ - path: 'recharge', - name: 'recharge', - component: () => - import ('@/views/module/index'), - meta: { - title: '面试题', - icon: 'el-icon-s-operation' - } >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - }, - // 404 page must be placed at the end !!! - { - path: '*', - redirect: '/404', - hidden: true - } - ] - } - - - function hasPermission(permissions, route) { - if (route.meta && route.meta.permissions) { - return permissions.some((role) => route.meta.permissions.includes(role)); - } else { - return true; - } - } + component: () => + import ('@/views/user/userdimset'), + meta: { + title: '维度规则设置', + permissions: ['admin'] + } + }, + { + path: 'index', + name: 'index', + component: () => + import ('@/views/password/index'), + meta: { + title: '忘记密码', + } + }, { + path: 'TestPaperClass', + name: 'Table', + component: () => + import ('@/views/TestPaper/TestPaperClass'), + meta: { + title: '分类管理', + permissions: ['admin'] + } + }, { + path: 'carousel', + name: 'carousel', + component: () => + import ('@/views/carousel/index'), + meta: { + title: '轮播图', + permissions: ['admin'] + } + }, { + path: 'new', + name: 'new', + component: () => + import ('@/views/carousel/new'), + meta: { + title: '最新资讯', + permissions: ['admin'] + } + }, { + code: 'rolelist', + path: 'role', + name: 'rolelist', + component: () => + import ('@/views/user/rolelist'), + meta: { + title: '角色权限', + permissions: ['admin'] + } + }, + { + code: 'logs', + path: 'logs', + name: 'logs', + component: () => + import ('@/views/user/loglist'), + meta: { + title: '系统日志', + } + }, + ] + }, + // 404 page must be placed at the end !!! + { + path: '*', + redirect: '/404', + hidden: true + } + ] + } else { + constantRoutes1 = [{ + path: '/login', + component: () => + import ('@/views/login/index'), + hidden: true + }, + + { + path: '/404', + component: () => + import ('@/views/404'), + hidden: true + }, + { + path: '/answerDetail', + name: '答题详情', + component: () => + import ('@/views/AnswerResult/detail.vue'), + hidden: true + }, + { + path: '/', + component: Layout, + redirect: '/dashboard', + children: [{ + path: 'dashboard', + name: '首页', + component: () => + import ('@/views/dashboard/index'), + meta: { + title: '首页', + icon: 'dashboard' + } + }] + }, + + // { + // path: '/example', + // component: Layout, + // redirect: '/example/table', + // name: 'Example', + // meta: { + // title: '题库管理', + // icon: 'el-icon-s-help' + // }, + // children: [{ + // path: 'QuestionBank', + // name: 'Table', + // component: () => import('@/views/QuestionBank/index'), + // meta: { + // title: '题库', + // icon: 'table' + // } + // }] + // }, + { + path: '/moduleIndex', + component: Layout, + redirect: '/module/index', + name: 'module', + meta: { + title: '练习', + icon: 'el-icon-s-help' + }, + children: [{ + path: 'recharge', + name: 'recharge', + component: () => + import ('@/views/module/index'), + meta: { + title: '练习', + icon: 'el-icon-s-operation' + } + }, + { + path: 'index', + name: 'index', + component: () => + import ('@/views/TestPaper/index'), + hidden: true, + meta: { + title: '试卷维护', + icon: 'table' + } + }, + ] + }, + { + path: '/realQuestion', + component: Layout, + redirect: '/module/realQuestion', + name: 'realQuestion', + meta: { + title: '历年真题', + icon: 'el-icon-s-help' + }, + children: [{ + path: 'recharge', + name: 'recharge', + component: () => + import ('@/views/module/realQuestion'), + meta: { + title: '历年真题', + icon: 'el-icon-s-management' + } + }] + }, + { + path: '/simulation', + component: Layout, + redirect: '/module/simulation', + name: 'module', + meta: { + title: '模拟试卷', + icon: 'el-icon-s-help' + }, + children: [{ + path: 'recharge', + name: 'recharge', + component: () => + import ('@/views/module/simulation'), + meta: { + title: '模拟试卷', + icon: 'el-icon-s-promotion' + } + }] + }, + + // { + // path: '/views', + // component: Layout, + // redirect: '/views/TestPaper', + // name: 'TestPaper', + // meta: { + // title: '试卷管理', + // icon: 'el-icon-s-help' + // }, + // children: [ + // { + // path: 'TestPaperList', + // name: 'Table', + // component: () => import('@/views/TestPaper/TestPaperList'), + // meta: { + // title: '试卷列表', + // icon: 'table' + // } + // }, + // { + // path: 'index', + // name: 'index', + // component: () => import('@/views/TestPaper/index'), + // hidden: true, + // meta: { + // title: '试卷维护', + // icon: 'table' + // } + // }, + // // { + // // path: 'ManualTestPaper', + // // name: 'Table', + // // component: () => import('@/views/TestPaper/ManualTestPaper'), + // // meta: { + // // title: '组卷', + // // icon: 'table' + // // } + // // }, + + // ] + // }, + { + path: '/order', + component: Layout, + redirect: '/', + name: 'order', + meta: { + title: '订单管理', + icon: 'el-icon-s-marketing' + }, + children: [{ + path: 'recharge', + name: 'recharge', + component: () => + import ('@/views/order/rechargeList'), + meta: { + title: '充值记录', + } + }, { + path: 'shop', + name: 'shop', + component: () => + import ('@/views/order/shopList'), + meta: { + title: '购买记录', + } + }] + }, + { + path: '/user', + component: Layout, + redirect: '/', + name: 'user', + meta: { + title: '用户管理', + icon: 'el-icon-s-help' + }, + children: [{ + path: 'user', + name: 'User', + component: () => + import ('@/views/user/userlist'), + meta: { + title: '普通用户列表', + } + }, + + + ] + }, { + path: '/password', + component: Layout, + redirect: '/', + name: 'password', + meta: { + title: '系统管理', + icon: 'el-icon-s-platform' + }, + children: [{ + path: 'index', + name: 'index', + component: () => + import ('@/views/password/index'), + meta: { + title: '忘记密码', + } + }, { + path: 'TestPaperClass', + name: 'Table', + component: () => + import ('@/views/TestPaper/TestPaperClass'), + meta: { + title: '分类管理', + } + }, { + path: 'carousel', + name: 'carousel', + component: () => + import ('@/views/carousel/index'), + meta: { + title: '轮播图', + } + }, { + path: 'new', + name: 'new', + component: () => + import ('@/views/carousel/new'), + meta: { + title: '最新资讯', + } + }] + }, + // 404 page must be placed at the end !!! + { + path: '*', + redirect: '/404', + hidden: true + } + ] + } - function filterAsyncRoutes(routes, permissions) { - const finallyRoutes = []; - routes.forEach((route) => { << - << << < HEAD - const item = {...route }; - if (hasPermission(permissions, item)) { === - === = - const item = {...route }; - // if (hasPermission(permissions, item)) { - if (permissions.includes(item.code) || !item.code) { >>> - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 - if (item.children) { - item.children = filterAsyncRoutes(item.children, permissions); - } - finallyRoutes.push(item); - } - }); - return finallyRoutes; - } - constantRoutes1 = filterAsyncRoutes(constantRoutes1, permissions); - return constantRoutes1; - } \ No newline at end of file + return constantRoutes1; +} \ No newline at end of file diff --git a/src/views/AnswerResult/detail.vue b/src/views/AnswerResult/detail.vue index e8997ec..37f8003 100644 --- a/src/views/AnswerResult/detail.vue +++ b/src/views/AnswerResult/detail.vue @@ -19,7 +19,8 @@ }} 【{{ item.subjectName }}】{{ item.subject }} -
+
+

{{ item.answer }}

-- libgit2 0.21.4