From 868d924ada653650f951e09f2b5e3f55d834f435 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Thu, 15 Jun 2023 14:51:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=8A=B6=E6=80=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/realTimeMonitor/index.vue | 50 +++++++++++------------------ 1 file changed, 19 insertions(+), 31 deletions(-) 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({