Commit e0ca3a6eb601593c5352877963bd825749382309

Authored by yangzhi
1 parent c6f93530

大家快来看 王哥在看琅琊榜

src/utils/routerList.js
1 1 import Layout from '@/layout'
2   -import {getInfo} from '../store/modules/user.js'
  2 +import { getInfo } from '../store/modules/user.js'
3 3  
4 4  
5 5 export function getRoutes() {
6 6  
7   - let userInfo ={}
8   - if (localStorage.userinfo) {
9   - userInfo = JSON.parse(localStorage.userinfo)
10   - }
11   - console.log(userInfo)
12   - let constantRoutes1 = []
13   - if(userInfo.UserId==1){
14   - constantRoutes1 = [{
15   - path: '/login',
16   - component: () => import('@/views/login/index'),
17   - hidden: true
18   - },
19   -
20   - {
21   - path: '/404',
22   - component: () => import('@/views/404'),
23   - hidden: true
24   - },
25   -
26   - {
27   - path: '/',
28   - component: Layout,
29   - redirect: '/dashboard',
30   - children: [{
31   - path: 'dashboard',
32   - name: '首页',
33   - component: () => import('@/views/dashboard/index'),
34   - meta: {
35   - title: '首页',
36   - icon: 'dashboard'
37   - }
38   - }]
39   - },
  7 + let userInfo = {}
  8 + if (localStorage.userinfo) {
  9 + userInfo = JSON.parse(localStorage.userinfo)
  10 + }
  11 + console.log(userInfo)
  12 + let constantRoutes1 = []
  13 + if (userInfo.UserId == 1) {
  14 + constantRoutes1 = [{
  15 + path: '/login',
  16 + component: () =>
  17 + import ('@/views/login/index'),
  18 + hidden: true
  19 + },
40 20  
41   - // {
42   - // path: '/example',
43   - // component: Layout,
44   - // redirect: '/example/table',
45   - // name: 'Example',
46   - // meta: {
47   - // title: '题库管理',
48   - // icon: 'el-icon-s-help'
49   - // },
50   - // children: [{
51   - // path: 'QuestionBank',
52   - // name: 'Table',
53   - // component: () => import('@/views/QuestionBank/index'),
54   - // meta: {
55   - // title: '题库',
56   - // icon: 'table'
57   - // }
58   - // }]
59   - // },
60   - {
61   - path: '/moduleIndex',
62   - component: Layout,
63   - redirect: '/module/index',
64   - name: 'module',
65   - meta: {
66   - title: '练习',
67   - icon: 'el-icon-s-help'
68   - },
69   - children: [{
70   - path: 'recharge',
71   - name: 'recharge',
72   - component: () => import('@/views/module/index'),
73   - meta: {
74   - title: '章节练习',
75   - icon: 'el-icon-s-operation'
76   - }
  21 + {
  22 + path: '/404',
  23 + component: () =>
  24 + import ('@/views/404'),
  25 + hidden: true
77 26 },
  27 +
78 28 {
79   - path: 'index',
80   - name: 'index',
81   - component: () => import('@/views/TestPaper/index'),
82   - hidden: true,
83   - meta: {
84   - title: '试卷维护',
85   - icon: 'table'
86   - }
  29 + path: '/',
  30 + component: Layout,
  31 + redirect: '/dashboard',
  32 + children: [{
  33 + path: 'dashboard',
  34 + name: '首页',
  35 + component: () =>
  36 + import ('@/views/dashboard/index'),
  37 + meta: {
  38 + title: '首页',
  39 + icon: 'dashboard'
  40 + }
  41 + }]
87 42 },
88   - ]
89   - },
90   - {
91   - path: '/realQuestion',
92   - component: Layout,
93   - redirect: '/module/realQuestion',
94   - name: 'realQuestion',
95   - meta: {
96   - title: '历年真题',
97   - icon: 'el-icon-s-help'
98   - },
99   - children: [{
100   - path: 'recharge',
101   - name: 'recharge',
102   - component: () => import('@/views/module/realQuestion'),
103   - meta: {
104   - title: '历年真题',
105   - icon: 'el-icon-s-management'
106   - }
107   - }]
108   - },
109   - {
110   - path: '/simulation',
111   - component: Layout,
112   - redirect: '/module/simulation',
113   - name: 'module',
114   - meta: {
115   - title: '模拟试卷',
116   - icon: 'el-icon-s-help'
117   - },
118   - children: [{
119   - path: 'recharge',
120   - name: 'recharge',
121   - component: () => import('@/views/module/simulation'),
122   - meta: {
123   - title: '模拟试卷',
124   - icon: 'el-icon-s-promotion'
125   - }
126   - }]
127   - },
128 43  
129   - {
130   - path: '/views',
131   - component: Layout,
132   - redirect: '/views/TestPaper',
133   - name: 'TestPaper',
134   - meta: {
135   - title: '试卷管理',
136   - icon: 'el-icon-s-help'
137   - },
138   - children: [
  44 + // {
  45 + // path: '/example',
  46 + // component: Layout,
  47 + // redirect: '/example/table',
  48 + // name: 'Example',
  49 + // meta: {
  50 + // title: '题库管理',
  51 + // icon: 'el-icon-s-help'
  52 + // },
  53 + // children: [{
  54 + // path: 'QuestionBank',
  55 + // name: 'Table',
  56 + // component: () => import('@/views/QuestionBank/index'),
  57 + // meta: {
  58 + // title: '题库',
  59 + // icon: 'table'
  60 + // }
  61 + // }]
  62 + // },
  63 + // {
  64 + // path: '/moduleIndex',
  65 + // component: Layout,
  66 + // redirect: '/module/index',
  67 + // name: 'module',
  68 + // meta: {
  69 + // title: '面试题',
  70 + // icon: 'el-icon-s-help'
  71 + // },
  72 + // children: [{
  73 + // path: 'index',
  74 + // name: 'index',
  75 + // component: () =>
  76 + // import ('@/views/TestPaper/index'),
  77 + // hidden: true,
  78 + // meta: {
  79 + // title: '试卷维护',
  80 + // icon: 'table'
  81 + // }
  82 + // }, ]
  83 + // },
  84 + // {
  85 + // path: '/realQuestion',
  86 + // component: Layout,
  87 + // redirect: '/module/realQuestion',
  88 + // name: 'realQuestion',
  89 + // meta: {
  90 + // title: '历年真题',
  91 + // icon: 'el-icon-s-help'
  92 + // },
  93 + // children: [{
  94 + // path: 'recharge',
  95 + // name: 'recharge',
  96 + // component: () =>
  97 + // import ('@/views/module/realQuestion'),
  98 + // meta: {
  99 + // title: '历年真题',
  100 + // icon: 'el-icon-s-management'
  101 + // }
  102 + // }]
  103 + // },
  104 +
139 105 {
140   - path: 'TestPaperList',
141   - name: 'Table',
142   - component: () => import('@/views/TestPaper/TestPaperList'),
143   - meta: {
144   - title: '试卷列表',
145   - icon: 'table'
146   - }
147   - },
148   - {
149   - path: 'index',
150   - name: 'index',
151   - component: () => import('@/views/TestPaper/index'),
152   - hidden: true,
153   - meta: {
154   - title: '试卷维护',
155   - icon: 'table'
156   - }
157   - },
158   - {
159   - path: 'ManualTestPaper',
160   - name: 'Table',
161   - component: () => import('@/views/TestPaper/ManualTestPaper'),
162   - meta: {
163   - title: '组卷',
164   - icon: 'table'
165   - }
166   - },
  106 + path: '/views',
  107 + component: Layout,
  108 + redirect: '/views/TestPaper',
  109 + name: 'TestPaper',
  110 + meta: {
  111 + title: '试卷管理',
  112 + icon: 'el-icon-s-help'
  113 + },
  114 + children: [{
  115 + path: 'TestPaperList',
  116 + name: 'Table',
  117 + component: () =>
  118 + import ('@/views/TestPaper/TestPaperList'),
  119 + meta: {
  120 + title: '试卷列表',
  121 + icon: 'table'
  122 + }
  123 + },
  124 + {
  125 + path: 'index',
  126 + name: 'index',
  127 + component: () =>
  128 + import ('@/views/TestPaper/index'),
  129 + hidden: true,
  130 + meta: {
  131 + title: '试卷维护',
  132 + icon: 'table'
  133 + }
  134 + },
  135 + {
  136 + path: 'ManualTestPaper',
  137 + name: 'Table',
  138 + component: () =>
  139 + import ('@/views/TestPaper/ManualTestPaper'),
  140 + meta: {
  141 + title: '组卷',
  142 + icon: 'table'
  143 + }
  144 + },
167 145  
168   - ]
169   - },
170   - {
171   - path: '/order',
172   - component: Layout,
173   - redirect: '/',
174   - name: 'order',
175   - meta: {
176   - title: '订单管理',
177   - icon: 'el-icon-s-marketing'
178   - },
179   - children: [{
180   - path: 'recharge',
181   - name: 'recharge',
182   - component: () => import('@/views/order/rechargeList'),
183   - meta: {
184   - title: '充值记录',
185   - }
186   - }, {
187   - path: 'shop',
188   - name: 'shop',
189   - component: () => import('@/views/order/shopList'),
190   - meta: {
191   - title: '购买记录',
192   - }
193   - }]
194   - },
195   - {
196   - path: '/user',
197   - component: Layout,
198   - redirect: '/',
199   - name: 'user',
200   - meta: {
201   - title: '用户管理',
202   - icon: 'el-icon-s-help'
203   - },
204   - children: [{
205   - path: 'user',
206   - name: 'User',
207   - component: () => import('@/views/user/userlist'),
208   - meta: {
209   - title: '普通用户列表',
210   - }
  146 + ]
211 147 },
212 148 {
213   - path: 'admin',
214   - name: 'admin',
215   -
216   - component: () => import('@/views/user/adminList'),
217   - meta: {
218   - title: '管理员列表',
219   - }
  149 + path: '/order',
  150 + component: Layout,
  151 + redirect: '/',
  152 + name: 'order',
  153 + meta: {
  154 + title: '订单管理',
  155 + icon: 'el-icon-s-marketing'
  156 + },
  157 + children: [{
  158 + path: 'recharge',
  159 + name: 'recharge',
  160 + component: () =>
  161 + import ('@/views/order/rechargeList'),
  162 + meta: {
  163 + title: '充值记录',
  164 + }
  165 + }, {
  166 + path: 'shop',
  167 + name: 'shop',
  168 + component: () =>
  169 + import ('@/views/order/shopList'),
  170 + meta: {
  171 + title: '购买记录',
  172 + }
  173 + }]
220 174 },
  175 + {
  176 + path: '/user',
  177 + component: Layout,
  178 + redirect: '/',
  179 + name: 'user',
  180 + meta: {
  181 + title: '用户管理',
  182 + icon: 'el-icon-s-help'
  183 + },
  184 + children: [{
  185 + path: 'user',
  186 + name: 'User',
  187 + component: () =>
  188 + import ('@/views/user/userlist'),
  189 + meta: {
  190 + title: '普通用户列表',
  191 + }
  192 + },
  193 + {
  194 + path: 'admin',
  195 + name: 'admin',
221 196  
222   - ]
223   - }, {
224   - path: '/password',
225   - component: Layout,
226   - redirect: '/',
227   - name: 'password',
228   - meta: {
229   - title: '系统管理',
230   - icon: 'el-icon-s-platform'
231   - },
232   - children: [{
233   - path: 'index',
234   - name: 'index',
235   - component: () => import('@/views/password/index'),
236   - meta: {
237   - title: '忘记密码',
238   - }
239   - }, {
240   - path: 'TestPaperClass',
241   - name: 'Table',
242   - component: () => import('@/views/TestPaper/TestPaperClass'),
243   - meta: {
244   - title: '分类管理',
245   - }
246   - }, {
247   - path: 'carousel',
248   - name: 'carousel',
249   - component: () => import('@/views/carousel/index'),
250   - meta: {
251   - title: '轮播图',
252   - }
253   - }, {
254   - path: 'new',
255   - name: 'new',
256   - component: () => import('@/views/carousel/new'),
257   - meta: {
258   - title: '最新资讯',
259   - }
260   - }]
261   - },
262   - // 404 page must be placed at the end !!!
263   - {
264   - path: '*',
265   - redirect: '/404',
266   - hidden: true
267   - }
268   - ]
269   - }else {
270   - constantRoutes1 = [{
271   - path: '/login',
272   - component: () => import('@/views/login/index'),
273   - hidden: true
274   - },
275   -
276   - {
277   - path: '/404',
278   - component: () => import('@/views/404'),
279   - hidden: true
280   - },
  197 + component: () =>
  198 + import ('@/views/user/adminList'),
  199 + meta: {
  200 + title: '管理员列表',
  201 + }
  202 + },
281 203  
282   - {
283   - path: '/',
284   - component: Layout,
285   - redirect: '/dashboard',
286   - children: [{
287   - path: 'dashboard',
288   - name: '首页',
289   - component: () => import('@/views/dashboard/index'),
290   - meta: {
291   - title: '首页',
292   - icon: 'dashboard'
  204 + ]
  205 + }, {
  206 + path: '/password',
  207 + component: Layout,
  208 + redirect: '/',
  209 + name: 'password',
  210 + meta: {
  211 + title: '系统管理',
  212 + icon: 'el-icon-s-platform'
  213 + },
  214 + children: [{
  215 + path: 'index',
  216 + name: 'index',
  217 + component: () =>
  218 + import ('@/views/password/index'),
  219 + meta: {
  220 + title: '忘记密码',
  221 + }
  222 + }, {
  223 + path: 'TestPaperClass',
  224 + name: 'Table',
  225 + component: () =>
  226 + import ('@/views/TestPaper/TestPaperClass'),
  227 + meta: {
  228 + title: '分类管理',
  229 + }
  230 + }, {
  231 + path: 'carousel',
  232 + name: 'carousel',
  233 + component: () =>
  234 + import ('@/views/carousel/index'),
  235 + meta: {
  236 + title: '轮播图',
  237 + }
  238 + }, {
  239 + path: 'new',
  240 + name: 'new',
  241 + component: () =>
  242 + import ('@/views/carousel/new'),
  243 + meta: {
  244 + title: '最新资讯',
  245 + }
  246 + }]
  247 + },
  248 + // 404 page must be placed at the end !!!
  249 + {
  250 + path: '*',
  251 + redirect: '/404',
  252 + hidden: true
293 253 }
294   - }]
295   - },
  254 + ]
  255 + } else {
  256 + constantRoutes1 = [{
  257 + path: '/login',
  258 + component: () =>
  259 + import ('@/views/login/index'),
  260 + hidden: true
  261 + },
296 262  
297   - // {
298   - // path: '/example',
299   - // component: Layout,
300   - // redirect: '/example/table',
301   - // name: 'Example',
302   - // meta: {
303   - // title: '题库管理',
304   - // icon: 'el-icon-s-help'
305   - // },
306   - // children: [{
307   - // path: 'QuestionBank',
308   - // name: 'Table',
309   - // component: () => import('@/views/QuestionBank/index'),
310   - // meta: {
311   - // title: '题库',
312   - // icon: 'table'
313   - // }
314   - // }]
315   - // },
316   - {
317   - path: '/moduleIndex',
318   - component: Layout,
319   - redirect: '/module/index',
320   - name: 'module',
321   - meta: {
322   - title: '练习',
323   - icon: 'el-icon-s-help'
324   - },
325   - children: [{
326   - path: 'recharge',
327   - name: 'recharge',
328   - component: () => import('@/views/module/index'),
329   - meta: {
330   - title: '练习',
331   - icon: 'el-icon-s-operation'
332   - }
  263 + {
  264 + path: '/404',
  265 + component: () =>
  266 + import ('@/views/404'),
  267 + hidden: true
333 268 },
  269 +
334 270 {
335   - path: 'index',
336   - name: 'index',
337   - component: () => import('@/views/TestPaper/index'),
338   - hidden: true,
339   - meta: {
340   - title: '试卷维护',
341   - icon: 'table'
342   - }
  271 + path: '/',
  272 + component: Layout,
  273 + redirect: '/dashboard',
  274 + children: [{
  275 + path: 'dashboard',
  276 + name: '首页',
  277 + component: () =>
  278 + import ('@/views/dashboard/index'),
  279 + meta: {
  280 + title: '首页',
  281 + icon: 'dashboard'
  282 + }
  283 + }]
343 284 },
344   - ]
345   - },
346   - {
347   - path: '/realQuestion',
348   - component: Layout,
349   - redirect: '/module/realQuestion',
350   - name: 'realQuestion',
351   - meta: {
352   - title: '历年真题',
353   - icon: 'el-icon-s-help'
354   - },
355   - children: [{
356   - path: 'recharge',
357   - name: 'recharge',
358   - component: () => import('@/views/module/realQuestion'),
359   - meta: {
360   - title: '历年真题',
361   - icon: 'el-icon-s-management'
362   - }
363   - }]
364   - },
365   - {
366   - path: '/simulation',
367   - component: Layout,
368   - redirect: '/module/simulation',
369   - name: 'module',
370   - meta: {
371   - title: '模拟试卷',
372   - icon: 'el-icon-s-help'
373   - },
374   - children: [{
375   - path: 'recharge',
376   - name: 'recharge',
377   - component: () => import('@/views/module/simulation'),
378   - meta: {
379   - title: '模拟试卷',
380   - icon: 'el-icon-s-promotion'
381   - }
382   - }]
383   - },
384 285  
385   - // {
386   - // path: '/views',
387   - // component: Layout,
388   - // redirect: '/views/TestPaper',
389   - // name: 'TestPaper',
390   - // meta: {
391   - // title: '试卷管理',
392   - // icon: 'el-icon-s-help'
393   - // },
394   - // children: [
395   - // {
396   - // path: 'TestPaperList',
397   - // name: 'Table',
398   - // component: () => import('@/views/TestPaper/TestPaperList'),
399   - // meta: {
400   - // title: '试卷列表',
401   - // icon: 'table'
402   - // }
403   - // },
404   - // {
405   - // path: 'index',
406   - // name: 'index',
407   - // component: () => import('@/views/TestPaper/index'),
408   - // hidden: true,
409   - // meta: {
410   - // title: '试卷维护',
411   - // icon: 'table'
412   - // }
413   - // },
414   - // // {
415   - // // path: 'ManualTestPaper',
416   - // // name: 'Table',
417   - // // component: () => import('@/views/TestPaper/ManualTestPaper'),
418   - // // meta: {
419   - // // title: '组卷',
420   - // // icon: 'table'
421   - // // }
422   - // // },
  286 + // {
  287 + // path: '/example',
  288 + // component: Layout,
  289 + // redirect: '/example/table',
  290 + // name: 'Example',
  291 + // meta: {
  292 + // title: '题库管理',
  293 + // icon: 'el-icon-s-help'
  294 + // },
  295 + // children: [{
  296 + // path: 'QuestionBank',
  297 + // name: 'Table',
  298 + // component: () => import('@/views/QuestionBank/index'),
  299 + // meta: {
  300 + // title: '题库',
  301 + // icon: 'table'
  302 + // }
  303 + // }]
  304 + // },
  305 + {
  306 + path: '/moduleIndex',
  307 + component: Layout,
  308 + redirect: '/module/index',
  309 + name: 'module',
  310 + meta: {
  311 + title: '面试题',
  312 + icon: 'el-icon-s-help'
  313 + },
  314 + children: [{
  315 + path: 'recharge',
  316 + name: 'recharge',
  317 + component: () =>
  318 + import ('@/views/module/index'),
  319 + meta: {
  320 + title: '面试题',
  321 + icon: 'el-icon-s-operation'
  322 + }
  323 + },
  324 + {
  325 + path: 'index',
  326 + name: 'index',
  327 + component: () =>
  328 + import ('@/views/TestPaper/index'),
  329 + hidden: true,
  330 + meta: {
  331 + title: '试卷维护',
  332 + icon: 'table'
  333 + }
  334 + },
  335 + ]
  336 + },
  337 + // {
  338 + // path: '/realQuestion',
  339 + // component: Layout,
  340 + // redirect: '/module/realQuestion',
  341 + // name: 'realQuestion',
  342 + // meta: {
  343 + // title: '历年真题',
  344 + // icon: 'el-icon-s-help'
  345 + // },
  346 + // children: [{
  347 + // path: 'recharge',
  348 + // name: 'recharge',
  349 + // component: () =>
  350 + // import ('@/views/module/realQuestion'),
  351 + // meta: {
  352 + // title: '历年真题',
  353 + // icon: 'el-icon-s-management'
  354 + // }
  355 + // }]
  356 + // },
  357 +
  358 + // {
  359 + // path: '/views',
  360 + // component: Layout,
  361 + // redirect: '/views/TestPaper',
  362 + // name: 'TestPaper',
  363 + // meta: {
  364 + // title: '试卷管理',
  365 + // icon: 'el-icon-s-help'
  366 + // },
  367 + // children: [
  368 + // {
  369 + // path: 'TestPaperList',
  370 + // name: 'Table',
  371 + // component: () => import('@/views/TestPaper/TestPaperList'),
  372 + // meta: {
  373 + // title: '试卷列表',
  374 + // icon: 'table'
  375 + // }
  376 + // },
  377 + // {
  378 + // path: 'index',
  379 + // name: 'index',
  380 + // component: () => import('@/views/TestPaper/index'),
  381 + // hidden: true,
  382 + // meta: {
  383 + // title: '试卷维护',
  384 + // icon: 'table'
  385 + // }
  386 + // },
  387 + // // {
  388 + // // path: 'ManualTestPaper',
  389 + // // name: 'Table',
  390 + // // component: () => import('@/views/TestPaper/ManualTestPaper'),
  391 + // // meta: {
  392 + // // title: '组卷',
  393 + // // icon: 'table'
  394 + // // }
  395 + // // },
423 396  
424   - // ]
425   - // },
426   - {
427   - path: '/order',
428   - component: Layout,
429   - redirect: '/',
430   - name: 'order',
431   - meta: {
432   - title: '订单管理',
433   - icon: 'el-icon-s-marketing'
434   - },
435   - children: [{
436   - path: 'recharge',
437   - name: 'recharge',
438   - component: () => import('@/views/order/rechargeList'),
439   - meta: {
440   - title: '充值记录',
441   - }
442   - }, {
443   - path: 'shop',
444   - name: 'shop',
445   - component: () => import('@/views/order/shopList'),
446   - meta: {
447   - title: '购买记录',
448   - }
449   - }]
450   - },
451   - {
452   - path: '/user',
453   - component: Layout,
454   - redirect: '/',
455   - name: 'user',
456   - meta: {
457   - title: '用户管理',
458   - icon: 'el-icon-s-help'
459   - },
460   - children: [{
461   - path: 'user',
462   - name: 'User',
463   - component: () => import('@/views/user/userlist'),
464   - meta: {
465   - title: '普通用户列表',
466   - }
  397 + // ]
  398 + // },
  399 + {
  400 + path: '/order',
  401 + component: Layout,
  402 + redirect: '/',
  403 + name: 'order',
  404 + meta: {
  405 + title: '订单管理',
  406 + icon: 'el-icon-s-marketing'
  407 + },
  408 + children: [{
  409 + path: 'recharge',
  410 + name: 'recharge',
  411 + component: () =>
  412 + import ('@/views/order/rechargeList'),
  413 + meta: {
  414 + title: '充值记录',
  415 + }
  416 + }, {
  417 + path: 'shop',
  418 + name: 'shop',
  419 + component: () =>
  420 + import ('@/views/order/shopList'),
  421 + meta: {
  422 + title: '购买记录',
  423 + }
  424 + }]
467 425 },
  426 + {
  427 + path: '/user',
  428 + component: Layout,
  429 + redirect: '/',
  430 + name: 'user',
  431 + meta: {
  432 + title: '用户管理',
  433 + icon: 'el-icon-s-help'
  434 + },
  435 + children: [{
  436 + path: 'user',
  437 + name: 'User',
  438 + component: () =>
  439 + import ('@/views/user/userlist'),
  440 + meta: {
  441 + title: '普通用户列表',
  442 + }
  443 + },
468 444  
469 445  
470   - ]
471   - }, {
472   - path: '/password',
473   - component: Layout,
474   - redirect: '/',
475   - name: 'password',
476   - meta: {
477   - title: '系统管理',
478   - icon: 'el-icon-s-platform'
479   - },
480   - children: [{
481   - path: 'index',
482   - name: 'index',
483   - component: () => import('@/views/password/index'),
484   - meta: {
485   - title: '忘记密码',
486   - }
487   - }, {
488   - path: 'TestPaperClass',
489   - name: 'Table',
490   - component: () => import('@/views/TestPaper/TestPaperClass'),
491   - meta: {
492   - title: '分类管理',
493   - }
494   - }, {
495   - path: 'carousel',
496   - name: 'carousel',
497   - component: () => import('@/views/carousel/index'),
498   - meta: {
499   - title: '轮播图',
500   - }
501   - }, {
502   - path: 'new',
503   - name: 'new',
504   - component: () => import('@/views/carousel/new'),
505   - meta: {
506   - title: '最新资讯',
  446 + ]
  447 + }, {
  448 + path: '/password',
  449 + component: Layout,
  450 + redirect: '/',
  451 + name: 'password',
  452 + meta: {
  453 + title: '系统管理',
  454 + icon: 'el-icon-s-platform'
  455 + },
  456 + children: [{
  457 + path: 'index',
  458 + name: 'index',
  459 + component: () =>
  460 + import ('@/views/password/index'),
  461 + meta: {
  462 + title: '忘记密码',
  463 + }
  464 + }, {
  465 + path: 'TestPaperClass',
  466 + name: 'Table',
  467 + component: () =>
  468 + import ('@/views/TestPaper/TestPaperClass'),
  469 + meta: {
  470 + title: '分类管理',
  471 + }
  472 + }, {
  473 + path: 'carousel',
  474 + name: 'carousel',
  475 + component: () =>
  476 + import ('@/views/carousel/index'),
  477 + meta: {
  478 + title: '轮播图',
  479 + }
  480 + }, {
  481 + path: 'new',
  482 + name: 'new',
  483 + component: () =>
  484 + import ('@/views/carousel/new'),
  485 + meta: {
  486 + title: '最新资讯',
  487 + }
  488 + }]
  489 + },
  490 + // 404 page must be placed at the end !!!
  491 + {
  492 + path: '*',
  493 + redirect: '/404',
  494 + hidden: true
507 495 }
508   - }]
509   - },
510   - // 404 page must be placed at the end !!!
511   - {
512   - path: '*',
513   - redirect: '/404',
514   - hidden: true
515   - }
516   - ]
517   - }
  496 + ]
  497 + }
518 498  
519 499  
520   - return constantRoutes1;
521   -}
  500 + return constantRoutes1;
  501 +}
522 502 \ No newline at end of file
... ...
src/views/TestPaper/TestPaperList.vue
... ... @@ -97,9 +97,7 @@
97 97 </el-form-item>
98 98 <el-form-item label="板块分类" class="el-form-item-custom">
99 99 <el-select v-model="TestPaper.PlateClass" placeholder="请选择板块分类">
100   - <el-option label="章节练习" value="1"></el-option>
101   - <el-option label="历年真题" value="2"></el-option>
102   - <el-option label="模拟试卷" value="3"></el-option>
  100 + <el-option label="面试题" value="4"></el-option>
103 101 </el-select>
104 102 </el-form-item>
105 103 <el-form-item label="试卷原价:" prop="OriginalPrice" v-show="false">
... ... @@ -165,7 +163,7 @@
165 163 QuestionClass: [],
166 164 TestPaper: {
167 165 TestPaperTitle: "",
168   - PlateClass: "",
  166 + PlateClass: 4,
169 167 TestPaperClassId: 0,
170 168 TotalScore: 0,
171 169 Describe: "",
... ... @@ -224,7 +222,7 @@
224 222 this.dialogAddTestPaperVIsible = false
225 223 this.TestPaper= {
226 224 TestPaperTitle: "",
227   - PlateClass: "",
  225 + PlateClass: "4",
228 226 TestPaperClassId: 0,
229 227 TotalScore: 0,
230 228 Describe: "",
... ...
src/views/module/index.vue
... ... @@ -99,9 +99,7 @@
99 99 </el-form-item>
100 100 <el-form-item label="板块分类" class="el-form-item-custom">
101 101 <el-select v-model="TestPaper.PlateClass" :disabled="true" placeholder="请选择板块分类">
102   - <el-option label="章节练习" value="1"></el-option>
103   - <el-option label="历年真题" value="2"></el-option>
104   - <el-option label="模拟试卷" value="3"></el-option>
  102 + <el-option label="面试题" value="4"></el-option>
105 103 </el-select>
106 104 </el-form-item>
107 105 <el-form-item label="试卷原价:" prop="OriginalPrice" v-show="false">
... ... @@ -159,7 +157,7 @@
159 157 parameter: {
160 158 pageIndex: 1,
161 159 pageSize: 12,
162   - PlateClass: 1,
  160 + PlateClass: 4,
163 161 QuestionClassId: 0,
164 162 },
165 163 Count: 0,
... ... @@ -169,7 +167,7 @@
169 167 QuestionClass: [],
170 168 TestPaper: {
171 169 TestPaperTitle: "",
172   - PlateClass: "1",
  170 + PlateClass: "4",
173 171 TestPaperClassId: 0,
174 172 TotalScore: 0,
175 173 Describe: "",
... ... @@ -233,7 +231,7 @@
233 231 this.getTestPaperListHeadler();
234 232 this.TestPaper = {
235 233 TestPaperTitle: "",
236   - PlateClass: "1",
  234 + PlateClass: "4",
237 235 TestPaperClassId: 0,
238 236 TotalScore: 0,
239 237 Describe: "",
... ... @@ -334,7 +332,7 @@
334 332 this.dialogAddTestPaperVIsible = true
335 333 this.TestPaper = val
336 334 // this.TestPaper.PresentPrice = this.TestPaper.PresentPrice * 0.01
337   - this.TestPaper.PlateClass = '1'
  335 + this.TestPaper.PlateClass = '4'
338 336 } else if (value == 'del') {
339 337 this.$confirm('确定删除该卷子?', '消息', {
340 338 confirmButtonText: '确认',
... ...
src/views/module/realQuestion.vue
... ... @@ -103,9 +103,7 @@
103 103 </el-form-item>
104 104 <el-form-item label="板块分类" class="el-form-item-custom">
105 105 <el-select v-model="TestPaper.PlateClass" :disabled="true" placeholder="请选择板块分类">
106   - <el-option label="章节练习" value="1"></el-option>
107   - <el-option label="历年真题" value="2"></el-option>
108   - <el-option label="模拟试卷" value="3"></el-option>
  106 + <el-option label="面试题" value="4"></el-option>
109 107 </el-select>
110 108 </el-form-item>
111 109 <el-form-item label="试卷原价:" prop="OriginalPrice" v-show="false">
... ... @@ -163,7 +161,7 @@
163 161 parameter: {
164 162 pageIndex: 1,
165 163 pageSize: 12,
166   - PlateClass: 2,
  164 + PlateClass: 4,
167 165 QuestionClassId: 0,
168 166 },
169 167 Count: 0,
... ... @@ -173,7 +171,7 @@
173 171 QuestionClass: [],
174 172 TestPaper: {
175 173 TestPaperTitle: "",
176   - PlateClass: "2",
  174 + PlateClass: "4",
177 175 TestPaperClassId: 0,
178 176 TotalScore: 0,
179 177 Describe: "",
... ... @@ -237,7 +235,7 @@
237 235 this.getTestPaperListHeadler();
238 236 this.TestPaper = {
239 237 TestPaperTitle: "",
240   - PlateClass: "2",
  238 + PlateClass: "4",
241 239 TestPaperClassId: 0,
242 240 TotalScore: 0,
243 241 Describe: "",
... ... @@ -333,7 +331,7 @@
333 331 this.dialogAddTestPaperVIsible = true
334 332 this.TestPaper = val
335 333 // this.TestPaper.PresentPrice=this.TestPaper.PresentPrice*0.01
336   - this.TestPaper.PlateClass='2'
  334 + this.TestPaper.PlateClass='4'
337 335 } else if (value == 'del') {
338 336 this.$confirm('确定删除该卷子?', '消息', {
339 337 confirmButtonText: '确认',
... ...
src/views/module/simulation.vue
... ... @@ -103,9 +103,7 @@
103 103 </el-form-item>
104 104 <el-form-item label="板块分类" class="el-form-item-custom">
105 105 <el-select v-model="TestPaper.PlateClass" :disabled="true" placeholder="请选择板块分类">
106   - <el-option label="章节练习" value="1"></el-option>
107   - <el-option label="历年真题" value="2"></el-option>
108   - <el-option label="模拟试卷" value="3"></el-option>
  106 + <el-option label="面试题" value="4"></el-option>
109 107 </el-select>
110 108 </el-form-item>
111 109 <el-form-item label="试卷原价:" prop="OriginalPrice" v-show="false">
... ... @@ -163,7 +161,7 @@
163 161 parameter: {
164 162 pageIndex: 1,
165 163 pageSize: 12,
166   - PlateClass: 3,
  164 + PlateClass: 4,
167 165 QuestionClassId: 0,
168 166 },
169 167 Count: 0,
... ... @@ -173,7 +171,7 @@
173 171 QuestionClass: [],
174 172 TestPaper: {
175 173 TestPaperTitle: "",
176   - PlateClass: "3",
  174 + PlateClass: "4",
177 175 TestPaperClassId: 0,
178 176 TotalScore: 0,
179 177 Describe: "",
... ... @@ -237,7 +235,7 @@
237 235 this.getTestPaperListHeadler();
238 236 this.TestPaper= {
239 237 TestPaperTitle: "",
240   - PlateClass: "3",
  238 + PlateClass: "4",
241 239 TestPaperClassId: 0,
242 240 TotalScore: 0,
243 241 Describe: "",
... ... @@ -334,7 +332,7 @@
334 332 this.dialogAddTestPaperVIsible = true
335 333 this.TestPaper = val
336 334 // this.TestPaper.PresentPrice=this.TestPaper.PresentPrice*0.01
337   - this.TestPaper.PlateClass='3'
  335 + this.TestPaper.PlateClass='4'
338 336 }else if (value == 'del') {
339 337 this.$confirm('确定删除该卷子?', '消息', {
340 338 confirmButtonText: '确认',
... ...