|
|
|
@ -325,9 +325,7 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="videoVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="videoVisible = false"
|
|
|
|
|
>确 定</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" @click="anVideoFn">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
@ -844,81 +842,39 @@ 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();
|
|
|
|
|
console.log(command);
|
|
|
|
|
this.clearfun();
|
|
|
|
|
if (this.zzprotocol == "65281") {
|
|
|
|
|
this.videoVisible = true;
|
|
|
|
|
// this.anVideoFn();
|
|
|
|
|
} 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);
|
|
|
|
|
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,
|
|
|
|
@ -930,6 +886,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setTermFn(dataParams) {
|
|
|
|
|
console.log("点击了统一的接口", "runningstatus");
|
|
|
|
|
setTermCamera({
|
|
|
|
@ -948,7 +905,6 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getinfo() {
|
|
|
|
|
getTermCameraRequest({ requestid: this.requestid })
|
|
|
|
|
.then((res) => {
|
|
|
|
@ -968,6 +924,49 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
anVideoFn() {
|
|
|
|
|
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: this.videoForm.stream,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "videoTime",
|
|
|
|
|
value: this.videoForm.time,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
this.setTermFn(params);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "装置下线,发送指令失败",
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//获取装置是否下发状态
|
|
|
|
|
getTakePicStatus(data) {
|
|
|
|
|
console.log(data);
|
|
|
|
|