From 90a47ee6822099582af5efc49e4d05332d2bebd3 Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期三, 27 十二月 2023 10:10:26 +0800 Subject: [PATCH] fix: 修改地图 --- map/index.js | 62 ++++++++++++------------------- 1 files changed, 24 insertions(+), 38 deletions(-) diff --git a/map/index.js b/map/index.js index 5e9dd5e..2b2de6f 100644 --- a/map/index.js +++ b/map/index.js @@ -548,7 +548,7 @@ }, //鐐瑰嚮鍦板浘marker tapMapMark: function (e) { - console.log(e,484) + // console.log(e,484) var id = e.detail.markerId; // console.log(id) //console.log(e) @@ -583,48 +583,34 @@ for (var i = 0; i < markers.length; i++) { markerTipInfo = markers[i]; if(id==markers[i].id){ - type=markerTipInfo.markerType + type=markers[i].markerType + if(type=='Station'){ + let stationLastRecord = await that.getGeneralLastRecordByStationID(id) + markerTipInfo.markerInfo.Records = stationLastRecord + } + if(type=='FlowMeter'){ - } - } - console.log(type,584) - if(type=='Station'){ - let stationLastRecord = await that.getGeneralLastRecordByStationID(id) - markerTipInfo.markerInfo.Records = stationLastRecord + let flowMeterLastRecord = await that.getMonitorKpiInfoByFlowMeterID(id) + markerTipInfo.markerInfo.Records = flowMeterLastRecord + } + if(type=='PressMeter'){ + console.log(13) + let infoByPressMeterLastRecord = await that.getMonitorKpiInfoByPressMeterID(id) + markerTipInfo.markerInfo.Records = infoByPressMeterLastRecord + } + if(type=='gongdan'){ + console.log(14) + var FormType=markerTipInfo.markerInfo.FormType + var FormID=markerTipInfo.markerInfo.FormID + let repairLastRecord = await that.getRepairStatusInfo(FormType,FormID) + markerTipInfo.markerInfo = repairLastRecord + } that.setData({ - markerTipInfo: markerTipInfo + markerTipInfo: markerTipInfo, }) - } - if(type=='FlowMeter'){ - let stationLastRecord = await that.getMonitorKpiInfoByFlowMeterID(id) - markerTipInfo.markerInfo.Records = stationLastRecord - that.setData({ - markerTipInfo: markerTipInfo - }) - } - if(type=='PressMeter'){ - - let stationLastRecord = await that.getMonitorKpiInfoByPressMeterID(id) - markerTipInfo.markerInfo.Records = stationLastRecord - that.setData({ - markerTipInfo: markerTipInfo - }) - - } - if(type=='gongdan'){ - var FormType=markerTipInfo.markerInfo.FormType - var FormID=markerTipInfo.markerInfo.FormID - let stationLastRecord = await that.getRepairStatusInfo(FormType,FormID) - console.log(stationLastRecord,628) - markerTipInfo.markerInfo = stationLastRecord - that.setData({ - markerTipInfo: markerTipInfo - }) - - } - console.log(markerTipInfo.markerType,625) + }, //鑾峰彇娉电珯鏈�杩戜竴鏉℃暟鎹� -- Gitblit v1.9.3