| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- /* eslint-disable */
- const dataMenu = ["orderManage", "faultRepairManagement", "comDispatch", "SJGD"]
- const urlData = {
- /*
- type :
- 1 : 报工模块
- 2 : 接单模块
- 3 : 报表模块
- */
- 'orderManage': [
- {
- type : 1,
- id: "12",
- imagePath: "../../static/consult.png",
- imageBg: "#1ccd8d",
- text: "咨询工单", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/consultList/consultList?segmenter=0&urlIndex=0",
- },
- {
- type : 1,
- id: "13",
- imagePath: "../../static/consult.png",
- imageBg: "#1ccd8d",
- text: "综合调度", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/comDispatch/applicantList/applicantList?segmenter=0&urlIndex=0",
- },
- {
- type : 1,
- id: "11",
- imagePath: "../../static/reppair.png",
- imageBg: "#1ccd8d",
- text: "故障报修", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/repairList/myRepairOrderList/myRepairOrderList?segmenter=0&urlIndex=1",
- },
- {
- type : 1,
- id: "14",
- imagePath: "../../static/icon_vehicleScheduling.png",
- imageBg: "#1ccd8d",
- text: "车辆调度", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/vehicleSchedulList/vehicleSchedulList?segmenter=1",
- },
- // {
- // type : 3,
- // id: "15",
- // imagePath: "../../static/icon_vehicleScheduling.png",
- // imageBg: "#aaffff",
- // text: "日报", //WorkOrder/GetLDDealList
- // navigateToUrl: "/pages/myTask/reportForm/reportForm?reportType=0",
- // },
- // {
- // type : 3,
- // id: "16",
- // imagePath: "../../static/icon_vehicleScheduling.png",
- // imageBg: "#aaffff",
- // text: "月报", //WorkOrder/GetLDDealList
- // navigateToUrl: "/pages/myTask/reportForm/reportForm?reportType=1",
- // }
- ],
-
- 'faultRepairManagement': [{
- type : 2,
- id: "2",
- imagePath: "../../static/icon_repair.png",
- imageBg: "#fe940a",
- text: "维修工单", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/repairList/repairList?segmenter=0",
- }],
-
- "comDispatch": [{
- type : 2,
- id: "3",
- imagePath: "../../static/consult.png",
- imageBg: "#fe940a",
- text: "调度工单", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/comDispatch/applicantList/applicantList?segmenter=0&urlIndex=1",
- }],
-
- "SJGD": [{
- type : 2,
- id: "4",
- imagePath: "../../static/icon_vehicleScheduling.png",
- imageBg: "#fe940a",
- text: "司机工单", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/vehicleSchedulList/vehicleSchedulList?segmenter=0",
- }],
- 'equipmentTransfer': {
- myEquipment:{
- type : 4,
- menuCode:'myEquipment',
- id: "40",
- imagePath: "../../static/icon_equipment.png",
- imageBg: "#2979ff",
- text: "我的设备", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/myEquipment/myEquipment",
- },
- idleEquipment:{
- type : 4,
- menuCode:'idleEquipment',
- id: "41",
- imagePath: "../../static/icon_freeEquipment.png",
- imageBg: "#2979ff",
- text: "空闲设备", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/idleEquipment/idleEquipment",
- },
- transferReview:{
- type : 4,
- menuCode:'transferReview',
- id: "42",
- imagePath: "../../static/icon_equipmentTransfer.png",
- imageBg: "#2979ff",
- text: "调拨审核", //WorkOrder/GetLDDealList
- navigateToUrl: "/pages/myTask/transferReview/transferReview",
- }
- },
-
-
-
-
- // 'equipmentTransfer':[
- // {
- // type : 4,
- // menuCode:'myEquipment',
- // id: "40",
- // imagePath: "../../static/icon_equipment.png",
- // imageBg: "#2979ff",
- // text: "我的设备", //WorkOrder/GetLDDealList
- // navigateToUrl: "/pages/myTask/myEquipment/myEquipment",
- // },
- // {
- // type : 4,
- // menuCode:'idleEquipment',
- // id: "41",
- // imagePath: "../../static/icon_freeEquipment.png",
- // imageBg: "#2979ff",
- // text: "空闲设备", //WorkOrder/GetLDDealList
- // navigateToUrl: "/pages/myTask/idleEquipment/idleEquipment",
- // },
- // {
- // type : 4,
- // menuCode:'transferReview',
- // id: "42",
- // imagePath: "../../static/icon_equipmentTransfer.png",
- // imageBg: "#2979ff",
- // text: "调拨审核", //WorkOrder/GetLDDealList
- // navigateToUrl: "/pages/myTask/transferReview/transferReview",
- // },
- // ]
- }
- const listUrl = {
- getUrlData(code) {
- return urlData[code];
- },
- getUrlCode() {
- const urlCodeData = []
- Object.keys(urlData).forEach(function(key) {
- urlCodeData.push(key)
- });
- return urlCodeData;
- },
- getMenuData(data, code) {
- const menuData = []
- for (let i in data) {
- const menuCode = data[i].F_MenuCode
- if(menuCode ==="vehicleDispatch"){
- for (let m in data[i].children) {
- const menuChildCode = data[i].children[m].F_MenuCode
- if (dataMenu.indexOf(menuChildCode) != -1) {
- for(let n in urlData[menuChildCode]){
- menuData.push(urlData[menuChildCode][n])
- }
- }
- }
- }else if(menuCode ==="equipmentTransfer"){
- if(data[i].children.length > 0){
- for (let o in data[i].children) {
- menuData.push(urlData[menuCode][data[i].children[o].F_MenuCode])
- }
- }
- }else{
- for(let n in urlData[menuCode]){
- menuData.push(urlData[menuCode][n])
- }
- }
-
- }
- console.log(menuData)
- return menuData
- }
- };
- export default listUrl
|