yangyin
2023-12-27 90a47ee6822099582af5efc49e4d05332d2bebd3
fix: 修改地图
已修改1个文件
46 ■■■■■ 文件已修改
map/index.js 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
      }
      }
      console.log(type,584)
        type=markers[i].markerType
      if(type=='Station'){
        let stationLastRecord = await that.getGeneralLastRecordByStationID(id)
        markerTipInfo.markerInfo.Records = stationLastRecord
        that.setData({
          markerTipInfo: markerTipInfo
        })
      }
      if(type=='FlowMeter'){
        let stationLastRecord = await that.getMonitorKpiInfoByFlowMeterID(id)
        markerTipInfo.markerInfo.Records = stationLastRecord
        that.setData({
          markerTipInfo: markerTipInfo
        })
   
          let flowMeterLastRecord = await that.getMonitorKpiInfoByFlowMeterID(id)
          markerTipInfo.markerInfo.Records = flowMeterLastRecord
      }
      if(type=='PressMeter'){
        let stationLastRecord = await that.getMonitorKpiInfoByPressMeterID(id)
        markerTipInfo.markerInfo.Records = stationLastRecord
        that.setData({
          markerTipInfo: markerTipInfo
        })
          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 stationLastRecord = await that.getRepairStatusInfo(FormType,FormID)
        console.log(stationLastRecord,628)
        markerTipInfo.markerInfo = stationLastRecord
        that.setData({
          markerTipInfo: markerTipInfo
        })
          let repairLastRecord = await that.getRepairStatusInfo(FormType,FormID)
          markerTipInfo.markerInfo = repairLastRecord
      }
    console.log(markerTipInfo.markerType,625)
        that.setData({
          markerTipInfo: markerTipInfo,
        })
      }
      }
  },
  //获取泵站最近一条数据