Commit af0f0cdec1c43d5d9d002ed4fae21be2c2fbf7ca
1 parent
d6d83120
22
Showing
1 changed file
with
512 additions
and
1068 deletions
src/utils/routerList.js
| 1 | 1 | import Layout from '@/layout' |
| 2 | 2 | import { getInfo } from '../store/modules/user.js' |
| 3 | -import { GetMenueRole } from '@/api/role' | |
| 4 | 3 | |
| 5 | -export function getRoutes(permissions) { | |
| 4 | + | |
| 5 | +export function getRoutes() { | |
| 6 | + | |
| 6 | 7 | let userInfo = {} |
| 7 | 8 | if (localStorage.userinfo) { |
| 8 | 9 | userInfo = JSON.parse(localStorage.userinfo) |
| 9 | 10 | } |
| 10 | - var permissions = userInfo.permissions || []; | |
| 11 | - | |
| 12 | - // var roles = await GetMenueRole(); | |
| 13 | - // roles = roles.data.map(o=>o.code); | |
| 14 | - | |
| 11 | + console.log(userInfo) | |
| 15 | 12 | let constantRoutes1 = [] |
| 16 | - if (true) { | |
| 13 | + if (userInfo.UserId == 1) { | |
| 17 | 14 | constantRoutes1 = [{ |
| 18 | -<<<<<<< HEAD | |
| 19 | - path: '/login', | |
| 20 | - component: () => | |
| 21 | - import('@/views/login/index'), | |
| 22 | - hidden: true | |
| 23 | - }, | |
| 24 | - | |
| 25 | - { | |
| 26 | - path: '/404', | |
| 27 | - component: () => | |
| 28 | - import('@/views/404'), | |
| 29 | - hidden: true | |
| 30 | - }, | |
| 31 | - | |
| 32 | - { | |
| 33 | - path: '/answerDetail', | |
| 34 | - name: '答题详情', | |
| 35 | - component: () => | |
| 36 | - import('@/views/AnswerResult/detail.vue'), | |
| 37 | - hidden: true | |
| 38 | - }, | |
| 39 | - | |
| 40 | - | |
| 41 | - { | |
| 42 | - // code:'home', | |
| 43 | - path: '', | |
| 44 | - component: Layout, | |
| 45 | - redirect: '/dashboard', | |
| 46 | - children: [{ | |
| 47 | - path: '/dashboard', | |
| 48 | - name: '首页', | |
| 49 | - component: () => | |
| 50 | - import('@/views/dashboard/index'), | |
| 51 | - meta: { | |
| 52 | - title: '首页', | |
| 53 | - icon: 'dashboard' | |
| 54 | - } | |
| 55 | - }, { | |
| 56 | - path: '/live', | |
| 57 | - name: '直播观看', | |
| 15 | + path: '/login', | |
| 58 | 16 | component: () => |
| 59 | - import('@/views/live/index'), | |
| 60 | - meta: { | |
| 61 | - title: '直播', | |
| 62 | - icon: 'video' | |
| 63 | - }, | |
| 17 | + import ('@/views/login/index'), | |
| 64 | 18 | hidden: true |
| 65 | - }] | |
| 66 | - }, | |
| 67 | - | |
| 68 | - { | |
| 69 | - code:'example', | |
| 70 | - path: '/example', | |
| 71 | - component: Layout, | |
| 72 | - redirect: '/example/table', | |
| 73 | - name: 'Example', | |
| 74 | - meta: { | |
| 75 | - title: '题库管理', | |
| 76 | - icon: 'el-icon-s-help', | |
| 77 | - permissions: ['admin'] | |
| 78 | 19 | }, |
| 79 | - children: [{ | |
| 80 | - code:'题库', | |
| 81 | - path: 'QuestionBank', | |
| 82 | - name: 'Table', | |
| 83 | - component: () => | |
| 84 | - import('@/views/QuestionBank/index'), | |
| 85 | - meta: { | |
| 86 | - title: '题库', | |
| 87 | - icon: 'table', | |
| 88 | - permissions: ['admin'] | |
| 89 | - } | |
| 90 | - },] | |
| 91 | - }, | |
| 92 | - // { | |
| 93 | - // path: '/moduleIndex', | |
| 94 | - // component: Layout, | |
| 95 | - // redirect: '/module/index', | |
| 96 | - // name: 'module', | |
| 97 | - // meta: { | |
| 98 | - // title: '面试题', | |
| 99 | - // icon: 'el-icon-s-help' | |
| 100 | - // }, | |
| 101 | - // children: [{ | |
| 102 | - // path: 'index', | |
| 103 | - // name: 'index', | |
| 104 | - // component: () => | |
| 105 | - // import ('@/views/TestPaper/index'), | |
| 106 | - // hidden: true, | |
| 107 | - // meta: { | |
| 108 | - // title: '试卷维护', | |
| 109 | - // icon: 'table' | |
| 110 | - // } | |
| 111 | - // }, ] | |
| 112 | - // }, | |
| 113 | - // { | |
| 114 | - // path: '/realQuestion', | |
| 115 | - // component: Layout, | |
| 116 | - // redirect: '/module/realQuestion', | |
| 117 | - // name: 'realQuestion', | |
| 118 | - // meta: { | |
| 119 | - // title: '历年真题', | |
| 120 | - // icon: 'el-icon-s-help' | |
| 121 | - // }, | |
| 122 | - // children: [{ | |
| 123 | - // path: 'recharge', | |
| 124 | - // name: 'recharge', | |
| 125 | - // component: () => | |
| 126 | - // import ('@/views/module/realQuestion'), | |
| 127 | - // meta: { | |
| 128 | - // title: '历年真题', | |
| 129 | - // icon: 'el-icon-s-management' | |
| 130 | - // } | |
| 131 | - // }] | |
| 132 | - // }, | |
| 133 | 20 | |
| 134 | - { | |
| 135 | - code:'试卷管理', | |
| 136 | - path: '/views', | |
| 137 | - component: Layout, | |
| 138 | - redirect: '/views/TestPaper', | |
| 139 | - name: 'TestPaper', | |
| 140 | - meta: { | |
| 141 | - title: '试卷管理', | |
| 142 | - icon: 'el-icon-s-help' | |
| 143 | - }, | |
| 144 | - children: [{ | |
| 145 | - code:'试卷列表', | |
| 146 | - path: 'TestPaperList', | |
| 147 | - name: 'Table', | |
| 21 | + { | |
| 22 | + path: '/404', | |
| 148 | 23 | component: () => |
| 149 | - import('@/views/TestPaper/TestPaperList'), | |
| 150 | - meta: { | |
| 151 | - title: '试卷列表', | |
| 152 | - icon: 'table' | |
| 153 | - } | |
| 24 | + import ('@/views/404'), | |
| 25 | + hidden: true | |
| 154 | 26 | }, |
| 155 | 27 | { |
| 156 | - path: 'index', | |
| 157 | - name: 'index', | |
| 28 | + path: '/resume/malestaff', | |
| 158 | 29 | component: () => |
| 159 | - import('@/views/TestPaper/index'), | |
| 160 | - hidden: true, | |
| 161 | - meta: { | |
| 162 | - title: '试卷维护', | |
| 163 | - icon: 'table' | |
| 164 | - } | |
| 30 | + import ('@/views/resume/malestaff.vue'), | |
| 31 | + hidden: true | |
| 165 | 32 | }, |
| 166 | 33 | { |
| 167 | - code:'组卷', | |
| 168 | - path: 'ManualTestPaper', | |
| 169 | - name: 'Table', | |
| 34 | + path: '/resume/femalestaff', | |
| 170 | 35 | component: () => |
| 171 | - import('@/views/TestPaper/ManualTestPaper'), | |
| 172 | - meta: { | |
| 173 | - title: '组卷', | |
| 174 | - icon: 'table' | |
| 175 | - } | |
| 176 | - }, | |
| 177 | - | |
| 178 | - ] | |
| 179 | - }, | |
| 180 | - // { | |
| 181 | - // path: '/order', | |
| 182 | - // component: Layout, | |
| 183 | - // redirect: '/', | |
| 184 | - // name: 'order', | |
| 185 | - // meta: { | |
| 186 | - // title: '订单管理', | |
| 187 | - // icon: 'el-icon-s-marketing' | |
| 188 | - // }, | |
| 189 | - // children: [{ | |
| 190 | - // path: 'recharge', | |
| 191 | - // name: 'recharge', | |
| 192 | - // component: () => | |
| 193 | - // import('@/views/order/rechargeList'), | |
| 194 | - // meta: { | |
| 195 | - // title: '充值记录', | |
| 196 | - // } | |
| 197 | - // }, { | |
| 198 | - // path: 'shop', | |
| 199 | - // name: 'shop', | |
| 200 | - // component: () => | |
| 201 | - // import('@/views/order/shopList'), | |
| 202 | - // meta: { | |
| 203 | - // title: '购买记录', | |
| 204 | - // } | |
| 205 | - // }] | |
| 206 | - // }, | |
| 207 | - { | |
| 208 | - code:'用户管理', | |
| 209 | - path: '/user', | |
| 210 | - component: Layout, | |
| 211 | - redirect: '/', | |
| 212 | - name: 'user', | |
| 213 | - meta: { | |
| 214 | - title: '用户管理', | |
| 215 | - icon: 'el-icon-s-help' | |
| 36 | + import ('@/views/resume/femalestaff.vue'), | |
| 37 | + hidden: true | |
| 216 | 38 | }, |
| 217 | - children: [{ | |
| 218 | - code:'人才库', | |
| 219 | - path: 'user', | |
| 220 | - name: 'User', | |
| 39 | + { | |
| 40 | + path: '/live', | |
| 41 | + name: '直播', | |
| 221 | 42 | component: () => |
| 222 | - import('@/views/user/userlist'), | |
| 223 | - meta: { | |
| 224 | - title: '人才库', | |
| 225 | - } | |
| 43 | + import ('@/views/live/index'), | |
| 44 | + hidden: true | |
| 226 | 45 | }, |
| 227 | 46 | { |
| 228 | - code:'面试时间表', | |
| 229 | - path: 'interviewSchedule', | |
| 230 | - name: 'interviewSchedule', | |
| 47 | + path: '/answerDetail', | |
| 48 | + name: '答题详情', | |
| 231 | 49 | component: () => |
| 232 | - import('@/views/user/InterviewSchedule'), | |
| 233 | - meta: { | |
| 234 | - title: '面试时间表', | |
| 235 | - } | |
| 50 | + import ('@/views/AnswerResult/detail.vue'), | |
| 51 | + hidden: true | |
| 236 | 52 | }, |
| 237 | - | |
| 238 | 53 | { |
| 239 | - code:'importuser', | |
| 240 | - path: 'importuser', | |
| 241 | - name: 'importuser', | |
| 54 | + path: '/', | |
| 55 | + component: Layout, | |
| 56 | + redirect: '/dashboard', | |
| 57 | + children: [{ | |
| 58 | + path: 'dashboard', | |
| 59 | + name: '首页', | |
| 60 | + component: () => | |
| 61 | + import ('@/views/dashboard/index'), | |
| 62 | + meta: { | |
| 63 | + title: '首页', | |
| 64 | + icon: 'dashboard' | |
| 65 | + } | |
| 66 | + }] | |
| 67 | + }, | |
| 242 | 68 | |
| 243 | - component: () => | |
| 244 | - import('@/views/user/picuserimport'), | |
| 69 | + { | |
| 70 | + path: '/example', | |
| 71 | + component: Layout, | |
| 72 | + redirect: '/example/table', | |
| 73 | + name: 'Example', | |
| 245 | 74 | meta: { |
| 246 | - title: '图片导入用户', | |
| 247 | - } | |
| 75 | + title: '题库管理', | |
| 76 | + icon: 'el-icon-s-help' | |
| 77 | + }, | |
| 78 | + children: [{ | |
| 79 | + path: 'QuestionBank', | |
| 80 | + name: 'Table', | |
| 81 | + component: () => | |
| 82 | + import ('@/views/QuestionBank/index'), | |
| 83 | + meta: { | |
| 84 | + title: '题库', | |
| 85 | + icon: 'table' | |
| 86 | + } | |
| 87 | + }] | |
| 248 | 88 | }, |
| 89 | + | |
| 249 | 90 | { |
| 250 | - code: 'admin', | |
| 251 | - path: 'admin', | |
| 252 | - name: 'admin', | |
| 253 | - component: () => | |
| 254 | - import('@/views/user/adminList'), | |
| 91 | + path: '/views', | |
| 92 | + component: Layout, | |
| 93 | + redirect: '/views/TestPaper', | |
| 94 | + name: 'TestPaper', | |
| 255 | 95 | meta: { |
| 256 | - title: '管理员列表', | |
| 257 | - permissions: ['admin'] | |
| 258 | - } | |
| 259 | - }, | |
| 96 | + title: '试卷管理', | |
| 97 | + icon: 'el-icon-s-help' | |
| 98 | + }, | |
| 99 | + children: [{ | |
| 100 | + path: 'TestPaperList', | |
| 101 | + name: 'Table', | |
| 102 | + component: () => | |
| 103 | + import ('@/views/TestPaper/TestPaperList'), | |
| 104 | + meta: { | |
| 105 | + title: '试卷列表', | |
| 106 | + icon: 'table' | |
| 107 | + } | |
| 108 | + }, | |
| 109 | + { | |
| 110 | + path: 'ManualTestPaper', | |
| 111 | + name: 'Table', | |
| 112 | + component: () => | |
| 113 | + import ('@/views/TestPaper/ManualTestPaper'), | |
| 114 | + meta: { | |
| 115 | + title: '组卷', | |
| 116 | + icon: 'table' | |
| 117 | + } | |
| 118 | + }, | |
| 260 | 119 | |
| 261 | - ] | |
| 262 | - }, { | |
| 263 | - code:'系统管理', | |
| 264 | - path: '/system', | |
| 265 | - component: Layout, | |
| 266 | - redirect: '/', | |
| 267 | - name: 'password', | |
| 268 | - meta: { | |
| 269 | - title: '系统管理', | |
| 270 | - icon: 'el-icon-s-platform' | |
| 120 | + ] | |
| 271 | 121 | }, |
| 272 | - children: [ | |
| 273 | - { | |
| 274 | - code: 'userdimset', | |
| 275 | - path: 'userdimset', | |
| 276 | - name: 'impouserdimsetrtuser', | |
| 277 | - | |
| 278 | -======= | |
| 279 | - path: '/login', | |
| 280 | ->>>>>>> 63deedae0dfc58ee6126449e91cbb703657842a0 | |
| 281 | - component: () => | |
| 282 | - import ('@/views/login/index'), | |
| 283 | - hidden: true | |
| 122 | + { | |
| 123 | + code: '用户管理', | |
| 124 | + path: '/user', | |
| 125 | + component: Layout, | |
| 126 | + redirect: '/', | |
| 127 | + name: 'user', | |
| 128 | + meta: { | |
| 129 | + title: '用户管理', | |
| 130 | + icon: 'el-icon-s-help' | |
| 284 | 131 | }, |
| 132 | + children: [{ | |
| 133 | + code: '人才库', | |
| 134 | + path: 'user', | |
| 135 | + name: 'User', | |
| 136 | + component: () => | |
| 137 | + import ('@/views/user/userlist'), | |
| 138 | + meta: { | |
| 139 | + title: '人才库', | |
| 140 | + } | |
| 141 | + }, | |
| 142 | + { | |
| 143 | + code: '面试时间表', | |
| 144 | + path: 'interviewSchedule', | |
| 145 | + name: 'interviewSchedule', | |
| 146 | + component: () => | |
| 147 | + import ('@/views/user/InterviewSchedule'), | |
| 148 | + meta: { | |
| 149 | + title: '面试时间表', | |
| 150 | + } | |
| 151 | + }, | |
| 285 | 152 | |
| 286 | - { | |
| 287 | - path: '/404', | |
| 288 | - component: () => | |
| 289 | - import ('@/views/404'), | |
| 290 | - hidden: true | |
| 291 | - }, | |
| 153 | + { | |
| 154 | + code: 'importuser', | |
| 155 | + path: 'importuser', | |
| 156 | + name: 'importuser', | |
| 292 | 157 | |
| 293 | - { | |
| 294 | - path: '/answerDetail', | |
| 295 | - name: '答题详情', | |
| 296 | - component: () => | |
| 297 | - import ('@/views/AnswerResult/detail.vue'), | |
| 298 | - hidden: true | |
| 158 | + component: () => | |
| 159 | + import ('@/views/user/picuserimport'), | |
| 160 | + meta: { | |
| 161 | + title: '图片导入用户', | |
| 162 | + } | |
| 163 | + }, | |
| 164 | + { | |
| 165 | + code: 'admin', | |
| 166 | + path: 'admin', | |
| 167 | + name: 'admin', | |
| 168 | + component: () => | |
| 169 | + import ('@/views/user/adminList'), | |
| 170 | + meta: { | |
| 171 | + title: '管理员列表', | |
| 172 | + permissions: ['admin'] | |
| 173 | + } | |
| 174 | + }, | |
| 175 | + | |
| 176 | + ] | |
| 177 | + }, { | |
| 178 | + path: '/password', | |
| 179 | + component: Layout, | |
| 180 | + redirect: '/', | |
| 181 | + name: 'password', | |
| 182 | + meta: { | |
| 183 | + title: '系统管理', | |
| 184 | + icon: 'el-icon-s-platform' | |
| 299 | 185 | }, |
| 186 | + children: [{ | |
| 187 | + path: 'userdimset', | |
| 188 | + name: 'impouserdimsetrtuser', | |
| 300 | 189 | |
| 190 | + component: () => | |
| 191 | + import ('@/views/user/userdimset'), | |
| 192 | + meta: { | |
| 193 | + title: '维度规则设置', | |
| 194 | + permissions: ['admin'] | |
| 195 | + } | |
| 196 | + }, | |
| 197 | + { | |
| 198 | + path: 'index', | |
| 199 | + name: 'index', | |
| 200 | + component: () => | |
| 201 | + import ('@/views/password/index'), | |
| 202 | + meta: { | |
| 203 | + title: '忘记密码', | |
| 204 | + } | |
| 205 | + }, | |
| 301 | 206 | |
| 302 | - << | |
| 303 | - << << < HEAD { | |
| 304 | - path: '/', | |
| 305 | - component: Layout, | |
| 306 | - redirect: '/dashboard', | |
| 307 | - children: [{ | |
| 308 | - path: 'dashboard', | |
| 309 | - name: '首页', | |
| 207 | + { | |
| 208 | + code: 'settings', | |
| 209 | + path: 'settings', | |
| 210 | + name: 'settings', | |
| 211 | + component: () => | |
| 212 | + import ('@/views/settings/index'), | |
| 213 | + meta: { | |
| 214 | + title: '系统设置', | |
| 215 | + } | |
| 216 | + }, | |
| 217 | + { | |
| 218 | + path: 'TestPaperClass', | |
| 219 | + name: 'Table', | |
| 310 | 220 | component: () => |
| 311 | - import ('@/views/dashboard/index'), | |
| 221 | + import ('@/views/TestPaper/TestPaperClass'), | |
| 312 | 222 | meta: { |
| 313 | - title: '首页', | |
| 314 | - icon: 'dashboard' | |
| 223 | + title: '分类管理', | |
| 224 | + permissions: ['admin'] | |
| 315 | 225 | } |
| 316 | 226 | }, { |
| 317 | - path: 'live', | |
| 318 | - name: '直播观看', | |
| 227 | + path: 'carousel', | |
| 228 | + name: 'carousel', | |
| 319 | 229 | component: () => |
| 320 | - import ('@/views/live/index'), | |
| 230 | + import ('@/views/carousel/index'), | |
| 321 | 231 | meta: { |
| 322 | - title: '直播', | |
| 323 | - icon: 'video' | |
| 324 | - }, | |
| 325 | - hidden: true | |
| 326 | - }] | |
| 327 | - }, | |
| 328 | - | |
| 329 | - { | |
| 330 | - path: '/example', | |
| 331 | - component: Layout, | |
| 332 | - redirect: '/example/table', | |
| 333 | - name: 'Example', | |
| 334 | - === | |
| 335 | - === = { | |
| 336 | - code: 'home', | |
| 337 | - path: '/', | |
| 338 | - component: Layout, | |
| 339 | - redirect: '/dashboard', | |
| 340 | - children: [{ | |
| 341 | - path: 'dashboard', | |
| 342 | - name: '首页', | |
| 343 | - component: () => | |
| 344 | - import ('@/views/dashboard/index'), | |
| 345 | - >>> | |
| 346 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 347 | - meta: { | |
| 348 | - title: '题库管理', | |
| 349 | - icon: 'el-icon-s-help', | |
| 350 | - permissions: ['admin'] | |
| 351 | - }, | |
| 352 | - children: [{ | |
| 353 | - path: 'QuestionBank', | |
| 354 | - name: 'Table', | |
| 355 | - component: () => | |
| 356 | - import ('@/views/QuestionBank/index'), | |
| 357 | - meta: { | |
| 358 | - title: '题库', | |
| 359 | - icon: 'table', | |
| 360 | - permissions: ['admin'] | |
| 361 | - } | |
| 362 | - }, ] | |
| 363 | - }, | |
| 364 | - // { | |
| 365 | - // path: '/moduleIndex', | |
| 366 | - // component: Layout, | |
| 367 | - // redirect: '/module/index', | |
| 368 | - // name: 'module', | |
| 369 | - // meta: { | |
| 370 | - // title: '面试题', | |
| 371 | - // icon: 'el-icon-s-help' | |
| 372 | - // }, | |
| 373 | - // children: [{ | |
| 374 | - // path: 'index', | |
| 375 | - // name: 'index', | |
| 376 | - // component: () => | |
| 377 | - // import ('@/views/TestPaper/index'), | |
| 378 | - // hidden: true, | |
| 379 | - // meta: { | |
| 380 | - // title: '试卷维护', | |
| 381 | - // icon: 'table' | |
| 382 | - // } | |
| 383 | - // }, ] | |
| 384 | - // }, | |
| 385 | - // { | |
| 386 | - // path: '/realQuestion', | |
| 387 | - // component: Layout, | |
| 388 | - // redirect: '/module/realQuestion', | |
| 389 | - // name: 'realQuestion', | |
| 390 | - // meta: { | |
| 391 | - // title: '历年真题', | |
| 392 | - // icon: 'el-icon-s-help' | |
| 393 | - // }, | |
| 394 | - // children: [{ | |
| 395 | - // path: 'recharge', | |
| 396 | - // name: 'recharge', | |
| 397 | - // component: () => | |
| 398 | - // import ('@/views/module/realQuestion'), | |
| 399 | - // meta: { | |
| 400 | - // title: '历年真题', | |
| 401 | - // icon: 'el-icon-s-management' | |
| 402 | - // } | |
| 403 | - // }] | |
| 404 | - // }, | |
| 405 | - | |
| 406 | - { | |
| 407 | - path: '/views', | |
| 408 | - component: Layout, | |
| 409 | - redirect: '/views/TestPaper', | |
| 410 | - name: 'TestPaper', | |
| 411 | - meta: { | |
| 412 | - title: '试卷管理', | |
| 413 | - icon: 'el-icon-s-help' | |
| 414 | - }, | |
| 415 | - children: [{ | |
| 416 | - path: 'TestPaperList', | |
| 417 | - name: 'Table', | |
| 418 | - component: () => | |
| 419 | - import ('@/views/TestPaper/TestPaperList'), | |
| 420 | - meta: { | |
| 421 | - title: '试卷列表', | |
| 422 | - icon: 'table' | |
| 423 | - } | |
| 424 | - }, | |
| 425 | - { | |
| 426 | - path: 'index', | |
| 427 | - name: 'index', | |
| 428 | - component: () => | |
| 429 | - import ('@/views/TestPaper/index'), | |
| 430 | - hidden: true, | |
| 431 | - meta: { | |
| 432 | - title: '试卷维护', | |
| 433 | - icon: 'table' | |
| 434 | - } | |
| 435 | - }, | |
| 436 | - { | |
| 437 | - path: 'ManualTestPaper', | |
| 438 | - name: 'Table', | |
| 439 | - component: () => | |
| 440 | - import ('@/views/TestPaper/ManualTestPaper'), | |
| 441 | - meta: { | |
| 442 | - title: '组卷', | |
| 443 | - icon: 'table' | |
| 444 | - } | |
| 445 | - }, | |
| 446 | - | |
| 447 | - << | |
| 448 | - << << < HEAD | |
| 449 | - ] | |
| 450 | - }, | |
| 451 | - // { | |
| 452 | - // path: '/order', | |
| 453 | - // component: Layout, | |
| 454 | - // redirect: '/', | |
| 455 | - // name: 'order', | |
| 456 | - // meta: { | |
| 457 | - // title: '订单管理', | |
| 458 | - // icon: 'el-icon-s-marketing' | |
| 459 | - // }, | |
| 460 | - // children: [{ | |
| 461 | - // path: 'recharge', | |
| 462 | - // name: 'recharge', | |
| 463 | - // component: () => | |
| 464 | - // import('@/views/order/rechargeList'), | |
| 465 | - // meta: { | |
| 466 | - // title: '充值记录', | |
| 467 | - // } | |
| 468 | - // }, { | |
| 469 | - // path: 'shop', | |
| 470 | - // name: 'shop', | |
| 471 | - // component: () => | |
| 472 | - // import('@/views/order/shopList'), | |
| 473 | - // meta: { | |
| 474 | - // title: '购买记录', | |
| 475 | - // } | |
| 476 | - // }] | |
| 477 | - // }, | |
| 478 | - { | |
| 479 | - path: '/user', | |
| 480 | - component: Layout, | |
| 481 | - redirect: '/', | |
| 482 | - name: 'user', | |
| 483 | - === | |
| 484 | - === = { | |
| 485 | - code: 'example', | |
| 486 | - path: '/example', | |
| 487 | - component: Layout, | |
| 488 | - redirect: '/example/table', | |
| 489 | - name: 'Example', | |
| 490 | - meta: { | |
| 491 | - title: '题库管理', | |
| 492 | - icon: 'el-icon-s-help', | |
| 493 | - permissions: ['admin'] | |
| 494 | - }, | |
| 495 | - children: [{ | |
| 496 | - code: '题库', | |
| 497 | - path: 'QuestionBank', | |
| 498 | - name: 'Table', | |
| 499 | - component: () => | |
| 500 | - import ('@/views/QuestionBank/index'), | |
| 501 | - >>> | |
| 502 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 503 | - meta: { | |
| 504 | - title: '用户管理', | |
| 505 | - icon: 'el-icon-s-help' | |
| 506 | - }, | |
| 507 | - children: [{ | |
| 508 | - path: 'user', | |
| 509 | - name: 'User', | |
| 510 | - component: () => | |
| 511 | - import ('@/views/user/userlist'), | |
| 512 | - meta: { | |
| 513 | - title: '人才库', | |
| 514 | - } | |
| 515 | - }, | |
| 516 | - { | |
| 517 | - path: 'interviewSchedule', | |
| 518 | - name: 'interviewSchedule', | |
| 519 | - component: () => | |
| 520 | - import ('@/views/user/InterviewSchedule'), | |
| 521 | - meta: { | |
| 522 | - title: '面试时间表', | |
| 523 | - } | |
| 524 | - }, | |
| 525 | - | |
| 526 | - << | |
| 527 | - << << < HEAD { | |
| 528 | - path: 'importuser', | |
| 529 | - name: 'importuser', | |
| 530 | - | |
| 531 | - component: () => | |
| 532 | - import ('@/views/user/picuserimport'), | |
| 533 | - meta: { | |
| 534 | - title: '图片导入用户', | |
| 535 | - } | |
| 536 | - }, | |
| 537 | - { | |
| 538 | - path: 'admin', | |
| 539 | - name: 'admin', | |
| 540 | - component: () => | |
| 541 | - import ('@/views/user/adminList'), | |
| 542 | - meta: { | |
| 543 | - title: '管理员列表', | |
| 544 | - permissions: ['admin'] | |
| 545 | - } | |
| 546 | - }, | |
| 547 | - | |
| 548 | - ] | |
| 549 | - }, { | |
| 550 | - path: '/password', | |
| 551 | - component: Layout, | |
| 552 | - redirect: '/', | |
| 553 | - name: 'password', | |
| 554 | - === | |
| 555 | - === = { | |
| 556 | - code: '试卷管理', | |
| 557 | - path: '/views', | |
| 558 | - component: Layout, | |
| 559 | - redirect: '/views/TestPaper', | |
| 560 | - name: 'TestPaper', | |
| 561 | - meta: { | |
| 562 | - title: '试卷管理', | |
| 563 | - icon: 'el-icon-s-help' | |
| 564 | - }, | |
| 565 | - children: [{ | |
| 566 | - code: '试卷列表', | |
| 567 | - path: 'TestPaperList', | |
| 568 | - name: 'Table', | |
| 569 | - component: () => | |
| 570 | - import ('@/views/TestPaper/TestPaperList'), | |
| 571 | - >>> | |
| 572 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 573 | - meta: { | |
| 574 | - title: '系统管理', | |
| 575 | - icon: 'el-icon-s-platform' | |
| 576 | - }, | |
| 577 | - children: [{ | |
| 578 | - path: 'userdimset', | |
| 579 | - name: 'impouserdimsetrtuser', | |
| 580 | - | |
| 581 | - component: () => | |
| 582 | - import ('@/views/user/userdimset'), | |
| 583 | - meta: { | |
| 584 | - title: '维度规则设置', | |
| 585 | - permissions: ['admin'] | |
| 586 | - } | |
| 587 | - }, | |
| 588 | - { | |
| 589 | - path: 'index', | |
| 590 | - name: 'index', | |
| 591 | - component: () => | |
| 592 | - import ('@/views/password/index'), | |
| 593 | - meta: { | |
| 594 | - title: '忘记密码', | |
| 595 | - } | |
| 596 | - }, { | |
| 597 | - path: 'TestPaperClass', | |
| 598 | - name: 'Table', | |
| 599 | - component: () => | |
| 600 | - import ('@/views/TestPaper/TestPaperClass'), | |
| 601 | - meta: { | |
| 602 | - title: '分类管理', | |
| 603 | - permissions: ['admin'] | |
| 604 | - } | |
| 605 | - }, { | |
| 606 | - path: 'carousel', | |
| 607 | - name: 'carousel', | |
| 608 | - component: () => | |
| 609 | - import ('@/views/carousel/index'), | |
| 610 | - meta: { | |
| 611 | - title: '轮播图', | |
| 612 | - permissions: ['admin'] | |
| 613 | - } | |
| 614 | - }, { | |
| 615 | - path: 'new', | |
| 616 | - name: 'new', | |
| 617 | - component: () => | |
| 618 | - import ('@/views/carousel/new'), | |
| 619 | - meta: { | |
| 620 | - title: '最新资讯', | |
| 621 | - permissions: ['admin'] | |
| 622 | - } | |
| 623 | - } | |
| 624 | - ] | |
| 625 | - }, | |
| 626 | - // 404 page must be placed at the end !!! | |
| 627 | - { | |
| 628 | - path: '*', | |
| 629 | - redirect: '/404', | |
| 630 | - hidden: true | |
| 631 | - } | |
| 632 | - ] | |
| 633 | - } | |
| 634 | - else { | |
| 635 | - return; | |
| 636 | - constantRoutes1 = [{ | |
| 637 | - path: '/login', | |
| 638 | - component: () => | |
| 639 | - import ('@/views/login/index'), | |
| 640 | - hidden: true | |
| 641 | - }, | |
| 642 | - | |
| 643 | - { << | |
| 644 | - << << < HEAD | |
| 645 | - path: '/404', | |
| 646 | - === | |
| 647 | - === = | |
| 648 | - code: '组卷', | |
| 649 | - path: 'ManualTestPaper', | |
| 650 | - name: 'Table', | |
| 651 | - >>> | |
| 652 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 653 | - component: () => | |
| 654 | - import ('@/views/404'), | |
| 655 | - hidden: true | |
| 656 | - }, | |
| 657 | - | |
| 658 | - << | |
| 659 | - << << < HEAD { | |
| 660 | - path: '/example', | |
| 661 | - component: Layout, | |
| 662 | - redirect: '/example/table', | |
| 663 | - name: 'Example', | |
| 664 | - === | |
| 665 | - === = | |
| 666 | - ] | |
| 667 | - }, | |
| 668 | - // { | |
| 669 | - // path: '/order', | |
| 670 | - // component: Layout, | |
| 671 | - // redirect: '/', | |
| 672 | - // name: 'order', | |
| 673 | - // meta: { | |
| 674 | - // title: '订单管理', | |
| 675 | - // icon: 'el-icon-s-marketing' | |
| 676 | - // }, | |
| 677 | - // children: [{ | |
| 678 | - // path: 'recharge', | |
| 679 | - // name: 'recharge', | |
| 680 | - // component: () => | |
| 681 | - // import('@/views/order/rechargeList'), | |
| 682 | - // meta: { | |
| 683 | - // title: '充值记录', | |
| 684 | - // } | |
| 685 | - // }, { | |
| 686 | - // path: 'shop', | |
| 687 | - // name: 'shop', | |
| 688 | - // component: () => | |
| 689 | - // import('@/views/order/shopList'), | |
| 690 | - // meta: { | |
| 691 | - // title: '购买记录', | |
| 692 | - // } | |
| 693 | - // }] | |
| 694 | - // }, | |
| 695 | - { | |
| 696 | - code: '用户管理', | |
| 697 | - path: '/user', | |
| 698 | - component: Layout, | |
| 699 | - redirect: '/', | |
| 700 | - name: 'user', | |
| 701 | - meta: { | |
| 702 | - title: '用户管理', | |
| 703 | - icon: 'el-icon-s-help' | |
| 704 | - }, | |
| 705 | - children: [{ | |
| 706 | - code: '人才库', | |
| 707 | - path: 'user', | |
| 708 | - name: 'User', | |
| 709 | - component: () => | |
| 710 | - import ('@/views/user/userlist'), | |
| 711 | - >>> | |
| 712 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 713 | - meta: { | |
| 714 | - title: '题库管理', | |
| 715 | - icon: 'el-icon-s-help', | |
| 716 | - permissions: ["admin", "user"], | |
| 717 | - }, | |
| 718 | - children: [{ | |
| 719 | - path: 'QuestionBank', | |
| 720 | - name: 'Table', | |
| 721 | - component: () => | |
| 722 | - import ('@/views/QuestionBank/index'), | |
| 723 | - meta: { | |
| 724 | - title: '题库', | |
| 725 | - icon: 'table' | |
| 726 | - } | |
| 727 | - }, ] | |
| 728 | - }, | |
| 729 | - { << | |
| 730 | - << << < HEAD | |
| 731 | - path: '/moduleIndex', | |
| 732 | - component: Layout, | |
| 733 | - redirect: '/module/index', | |
| 734 | - name: 'module', | |
| 735 | - === | |
| 736 | - === = | |
| 737 | - code: '面试时间表', | |
| 738 | - path: 'interviewSchedule', | |
| 739 | - name: 'interviewSchedule', | |
| 740 | - component: () => | |
| 741 | - import ('@/views/user/InterviewSchedule'), | |
| 742 | - >>> | |
| 743 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 744 | - meta: { | |
| 745 | - title: '面试题', | |
| 746 | - icon: 'el-icon-s-help' | |
| 747 | - }, | |
| 748 | - children: [{ | |
| 749 | - path: 'recharge', | |
| 750 | - name: 'recharge', | |
| 751 | - component: () => | |
| 752 | - import ('@/views/module/index'), | |
| 753 | - meta: { | |
| 754 | - title: '面试题', | |
| 755 | - icon: 'el-icon-s-operation' | |
| 756 | - } | |
| 757 | - }, | |
| 758 | - { | |
| 759 | - path: 'index', | |
| 760 | - name: 'index', | |
| 761 | - component: () => | |
| 762 | - import ('@/views/TestPaper/index'), | |
| 763 | - hidden: true, | |
| 764 | - meta: { | |
| 765 | - title: '试卷维护', | |
| 766 | - icon: 'table' | |
| 767 | - } | |
| 768 | - }, | |
| 769 | - ] | |
| 770 | - }, | |
| 771 | - // { | |
| 772 | - // path: '/realQuestion', | |
| 773 | - // component: Layout, | |
| 774 | - // redirect: '/module/realQuestion', | |
| 775 | - // name: 'realQuestion', | |
| 776 | - // meta: { | |
| 777 | - // title: '历年真题', | |
| 778 | - // icon: 'el-icon-s-help' | |
| 779 | - // }, | |
| 780 | - // children: [{ | |
| 781 | - // path: 'recharge', | |
| 782 | - // name: 'recharge', | |
| 783 | - // component: () => | |
| 784 | - // import ('@/views/module/realQuestion'), | |
| 785 | - // meta: { | |
| 786 | - // title: '历年真题', | |
| 787 | - // icon: 'el-icon-s-management' | |
| 788 | - // } | |
| 789 | - // }] | |
| 790 | - // }, | |
| 791 | - | |
| 792 | - { << | |
| 793 | - << << < HEAD | |
| 794 | - path: '/views', | |
| 795 | - component: Layout, | |
| 796 | - redirect: '/views/TestPaper', | |
| 797 | - name: 'TestPaper', | |
| 798 | - === | |
| 799 | - === = | |
| 800 | - code: 'importuser', | |
| 801 | - path: 'importuser', | |
| 802 | - name: 'importuser', | |
| 803 | - | |
| 804 | - component: () => | |
| 805 | - import ('@/views/user/picuserimport'), | |
| 806 | - >>> | |
| 807 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 808 | - meta: { | |
| 809 | - title: '试卷管理', | |
| 810 | - icon: 'el-icon-s-help' | |
| 811 | - }, | |
| 812 | - children: [{ | |
| 813 | - path: 'TestPaperList', | |
| 814 | - name: 'Table', | |
| 815 | - component: () => | |
| 816 | - import ('@/views/TestPaper/TestPaperList'), | |
| 817 | - meta: { | |
| 818 | - title: '试卷列表', | |
| 819 | - icon: 'table' | |
| 820 | - } | |
| 821 | - }, | |
| 822 | - { | |
| 823 | - path: 'index', | |
| 824 | - name: 'index', | |
| 825 | - component: () => | |
| 826 | - import ('@/views/TestPaper/index'), | |
| 827 | - hidden: true, | |
| 828 | - meta: { | |
| 829 | - title: '试卷维护', | |
| 830 | - icon: 'table' | |
| 831 | - } | |
| 832 | - }, | |
| 833 | - // { | |
| 834 | - // path: 'ManualTestPaper', | |
| 835 | - // name: 'Table', | |
| 836 | - // component: () => import('@/views/TestPaper/ManualTestPaper'), | |
| 837 | - // meta: { | |
| 838 | - // title: '组卷', | |
| 839 | - // icon: 'table' | |
| 840 | - // } | |
| 841 | - // }, | |
| 842 | - | |
| 843 | - ] | |
| 844 | - }, | |
| 845 | - // { | |
| 846 | - // path: '/order', | |
| 847 | - // component: Layout, | |
| 848 | - // redirect: '/', | |
| 849 | - // name: 'order', | |
| 850 | - // meta: { | |
| 851 | - // title: '订单管理', | |
| 852 | - // icon: 'el-icon-s-marketing' | |
| 853 | - // }, | |
| 854 | - // children: [{ | |
| 855 | - // path: 'recharge', | |
| 856 | - // name: 'recharge', | |
| 857 | - // component: () => | |
| 858 | - // import('@/views/order/rechargeList'), | |
| 859 | - // meta: { | |
| 860 | - // title: '充值记录', | |
| 861 | - // } | |
| 862 | - // }, { | |
| 863 | - // path: 'shop', | |
| 864 | - // name: 'shop', | |
| 865 | - // component: () => | |
| 866 | - // import('@/views/order/shopList'), | |
| 867 | - // meta: { | |
| 868 | - // title: '购买记录', | |
| 869 | - // } | |
| 870 | - // }] | |
| 871 | - // }, | |
| 872 | - { << | |
| 873 | - << << < HEAD | |
| 874 | - path: '/user', | |
| 875 | - component: Layout, | |
| 876 | - redirect: '/', | |
| 877 | - name: 'user', | |
| 878 | - meta: { | |
| 879 | - title: '用户管理', | |
| 880 | - icon: 'el-icon-s-help' | |
| 881 | - }, | |
| 882 | - children: [{ | |
| 883 | - path: 'user', | |
| 884 | - name: 'User', | |
| 885 | - component: () => | |
| 886 | - import ('@/views/user/userlist'), | |
| 887 | - meta: { | |
| 888 | - title: '人才库', | |
| 889 | - } === | |
| 890 | - === = | |
| 891 | - code: 'admin', | |
| 892 | - path: 'admin', | |
| 893 | - name: 'admin', | |
| 894 | - component: () => | |
| 895 | - import ('@/views/user/adminList'), | |
| 896 | - meta: { | |
| 897 | - title: '管理员列表', | |
| 898 | - permissions: ['admin'] | |
| 899 | - } | |
| 900 | - }, | |
| 901 | - | |
| 902 | - ] | |
| 903 | - }, { | |
| 904 | - code: '系统管理', | |
| 905 | - path: '/system', | |
| 906 | - component: Layout, | |
| 907 | - redirect: '/', | |
| 908 | - name: 'password', | |
| 909 | - meta: { | |
| 910 | - title: '系统管理', | |
| 911 | - icon: 'el-icon-s-platform' | |
| 912 | - }, | |
| 913 | - children: [{ | |
| 914 | - code: 'userdimset', | |
| 915 | - path: 'userdimset', | |
| 916 | - name: 'impouserdimsetrtuser', | |
| 917 | - | |
| 918 | - component: () => | |
| 919 | - import ('@/views/user/userdimset'), | |
| 920 | - meta: { | |
| 921 | - title: '维度规则设置', | |
| 922 | - permissions: ['admin'] >>> | |
| 923 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 924 | - } | |
| 925 | - | |
| 926 | - ] | |
| 927 | - }, | |
| 928 | - { | |
| 929 | - path: '/password', | |
| 930 | - component: Layout, | |
| 931 | - redirect: '/', | |
| 932 | - name: 'password', | |
| 933 | - meta: { | |
| 934 | - title: '系统管理', | |
| 935 | - icon: 'el-icon-s-platform', | |
| 936 | - permissions: ['admin', 'user'] | |
| 937 | - }, | |
| 938 | - children: [{ | |
| 939 | - path: 'index', | |
| 940 | - name: 'index', | |
| 941 | - component: () => | |
| 942 | - import ('@/views/password/index'), | |
| 943 | - meta: { | |
| 944 | - title: '忘记密码', | |
| 945 | - } | |
| 946 | - }, | |
| 947 | - { | |
| 948 | - code: 'settings', | |
| 949 | - path: 'settings', | |
| 950 | - name: 'settings', | |
| 951 | - component: () => | |
| 952 | - import ('@/views/settings/index'), | |
| 953 | - meta: { | |
| 954 | - title: '系统设置', | |
| 955 | - } | |
| 956 | - }, | |
| 957 | - { | |
| 958 | - code: 'TestPaperClass', | |
| 959 | - path: 'TestPaperClass', | |
| 960 | - name: 'Table', | |
| 961 | - component: () => | |
| 962 | - import ('@/views/TestPaper/TestPaperClass'), | |
| 963 | - meta: { | |
| 964 | - title: '分类管理', | |
| 965 | - permissions: ['admin'] | |
| 966 | - } | |
| 967 | - }, { | |
| 968 | - code: 'carousel', | |
| 969 | - path: 'carousel', | |
| 970 | - name: 'carousel', | |
| 971 | - component: () => | |
| 972 | - import ('@/views/carousel/index'), | |
| 973 | - meta: { | |
| 974 | - title: '轮播图', | |
| 975 | - permissions: ['admin'] | |
| 976 | - } | |
| 977 | - }, { | |
| 978 | - code: 'new', | |
| 979 | - path: 'new', | |
| 980 | - name: 'new', | |
| 981 | - component: () => | |
| 982 | - import ('@/views/carousel/new'), | |
| 983 | - meta: { | |
| 984 | - title: '最新资讯', | |
| 985 | - permissions: ['admin'] | |
| 986 | - } << | |
| 987 | - << << < HEAD | |
| 988 | - } | |
| 989 | - ] === | |
| 990 | - === = | |
| 991 | - }, | |
| 992 | - { | |
| 993 | - code: 'rolelist', | |
| 994 | - path: 'role', | |
| 995 | - name: 'rolelist', | |
| 996 | - component: () => | |
| 997 | - import ('@/views/user/rolelist'), | |
| 998 | - meta: { | |
| 999 | - title: '角色权限', | |
| 1000 | - permissions: ['admin'] | |
| 1001 | - } | |
| 1002 | - }, | |
| 1003 | - { | |
| 1004 | - code: 'logs', | |
| 1005 | - path: 'logs', | |
| 1006 | - name: 'logs', | |
| 1007 | - | |
| 1008 | - component: () => | |
| 1009 | - import ('@/views/user/loglist'), | |
| 1010 | - meta: { | |
| 1011 | - title: '系统日志', | |
| 1012 | - } | |
| 1013 | - }, | |
| 232 | + title: '轮播图', | |
| 233 | + permissions: ['admin'] | |
| 234 | + } | |
| 235 | + }, { | |
| 236 | + path: 'new', | |
| 237 | + name: 'new', | |
| 238 | + component: () => | |
| 239 | + import ('@/views/carousel/new'), | |
| 240 | + meta: { | |
| 241 | + title: '最新资讯', | |
| 242 | + permissions: ['admin'] | |
| 243 | + } | |
| 244 | + }, { | |
| 245 | + code: 'rolelist', | |
| 246 | + path: 'role', | |
| 247 | + name: 'rolelist', | |
| 248 | + component: () => | |
| 249 | + import ('@/views/user/rolelist'), | |
| 250 | + meta: { | |
| 251 | + title: '角色权限', | |
| 252 | + permissions: ['admin'] | |
| 253 | + } | |
| 254 | + }, | |
| 255 | + { | |
| 256 | + code: 'logs', | |
| 257 | + path: 'logs', | |
| 258 | + name: 'logs', | |
| 1014 | 259 | |
| 260 | + component: () => | |
| 261 | + import ('@/views/user/loglist'), | |
| 262 | + meta: { | |
| 263 | + title: '系统日志', | |
| 264 | + } | |
| 265 | + }, | |
| 266 | + ] | |
| 267 | + }, | |
| 268 | + // 404 page must be placed at the end !!! | |
| 269 | + { | |
| 270 | + path: '*', | |
| 271 | + redirect: '/404', | |
| 272 | + hidden: true | |
| 273 | + } | |
| 274 | + ] | |
| 275 | + } else { | |
| 276 | + constantRoutes1 = [{ | |
| 277 | + path: '/login', | |
| 278 | + component: () => | |
| 279 | + import ('@/views/login/index'), | |
| 280 | + hidden: true | |
| 281 | + }, | |
| 1015 | 282 | |
| 1016 | - ] | |
| 1017 | - }, | |
| 1018 | - // 404 page must be placed at the end !!! | |
| 1019 | - { | |
| 1020 | - path: '*', | |
| 1021 | - redirect: '/404', | |
| 1022 | - hidden: true | |
| 1023 | - } | |
| 1024 | - ] | |
| 1025 | - } else { | |
| 1026 | - return; | |
| 1027 | - constantRoutes1 = [{ | |
| 1028 | - path: '/login', | |
| 1029 | - component: () => | |
| 1030 | - import ('@/views/login/index'), | |
| 1031 | - hidden: true | |
| 1032 | - }, | |
| 283 | + { | |
| 284 | + path: '/404', | |
| 285 | + component: () => | |
| 286 | + import ('@/views/404'), | |
| 287 | + hidden: true | |
| 288 | + }, | |
| 289 | + { | |
| 290 | + path: '/resume/malestaff', | |
| 291 | + component: () => | |
| 292 | + import ('@/views/resume/malestaff.vue'), | |
| 293 | + hidden: true | |
| 294 | + }, | |
| 295 | + { | |
| 296 | + path: '/resume/femalestaff', | |
| 297 | + component: () => | |
| 298 | + import ('@/views/resume/femalestaff.vue'), | |
| 299 | + hidden: true | |
| 300 | + }, | |
| 1033 | 301 | |
| 1034 | - { | |
| 1035 | - path: '/404', | |
| 1036 | - component: () => | |
| 1037 | - import ('@/views/404'), | |
| 1038 | - hidden: true | |
| 1039 | - }, | |
| 302 | + { | |
| 303 | + path: '/live', | |
| 304 | + name: '直播', | |
| 305 | + component: () => | |
| 306 | + import ('@/views/live/index'), | |
| 307 | + hidden: true | |
| 308 | + }, | |
| 309 | + { | |
| 310 | + path: '/answerDetail', | |
| 311 | + name: '答题详情', | |
| 312 | + component: () => | |
| 313 | + import ('@/views/AnswerResult/detail.vue'), | |
| 314 | + hidden: true | |
| 315 | + }, | |
| 316 | + { | |
| 317 | + path: '/', | |
| 318 | + component: Layout, | |
| 319 | + redirect: '/dashboard', | |
| 320 | + children: [{ | |
| 321 | + path: 'dashboard', | |
| 322 | + name: '首页', | |
| 323 | + component: () => | |
| 324 | + import ('@/views/dashboard/index'), | |
| 325 | + meta: { | |
| 326 | + title: '首页', | |
| 327 | + icon: 'dashboard' | |
| 328 | + } | |
| 329 | + }] | |
| 330 | + }, | |
| 1040 | 331 | |
| 1041 | - { | |
| 1042 | - path: '/example', | |
| 1043 | - component: Layout, | |
| 1044 | - redirect: '/example/table', | |
| 1045 | - name: 'Example', | |
| 1046 | - meta: { | |
| 1047 | - title: '题库管理', | |
| 1048 | - icon: 'el-icon-s-help', | |
| 1049 | - permissions: ["admin", "user"], | |
| 1050 | - }, | |
| 1051 | - children: [{ | |
| 1052 | - path: 'QuestionBank', | |
| 1053 | - name: 'Table', | |
| 1054 | - component: () => | |
| 1055 | - import ('@/views/QuestionBank/index'), | |
| 1056 | - meta: { | |
| 1057 | - title: '题库', | |
| 1058 | - icon: 'table' | |
| 1059 | - } | |
| 1060 | - }, ] | |
| 1061 | - }, | |
| 1062 | - { | |
| 1063 | - path: '/moduleIndex', | |
| 1064 | - component: Layout, | |
| 1065 | - redirect: '/module/index', | |
| 1066 | - name: 'module', | |
| 1067 | - meta: { | |
| 1068 | - title: '面试题', | |
| 1069 | - icon: 'el-icon-s-help' | |
| 1070 | - }, | |
| 1071 | - children: [{ | |
| 1072 | - path: 'recharge', | |
| 1073 | - name: 'recharge', | |
| 1074 | - component: () => | |
| 1075 | - import ('@/views/module/index'), | |
| 1076 | - meta: { | |
| 1077 | - title: '面试题', | |
| 1078 | - icon: 'el-icon-s-operation' | |
| 1079 | - } >>> | |
| 1080 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 1081 | - }, | |
| 1082 | - // 404 page must be placed at the end !!! | |
| 1083 | - { | |
| 1084 | - path: '*', | |
| 1085 | - redirect: '/404', | |
| 1086 | - hidden: true | |
| 1087 | - } | |
| 1088 | - ] | |
| 1089 | - } | |
| 332 | + // { | |
| 333 | + // path: '/example', | |
| 334 | + // component: Layout, | |
| 335 | + // redirect: '/example/table', | |
| 336 | + // name: 'Example', | |
| 337 | + // meta: { | |
| 338 | + // title: '题库管理', | |
| 339 | + // icon: 'el-icon-s-help' | |
| 340 | + // }, | |
| 341 | + // children: [{ | |
| 342 | + // path: 'QuestionBank', | |
| 343 | + // name: 'Table', | |
| 344 | + // component: () => import('@/views/QuestionBank/index'), | |
| 345 | + // meta: { | |
| 346 | + // title: '题库', | |
| 347 | + // icon: 'table' | |
| 348 | + // } | |
| 349 | + // }] | |
| 350 | + // }, | |
| 351 | + { | |
| 352 | + path: '/moduleIndex', | |
| 353 | + component: Layout, | |
| 354 | + redirect: '/module/index', | |
| 355 | + name: 'module', | |
| 356 | + meta: { | |
| 357 | + title: '练习', | |
| 358 | + icon: 'el-icon-s-help' | |
| 359 | + }, | |
| 360 | + children: [{ | |
| 361 | + path: 'recharge', | |
| 362 | + name: 'recharge', | |
| 363 | + component: () => | |
| 364 | + import ('@/views/module/index'), | |
| 365 | + meta: { | |
| 366 | + title: '练习', | |
| 367 | + icon: 'el-icon-s-operation' | |
| 368 | + } | |
| 369 | + }, | |
| 370 | + { | |
| 371 | + path: 'index', | |
| 372 | + name: 'index', | |
| 373 | + component: () => | |
| 374 | + import ('@/views/TestPaper/index'), | |
| 375 | + hidden: true, | |
| 376 | + meta: { | |
| 377 | + title: '试卷维护', | |
| 378 | + icon: 'table' | |
| 379 | + } | |
| 380 | + }, | |
| 381 | + ] | |
| 382 | + }, | |
| 383 | + { | |
| 384 | + path: '/realQuestion', | |
| 385 | + component: Layout, | |
| 386 | + redirect: '/module/realQuestion', | |
| 387 | + name: 'realQuestion', | |
| 388 | + meta: { | |
| 389 | + title: '历年真题', | |
| 390 | + icon: 'el-icon-s-help' | |
| 391 | + }, | |
| 392 | + children: [{ | |
| 393 | + path: 'recharge', | |
| 394 | + name: 'recharge', | |
| 395 | + component: () => | |
| 396 | + import ('@/views/module/realQuestion'), | |
| 397 | + meta: { | |
| 398 | + title: '历年真题', | |
| 399 | + icon: 'el-icon-s-management' | |
| 400 | + } | |
| 401 | + }] | |
| 402 | + }, | |
| 403 | + { | |
| 404 | + path: '/simulation', | |
| 405 | + component: Layout, | |
| 406 | + redirect: '/module/simulation', | |
| 407 | + name: 'module', | |
| 408 | + meta: { | |
| 409 | + title: '模拟试卷', | |
| 410 | + icon: 'el-icon-s-help' | |
| 411 | + }, | |
| 412 | + children: [{ | |
| 413 | + path: 'recharge', | |
| 414 | + name: 'recharge', | |
| 415 | + component: () => | |
| 416 | + import ('@/views/module/simulation'), | |
| 417 | + meta: { | |
| 418 | + title: '模拟试卷', | |
| 419 | + icon: 'el-icon-s-promotion' | |
| 420 | + } | |
| 421 | + }] | |
| 422 | + }, | |
| 1090 | 423 | |
| 424 | + // { | |
| 425 | + // path: '/views', | |
| 426 | + // component: Layout, | |
| 427 | + // redirect: '/views/TestPaper', | |
| 428 | + // name: 'TestPaper', | |
| 429 | + // meta: { | |
| 430 | + // title: '试卷管理', | |
| 431 | + // icon: 'el-icon-s-help' | |
| 432 | + // }, | |
| 433 | + // children: [ | |
| 434 | + // { | |
| 435 | + // path: 'TestPaperList', | |
| 436 | + // name: 'Table', | |
| 437 | + // component: () => import('@/views/TestPaper/TestPaperList'), | |
| 438 | + // meta: { | |
| 439 | + // title: '试卷列表', | |
| 440 | + // icon: 'table' | |
| 441 | + // } | |
| 442 | + // }, | |
| 443 | + // { | |
| 444 | + // path: 'index', | |
| 445 | + // name: 'index', | |
| 446 | + // component: () => import('@/views/TestPaper/index'), | |
| 447 | + // hidden: true, | |
| 448 | + // meta: { | |
| 449 | + // title: '试卷维护', | |
| 450 | + // icon: 'table' | |
| 451 | + // } | |
| 452 | + // }, | |
| 453 | + // // { | |
| 454 | + // // path: 'ManualTestPaper', | |
| 455 | + // // name: 'Table', | |
| 456 | + // // component: () => import('@/views/TestPaper/ManualTestPaper'), | |
| 457 | + // // meta: { | |
| 458 | + // // title: '组卷', | |
| 459 | + // // icon: 'table' | |
| 460 | + // // } | |
| 461 | + // // }, | |
| 462 | + | |
| 463 | + // ] | |
| 464 | + // }, | |
| 465 | + { | |
| 466 | + path: '/order', | |
| 467 | + component: Layout, | |
| 468 | + redirect: '/', | |
| 469 | + name: 'order', | |
| 470 | + meta: { | |
| 471 | + title: '订单管理', | |
| 472 | + icon: 'el-icon-s-marketing' | |
| 473 | + }, | |
| 474 | + children: [{ | |
| 475 | + path: 'recharge', | |
| 476 | + name: 'recharge', | |
| 477 | + component: () => | |
| 478 | + import ('@/views/order/rechargeList'), | |
| 479 | + meta: { | |
| 480 | + title: '充值记录', | |
| 481 | + } | |
| 482 | + }, { | |
| 483 | + path: 'shop', | |
| 484 | + name: 'shop', | |
| 485 | + component: () => | |
| 486 | + import ('@/views/order/shopList'), | |
| 487 | + meta: { | |
| 488 | + title: '购买记录', | |
| 489 | + } | |
| 490 | + }] | |
| 491 | + }, | |
| 492 | + { | |
| 493 | + path: '/user', | |
| 494 | + component: Layout, | |
| 495 | + redirect: '/', | |
| 496 | + name: 'user', | |
| 497 | + meta: { | |
| 498 | + title: '用户管理', | |
| 499 | + icon: 'el-icon-s-help' | |
| 500 | + }, | |
| 501 | + children: [{ | |
| 502 | + path: 'user', | |
| 503 | + name: 'User', | |
| 504 | + component: () => | |
| 505 | + import ('@/views/user/userlist'), | |
| 506 | + meta: { | |
| 507 | + title: '普通用户列表', | |
| 508 | + } | |
| 509 | + }, | |
| 1091 | 510 | |
| 1092 | - function hasPermission(permissions, route) { | |
| 1093 | - if (route.meta && route.meta.permissions) { | |
| 1094 | - return permissions.some((role) => route.meta.permissions.includes(role)); | |
| 1095 | - } else { | |
| 1096 | - return true; | |
| 1097 | - } | |
| 1098 | - } | |
| 1099 | 511 | |
| 512 | + ] | |
| 513 | + }, { | |
| 514 | + path: '/password', | |
| 515 | + component: Layout, | |
| 516 | + redirect: '/', | |
| 517 | + name: 'password', | |
| 518 | + meta: { | |
| 519 | + title: '系统管理', | |
| 520 | + icon: 'el-icon-s-platform' | |
| 521 | + }, | |
| 522 | + children: [{ | |
| 523 | + path: 'index', | |
| 524 | + name: 'index', | |
| 525 | + component: () => | |
| 526 | + import ('@/views/password/index'), | |
| 527 | + meta: { | |
| 528 | + title: '忘记密码', | |
| 529 | + } | |
| 530 | + }, { | |
| 531 | + path: 'TestPaperClass', | |
| 532 | + name: 'Table', | |
| 533 | + component: () => | |
| 534 | + import ('@/views/TestPaper/TestPaperClass'), | |
| 535 | + meta: { | |
| 536 | + title: '分类管理', | |
| 537 | + } | |
| 538 | + }, { | |
| 539 | + path: 'carousel', | |
| 540 | + name: 'carousel', | |
| 541 | + component: () => | |
| 542 | + import ('@/views/carousel/index'), | |
| 543 | + meta: { | |
| 544 | + title: '轮播图', | |
| 545 | + } | |
| 546 | + }, { | |
| 547 | + path: 'new', | |
| 548 | + name: 'new', | |
| 549 | + component: () => | |
| 550 | + import ('@/views/carousel/new'), | |
| 551 | + meta: { | |
| 552 | + title: '最新资讯', | |
| 553 | + } | |
| 554 | + }] | |
| 555 | + }, | |
| 556 | + // 404 page must be placed at the end !!! | |
| 557 | + { | |
| 558 | + path: '*', | |
| 559 | + redirect: '/404', | |
| 560 | + hidden: true | |
| 561 | + } | |
| 562 | + ] | |
| 563 | + } | |
| 1100 | 564 | |
| 1101 | - function filterAsyncRoutes(routes, permissions) { | |
| 1102 | - const finallyRoutes = []; | |
| 1103 | - routes.forEach((route) => { << | |
| 1104 | - << << < HEAD | |
| 1105 | - const item = {...route }; | |
| 1106 | - if (hasPermission(permissions, item)) { === | |
| 1107 | - === = | |
| 1108 | - const item = {...route }; | |
| 1109 | - // if (hasPermission(permissions, item)) { | |
| 1110 | - if (permissions.includes(item.code) || !item.code) { >>> | |
| 1111 | - >>> > b32564ca8a1d0ef59530817c619131f5ed8d1d74 | |
| 1112 | - if (item.children) { | |
| 1113 | - item.children = filterAsyncRoutes(item.children, permissions); | |
| 1114 | - } | |
| 1115 | - finallyRoutes.push(item); | |
| 1116 | - } | |
| 1117 | - }); | |
| 1118 | - return finallyRoutes; | |
| 1119 | - } | |
| 1120 | - constantRoutes1 = filterAsyncRoutes(constantRoutes1, permissions); | |
| 1121 | 565 | |
| 1122 | - return constantRoutes1; | |
| 1123 | - } | |
| 1124 | 566 | \ No newline at end of file |
| 567 | + return constantRoutes1; | |
| 568 | +} | |
| 1125 | 569 | \ No newline at end of file | ... | ... |