diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue index 23d29ce..5b4bc10 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue @@ -186,7 +186,10 @@ - 确认 @@ -210,6 +213,7 @@ export default { return { loading: false, searchloading: false, + setloading: false, activeName: "1", //选项卡 accesslist: [], //通道选择器 colorlist: [ @@ -654,7 +658,6 @@ export default { seltermid: "", //装置id selcmdId: "", //cmdId requestId: "", - requestid: "", timer: null, i: 0, @@ -797,6 +800,7 @@ export default { //命令调用imageSearch //--act=imgparams [0xC9] --flag=[Request Set Flag, default is set=1, 0: request] --rf=[Request Flag] --channel=[Channel No] --color=[Color Select: 0, 1] --resolution=[Resolution: 1-15 255] --luminance=[Luminance: 1-100] --contrast=[Contrast: 1-100] --saturation=[Saturation: 1-100] imageSearch() { + this.searchloading = true; let params = [ { name: "act", @@ -835,7 +839,7 @@ export default { }, imageSet(setForm) { console.log(this.setForm); - + this.setloading = true; let params = [ { name: "act", @@ -902,6 +906,8 @@ export default { this.timer = null; this.i = 0; console.log("终止轮询"); + this.searchloading = false; + this.setloading = false; // && res.data.result == 255 console.log(JSON.parse(res.data.data)); this.capturenr = JSON.parse(res.data.data); @@ -915,6 +921,8 @@ export default { window.clearInterval(this.timer); this.timer = null; this.i = 0; + this.searchloading = false; + this.setloading = false; this.$message({ duration: 1500, showClose: true, @@ -928,10 +936,14 @@ export default { clearform() { console.log("清除其他数据"); this.capturenr = {}; + this.searchloading = false; + this.setloading = false; }, clearData() { this.capturenr = {}; this.setForm = {}; + this.searchloading = false; + this.setloading = false; }, }, }; diff --git a/src/views/realTimeMonitor/components/setschedule.vue b/src/views/realTimeMonitor/components/setschedule.vue index a5f1863..761fcaa 100644 --- a/src/views/realTimeMonitor/components/setschedule.vue +++ b/src/views/realTimeMonitor/components/setschedule.vue @@ -602,7 +602,11 @@ export default { } } //河南规约 - if (this.timeProtocol == "65286" || this.timeProtocol == "65282") { + if ( + this.timeProtocol == "65286" || + this.timeProtocol == "65282" || + this.timeProtocol == "65281" + ) { console.log("河南规约"); var hnarr = []; for (var i = 0; i < this.shedulenr.length; i++) { @@ -1080,7 +1084,8 @@ export default { ////判断河南规约 if ( this.deviceListData.zzprotocol == "65286" || - this.timeProtocol == "65282" + this.deviceListData.zzprotocol == "65282" || + this.deviceListData.zzprotocol == "65281" ) { console.log("河南规约"); //偏移时间 @@ -1207,7 +1212,7 @@ export default { this.checkList = ""; // this.setNum = this.offsetnum; this.deviceList(); - + this.sureloading = false; clearInterval(this.timers); this.timers = null; }, @@ -1220,7 +1225,7 @@ export default { handleclose() { this.newshedulenr = []; this.shedulenr = []; - + this.sureloading = false; console.log("关闭轮询"); clearInterval(this.timers); this.timers = null; diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index 1ffac4c..0dc3954 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -301,6 +301,35 @@ + + + + + + + + + + + + + + + + @@ -316,6 +345,8 @@ import { getTakePicStatusJoggle, setTermGPSJoggle, updateTermCamera, + setTermCamera, + getTermCameraRequest, } from "@/utils/api/index"; import previewContain from "./previewContain.vue"; import carouselChart from "../components/carouselChart.vue"; @@ -388,6 +419,11 @@ export default { selectTowerId: "", currentData: "", //保存选中的数据 zzradio: -1, + videoVisible: false, + videoForm: { + stream: "0", + time: "20", + }, }; }, watch: { @@ -808,44 +844,130 @@ export default { }); }, //主动拍视频 + // handleCommandvideo(command) { + // console.log(command); + // this.clearfun(); + // getTermStatus({ termId: this.zztermId }).then((res) => { + // console.log(res); + // if (res.data.isonline) { + // takePicJoggle({ + // captureType: 1, + // channel: command, + // termId: this.zztermId, + // preset: 255, + // }) + // .then((res) => { + // console.log(res); + // this.requestId = res.data.requestId; //获取requestid 判断装置是否下发 + // this.picTime = res.data.taketime; //获取时间 判断获取最新视频 + // console.log(this.requestId); + // this.btnvideoloading = true; + // this.getTakePicStatus(res.data); + // this.statusTimer = window.setInterval(() => { + // this.getTakePicStatus(res.data); + // this.statusNum++; + // }, 2000); + // }) + // .catch((err) => { + // console.log(err); //代码错误、请求失败捕获 + // }); + // } else { + // this.$message({ + // duration: 1500, + // showClose: true, + // message: "装置下线,发送指令失败", + // type: "error", + // }); + // } + // }); + // }, handleCommandvideo(command) { console.log(command); this.clearfun(); - getTermStatus({ termId: this.zztermId }).then((res) => { - console.log(res); - if (res.data.isonline) { - takePicJoggle({ - captureType: 1, - channel: command, - termId: this.zztermId, - preset: 255, - }) - .then((res) => { - console.log(res); - this.requestId = res.data.requestId; //获取requestid 判断装置是否下发 - this.picTime = res.data.taketime; //获取时间 判断获取最新视频 - console.log(this.requestId); - this.btnvideoloading = true; - this.getTakePicStatus(res.data); - this.statusTimer = window.setInterval(() => { - this.getTakePicStatus(res.data); - this.statusNum++; - }, 2000); - }) - .catch((err) => { - console.log(err); //代码错误、请求失败捕获 + if (this.zzprotocol == "65281") { + this.videoVisible = true; + } else { + getTermStatus({ termId: this.zztermId }).then((res) => { + console.log(res); + if (res.data.isonline) { + this.btnvideoloading = true; + console.log("拍摄视频通道" + command); + let params = [ + { + name: "act", + value: "capture", + }, + { + name: "channel", + value: command, + }, + { + name: "preset", + value: 255, + }, + { + name: "type", + value: 1, + }, + // { + // name: "stream", + // value: 0, + // }, + // { + // name: "videoTime", + // value: 20, + // }, + ]; + this.setTermFn(params); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: "装置下线,发送指令失败", + type: "error", }); - } else { - this.$message({ - duration: 1500, - showClose: true, - message: "装置下线,发送指令失败", - type: "error", - }); - } - }); + } + }); + } + }, + setTermFn(dataParams) { + console.log("点击了统一的接口", "runningstatus"); + setTermCamera({ + termId: this.zztermId, + list: dataParams, + }) + .then((res) => { + console.log(res); + this.requestid = res.data.requestId; + //this.getinfo1(); + clearInterval(this.statusTimer); + this.statusTimer = window.setInterval(() => { + this.getinfo(); + this.statusNum++; + }, 1000); + }) + .catch((err) => {}); }, + getinfo() { + getTermCameraRequest({ requestid: this.requestid }) + .then((res) => { + if (res.data.success == 1) { + this.btnvideoloading = false; + this.statusNum = 0; + clearInterval(this.statusTimer); + this.statusTimer = null; + console.log(res); + } else if (this.statusNum > 9) { + this.btnvideoloading = false; + this.statusNum = 0; + clearInterval(this.statusTimer); + this.statusTimer = null; + console.log(res); + } + }) + .catch((err) => {}); + }, //获取装置是否下发状态 getTakePicStatus(data) { console.log(data); @@ -1464,6 +1586,14 @@ export default { } } } + .videoDialog { + .el-dialog { + width: 380px; + } + .el-input-number { + width: 208px; + } + } } .picdropStyle, .videodropStyle,