安徽规约添加主动录像

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

@ -186,7 +186,10 @@
<!-- <el-button type="primary" @click="submitbtn('setForm')" <!-- <el-button type="primary" @click="submitbtn('setForm')"
>确认</el-button >确认</el-button
> --> > -->
<el-button type="primary" @click="imageSet('setForm')" <el-button
type="primary"
@click="imageSet('setForm')"
:loading="setloading"
>确认</el-button >确认</el-button
> >
</el-form-item> </el-form-item>
@ -210,6 +213,7 @@ export default {
return { return {
loading: false, loading: false,
searchloading: false, searchloading: false,
setloading: false,
activeName: "1", // activeName: "1", //
accesslist: [], // accesslist: [], //
colorlist: [ colorlist: [
@ -654,7 +658,6 @@ export default {
seltermid: "", //id seltermid: "", //id
selcmdId: "", //cmdId selcmdId: "", //cmdId
requestId: "", requestId: "",
requestid: "", requestid: "",
timer: null, timer: null,
i: 0, i: 0,
@ -797,6 +800,7 @@ export default {
//imageSearch //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] //--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() { imageSearch() {
this.searchloading = true;
let params = [ let params = [
{ {
name: "act", name: "act",
@ -835,7 +839,7 @@ export default {
}, },
imageSet(setForm) { imageSet(setForm) {
console.log(this.setForm); console.log(this.setForm);
this.setloading = true;
let params = [ let params = [
{ {
name: "act", name: "act",
@ -902,6 +906,8 @@ export default {
this.timer = null; this.timer = null;
this.i = 0; this.i = 0;
console.log("终止轮询"); console.log("终止轮询");
this.searchloading = false;
this.setloading = false;
// && res.data.result == 255 // && res.data.result == 255
console.log(JSON.parse(res.data.data)); console.log(JSON.parse(res.data.data));
this.capturenr = JSON.parse(res.data.data); this.capturenr = JSON.parse(res.data.data);
@ -915,6 +921,8 @@ export default {
window.clearInterval(this.timer); window.clearInterval(this.timer);
this.timer = null; this.timer = null;
this.i = 0; this.i = 0;
this.searchloading = false;
this.setloading = false;
this.$message({ this.$message({
duration: 1500, duration: 1500,
showClose: true, showClose: true,
@ -928,10 +936,14 @@ export default {
clearform() { clearform() {
console.log("清除其他数据"); console.log("清除其他数据");
this.capturenr = {}; this.capturenr = {};
this.searchloading = false;
this.setloading = false;
}, },
clearData() { clearData() {
this.capturenr = {}; this.capturenr = {};
this.setForm = {}; this.setForm = {};
this.searchloading = false;
this.setloading = false;
}, },
}, },
}; };

@ -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("河南规约"); console.log("河南规约");
var hnarr = []; var hnarr = [];
for (var i = 0; i < this.shedulenr.length; i++) { for (var i = 0; i < this.shedulenr.length; i++) {
@ -1080,7 +1084,8 @@ export default {
//// ////
if ( if (
this.deviceListData.zzprotocol == "65286" || this.deviceListData.zzprotocol == "65286" ||
this.timeProtocol == "65282" this.deviceListData.zzprotocol == "65282" ||
this.deviceListData.zzprotocol == "65281"
) { ) {
console.log("河南规约"); console.log("河南规约");
// //
@ -1207,7 +1212,7 @@ export default {
this.checkList = ""; this.checkList = "";
// this.setNum = this.offsetnum; // this.setNum = this.offsetnum;
this.deviceList(); this.deviceList();
this.sureloading = false;
clearInterval(this.timers); clearInterval(this.timers);
this.timers = null; this.timers = null;
}, },
@ -1220,7 +1225,7 @@ export default {
handleclose() { handleclose() {
this.newshedulenr = []; this.newshedulenr = [];
this.shedulenr = []; this.shedulenr = [];
this.sureloading = false;
console.log("关闭轮询"); console.log("关闭轮询");
clearInterval(this.timers); clearInterval(this.timers);
this.timers = null; this.timers = null;

@ -301,6 +301,35 @@
<setschedule ref="setschedule_ref"></setschedule> <setschedule ref="setschedule_ref"></setschedule>
<info-dialog ref="infodialog_ref"></info-dialog> <info-dialog ref="infodialog_ref"></info-dialog>
<gps-position ref="gpsdialog_ref"></gps-position> <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> </div>
</template> </template>
@ -316,6 +345,8 @@ import {
getTakePicStatusJoggle, getTakePicStatusJoggle,
setTermGPSJoggle, setTermGPSJoggle,
updateTermCamera, updateTermCamera,
setTermCamera,
getTermCameraRequest,
} from "@/utils/api/index"; } from "@/utils/api/index";
import previewContain from "./previewContain.vue"; import previewContain from "./previewContain.vue";
import carouselChart from "../components/carouselChart.vue"; import carouselChart from "../components/carouselChart.vue";
@ -388,6 +419,11 @@ export default {
selectTowerId: "", selectTowerId: "",
currentData: "", // currentData: "", //
zzradio: -1, zzradio: -1,
videoVisible: false,
videoForm: {
stream: "0",
time: "20",
},
}; };
}, },
watch: { 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) { handleCommandvideo(command) {
console.log(command); console.log(command);
this.clearfun(); this.clearfun();
getTermStatus({ termId: this.zztermId }).then((res) => { if (this.zzprotocol == "65281") {
console.log(res); this.videoVisible = true;
if (res.data.isonline) { } else {
takePicJoggle({ getTermStatus({ termId: this.zztermId }).then((res) => {
captureType: 1, console.log(res);
channel: command, if (res.data.isonline) {
termId: this.zztermId, this.btnvideoloading = true;
preset: 255, console.log("拍摄视频通道" + command);
}) let params = [
.then((res) => { {
console.log(res); name: "act",
this.requestId = res.data.requestId; //requestid value: "capture",
this.picTime = res.data.taketime; // },
console.log(this.requestId); {
this.btnvideoloading = true; name: "channel",
this.getTakePicStatus(res.data); value: command,
this.statusTimer = window.setInterval(() => { },
this.getTakePicStatus(res.data); {
this.statusNum++; name: "preset",
}, 2000); value: 255,
}) },
.catch((err) => { {
console.log(err); // 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: "装置下线,发送指令失败", setTermFn(dataParams) {
type: "error", 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) { getTakePicStatus(data) {
console.log(data); console.log(data);
@ -1464,6 +1586,14 @@ export default {
} }
} }
} }
.videoDialog {
.el-dialog {
width: 380px;
}
.el-input-number {
width: 208px;
}
}
} }
.picdropStyle, .picdropStyle,
.videodropStyle, .videodropStyle,

Loading…
Cancel
Save