yangyin
2023-12-26 ebd9f0bd44a76a0fba4f82f799b349cdab2b21ca
fix: 修改监测值
已修改4个文件
104 ■■■■■ 文件已修改
map/index.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
monitor/singlePoint/index.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
monitor/station/index.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.private.config.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
map/index.js
@@ -583,21 +583,14 @@
    })
    console.log(stationLastRecord,id,528)
    if(stationLastRecord.LastRecordList==null){
      return
    }
    if(stationLastRecord.LastRecordList!=null){
        for (let j = 0; j < stationLastRecord.LastRecordList.length; j++) {
          let record = stationLastRecord.LastRecordList[j];
        console.log(record.DataValue,591)
        }
      }
    // console.log(markers,540)
    for (var i = 0; i < markers.length; i++) {
      console.log(markers[i].markerInfo,598)
      if (markers[i].markerInfo.ObjectType == '泵站' && id == markers[i].StationID) {
      if ( id == markers[i].StationID) {
        markerTipInfo = markers[i];
        markerTipInfo.markerInfo.Records = Record
        markerTipInfo.markerInfo.Records = stationLastRecord.LastRecordList
        that.setData({
          markerTipInfo: markerTipInfo
        })
@@ -605,8 +598,8 @@
      } else if (id == markers[i].id) {
        // console.log("ddd")
        markerTipInfo = markers[i];
        //  console.log(markerTipInfo)
        var ids = markerTipInfo.markerInfo.ObjectID
         console.log(markerTipInfo)
        var ids = markerTipInfo.markerInfo.StationID
        // console.log(ids,520)
        //console.log(markerTipInfo)
        that.refreshMonitorRecords(ids)
monitor/singlePoint/index.js
@@ -514,17 +514,19 @@
  refreshRealAlarmRecord() {
    var that = this;
    var real_time_records = that.data.real_time_records
    var real_data_time=real_time_records[real_time_records.length-1].DataTime
    console.log(real_time_records,real_data_time,517)
    that.setData({
      loadingHidden: false,
      loadingInfo: "刷新中,请稍等..."
    });
    //console.log(that.data.pointID)
    Request({
      url: Constant.BASE_SERVER_URL + "Run/MonitorAlarmRecord/Mobile/GetLastRecordListByMonitorPointID@V1.0",
      url: Constant.BASE_SERVER_URL + "Monitor/Value/Alarm/Record/Std/GetBySignalIDOfTime@V1.0",
      method: 'GET',
      data: {
        CorpID: Constant.CorpID,
        MonitorPointID: that.data.pointID,
        Time: real_data_time,
        SignalID : that.data.pointID,
      },
      header: {
        'content-type': 'application/json'
@@ -1357,11 +1359,11 @@
    })
    Request({
      url: Constant.BASE_SERVER_URL + "Run/MonitorAlarmRecord/Mobile/GetPageListByMonitorPointID@V1.1",
      url: Constant.BASE_SERVER_URL + "Monitor/Value/Alarm/Record/Std/GetPageListBySignalID@V1.0",
      method: 'GET',
      data: {
        CorpID: Constant.CorpID,
        MonitorPointID: that.data.pointID,
        SignalID : that.data.pointID,
        StartTime: that.data.startAlarmDate,
        EndTime: that.data.endAlarmDate,
        PageIndex: that.data.PageIndex,
@@ -1393,6 +1395,16 @@
          });
          return;
        }
        if(res.data.Data.List==null)
        {
          wx.showToast({
            title: '当前无报警数据',
          });
          that.setData({
            hasAlarmData: false
          });
          return;
        }
        if (res.data.Data.List.length == 0) {
          wx.showToast({
            title: '当前日期,没有获取到监控值',
monitor/station/index.js
@@ -297,7 +297,7 @@
    var machineList = this.data.machineList;
    var userInfo = app.globalData.userInfo;
    Request({
      url: Constant.BASE_SERVER_URL + 'Run/RunSpan/Mobile/GetByStationIDOfDay@V1.0',
      url: Constant.BASE_SERVER_URL + 'SZJT/Run/Analy/Mobile/GetSpanListByStationIDOfDay@V1.0',
      method: 'GET',
      data: {
        StationID :that.data.stationID,
@@ -313,16 +313,23 @@
          return;
        }
        // 
        var run_time_array = result.Data;
        //
         console.log('291行   ', that.data.historyDate + '的开停机:', run_time_array);
        for (var i = 0; i < machineList.length; i++) {
          console.log()
        var run_time_array = result.Data;
        //  console.log('291行   ', that.data.historyDate + '的开停机:', run_time_array);
         run_time_array.forEach(item => {
          item.runTimeSum=0
           item.ChunkList.forEach(chunkItem=>{
            //  console.log(chunkItem,321)
             if (chunkItem.RunStatus == 1) {
               item.runTimeSum += chunkItem.Duration;
             }
           })
         })
        //  console.log(run_time_array,328)
        for (var i = 0; i < machineList.length; i++) {
          run_time_array.forEach(item => {
            if(machineList[i].TitleName == item.Name){
              machineList[i].WorkTime = (item.RumTime / 60 / 60).toFixed(1)
              machineList[i].WorkTime = (item.runTimeSum/ 60 / 60).toFixed(1)
            }
          });
        }
@@ -347,7 +354,7 @@
      var machineListNode = []
      records.forEach(item => {
        if(item.Name == machineList[i].MachineName){
          machineListNode.push(item.Spans)
          machineListNode.push(item.ChunkList)
        }
      });
        // console.log('machineListNode', machineListNode)
@@ -693,26 +700,16 @@
  getAlarmData: function () {
    var that = this;
    var alarmListInfo = that.data.alarmListInfo
    var userInfo = app.globalData.userInfo;
    wx.showLoading({
      title: '加载中...',
    })
    let data = {
      CorpID:Constant.CorpID,
      StationID: that.data.stationID,
      StartTime : that.data.startAlarmDate,
      EndTime : that.data.endAlarmDate,
      PageIndex: that.data.PageIndex,
      PageSize: that.data.PageSize
    }
    // console.log(data,697)
console.log(that.data.stationID,706)
    Request({
      url: Constant.BASE_SERVER_URL + "Run/MonitorAlarmRecord/Mobile/GetPageListByStationID@V1.1",
      url: Constant.BASE_SERVER_URL + "Monitor/Value/Alarm/Record/Std/GetPageListBySignalID@V1.0",
      method: 'GET',
      data: {
        CorpID:Constant.CorpID,
        StationID: that.data.stationID,
        SignalID : that.data.stationID,
        StartTime: that.data.startAlarmDate,
        EndTime: that.data.endAlarmDate,
        PageIndex: that.data.PageIndex,
@@ -745,6 +742,16 @@
          return;
        }
        let result = res.data.Data
        if(result.List==null)
        {
          wx.showToast({
            title: '当前无报警数据',
          });
          that.setData({
            hasAlarmData: false
          });
          return;
        }
        if (result.List.length == 0) {
          wx.showToast({
            title: '当前无报警数据',
project.private.config.json
@@ -11,15 +11,15 @@
      "list": [
        {
          "name": "",
          "pathName": "monitor/station/index",
          "query": "id=23&name=%E5%87%AF%E6%B3%89%E4%B8%80%E4%BD%93%E5%8C%96%E5%A2%9E%E5%8E%8B%E6%B3%B5%E7%AB%99",
          "pathName": "map/index",
          "query": "",
          "launchMode": "default",
          "scene": null
        },
        {
          "name": "",
          "pathName": "station/list/index",
          "query": "",
          "pathName": "monitor/station/index",
          "query": "id=23&name=%E5%87%AF%E6%B3%89%E4%B8%80%E4%BD%93%E5%8C%96%E5%A2%9E%E5%8E%8B%E6%B3%B5%E7%AB%99",
          "launchMode": "default",
          "scene": null
        }