menu.mock.ts 56 KB

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