mock-menu.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. // 菜单 mock 假数据
  2. module.exports = [
  3. {
  4. url: '/menu/getMenuData',
  5. type: 'get',
  6. response: _ => {
  7. const menuData = [
  8. {
  9. path: '/plan',
  10. redirect: '/plan/index',
  11. name: 'plan',
  12. component: 'Layout',
  13. meta: {
  14. title: '检测方案',
  15. icon: 'el-icon-document',
  16. roles: ['xxx', 'admin', 'editor']
  17. },
  18. children: [
  19. {
  20. path: 'index',
  21. component: 'plan/index',
  22. name: 'plan index',
  23. hidden: true,
  24. meta: {
  25. title: '方案列表',
  26. roles: ['admin']
  27. }
  28. },
  29. {
  30. path: 'save',
  31. component: 'plan/save',
  32. name: 'plan save',
  33. hidden: true,
  34. meta: {
  35. title: '新建方案',
  36. roles: ['admin']
  37. }
  38. }
  39. ]
  40. },
  41. {
  42. path: '/device',
  43. component: 'Layout',
  44. redirect: '/device/index',
  45. name: '设备检测',
  46. meta: {
  47. title: '设备检测',
  48. icon: 'el-icon-document',
  49. roles: ['admin', 'editor']
  50. },
  51. children: [
  52. {
  53. path: 'index',
  54. component: 'device/index',
  55. name: 'device index',
  56. hidden: true,
  57. meta: {
  58. title: '设备检测列表',
  59. roles: ['admin']
  60. }
  61. },
  62. {
  63. path: 'save',
  64. component: 'device/save',
  65. name: 'device save',
  66. hidden: true,
  67. meta: {
  68. title: '新建设备检测',
  69. roles: ['admin']
  70. }
  71. },
  72. {
  73. path: 'check',
  74. component: 'device/check',
  75. name: 'device check',
  76. hidden: true,
  77. meta: {
  78. title: '设备检测中',
  79. roles: ['admin']
  80. }
  81. },
  82. {
  83. path: 'mqtt',
  84. component: 'device/mqtt',
  85. name: 'device mqtt',
  86. hidden: true,
  87. meta: {
  88. title: '设备检测 MQTT',
  89. roles: ['admin']
  90. }
  91. }
  92. ]
  93. },
  94. {
  95. path: '/testreport',
  96. component: 'Layout',
  97. redirect: '/testreport/index',
  98. children: [
  99. {
  100. path: 'index',
  101. component: 'testreport/index',
  102. name: 'testreport',
  103. meta: { title: '测试报告', icon: 'el-icon-document-copy', affix: true }
  104. }
  105. ]
  106. },
  107. // 基础数据 界面隐藏
  108. // 聊天记录: 20230609一致性检测沟通问题清单.docx
  109. // {
  110. // path: '/basedata',
  111. // component: 'Layout',
  112. // redirect: '/basedata/index',
  113. // children: [
  114. // {
  115. // path: 'index',
  116. // component: 'basedata/index',
  117. // name: 'basedata',
  118. // meta: { title: '基础数据', icon: 'el-icon-coin', affix: true }
  119. // }
  120. // ]
  121. // },
  122. {
  123. path: '/system',
  124. component: 'Layout',
  125. redirect: '/system/index',
  126. name: '系统管理',
  127. meta: {
  128. title: '系统管理',
  129. icon: 'el-icon-document',
  130. roles: ['admin', 'editor']
  131. },
  132. children: [
  133. {
  134. path: 'index',
  135. component: 'system/index',
  136. name: 'system authority',
  137. hidden: true,
  138. meta: {
  139. title: '角色管理',
  140. roles: ['admin']
  141. }
  142. },
  143. {
  144. path: 'log',
  145. component: 'system/index',
  146. name: 'system log',
  147. hidden: true,
  148. meta: {
  149. title: '操作日志',
  150. roles: ['admin']
  151. }
  152. },
  153. {
  154. path: 'user',
  155. component: 'system/index',
  156. name: 'system user',
  157. hidden: true,
  158. meta: {
  159. title: '用户管理',
  160. roles: ['admin']
  161. }
  162. },
  163. {
  164. path: 'menu',
  165. component: 'system/index.vue',
  166. name: 'system user',
  167. hidden: true,
  168. meta: {
  169. title: '菜单管理',
  170. roles: ['admin']
  171. }
  172. }
  173. ]
  174. },
  175. { path: '*', redirect: '/404', hidden: true }
  176. ]
  177. return {
  178. code: 20000,
  179. data: menuData
  180. }
  181. }
  182. }
  183. ]