From dbb514d8deb1ef64ca89f7afb1b30b6dda7dfcc0 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Fri, 19 May 2023 17:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/setdevice.vue | 67 +++++++-------- .../photographicDevice/index.vue | 85 ++++++++++++++++++- .../realTimeMonitor/components/infoDialog.vue | 4 +- src/views/realTimeMonitor/index.vue | 69 +-------------- 4 files changed, 119 insertions(+), 106 deletions(-) diff --git a/src/views/devicePhotoSchedule/components/setdevice.vue b/src/views/devicePhotoSchedule/components/setdevice.vue index 86cc444..e2879e8 100644 --- a/src/views/devicePhotoSchedule/components/setdevice.vue +++ b/src/views/devicePhotoSchedule/components/setdevice.vue @@ -15,39 +15,10 @@ 间隔:{{ val.span }}分钟
-" + + `${res.data.longitude}` + + "
" + + `${res.data.latitude}` + + "
" + + `${res.data.radius}` + + "
", + "GPS位置", + { + dangerouslyUseHTMLString: true, + customClass: "messageGps", + } + ); + }) + .catch((err) => { + console.log(err); //代码错误、请求失败捕获 + }); + }, + //切换gps开启关闭 + changeGPS(val) { + console.log(val); + setTermGPSJoggle({ gpsstatus: val, termid: this.channelId }) + .then((res) => { + console.log(res); + if (val == 0) { + this.$message("关闭GPS"); + } else { + this.$message({ + message: "成功开启GPS", + type: "success", + }); + } + }) + .catch((err) => { + console.log(err); //代码错误、请求失败捕获 + }); + }, + handleCommand(command) { + switch (command) { + case "open": //开启 + this.changeGPS(1); + break; + case "close": //关闭 + this.changeGPS(0); + break; + } + }, //图像采集参数 handleImageCapture(data) { this.$refs.imageCaptureref.display(); @@ -309,5 +382,11 @@ export default { margin-top: 16px; height: calc(100% - 48px); } + .dropgps { + color: #409eff; + margin-left: 16px; + margin-right: 16px; + cursor: pointer; + } } diff --git a/src/views/realTimeMonitor/components/infoDialog.vue b/src/views/realTimeMonitor/components/infoDialog.vue index aa2e646..392b4fe 100644 --- a/src/views/realTimeMonitor/components/infoDialog.vue +++ b/src/views/realTimeMonitor/components/infoDialog.vue @@ -90,7 +90,7 @@ export default { }, //最新数据 getNewListData(val) { - this.loading = true; + //this.loading = true; getNewDeviceList({ queryTime: this.queryTime, termId: val, @@ -106,7 +106,7 @@ export default { } else { this.infornr = res.data; } - this.loading = false; + //this.loading = false; }) .catch((err) => {}); }, diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index 86bdfa2..dd0596e 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -173,8 +173,6 @@ import { getdyTreeListJoggle, getChannelByTermidJoggle, getTerminalPhotoListJoggle, - getTermGPSJoggle, - setTermGPSJoggle, getLatestPhotoJoggle, getReturnedPhotoJoggle, } from "@/utils/api/index"; @@ -220,17 +218,7 @@ export default { nopicPath: require("@/assets/img/nopic.jpg"), loadingBg: true, loading: true, - GPSValue: "", - GpsOption: [ - { - value: "1", - label: "开启", - }, - { - value: "0", - label: "关闭", - }, - ], + newPicData: "", timer: null, i: 0, @@ -320,6 +308,8 @@ export default { this.channelListOption = []; this.getChannelList(this.channelId); //获取通道id接口 this.stop(); + this.btnvideoloading = false; + this.btnpicloading = false; }, //获取通道的接口 getChannelList(id) { @@ -451,59 +441,6 @@ export default { }); }, - //切换gps开启关闭 - changeGPS(val) { - console.log(val); - setTermGPSJoggle({ gpsstatus: val, termid: this.channelId }) - .then((res) => { - console.log(res); - if (val == 0) { - this.$message("关闭GPS"); - } else { - this.$message({ - message: "成功开启GPS", - type: "success", - }); - } - }) - .catch((err) => { - console.log(err); //代码错误、请求失败捕获 - }); - }, - handleCommand(command) { - switch (command) { - case "open": //开启 - this.changeGPS(1); - break; - case "close": //关闭 - this.changeGPS(0); - break; - } - }, - //获取GPS位置 - handleShowGPS() { - getTermGPSJoggle({ termid: this.channelId }) - .then((res) => { - console.log(res); - this.$alert( - "" + - `${res.data.longitude}` + - "
" + - `${res.data.latitude}` + - "
" + - `${res.data.radius}` + - "
", - "GPS位置", - { - dangerouslyUseHTMLString: true, - customClass: "messageGps", - } - ); - }) - .catch((err) => { - console.log(err); //代码错误、请求失败捕获 - }); - }, //手动拍照 handleCommandpic(command) { this.btnpicloading = true;