diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index ae7e6f3..5adb43a 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -505,9 +505,25 @@ export default { //设置时间表 handleSetSchedule() { - this.$refs.setschedule_ref.display(); - this.$refs.setschedule_ref.getSingleAccess(this.channelId, this.cmdid); - this.$refs.setschedule_ref.deviceList(); + getTermStatus({ termId: this.newTermId }).then((res) => { + console.log(res); + if (res.data.isonline) { + this.$refs.setschedule_ref.display(); + this.$refs.setschedule_ref.getSingleAccess( + this.channelId, + this.cmdid + ); + this.$refs.setschedule_ref.deviceList(); + } else { + this.btnpicloading = false; + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", + }); + } + }); }, handleCommandWarn(command) { switch (command) { @@ -679,35 +695,7 @@ export default { } }); }, - //手动拍照 - // handleShowPic() { - // console.log(this.channelValue[0]); - // console.log(this.cmdid); - // getLatestPhotoJoggle({ - // captureType: 0, - // channel: this.channelValue[0], - // cmdid: this.cmdid, - // preset: 255, - // }) - // .then((res) => { - // this.$message({ - // message: "自动拍照请求成功!", - // type: "success", - // }); - // console.log(res); - // this.newPicData = res.data; - // console.log(this.newPicData); - // console.log(this.newTermId); - // this.timer = window.setInterval(() => { - // this.newPicApi(); - // this.i++; - // }, 10000); - // }) - // .catch((err) => { - // console.log(err); //代码错误、请求失败捕获 - // }); - // }, //获取最新图片 newPicApi() { getReturnedPhotoJoggle({