人民医院前端

listUrl.js 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. /* eslint-disable */
  2. const dataMenu = ["orderManage", "faultRepairManagement", "comDispatch", "SJGD"]
  3. const urlData = {
  4. /*
  5. type :
  6. 1 : 报工模块
  7. 2 : 接单模块
  8. 3 : 报表模块
  9. */
  10. 'orderManage': [
  11. {
  12. type : 1,
  13. id: "12",
  14. imagePath: "../../static/consult.png",
  15. imageBg: "#1ccd8d",
  16. text: "咨询工单", //WorkOrder/GetLDDealList
  17. navigateToUrl: "/pages/myTask/consultList/consultList?segmenter=0&urlIndex=0",
  18. },
  19. {
  20. type : 1,
  21. id: "13",
  22. imagePath: "../../static/consult.png",
  23. imageBg: "#1ccd8d",
  24. text: "综合调度", //WorkOrder/GetLDDealList
  25. navigateToUrl: "/pages/myTask/comDispatch/applicantList/applicantList?segmenter=0&urlIndex=0",
  26. },
  27. {
  28. type : 1,
  29. id: "11",
  30. imagePath: "../../static/reppair.png",
  31. imageBg: "#1ccd8d",
  32. text: "故障报修", //WorkOrder/GetLDDealList
  33. navigateToUrl: "/pages/myTask/repairList/myRepairOrderList/myRepairOrderList?segmenter=0&urlIndex=1",
  34. },
  35. {
  36. type : 1,
  37. id: "14",
  38. imagePath: "../../static/icon_vehicleScheduling.png",
  39. imageBg: "#1ccd8d",
  40. text: "车辆调度", //WorkOrder/GetLDDealList
  41. navigateToUrl: "/pages/myTask/vehicleSchedulList/vehicleSchedulList?segmenter=1",
  42. },
  43. // {
  44. // type : 3,
  45. // id: "15",
  46. // imagePath: "../../static/icon_vehicleScheduling.png",
  47. // imageBg: "#aaffff",
  48. // text: "日报", //WorkOrder/GetLDDealList
  49. // navigateToUrl: "/pages/myTask/reportForm/reportForm?reportType=0",
  50. // },
  51. // {
  52. // type : 3,
  53. // id: "16",
  54. // imagePath: "../../static/icon_vehicleScheduling.png",
  55. // imageBg: "#aaffff",
  56. // text: "月报", //WorkOrder/GetLDDealList
  57. // navigateToUrl: "/pages/myTask/reportForm/reportForm?reportType=1",
  58. // }
  59. ],
  60. 'faultRepairManagement': [{
  61. type : 2,
  62. id: "2",
  63. imagePath: "../../static/icon_repair.png",
  64. imageBg: "#fe940a",
  65. text: "维修工单", //WorkOrder/GetLDDealList
  66. navigateToUrl: "/pages/myTask/repairList/repairList?segmenter=0",
  67. }],
  68. "comDispatch": [{
  69. type : 2,
  70. id: "3",
  71. imagePath: "../../static/consult.png",
  72. imageBg: "#fe940a",
  73. text: "调度工单", //WorkOrder/GetLDDealList
  74. navigateToUrl: "/pages/myTask/comDispatch/applicantList/applicantList?segmenter=0&urlIndex=1",
  75. }],
  76. "SJGD": [{
  77. type : 2,
  78. id: "4",
  79. imagePath: "../../static/icon_vehicleScheduling.png",
  80. imageBg: "#fe940a",
  81. text: "司机工单", //WorkOrder/GetLDDealList
  82. navigateToUrl: "/pages/myTask/vehicleSchedulList/vehicleSchedulList?segmenter=0",
  83. }],
  84. 'equipmentTransfer': {
  85. myEquipment:{
  86. type : 4,
  87. menuCode:'myEquipment',
  88. id: "40",
  89. imagePath: "../../static/icon_equipment.png",
  90. imageBg: "#2979ff",
  91. text: "我的设备", //WorkOrder/GetLDDealList
  92. navigateToUrl: "/pages/myTask/myEquipment/myEquipment",
  93. },
  94. idleEquipment:{
  95. type : 4,
  96. menuCode:'idleEquipment',
  97. id: "41",
  98. imagePath: "../../static/icon_freeEquipment.png",
  99. imageBg: "#2979ff",
  100. text: "空闲设备", //WorkOrder/GetLDDealList
  101. navigateToUrl: "/pages/myTask/idleEquipment/idleEquipment",
  102. },
  103. transferReview:{
  104. type : 4,
  105. menuCode:'transferReview',
  106. id: "42",
  107. imagePath: "../../static/icon_equipmentTransfer.png",
  108. imageBg: "#2979ff",
  109. text: "调拨审核", //WorkOrder/GetLDDealList
  110. navigateToUrl: "/pages/myTask/transferReview/transferReview",
  111. }
  112. },
  113. // 'equipmentTransfer':[
  114. // {
  115. // type : 4,
  116. // menuCode:'myEquipment',
  117. // id: "40",
  118. // imagePath: "../../static/icon_equipment.png",
  119. // imageBg: "#2979ff",
  120. // text: "我的设备", //WorkOrder/GetLDDealList
  121. // navigateToUrl: "/pages/myTask/myEquipment/myEquipment",
  122. // },
  123. // {
  124. // type : 4,
  125. // menuCode:'idleEquipment',
  126. // id: "41",
  127. // imagePath: "../../static/icon_freeEquipment.png",
  128. // imageBg: "#2979ff",
  129. // text: "空闲设备", //WorkOrder/GetLDDealList
  130. // navigateToUrl: "/pages/myTask/idleEquipment/idleEquipment",
  131. // },
  132. // {
  133. // type : 4,
  134. // menuCode:'transferReview',
  135. // id: "42",
  136. // imagePath: "../../static/icon_equipmentTransfer.png",
  137. // imageBg: "#2979ff",
  138. // text: "调拨审核", //WorkOrder/GetLDDealList
  139. // navigateToUrl: "/pages/myTask/transferReview/transferReview",
  140. // },
  141. // ]
  142. }
  143. const listUrl = {
  144. getUrlData(code) {
  145. return urlData[code];
  146. },
  147. getUrlCode() {
  148. const urlCodeData = []
  149. Object.keys(urlData).forEach(function(key) {
  150. urlCodeData.push(key)
  151. });
  152. return urlCodeData;
  153. },
  154. getMenuData(data, code) {
  155. const menuData = []
  156. for (let i in data) {
  157. const menuCode = data[i].F_MenuCode
  158. if(menuCode ==="vehicleDispatch"){
  159. for (let m in data[i].children) {
  160. const menuChildCode = data[i].children[m].F_MenuCode
  161. if (dataMenu.indexOf(menuChildCode) != -1) {
  162. for(let n in urlData[menuChildCode]){
  163. menuData.push(urlData[menuChildCode][n])
  164. }
  165. }
  166. }
  167. }else if(menuCode ==="equipmentTransfer"){
  168. if(data[i].children.length > 0){
  169. for (let o in data[i].children) {
  170. menuData.push(urlData[menuCode][data[i].children[o].F_MenuCode])
  171. }
  172. }
  173. }else{
  174. for(let n in urlData[menuCode]){
  175. menuData.push(urlData[menuCode][n])
  176. }
  177. }
  178. }
  179. console.log(menuData)
  180. return menuData
  181. }
  182. };
  183. export default listUrl