安徽规约添加主动录像

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

@ -186,7 +186,10 @@
<!-- <el-button type="primary" @click="submitbtn('setForm')"
>确认</el-button
> -->
<el-button type="primary" @click="imageSet('setForm')"
<el-button
type="primary"
@click="imageSet('setForm')"
:loading="setloading"
>确认</el-button
>
</el-form-item>
@ -210,6 +213,7 @@ export default {
return {
loading: false,
searchloading: false,
setloading: false,
activeName: "1", //
accesslist: [], //
colorlist: [
@ -654,7 +658,6 @@ export default {
seltermid: "", //id
selcmdId: "", //cmdId
requestId: "",
requestid: "",
timer: null,
i: 0,
@ -797,6 +800,7 @@ export default {
//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]
imageSearch() {
this.searchloading = true;
let params = [
{
name: "act",
@ -835,7 +839,7 @@ export default {
},
imageSet(setForm) {
console.log(this.setForm);
this.setloading = true;
let params = [
{
name: "act",
@ -902,6 +906,8 @@ export default {
this.timer = null;
this.i = 0;
console.log("终止轮询");
this.searchloading = false;
this.setloading = false;
// && res.data.result == 255
console.log(JSON.parse(res.data.data));
this.capturenr = JSON.parse(res.data.data);
@ -915,6 +921,8 @@ export default {
window.clearInterval(this.timer);
this.timer = null;
this.i = 0;
this.searchloading = false;
this.setloading = false;
this.$message({
duration: 1500,
showClose: true,
@ -928,10 +936,14 @@ export default {
clearform() {
console.log("清除其他数据");
this.capturenr = {};
this.searchloading = false;
this.setloading = false;
},
clearData() {
this.capturenr = {};
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("河南规约");
var hnarr = [];
for (var i = 0; i < this.shedulenr.length; i++) {
@ -1080,7 +1084,8 @@ export default {
////
if (
this.deviceListData.zzprotocol == "65286" ||
this.timeProtocol == "65282"
this.deviceListData.zzprotocol == "65282" ||
this.deviceListData.zzprotocol == "65281"
) {
console.log("河南规约");
//
@ -1207,7 +1212,7 @@ export default {
this.checkList = "";
// this.setNum = this.offsetnum;
this.deviceList();
this.sureloading = false;
clearInterval(this.timers);
this.timers = null;
},
@ -1220,7 +1225,7 @@ export default {
handleclose() {
this.newshedulenr = [];
this.shedulenr = [];
this.sureloading = false;
console.log("关闭轮询");
clearInterval(this.timers);
this.timers = null;

@ -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,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) {
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); //
if (this.zzprotocol == "65281") {
this.videoVisible = true;
} 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);
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
}
});
}
},
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,

Loading…
Cancel
Save