|
|
|
@ -301,6 +301,35 @@
|
|
|
|
|
<setschedule ref="setschedule_ref"></setschedule>
|
|
|
|
|
<info-dialog ref="infodialog_ref"></info-dialog>
|
|
|
|
|
<gps-position ref="gpsdialog_ref"></gps-position>
|
|
|
|
|
<el-dialog
|
|
|
|
|
class="videoDialog"
|
|
|
|
|
title="配置参数"
|
|
|
|
|
:visible.sync="videoVisible"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="videoForm">
|
|
|
|
|
<el-form-item label="码流类型">
|
|
|
|
|
<el-select v-model="videoForm.stream">
|
|
|
|
|
<el-option label="主码流" value="0"></el-option>
|
|
|
|
|
<el-option label="从码流" value="1"></el-option>
|
|
|
|
|
<el-option label="第3码流" value="2"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="时间 s(秒)" prop="videoTime">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="videoForm.time"
|
|
|
|
|
:min="1"
|
|
|
|
|
:max="100"
|
|
|
|
|
></el-input-number>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="videoVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="videoVisible = false"
|
|
|
|
|
>确 定</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -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,33 +844,81 @@ 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();
|
|
|
|
|
if (this.zzprotocol == "65281") {
|
|
|
|
|
this.videoVisible = true;
|
|
|
|
|
} else {
|
|
|
|
|
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); //代码错误、请求失败捕获
|
|
|
|
|
});
|
|
|
|
|
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,
|
|
|
|
@ -844,8 +928,46 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|