menu.mock.ts 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927
  1. import { defineMock } from './base'
  2. export default defineMock([
  3. {
  4. url: 'menus/routes',
  5. method: ['GET'],
  6. body: {
  7. code: '200',
  8. data: [
  9. {
  10. path: '/myTest',
  11. component: 'Layout',
  12. redirect: '/myTest/test',
  13. name: 'MyTest',
  14. meta: {
  15. title: '我的训练',
  16. icon: 'train',
  17. hidden: false,
  18. roles: ['ADMIN']
  19. },
  20. children: [
  21. {
  22. path: 'test',
  23. component: 'myTest/test/index',
  24. name: 'Test',
  25. meta: {
  26. title: '我的训练',
  27. icon: '',
  28. hidden: false,
  29. roles: ['ADMIN'],
  30. keepAlive: true
  31. }
  32. },
  33. {
  34. path: 'achievement/:id',
  35. component: 'myTest/achievement/index',
  36. name: 'Achievement',
  37. meta: {
  38. title: '我的成绩',
  39. icon: '',
  40. hidden: true,
  41. roles: ['ADMIN'],
  42. keepAlive: true
  43. }
  44. }
  45. ]
  46. },
  47. {
  48. path: '/evaluate',
  49. component: 'Layout',
  50. redirect: '/evaluate/rehabilitation',
  51. name: 'Evaluate',
  52. meta: {
  53. title: '我的评定',
  54. icon: 'reh-evaluation',
  55. hidden: false,
  56. roles: ['ADMIN']
  57. },
  58. children: [
  59. {
  60. path: 'rehabilitation',
  61. component: 'evaluate/rehabilitation/index',
  62. name: 'EvaluateRehabilitation',
  63. meta: {
  64. title: '我的康复评定',
  65. icon: '',
  66. hidden: false,
  67. roles: ['ADMIN'],
  68. keepAlive: true
  69. }
  70. },
  71. {
  72. path: 'device',
  73. component: 'evaluate/device/index',
  74. name: 'EvaluateDevice',
  75. meta: {
  76. title: '设备授权',
  77. icon: '',
  78. hidden: true,
  79. roles: ['ADMIN'],
  80. keepAlive: true
  81. }
  82. },
  83. {
  84. path: 'content',
  85. component: 'evaluate/content/index',
  86. name: 'EvaluateContent',
  87. meta: {
  88. title: '开始康复评定',
  89. icon: '',
  90. hidden: false,
  91. roles: ['ADMIN'],
  92. keepAlive: true
  93. }
  94. }
  95. ]
  96. },
  97. {
  98. path: '/doctor',
  99. component: 'Layout',
  100. redirect: '/doctor/chat',
  101. name: 'Doctor',
  102. meta: {
  103. hidden: false,
  104. roles: ['ADMIN']
  105. },
  106. children: [
  107. {
  108. path: 'chat',
  109. component: 'doctor/chat/index',
  110. name: 'DoctorChat',
  111. meta: {
  112. title: '我的医生',
  113. icon: 'chat',
  114. hidden: false,
  115. roles: ['ADMIN'],
  116. keepAlive: true
  117. }
  118. }
  119. ]
  120. },
  121. {
  122. path: '/doctor',
  123. name: 'Doctor',
  124. component: 'Layout',
  125. redirect: '/doctor/chat',
  126. children: [
  127. {
  128. path: 'chat',
  129. component: 'doctor/chat/index',
  130. name: 'DoctorChat',
  131. meta: {
  132. title: '我的医生',
  133. icon: '',
  134. hidden: false,
  135. roles: ['ADMIN'],
  136. keepAlive: true
  137. }
  138. }
  139. ]
  140. },
  141. {
  142. path: '/information',
  143. component: 'Layout',
  144. redirect: '/information/manage',
  145. name: 'Information',
  146. meta: {
  147. title: '我的信息',
  148. icon: 'info',
  149. hidden: false,
  150. roles: ['ADMIN']
  151. },
  152. children: [
  153. {
  154. path: 'manage',
  155. component: 'information/manage/index',
  156. name: 'InformationManage',
  157. meta: {
  158. title: '我的信息',
  159. icon: '',
  160. hidden: false,
  161. roles: ['ADMIN'],
  162. keepAlive: true
  163. }
  164. },
  165. {
  166. path: 'updatePsw',
  167. component: 'information/updatePsw/index',
  168. name: 'InformationUpdatePsw',
  169. meta: {
  170. title: '修改密码',
  171. icon: '',
  172. hidden: false,
  173. roles: ['ADMIN'],
  174. keepAlive: true
  175. }
  176. }
  177. ]
  178. },
  179. {
  180. path: '/tester-manage',
  181. component: 'Layout',
  182. redirect: '/tester-manage/manage',
  183. name: 'TesterManage',
  184. meta: {
  185. title: '受试者信息管理',
  186. icon: 'info-mr',
  187. hidden: false,
  188. roles: ['ADMIN']
  189. },
  190. children: [
  191. {
  192. path: 'manage',
  193. component: 'tester/manage/manage/index',
  194. name: 'TesterManageIndex',
  195. meta: {
  196. title: '受试者管理',
  197. icon: '',
  198. hidden: false,
  199. roles: ['ADMIN'],
  200. keepAlive: true
  201. }
  202. },
  203. {
  204. path: 'add',
  205. component: 'tester/manage/add/index',
  206. name: 'TesterManageAdd',
  207. meta: {
  208. title: '新增受试者账号',
  209. icon: '',
  210. hidden: false,
  211. roles: ['ADMIN'],
  212. keepAlive: true
  213. }
  214. },
  215. {
  216. path: 'rehabilitationGoals',
  217. component: 'tester/manage/rehabilitationGoals/index',
  218. name: 'TesterManageRehabilitationGoals',
  219. meta: {
  220. title: '康复目标',
  221. icon: '',
  222. hidden: false,
  223. roles: ['ADMIN'],
  224. keepAlive: true
  225. }
  226. },
  227. {
  228. path: 'userInfo',
  229. component: 'information/manage/index',
  230. name: 'TesterManageUserInfo',
  231. meta: {
  232. title: '自然信息',
  233. icon: '',
  234. hidden: false,
  235. roles: ['ADMIN'],
  236. keepAlive: true
  237. }
  238. },
  239. {
  240. path: 'medicalRecordInformation',
  241. component: 'tester/manage/medicalRecordInformation/index',
  242. name: 'TesterManageMedicalRecordInformation',
  243. meta: {
  244. title: '病例信息',
  245. icon: '',
  246. hidden: false,
  247. roles: ['ADMIN'],
  248. keepAlive: true
  249. }
  250. },
  251. {
  252. path: 'rehabilitationTraining',
  253. component: 'tester/manage/rehabilitationTraining/index',
  254. redirect: '/rehabilitationTraining/training',
  255. name: 'TesterManageRehabilitationTraining',
  256. meta: {
  257. title: '康复训练',
  258. icon: '',
  259. hidden: false,
  260. roles: ['ADMIN']
  261. },
  262. children: [
  263. {
  264. path: 'training',
  265. component: 'tester/manage/rehabilitationTraining/training/index',
  266. name: 'TesterManageRehabilitationTrainingIndex',
  267. meta: {
  268. title: '康复训练',
  269. icon: '',
  270. hidden: false,
  271. roles: ['ADMIN'],
  272. keepAlive: true
  273. }
  274. },
  275. {
  276. path: 'add',
  277. component: 'tester/manage/rehabilitationTraining/add/index',
  278. name: 'TesterManageRehabilitationTrainingAdd',
  279. meta: {
  280. title: '增加训练',
  281. icon: '',
  282. hidden: false,
  283. roles: ['ADMIN'],
  284. keepAlive: true
  285. }
  286. },
  287. {
  288. path: 'scoreList/:id',
  289. component: 'myTest/achievement/index',
  290. name: 'TesterManageRehabilitationTrainingScoreList',
  291. meta: {
  292. title: '康复训练成绩',
  293. icon: '',
  294. hidden: true,
  295. roles: ['ADMIN'],
  296. keepAlive: true
  297. }
  298. }
  299. ]
  300. }
  301. ]
  302. },
  303. {
  304. path: '/tester-scheduling',
  305. component: 'Layout',
  306. redirect: '/tester-scheduling/scheduling',
  307. name: 'TesterScheduling',
  308. meta: {
  309. title: '受试者训练排期',
  310. icon: 'arrange',
  311. hidden: false,
  312. roles: ['ADMIN']
  313. },
  314. children: [
  315. {
  316. path: 'scheduling',
  317. component: 'tester/scheduling/scheduling/index',
  318. name: 'TesterSchedulingIndex',
  319. meta: {
  320. title: '训练排期',
  321. icon: '',
  322. hidden: false,
  323. roles: ['ADMIN'],
  324. keepAlive: true
  325. }
  326. },
  327. {
  328. path: 'deviceMgr',
  329. component: 'tester/scheduling/deviceMgr/index',
  330. name: 'TesterSchedulingDeviceMgr',
  331. meta: {
  332. title: '设备管理',
  333. icon: '',
  334. hidden: false,
  335. roles: ['ADMIN'],
  336. keepAlive: true
  337. }
  338. }
  339. ]
  340. },
  341. {
  342. path: '/tester-evaluation',
  343. component: 'Layout',
  344. name: 'TesterEvaluation',
  345. meta: {
  346. title: '受试者康复评定',
  347. icon: 'reh-evaluation',
  348. hidden: false,
  349. roles: ['ADMIN'],
  350. alwaysShow: true
  351. },
  352. children: [
  353. {
  354. path: 'infos',
  355. component: 'tester/evaluation/infos/index',
  356. name: 'TesterEvaluationInfos',
  357. meta: {
  358. title: '受试者信息',
  359. icon: '',
  360. hidden: false,
  361. roles: ['ADMIN'],
  362. keepAlive: true
  363. }
  364. },
  365. {
  366. path: 'log/:id',
  367. component: 'tester/evaluation/log/index',
  368. name: 'TesterEvaluationLog',
  369. meta: {
  370. title: '评定记录',
  371. icon: '',
  372. hidden: true,
  373. roles: ['ADMIN'],
  374. keepAlive: false
  375. }
  376. },
  377. {
  378. path: 'evaluation/:id',
  379. component: 'tester/evaluation/evaluation/index',
  380. name: 'TesterEvaluationEvaluation',
  381. meta: {
  382. title: '开始康复评定',
  383. icon: '',
  384. hidden: true,
  385. roles: ['ADMIN'],
  386. keepAlive: false
  387. }
  388. },
  389. {
  390. path: 'scoreList/:id',
  391. component: 'myTest/achievement/index',
  392. name: 'TesterEvaluationScoreList',
  393. meta: {
  394. title: '康复评定成绩',
  395. icon: '',
  396. hidden: true,
  397. roles: ['ADMIN'],
  398. keepAlive: false
  399. }
  400. },
  401. {
  402. path: 'report/:id',
  403. component: 'tester/evaluation/report/index',
  404. name: 'TesterEvaluationReport',
  405. meta: {
  406. title: '评定报告',
  407. icon: '',
  408. hidden: true,
  409. roles: ['ADMIN'],
  410. keepAlive: false
  411. }
  412. }
  413. ]
  414. },
  415. {
  416. path: '/doc-information',
  417. component: 'Layout',
  418. redirect: '/doc-information/manage',
  419. name: 'DocInformation',
  420. meta: {
  421. title: '医生信息管理',
  422. icon: 'info-mr-d',
  423. hidden: false,
  424. roles: ['ADMIN']
  425. },
  426. children: [
  427. {
  428. path: 'manage',
  429. component: 'information/manage/doc',
  430. name: 'DocInformationManage',
  431. meta: {
  432. title: '个人信息',
  433. icon: '',
  434. hidden: false,
  435. roles: ['ADMIN'],
  436. keepAlive: true
  437. }
  438. },
  439. {
  440. path: 'updatePsw',
  441. component: 'information/updatePsw/index',
  442. name: 'DocInformationUpdatePsw',
  443. meta: {
  444. title: '修改密码',
  445. icon: '',
  446. hidden: false,
  447. roles: ['ADMIN'],
  448. keepAlive: true
  449. }
  450. },
  451. {
  452. path: 'chat-list',
  453. component: 'information/chatList/index',
  454. name: 'DocInformationChatList',
  455. meta: {
  456. title: '留言信息',
  457. icon: '',
  458. hidden: false,
  459. roles: ['ADMIN'],
  460. keepAlive: true
  461. }
  462. }
  463. ]
  464. },
  465. {
  466. path: '/game-center',
  467. component: 'Layout',
  468. redirect: '/game-center/manage',
  469. name: 'GameCenter',
  470. meta: {
  471. title: '游戏中心',
  472. icon: 'game',
  473. hidden: false,
  474. roles: ['ADMIN'],
  475. alwaysShow: true
  476. },
  477. children: [
  478. {
  479. path: 'manage',
  480. component: 'gameCenter/manage/index',
  481. name: 'GameCenterManage',
  482. meta: {
  483. title: '游戏管理',
  484. icon: '',
  485. hidden: false,
  486. roles: ['ADMIN'],
  487. keepAlive: true
  488. }
  489. }
  490. ]
  491. },
  492. {
  493. path: '/system',
  494. component: 'Layout',
  495. redirect: '/system/user',
  496. name: '/system',
  497. meta: {
  498. title: '系统管理',
  499. icon: 'system',
  500. hidden: true,
  501. roles: ['ADMIN']
  502. },
  503. children: [
  504. {
  505. path: 'user',
  506. component: 'system/user/index',
  507. name: 'User',
  508. meta: {
  509. title: '用户管理',
  510. icon: 'user',
  511. hidden: false,
  512. roles: ['ADMIN'],
  513. keepAlive: true
  514. }
  515. },
  516. {
  517. path: 'role',
  518. component: 'system/role/index',
  519. name: 'Role',
  520. meta: {
  521. title: '角色管理',
  522. icon: 'role',
  523. hidden: false,
  524. roles: ['ADMIN'],
  525. keepAlive: true
  526. }
  527. },
  528. {
  529. path: 'menu',
  530. component: 'system/menu/index',
  531. name: 'Menu',
  532. meta: {
  533. title: '菜单管理',
  534. icon: 'menu',
  535. hidden: false,
  536. roles: ['ADMIN'],
  537. keepAlive: true
  538. }
  539. },
  540. {
  541. path: 'dept',
  542. component: 'system/dept/index',
  543. name: 'Dept',
  544. meta: {
  545. title: '部门管理',
  546. icon: 'tree',
  547. hidden: false,
  548. roles: ['ADMIN'],
  549. keepAlive: true
  550. }
  551. },
  552. {
  553. path: 'dict',
  554. component: 'system/dict/index',
  555. name: 'Dict',
  556. meta: {
  557. title: '字典管理',
  558. icon: 'dict',
  559. hidden: false,
  560. roles: ['ADMIN'],
  561. keepAlive: true
  562. }
  563. }
  564. ]
  565. },
  566. {
  567. path: '/api',
  568. component: 'Layout',
  569. name: '/api',
  570. meta: {
  571. title: '接口文档',
  572. icon: 'api',
  573. hidden: true,
  574. roles: ['ADMIN'],
  575. alwaysShow: true
  576. },
  577. children: [
  578. {
  579. path: 'apifox',
  580. component: 'demo/api/apifox',
  581. name: 'Apifox',
  582. meta: {
  583. title: 'Apifox',
  584. icon: 'api',
  585. hidden: false,
  586. roles: ['ADMIN'],
  587. keepAlive: true
  588. }
  589. },
  590. {
  591. path: 'swagger',
  592. component: 'demo/api/swagger',
  593. name: 'Swagger',
  594. meta: {
  595. title: 'Swagger',
  596. icon: 'api',
  597. hidden: true,
  598. roles: ['ADMIN'],
  599. keepAlive: true
  600. }
  601. },
  602. {
  603. path: 'knife4j',
  604. component: 'demo/api/knife4j',
  605. name: 'Knife4j',
  606. meta: {
  607. title: 'Knife4j',
  608. icon: 'api',
  609. hidden: true,
  610. roles: ['ADMIN'],
  611. keepAlive: true
  612. }
  613. }
  614. ]
  615. },
  616. {
  617. path: '/doc',
  618. component: 'Layout',
  619. name: '/doc',
  620. meta: {
  621. title: '平台文档',
  622. icon: 'document',
  623. hidden: true,
  624. roles: ['ADMIN']
  625. },
  626. children: [
  627. {
  628. path: 'internal-doc',
  629. component: 'demo/internal-doc',
  630. name: 'InternalDoc',
  631. meta: {
  632. title: '平台文档(内嵌)',
  633. icon: 'document',
  634. hidden: false,
  635. roles: ['ADMIN']
  636. }
  637. },
  638. {
  639. path: 'https://juejin.cn/post/7228990409909108793',
  640. name: 'Https://juejin.cn/post/7228990409909108793',
  641. meta: {
  642. title: '平台文档(外链)',
  643. icon: 'link',
  644. hidden: false,
  645. roles: ['ADMIN']
  646. }
  647. }
  648. ]
  649. },
  650. {
  651. path: '/multi-level',
  652. component: 'Layout',
  653. redirect: '/multi-level/multi-level1',
  654. name: '/multiLevel',
  655. meta: {
  656. title: '多级菜单',
  657. icon: 'cascader',
  658. hidden: true,
  659. roles: ['ADMIN']
  660. },
  661. children: [
  662. {
  663. path: 'multi-level1',
  664. component: 'demo/multi-level/level1',
  665. redirect: '/multi-level/multi-level2',
  666. name: 'MultiLevel1',
  667. meta: {
  668. title: '菜单一级',
  669. icon: '',
  670. hidden: false,
  671. roles: ['ADMIN'],
  672. keepAlive: true
  673. },
  674. children: [
  675. {
  676. path: 'multi-level2',
  677. component: 'demo/multi-level/children/level2',
  678. redirect: '/multi-level/multi-level2/multi-level3-1',
  679. name: 'MultiLevel2',
  680. meta: {
  681. title: '菜单二级',
  682. icon: '',
  683. hidden: false,
  684. roles: ['ADMIN'],
  685. keepAlive: true
  686. },
  687. children: [
  688. {
  689. path: 'multi-level3-1',
  690. component: 'demo/multi-level/children/children/level3-1',
  691. name: 'MultiLevel31',
  692. meta: {
  693. title: '菜单三级-1',
  694. icon: '',
  695. hidden: false,
  696. roles: ['ADMIN'],
  697. keepAlive: true
  698. }
  699. },
  700. {
  701. path: 'multi-level3-2',
  702. component: 'demo/multi-level/children/children/level3-2',
  703. name: 'MultiLevel32',
  704. meta: {
  705. title: '菜单三级-2',
  706. icon: '',
  707. hidden: false,
  708. roles: ['ADMIN'],
  709. keepAlive: true
  710. }
  711. }
  712. ]
  713. }
  714. ]
  715. }
  716. ]
  717. },
  718. {
  719. path: '/component',
  720. component: 'Layout',
  721. name: '/component',
  722. meta: {
  723. title: '组件封装',
  724. icon: 'menu',
  725. hidden: true,
  726. roles: ['ADMIN']
  727. },
  728. children: [
  729. {
  730. path: 'wang-editor',
  731. component: 'demo/wang-editor',
  732. name: 'WangEditor',
  733. meta: {
  734. title: '富文本编辑器',
  735. icon: '',
  736. hidden: false,
  737. roles: ['ADMIN'],
  738. keepAlive: true
  739. }
  740. },
  741. {
  742. path: 'upload',
  743. component: 'demo/upload',
  744. name: 'Upload',
  745. meta: {
  746. title: '图片上传',
  747. icon: '',
  748. hidden: false,
  749. roles: ['ADMIN'],
  750. keepAlive: true
  751. }
  752. },
  753. {
  754. path: 'icon-selector',
  755. component: 'demo/icon-selector',
  756. name: 'IconSelector',
  757. meta: {
  758. title: '图标选择器',
  759. icon: '',
  760. hidden: false,
  761. roles: ['ADMIN'],
  762. keepAlive: true
  763. }
  764. },
  765. {
  766. path: 'dict-demo',
  767. component: 'demo/dict',
  768. name: 'DictDemo',
  769. meta: {
  770. title: '字典组件',
  771. icon: '',
  772. hidden: false,
  773. roles: ['ADMIN'],
  774. keepAlive: true
  775. }
  776. },
  777. {
  778. path: 'signature',
  779. component: 'demo/signature',
  780. name: 'Signature',
  781. meta: {
  782. title: '签名',
  783. icon: '',
  784. hidden: false,
  785. roles: ['ADMIN'],
  786. keepAlive: true
  787. }
  788. },
  789. {
  790. path: 'table',
  791. component: 'demo/table',
  792. name: 'Table',
  793. meta: {
  794. title: '表格',
  795. icon: '',
  796. hidden: false,
  797. roles: ['ADMIN'],
  798. keepAlive: true
  799. }
  800. }
  801. ]
  802. },
  803. {
  804. path: '/function',
  805. component: 'Layout',
  806. name: '/function',
  807. meta: {
  808. title: '功能演示',
  809. icon: 'menu',
  810. hidden: false,
  811. roles: ['ADMIN']
  812. },
  813. children: [
  814. {
  815. path: 'icon-demo',
  816. component: 'demo/icons',
  817. name: 'IconDemo',
  818. meta: {
  819. title: 'Icons',
  820. icon: 'el-icon-edit',
  821. hidden: false,
  822. roles: ['ADMIN'],
  823. keepAlive: true
  824. }
  825. },
  826. {
  827. path: '/function/websocket',
  828. component: 'demo/websocket',
  829. name: '/function/websocket',
  830. meta: {
  831. title: 'Websocket',
  832. icon: '',
  833. hidden: false,
  834. roles: ['ADMIN'],
  835. keepAlive: true
  836. }
  837. },
  838. {
  839. path: 'other',
  840. component: 'demo/other',
  841. name: 'Other',
  842. meta: {
  843. title: '敬请期待...',
  844. icon: '',
  845. hidden: false,
  846. roles: ['ADMIN']
  847. }
  848. }
  849. ]
  850. }
  851. ],
  852. message: '一切ok'
  853. }
  854. },
  855. {
  856. url: 'menus',
  857. method: ['GET'],
  858. body: {
  859. code: '200',
  860. data: [
  861. {
  862. id: 1,
  863. parentId: 0,
  864. name: '系统管理',
  865. type: 'CATALOG',
  866. path: '/system',
  867. component: 'Layout',
  868. sort: 1,
  869. visible: 1,
  870. icon: 'system',
  871. redirect: '/system/user',
  872. perm: null,
  873. children: [
  874. {
  875. id: 2,
  876. parentId: 1,
  877. name: '用户管理',
  878. type: 'MENU',
  879. path: 'user',
  880. component: 'system/user/index',
  881. sort: 1,
  882. visible: 1,
  883. icon: 'user',
  884. redirect: null,
  885. perm: null,
  886. children: [
  887. {
  888. id: 31,
  889. parentId: 2,
  890. name: '用户新增',
  891. type: 'BUTTON',
  892. path: '',
  893. component: null,
  894. sort: 1,
  895. visible: 1,
  896. icon: '',
  897. redirect: '',
  898. perm: 'sys:user:add',
  899. children: []
  900. },
  901. {
  902. id: 32,
  903. parentId: 2,
  904. name: '用户编辑',
  905. type: 'BUTTON',
  906. path: '',
  907. component: null,
  908. sort: 2,
  909. visible: 1,
  910. icon: '',
  911. redirect: '',
  912. perm: 'sys:user:edit',
  913. children: []
  914. },
  915. {
  916. id: 33,
  917. parentId: 2,
  918. name: '用户删除',
  919. type: 'BUTTON',
  920. path: '',
  921. component: null,
  922. sort: 3,
  923. visible: 1,
  924. icon: '',
  925. redirect: '',
  926. perm: 'sys:user:delete',
  927. children: []
  928. },
  929. {
  930. id: 88,
  931. parentId: 2,
  932. name: '重置密码',
  933. type: 'BUTTON',
  934. path: '',
  935. component: null,
  936. sort: 4,
  937. visible: 1,
  938. icon: '',
  939. redirect: null,
  940. perm: 'sys:user:reset_pwd',
  941. children: []
  942. }
  943. ]
  944. },
  945. {
  946. id: 3,
  947. parentId: 1,
  948. name: '角色管理',
  949. type: 'MENU',
  950. path: 'role',
  951. component: 'system/role/index',
  952. sort: 2,
  953. visible: 1,
  954. icon: 'role',
  955. redirect: null,
  956. perm: null,
  957. children: [
  958. {
  959. id: 70,
  960. parentId: 3,
  961. name: '角色新增',
  962. type: 'BUTTON',
  963. path: '',
  964. component: null,
  965. sort: 1,
  966. visible: 1,
  967. icon: '',
  968. redirect: null,
  969. perm: 'sys:role:add',
  970. children: []
  971. },
  972. {
  973. id: 71,
  974. parentId: 3,
  975. name: '角色编辑',
  976. type: 'BUTTON',
  977. path: '',
  978. component: null,
  979. sort: 2,
  980. visible: 1,
  981. icon: '',
  982. redirect: null,
  983. perm: 'sys:role:edit',
  984. children: []
  985. },
  986. {
  987. id: 72,
  988. parentId: 3,
  989. name: '角色删除',
  990. type: 'BUTTON',
  991. path: '',
  992. component: null,
  993. sort: 3,
  994. visible: 1,
  995. icon: '',
  996. redirect: null,
  997. perm: 'sys:role:delete',
  998. children: []
  999. }
  1000. ]
  1001. },
  1002. {
  1003. id: 4,
  1004. parentId: 1,
  1005. name: '菜单管理',
  1006. type: 'MENU',
  1007. path: 'menu',
  1008. component: 'system/menu/index',
  1009. sort: 3,
  1010. visible: 1,
  1011. icon: 'menu',
  1012. redirect: null,
  1013. perm: null,
  1014. children: [
  1015. {
  1016. id: 73,
  1017. parentId: 4,
  1018. name: '菜单新增',
  1019. type: 'BUTTON',
  1020. path: '',
  1021. component: null,
  1022. sort: 1,
  1023. visible: 1,
  1024. icon: '',
  1025. redirect: null,
  1026. perm: 'sys:menu:add',
  1027. children: []
  1028. },
  1029. {
  1030. id: 74,
  1031. parentId: 4,
  1032. name: '菜单编辑',
  1033. type: 'BUTTON',
  1034. path: '',
  1035. component: null,
  1036. sort: 3,
  1037. visible: 1,
  1038. icon: '',
  1039. redirect: null,
  1040. perm: 'sys:menu:edit',
  1041. children: []
  1042. },
  1043. {
  1044. id: 75,
  1045. parentId: 4,
  1046. name: '菜单删除',
  1047. type: 'BUTTON',
  1048. path: '',
  1049. component: null,
  1050. sort: 3,
  1051. visible: 1,
  1052. icon: '',
  1053. redirect: null,
  1054. perm: 'sys:menu:delete',
  1055. children: []
  1056. }
  1057. ]
  1058. },
  1059. {
  1060. id: 5,
  1061. parentId: 1,
  1062. name: '部门管理',
  1063. type: 'MENU',
  1064. path: 'dept',
  1065. component: 'system/dept/index',
  1066. sort: 4,
  1067. visible: 1,
  1068. icon: 'tree',
  1069. redirect: null,
  1070. perm: null,
  1071. children: [
  1072. {
  1073. id: 76,
  1074. parentId: 5,
  1075. name: '部门新增',
  1076. type: 'BUTTON',
  1077. path: '',
  1078. component: null,
  1079. sort: 1,
  1080. visible: 1,
  1081. icon: '',
  1082. redirect: null,
  1083. perm: 'sys:dept:add',
  1084. children: []
  1085. },
  1086. {
  1087. id: 77,
  1088. parentId: 5,
  1089. name: '部门编辑',
  1090. type: 'BUTTON',
  1091. path: '',
  1092. component: null,
  1093. sort: 2,
  1094. visible: 1,
  1095. icon: '',
  1096. redirect: null,
  1097. perm: 'sys:dept:edit',
  1098. children: []
  1099. },
  1100. {
  1101. id: 78,
  1102. parentId: 5,
  1103. name: '部门删除',
  1104. type: 'BUTTON',
  1105. path: '',
  1106. component: null,
  1107. sort: 3,
  1108. visible: 1,
  1109. icon: '',
  1110. redirect: null,
  1111. perm: 'sys:dept:delete',
  1112. children: []
  1113. }
  1114. ]
  1115. },
  1116. {
  1117. id: 6,
  1118. parentId: 1,
  1119. name: '字典管理',
  1120. type: 'MENU',
  1121. path: 'dict',
  1122. component: 'system/dict/index',
  1123. sort: 5,
  1124. visible: 1,
  1125. icon: 'dict',
  1126. redirect: null,
  1127. perm: null,
  1128. children: [
  1129. {
  1130. id: 79,
  1131. parentId: 6,
  1132. name: '字典类型新增',
  1133. type: 'BUTTON',
  1134. path: '',
  1135. component: null,
  1136. sort: 1,
  1137. visible: 1,
  1138. icon: '',
  1139. redirect: null,
  1140. perm: 'sys:dict_type:add',
  1141. children: []
  1142. },
  1143. {
  1144. id: 81,
  1145. parentId: 6,
  1146. name: '字典类型编辑',
  1147. type: 'BUTTON',
  1148. path: '',
  1149. component: null,
  1150. sort: 2,
  1151. visible: 1,
  1152. icon: '',
  1153. redirect: null,
  1154. perm: 'sys:dict_type:edit',
  1155. children: []
  1156. },
  1157. {
  1158. id: 84,
  1159. parentId: 6,
  1160. name: '字典类型删除',
  1161. type: 'BUTTON',
  1162. path: '',
  1163. component: null,
  1164. sort: 3,
  1165. visible: 1,
  1166. icon: '',
  1167. redirect: null,
  1168. perm: 'sys:dict_type:delete',
  1169. children: []
  1170. },
  1171. {
  1172. id: 85,
  1173. parentId: 6,
  1174. name: '字典数据新增',
  1175. type: 'BUTTON',
  1176. path: '',
  1177. component: null,
  1178. sort: 4,
  1179. visible: 1,
  1180. icon: '',
  1181. redirect: null,
  1182. perm: 'sys:dict:add',
  1183. children: []
  1184. },
  1185. {
  1186. id: 86,
  1187. parentId: 6,
  1188. name: '字典数据编辑',
  1189. type: 'BUTTON',
  1190. path: '',
  1191. component: null,
  1192. sort: 5,
  1193. visible: 1,
  1194. icon: '',
  1195. redirect: null,
  1196. perm: 'sys:dict:edit',
  1197. children: []
  1198. },
  1199. {
  1200. id: 87,
  1201. parentId: 6,
  1202. name: '字典数据删除',
  1203. type: 'BUTTON',
  1204. path: '',
  1205. component: null,
  1206. sort: 6,
  1207. visible: 1,
  1208. icon: '',
  1209. redirect: null,
  1210. perm: 'sys:dict:delete',
  1211. children: []
  1212. }
  1213. ]
  1214. }
  1215. ]
  1216. },
  1217. {
  1218. id: 40,
  1219. parentId: 0,
  1220. name: '接口文档',
  1221. type: 'CATALOG',
  1222. path: '/api',
  1223. component: 'Layout',
  1224. sort: 7,
  1225. visible: 1,
  1226. icon: 'api',
  1227. redirect: '',
  1228. perm: null,
  1229. children: [
  1230. {
  1231. id: 41,
  1232. parentId: 40,
  1233. name: 'Apifox',
  1234. type: 'MENU',
  1235. path: 'apifox',
  1236. component: 'demo/api/apifox',
  1237. sort: 1,
  1238. visible: 1,
  1239. icon: 'api',
  1240. redirect: '',
  1241. perm: null,
  1242. children: []
  1243. },
  1244. {
  1245. id: 103,
  1246. parentId: 40,
  1247. name: 'Swagger',
  1248. type: 'MENU',
  1249. path: 'swagger',
  1250. component: 'demo/api/swagger',
  1251. sort: 2,
  1252. visible: 0,
  1253. icon: 'api',
  1254. redirect: '',
  1255. perm: null,
  1256. children: []
  1257. },
  1258. {
  1259. id: 104,
  1260. parentId: 40,
  1261. name: 'Knife4j',
  1262. type: 'MENU',
  1263. path: 'knife4j',
  1264. component: 'demo/api/knife4j',
  1265. sort: 3,
  1266. visible: 0,
  1267. icon: 'api',
  1268. redirect: '',
  1269. perm: null,
  1270. children: []
  1271. }
  1272. ]
  1273. },
  1274. {
  1275. id: 26,
  1276. parentId: 0,
  1277. name: '平台文档',
  1278. type: 'CATALOG',
  1279. path: '/doc',
  1280. component: 'Layout',
  1281. sort: 8,
  1282. visible: 1,
  1283. icon: 'document',
  1284. redirect: null,
  1285. perm: null,
  1286. children: [
  1287. {
  1288. id: 102,
  1289. parentId: 26,
  1290. name: '平台文档(内嵌)',
  1291. type: 'EXTLINK',
  1292. path: 'internal-doc',
  1293. component: 'demo/internal-doc',
  1294. sort: 1,
  1295. visible: 1,
  1296. icon: 'document',
  1297. redirect: '',
  1298. perm: null,
  1299. children: []
  1300. },
  1301. {
  1302. id: 30,
  1303. parentId: 26,
  1304. name: '平台文档(外链)',
  1305. type: 'EXTLINK',
  1306. path: 'https://juejin.cn/post/7228990409909108793',
  1307. component: '',
  1308. sort: 2,
  1309. visible: 1,
  1310. icon: 'link',
  1311. redirect: '',
  1312. perm: null,
  1313. children: []
  1314. }
  1315. ]
  1316. },
  1317. {
  1318. id: 20,
  1319. parentId: 0,
  1320. name: '多级菜单',
  1321. type: 'CATALOG',
  1322. path: '/multi-level',
  1323. component: 'Layout',
  1324. sort: 9,
  1325. visible: 1,
  1326. icon: 'cascader',
  1327. redirect: '/multi-level/multi-level1',
  1328. perm: null,
  1329. children: [
  1330. {
  1331. id: 21,
  1332. parentId: 20,
  1333. name: '菜单一级',
  1334. type: 'MENU',
  1335. path: 'multi-level1',
  1336. component: 'demo/multi-level/level1',
  1337. sort: 1,
  1338. visible: 1,
  1339. icon: '',
  1340. redirect: '/multi-level/multi-level2',
  1341. perm: null,
  1342. children: [
  1343. {
  1344. id: 22,
  1345. parentId: 21,
  1346. name: '菜单二级',
  1347. type: 'MENU',
  1348. path: 'multi-level2',
  1349. component: 'demo/multi-level/children/level2',
  1350. sort: 1,
  1351. visible: 1,
  1352. icon: '',
  1353. redirect: '/multi-level/multi-level2/multi-level3-1',
  1354. perm: null,
  1355. children: [
  1356. {
  1357. id: 23,
  1358. parentId: 22,
  1359. name: '菜单三级-1',
  1360. type: 'MENU',
  1361. path: 'multi-level3-1',
  1362. component: 'demo/multi-level/children/children/level3-1',
  1363. sort: 1,
  1364. visible: 1,
  1365. icon: '',
  1366. redirect: '',
  1367. perm: null,
  1368. children: []
  1369. },
  1370. {
  1371. id: 24,
  1372. parentId: 22,
  1373. name: '菜单三级-2',
  1374. type: 'MENU',
  1375. path: 'multi-level3-2',
  1376. component: 'demo/multi-level/children/children/level3-2',
  1377. sort: 2,
  1378. visible: 1,
  1379. icon: '',
  1380. redirect: '',
  1381. perm: null,
  1382. children: []
  1383. }
  1384. ]
  1385. }
  1386. ]
  1387. }
  1388. ]
  1389. },
  1390. {
  1391. id: 36,
  1392. parentId: 0,
  1393. name: '组件封装',
  1394. type: 'CATALOG',
  1395. path: '/component',
  1396. component: 'Layout',
  1397. sort: 10,
  1398. visible: 1,
  1399. icon: 'menu',
  1400. redirect: '',
  1401. perm: null,
  1402. children: [
  1403. {
  1404. id: 37,
  1405. parentId: 36,
  1406. name: '富文本编辑器',
  1407. type: 'MENU',
  1408. path: 'wang-editor',
  1409. component: 'demo/wang-editor',
  1410. sort: 1,
  1411. visible: 1,
  1412. icon: '',
  1413. redirect: '',
  1414. perm: null,
  1415. children: []
  1416. },
  1417. {
  1418. id: 38,
  1419. parentId: 36,
  1420. name: '图片上传',
  1421. type: 'MENU',
  1422. path: 'upload',
  1423. component: 'demo/upload',
  1424. sort: 2,
  1425. visible: 1,
  1426. icon: '',
  1427. redirect: '',
  1428. perm: null,
  1429. children: []
  1430. },
  1431. {
  1432. id: 39,
  1433. parentId: 36,
  1434. name: '图标选择器',
  1435. type: 'MENU',
  1436. path: 'icon-selector',
  1437. component: 'demo/icon-selector',
  1438. sort: 3,
  1439. visible: 1,
  1440. icon: '',
  1441. redirect: '',
  1442. perm: null,
  1443. children: []
  1444. },
  1445. {
  1446. id: 95,
  1447. parentId: 36,
  1448. name: '字典组件',
  1449. type: 'MENU',
  1450. path: 'dict-demo',
  1451. component: 'demo/dict',
  1452. sort: 4,
  1453. visible: 1,
  1454. icon: '',
  1455. redirect: '',
  1456. perm: null,
  1457. children: []
  1458. },
  1459. {
  1460. id: 93,
  1461. parentId: 36,
  1462. name: '签名',
  1463. type: 'MENU',
  1464. path: 'signature',
  1465. component: 'demo/signature',
  1466. sort: 6,
  1467. visible: 1,
  1468. icon: '',
  1469. redirect: '',
  1470. perm: null,
  1471. children: []
  1472. },
  1473. {
  1474. id: 94,
  1475. parentId: 36,
  1476. name: '表格',
  1477. type: 'MENU',
  1478. path: 'table',
  1479. component: 'demo/table',
  1480. sort: 7,
  1481. visible: 1,
  1482. icon: '',
  1483. redirect: '',
  1484. perm: null,
  1485. children: []
  1486. }
  1487. ]
  1488. },
  1489. {
  1490. id: 89,
  1491. parentId: 0,
  1492. name: '功能演示',
  1493. type: 'CATALOG',
  1494. path: '/function',
  1495. component: 'Layout',
  1496. sort: 11,
  1497. visible: 1,
  1498. icon: 'menu',
  1499. redirect: '',
  1500. perm: null,
  1501. children: [
  1502. {
  1503. id: 97,
  1504. parentId: 89,
  1505. name: 'Icons',
  1506. type: 'MENU',
  1507. path: 'icon-demo',
  1508. component: 'demo/icons',
  1509. sort: 2,
  1510. visible: 1,
  1511. icon: 'el-icon-edit',
  1512. redirect: '',
  1513. perm: null,
  1514. children: []
  1515. },
  1516. {
  1517. id: 90,
  1518. parentId: 89,
  1519. name: 'Websocket',
  1520. type: 'MENU',
  1521. path: '/function/websocket',
  1522. component: 'demo/websocket',
  1523. sort: 3,
  1524. visible: 1,
  1525. icon: '',
  1526. redirect: '',
  1527. perm: null,
  1528. children: []
  1529. },
  1530. {
  1531. id: 91,
  1532. parentId: 89,
  1533. name: '敬请期待...',
  1534. type: 'CATALOG',
  1535. path: 'other',
  1536. component: 'demo/other',
  1537. sort: 4,
  1538. visible: 1,
  1539. icon: '',
  1540. redirect: '',
  1541. perm: null,
  1542. children: []
  1543. }
  1544. ]
  1545. }
  1546. ],
  1547. message: '一切ok'
  1548. }
  1549. },
  1550. {
  1551. url: 'menus/options',
  1552. method: ['GET'],
  1553. body: {
  1554. code: '200',
  1555. data: [
  1556. {
  1557. value: 1,
  1558. label: '系统管理',
  1559. children: [
  1560. {
  1561. value: 2,
  1562. label: '用户管理',
  1563. children: [
  1564. {
  1565. value: 31,
  1566. label: '用户新增'
  1567. },
  1568. {
  1569. value: 32,
  1570. label: '用户编辑'
  1571. },
  1572. {
  1573. value: 33,
  1574. label: '用户删除'
  1575. },
  1576. {
  1577. value: 88,
  1578. label: '重置密码'
  1579. }
  1580. ]
  1581. },
  1582. {
  1583. value: 3,
  1584. label: '角色管理',
  1585. children: [
  1586. {
  1587. value: 70,
  1588. label: '角色新增'
  1589. },
  1590. {
  1591. value: 71,
  1592. label: '角色编辑'
  1593. },
  1594. {
  1595. value: 72,
  1596. label: '角色删除'
  1597. }
  1598. ]
  1599. },
  1600. {
  1601. value: 4,
  1602. label: '菜单管理',
  1603. children: [
  1604. {
  1605. value: 73,
  1606. label: '菜单新增'
  1607. },
  1608. {
  1609. value: 74,
  1610. label: '菜单编辑'
  1611. },
  1612. {
  1613. value: 75,
  1614. label: '菜单删除'
  1615. }
  1616. ]
  1617. },
  1618. {
  1619. value: 5,
  1620. label: '部门管理',
  1621. children: [
  1622. {
  1623. value: 76,
  1624. label: '部门新增'
  1625. },
  1626. {
  1627. value: 77,
  1628. label: '部门编辑'
  1629. },
  1630. {
  1631. value: 78,
  1632. label: '部门删除'
  1633. }
  1634. ]
  1635. },
  1636. {
  1637. value: 6,
  1638. label: '字典管理',
  1639. children: [
  1640. {
  1641. value: 79,
  1642. label: '字典类型新增'
  1643. },
  1644. {
  1645. value: 81,
  1646. label: '字典类型编辑'
  1647. },
  1648. {
  1649. value: 84,
  1650. label: '字典类型删除'
  1651. },
  1652. {
  1653. value: 85,
  1654. label: '字典数据新增'
  1655. },
  1656. {
  1657. value: 86,
  1658. label: '字典数据编辑'
  1659. },
  1660. {
  1661. value: 87,
  1662. label: '字典数据删除'
  1663. }
  1664. ]
  1665. }
  1666. ]
  1667. },
  1668. {
  1669. value: 40,
  1670. label: '接口文档',
  1671. children: [
  1672. {
  1673. value: 41,
  1674. label: 'Apifox'
  1675. },
  1676. {
  1677. value: 103,
  1678. label: 'Swagger'
  1679. },
  1680. {
  1681. value: 104,
  1682. label: 'Knife4j'
  1683. }
  1684. ]
  1685. },
  1686. {
  1687. value: 26,
  1688. label: '平台文档',
  1689. children: [
  1690. {
  1691. value: 102,
  1692. label: '平台文档(内嵌)'
  1693. },
  1694. {
  1695. value: 30,
  1696. label: '平台文档(外链)'
  1697. }
  1698. ]
  1699. },
  1700. {
  1701. value: 20,
  1702. label: '多级菜单',
  1703. children: [
  1704. {
  1705. value: 21,
  1706. label: '菜单一级',
  1707. children: [
  1708. {
  1709. value: 22,
  1710. label: '菜单二级',
  1711. children: [
  1712. {
  1713. value: 23,
  1714. label: '菜单三级-1'
  1715. },
  1716. {
  1717. value: 24,
  1718. label: '菜单三级-2'
  1719. }
  1720. ]
  1721. }
  1722. ]
  1723. }
  1724. ]
  1725. },
  1726. {
  1727. value: 36,
  1728. label: '组件封装',
  1729. children: [
  1730. {
  1731. value: 37,
  1732. label: '富文本编辑器'
  1733. },
  1734. {
  1735. value: 38,
  1736. label: '图片上传'
  1737. },
  1738. {
  1739. value: 39,
  1740. label: '图标选择器'
  1741. },
  1742. {
  1743. value: 95,
  1744. label: '字典组件'
  1745. },
  1746. {
  1747. value: 93,
  1748. label: '签名'
  1749. },
  1750. {
  1751. value: 94,
  1752. label: '表格'
  1753. }
  1754. ]
  1755. },
  1756. {
  1757. value: 89,
  1758. label: '功能演示',
  1759. children: [
  1760. {
  1761. value: 97,
  1762. label: 'Icons'
  1763. },
  1764. {
  1765. value: 90,
  1766. label: 'Websocket'
  1767. },
  1768. {
  1769. value: 91,
  1770. label: '敬请期待...'
  1771. }
  1772. ]
  1773. }
  1774. ],
  1775. message: '一切ok'
  1776. }
  1777. },
  1778. // 新增菜单
  1779. {
  1780. url: 'menus',
  1781. method: ['POST'],
  1782. body({ body }) {
  1783. return {
  1784. code: '200',
  1785. data: null,
  1786. message: '新增菜单' + body.name + '成功'
  1787. }
  1788. }
  1789. },
  1790. // 获取菜单表单数据
  1791. {
  1792. url: 'menus/:id/form',
  1793. method: ['GET'],
  1794. body: ({ params }) => {
  1795. return {
  1796. code: '200',
  1797. data: menuMap[params.id],
  1798. message: '一切ok'
  1799. }
  1800. }
  1801. },
  1802. // 修改菜单
  1803. {
  1804. url: 'menus/:id',
  1805. method: ['PUT'],
  1806. body({ body }) {
  1807. return {
  1808. code: '200',
  1809. data: null,
  1810. message: '修改菜单' + body.name + '成功'
  1811. }
  1812. }
  1813. },
  1814. // 删除菜单
  1815. {
  1816. url: 'menus/:id',
  1817. method: ['DELETE'],
  1818. body({ params }) {
  1819. return {
  1820. code: '200',
  1821. data: null,
  1822. message: '删除菜单' + params.id + '成功'
  1823. }
  1824. }
  1825. }
  1826. ])
  1827. // 菜单映射表数据
  1828. const menuMap: Record<string, any> = {
  1829. 1: {
  1830. id: 1,
  1831. parentId: 0,
  1832. name: '系统管理',
  1833. type: 'CATALOG',
  1834. path: '/system',
  1835. component: 'Layout',
  1836. perm: null,
  1837. visible: 1,
  1838. sort: 1,
  1839. icon: 'system',
  1840. redirect: '/system/user',
  1841. keepAlive: null,
  1842. alwaysShow: null
  1843. },
  1844. 2: {
  1845. id: 2,
  1846. parentId: 1,
  1847. name: '用户管理',
  1848. type: 'MENU',
  1849. path: 'user',
  1850. component: 'system/user/index',
  1851. perm: null,
  1852. visible: 1,
  1853. sort: 1,
  1854. icon: 'user',
  1855. redirect: null,
  1856. keepAlive: 1,
  1857. alwaysShow: null
  1858. },
  1859. 3: {
  1860. id: 3,
  1861. parentId: 1,
  1862. name: '角色管理',
  1863. type: 'MENU',
  1864. path: 'role',
  1865. component: 'system/role/index',
  1866. perm: null,
  1867. visible: 1,
  1868. sort: 2,
  1869. icon: 'role',
  1870. redirect: null,
  1871. keepAlive: 1,
  1872. alwaysShow: null
  1873. },
  1874. 4: {
  1875. id: 4,
  1876. parentId: 1,
  1877. name: '菜单管理',
  1878. type: 'MENU',
  1879. path: 'menu',
  1880. component: 'system/menu/index',
  1881. perm: null,
  1882. visible: 1,
  1883. sort: 3,
  1884. icon: 'menu',
  1885. redirect: null,
  1886. keepAlive: 1,
  1887. alwaysShow: null
  1888. },
  1889. 5: {
  1890. id: 5,
  1891. parentId: 1,
  1892. name: '部门管理',
  1893. type: 'MENU',
  1894. path: 'dept',
  1895. component: 'system/dept/index',
  1896. perm: null,
  1897. visible: 1,
  1898. sort: 4,
  1899. icon: 'tree',
  1900. redirect: null,
  1901. keepAlive: 1,
  1902. alwaysShow: null
  1903. },
  1904. 6: {
  1905. id: 6,
  1906. parentId: 1,
  1907. name: '字典管理',
  1908. type: 'MENU',
  1909. path: 'dict',
  1910. component: 'system/dict/index',
  1911. perm: null,
  1912. visible: 1,
  1913. sort: 5,
  1914. icon: 'dict',
  1915. redirect: null,
  1916. keepAlive: 1,
  1917. alwaysShow: null
  1918. }
  1919. }