安徽视频

ds1.0
fanluyan 2 years ago
parent 1a0111f218
commit 2567701244

@ -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);

Loading…
Cancel
Save