| | |
| | | }) |
| | | 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 |
| | | }) |
| | |
| | | } 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) |
| | |
| | | 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' |
| | |
| | | }) |
| | | |
| | | 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, |
| | |
| | | }); |
| | | 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: '当前日期,没有获取到监控值', |
| | |
| | | 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, |
| | |
| | | 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) |
| | | } |
| | | }); |
| | | } |
| | |
| | | var machineListNode = [] |
| | | records.forEach(item => { |
| | | if(item.Name == machineList[i].MachineName){ |
| | | machineListNode.push(item.Spans) |
| | | machineListNode.push(item.ChunkList) |
| | | } |
| | | }); |
| | | // console.log('machineListNode', machineListNode) |
| | |
| | | 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, |
| | |
| | | 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: '当前无报警数据', |
| | |
| | | "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 |
| | | } |