| | |
| | | } |
| | | |
| | | 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: { |
| | |
| | | // var dict = result.Data.PointList; |
| | | // console.log('dict',dict); |
| | | var allMeterPoints = dict; |
| | | if (allMeterPoints.length == 0) { |
| | | if (allMeterPoints ==null) { |
| | | return; |
| | | } |
| | | // console.log('allMeterPoints', allMeterPoints); |
| | |
| | | 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++) { |
| | |
| | | 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 () { |
| | |
| | | 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; |
| | |
| | | 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' |
| | |
| | | |
| | | }, |
| | | 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, |
| | | }); |