tanghaolin
2024-05-14 e74dbf0c6cd848916bed63633a06fc156451e1a1
monitor/meter/index.js
@@ -161,10 +161,9 @@
    }
    Request({
      url: Constant.BASE_SERVER_URL + "Monitor/MonitorPoint/Mobile/GetByMeterID@V1.0",
      url: Constant.BASE_SERVER_URL + "SZJT/Meter/Monitor/List/Mobile/GetByMeterID@V1.0",
      method: 'GET',
      data: {
        CorpID: userInfo.CorpID,
        MeterID: meterID,
      },
      header: {
@@ -195,7 +194,7 @@
        // var dict = result.Data.PointList;
        // console.log('dict',dict);
        var allMeterPoints = dict;
        if (allMeterPoints.length == 0) {
        if (allMeterPoints ==null) {
          return;
        }
        //  console.log('allMeterPoints', allMeterPoints);
@@ -203,12 +202,12 @@
          var dis_num = 0;
          for (var n = 0; n < allMeterPoints.length; n++) {
            var record = allMeterPoints[n];
            record.SignalList[0].SignalValue = ""
            record.SignalList[0].RecordTime= ""
            record.SignalValue = ""
            record.RecordTime= ""
            record.isDisp = false;
              record.isDisp = true;
              dis_num++;
              allMeterPointIds.push(record.ID);
              allMeterPointIds.push(record.SignalID);
          }
          if (dis_num < 2) { //没有就显示前两个
            for (var n = 0; n < allMeterPoints.length; n++) {
@@ -216,12 +215,12 @@
              if (dis_num <= 2) {
                record.isDisp = true;
                dis_num++;
                allMeterPointIds.push(record.ID);
                allMeterPointIds.push(record.SignalID);
              }
            }
          }
        
        // console.log(allMeterPointIds)
        // console.log(allMeterPointIds,223)
        //定时刷新
        var intervalRefreshTime = setInterval(function () {
@@ -290,7 +289,7 @@
  refreshRecordValue: function (Ids) {
    var that = this;
    var allPointId = Ids.join(',');
    // console.log(allPointId,565)
    console.log(allPointId,293)
    var userInfo = app.globalData.userInfo;
    if (allPointId == null || allPointId.length == 0)
      return;
@@ -299,11 +298,10 @@
      loadingInfo: "刷新中,请稍等..."
    });
     Request({
      url: Constant.BASE_SERVER_URL + "Run/MonitorRecord/Mobile/GetLastRecordByMonitorPointIds@V1.0",
      url: Constant.BASE_SERVER_URL + "Monitor/Record/Std/GetLastRecordList@V2.0",
      method: 'GET',
      data: {
        CorpID: userInfo.CorpID,
        MonitorPointIds : allPointId
        SignalIds  : allPointId
      },
      header: {
        'content-type': 'application/json'
@@ -363,19 +361,19 @@
  },
  tapeMonitorPoint: function (e) {
    // console.log(e,653)
    console.log(e,653)
    var pointid = e.currentTarget.dataset.pointid;
    let cronType = e.currentTarget.dataset.crontype;
    // let cronType = e.currentTarget.dataset.crontype;
    let pointName = e.currentTarget.dataset.pointname;
    let pointUnit = e.currentTarget.dataset.pointunit;
if(cronType != 0){
  wx.showModal({
    title:"提示",
    content:"不是实时测点,暂无配置",
    showCancel:false,
  })
  return
}
// if(cronType != 0){
//   wx.showModal({
//     title:"提示",
//     content:"不是实时测点,暂无配置",
//     showCancel:false,
//   })
//   return
// }
    wx.navigateTo({
      url: '../singlePoint/index?id=' + pointid + '&name=' + pointName + "&unit=" + pointUnit,
    });