安徽视频

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

@ -325,9 +325,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="videoVisible = false"> </el-button> <el-button @click="videoVisible = false"> </el-button>
<el-button type="primary" @click="videoVisible = false" <el-button type="primary" @click="anVideoFn"> </el-button>
> </el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </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) { handleCommandvideo(command) {
console.log(command);
this.clearfun();
console.log(command); console.log(command);
this.clearfun(); this.clearfun();
if (this.zzprotocol == "65281") { if (this.zzprotocol == "65281") {
this.videoVisible = true; this.videoVisible = true;
// this.anVideoFn();
} else { } else {
getTermStatus({ termId: this.zztermId }).then((res) => { getTermStatus({ termId: this.zztermId }).then((res) => {
console.log(res); console.log(res);
if (res.data.isonline) { if (res.data.isonline) {
this.btnvideoloading = true; takePicJoggle({
console.log("拍摄视频通道" + command); captureType: 1,
let params = [ channel: command,
{ termId: this.zztermId,
name: "act", preset: 255,
value: "capture", })
}, .then((res) => {
{ console.log(res);
name: "channel", this.requestId = res.data.requestId; //requestid
value: command, this.picTime = res.data.taketime; //
}, console.log(this.requestId);
{ this.btnvideoloading = true;
name: "preset", this.getTakePicStatus(res.data);
value: 255, this.statusTimer = window.setInterval(() => {
}, this.getTakePicStatus(res.data);
{ this.statusNum++;
name: "type", }, 2000);
value: 1, })
}, .catch((err) => {
// { console.log(err); //
// name: "stream", });
// value: 0,
// },
// {
// name: "videoTime",
// value: 20,
// },
];
this.setTermFn(params);
} else { } else {
this.$message({ this.$message({
duration: 1500, duration: 1500,
@ -930,6 +886,7 @@ export default {
}); });
} }
}, },
setTermFn(dataParams) { setTermFn(dataParams) {
console.log("点击了统一的接口", "runningstatus"); console.log("点击了统一的接口", "runningstatus");
setTermCamera({ setTermCamera({
@ -948,7 +905,6 @@ export default {
}) })
.catch((err) => {}); .catch((err) => {});
}, },
getinfo() { getinfo() {
getTermCameraRequest({ requestid: this.requestid }) getTermCameraRequest({ requestid: this.requestid })
.then((res) => { .then((res) => {
@ -968,6 +924,49 @@ export default {
}) })
.catch((err) => {}); .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) { getTakePicStatus(data) {
console.log(data); console.log(data);

Loading…
Cancel
Save