视频参数、历史图片筛选全部

master
13703816893 2 years ago
parent d625361698
commit 7160ec0fe6

@ -366,6 +366,34 @@ export function getResolutionRatio(data) {
});
}
//视频采集参数
//参数查询--触发
export function getVideoParamApi(data) {
return request({
url: "/api/videoParamGet",
method: "post",
data,
});
}
//参数查询
export function getVideoParamnrApi(data) {
return request({
url: "/api/selectVideoParam",
method: "post",
data,
});
}
//参数设置
export function setVideoParamApi(data) {
return request({
url: "/api/updateVideoParam",
method: "post",
data,
});
}
//设置图像参数 setImageParams
//查询图像分辨率 getImageParams

@ -196,7 +196,7 @@ export default {
],
luminance: [{ required: true, message: "请输入亮度", trigger: "blur" }],
resolution: [
{ required: true, message: "请输入图像分辨率", trigger: "blur" },
{ required: true, message: "请选择图像分辨率", trigger: "blur" },
],
saturation: [
{ required: true, message: "请输入饱和度", trigger: "blur" },
@ -231,7 +231,7 @@ export default {
//
getRatio() {
this.$set(this.setForm, "color", this.colorlist[0].id);
getResolutionRatio()
getResolutionRatio({ type: 0 })
.then((res) => {
this.ratiolist = res.data.list;
this.$set(this.setForm, "resolution", res.data.list[0].id);

@ -0,0 +1,371 @@
<template>
<el-dialog
class="setimgDialog"
title="视频采集参数"
:visible.sync="isShow"
:close-on-click-modal="false"
width="60%"
@close="handleclose"
>
<el-tabs v-model="activeName" @tab-click="handleClick" v-loading="loading">
<el-tab-pane label="查询实际参数" name="1">
<div class="flexnr">
<div class="wt80">通道:</div>
<el-select v-model="selaccess" placeholder="请选择" class="mr20">
<el-option
v-for="item in accesslist"
:key="item.channelid"
:label="item.channelname"
:value="item.channelid"
></el-option>
</el-select>
<el-button
:loading="searchloading"
type="primary"
@click="inquirebtn()"
>查询</el-button
>
</div>
<div class="flexno bt30">
<div class="wt80">视频分辨率:</div>
<el-select
v-model="capturenr.resolution"
class="wt280"
:disabled="true"
>
<el-option
v-for="item in ratiolist"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
<div class="flexno bt30">
<div class="wt80">预置位:</div>
<el-input
v-model="capturenr.luminance"
:disabled="true"
class="wt280"
></el-input>
</div>
<div class="flexno bt30">
<div class="wt80">录制时长:</div>
<el-input
v-model="capturenr.contrast"
:disabled="true"
class="wt280"
>
<template slot="append">s ()</template>
</el-input>
</div>
</el-tab-pane>
<el-tab-pane label="设置参数" name="2">
<el-form
:model="setForm"
:rules="rules"
ref="setForm"
label-width="120px"
>
<el-form-item label="通道" prop="channelId">
<el-select
v-model="setForm.channelId"
placeholder="请选择"
class="mr20"
>
<el-option
v-for="item in accesslist"
:key="item.channelid"
:label="item.channelname"
:value="item.channelid"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="视频分辨率" prop="resolution">
<el-select
v-model="setForm.resolution"
placeholder="请选择"
class="mr20"
>
<el-option
v-for="item in ratiolist"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="预置位" prop="luminance">
<el-input-number
v-model="setForm.luminance"
:min="1"
:max="255"
></el-input-number>
</el-form-item>
<el-form-item label="录制时长 s(秒)" prop="contrast">
<el-input-number
v-model="setForm.contrast"
:min="1"
:max="100"
></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitbtn('setForm')"
>确认</el-button
>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
</el-dialog>
</template>
<script>
import {
getChannelListJoggle,
getVideoParamApi,
setVideoParamApi,
getVideoParamnrApi,
getResolutionRatio,
} from "@/utils/api/index";
export default {
data() {
return {
loading: false,
isShow: false,
searchloading: false,
activeName: "1", //
accesslist: [], //
ratiolist: [], //
selaccess: "", //
capturenr: {}, //
setForm: {}, //
rules: {
channelId: [{ required: true, message: "请选择通道", trigger: "blur" }],
contrast: [
{ required: true, message: "请输入录制时长", trigger: "blur" },
],
luminance: [{ required: true, message: "请输入预置位", trigger: "blur" }],
resolution: [
{ required: true, message: "请选择视频分辨率", trigger: "blur" },
]
},
timer: null,
i: 0,
seltermid: "", //id
selcmdId: "", //cmdId
requestId: "",
};
},
mounted() {},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
//
getSingleAccess(val) {
this.setForm = {};
console.log(val);
this.seltermid = val.id;
this.selcmdId = val.cmdid;
getChannelListJoggle({ termid: this.seltermid })
.then((res) => {
this.accesslist = res.data.list;
this.selaccess = res.data.list[0].channelid;
this.$set(this.setForm, "channelId", res.data.list[0].channelid);
})
.catch((err) => {});
},
//
getRatio() {
getResolutionRatio({ type: 1 })
.then((res) => {
this.ratiolist = res.data.list;
this.$set(this.setForm, "resolution", res.data.list[0].id);
})
.catch((err) => {});
},
//
inquirebtn() {
this.loading = true;
this.searchloading = true;
getVideoParamApi({
channelId: this.selaccess,
cmdId: this.selcmdId,
})
.then((res) => {
if (res.code == 200) {
this.requestId = res.data.requestId;
this.inquirenr();
this.timer = window.setInterval(() => {
this.inquirenr();
this.i++;
}, 1000);
} else {
this.$message.error(res.code.msg);
}
})
.catch((err) => {});
},
//
inquirenr() {
getVideoParamnrApi({
channelId: this.selaccess,
termId: this.seltermid,
requestId: this.requestId,
})
.then((res) => {
this.loading = false;
if (res.code == 200) {
this.capturenr = res.data;
if (res.data.isNew == true) {
this.searchloading = false;
this.i = 0;
this.$message.success("查询已更新");
clearInterval(this.timer);
this.timer = null;
} else if (this.i > 9) {
this.searchloading = false;
this.i = 0;
this.$message.warning("暂无响应,请稍后再试!");
clearInterval(this.timer);
this.timer = null;
}
} else {
this.$message.error(res.code.msg);
}
})
.catch((err) => {});
},
//
submitbtn(setForm) {
this.$set(this.setForm, "cmdId", this.selcmdId);
this.$set(this.setForm, "termId", this.seltermid);
this.$refs[setForm].validate((valid) => {
if (valid) {
setVideoParamApi(this.setForm)
.then((res) => {
if (res.code == 200) {
this.$message.success("设置成功");
this.isShow = false;
} else {
this.$message.error(res.code.msg);
}
})
.catch((err) => {
this.$message.error("设置失败");
});
} else {
return false;
}
});
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
handleclose() {
this.searchloading = false;
this.i = 0;
clearInterval(this.timer);
this.timer = null;
},
},
};
</script>
<style lang="less" scoped>
.setimgDialog {
.el-tabs__content {
height: 400px;
overflow: auto;
.el-tab-pane {
height: calc(100% - 16px);
}
}
.flexonly {
display: flex;
flex-wrap: wrap;
}
.flexno {
display: flex;
margin-top: 24px;
padding: 0px 8px;
align-items: center;
}
.flexnr {
display: flex;
align-items: center;
margin-top: 16px;
padding: 0px 8px;
}
.mt10 {
margin-bottom: 10px;
}
.mr10 {
margin-right: 10px;
}
.w8 {
width: 8%;
}
.wt80 {
width: 80px;
}
.wt280 {
width: 280px;
}
.w80 {
width: 90%;
overflow-y: auto;
height: 300px;
}
.mr20 {
margin-right: 20px;
}
.bt30 {
margin-bottom: 30px;
}
.deviceTable {
padding: 16px 8px 0 8px;
height: calc(100% - 16px);
.rulesBox {
display: flex;
flex-direction: row;
li {
list-style: none;
margin-right: 24px;
line-height: 24px;
span {
margin-right: 4px;
}
.el-tag--small {
height: 16px;
padding: 0 8px;
line-height: 16px;
}
}
}
}
}
.setRoadDialog {
.el-dialog__body {
height: 400px;
overflow: auto;
.el-form {
height: 100%;
//background: #fcc;
}
.setTimeTd {
h3 {
margin: 8px 0px;
font-size: 16px;
line-height: 24px;
}
.timename {
margin: 8px 0px;
}
}
}
}
</style>

@ -133,7 +133,12 @@
<el-button
type="text"
@click.native.stop="handleImageCapture(scope.row)"
>图像采集参数</el-button
>图像参数</el-button
>
<el-button
type="text"
@click.native.stop="handleVideoCapture(scope.row)"
>视频参数</el-button
>
<el-button
type="text"
@ -163,6 +168,7 @@
ref="addPhotoDialogref"
></addPhotoDialog>
<imageCapture ref="imageCaptureref"></imageCapture>
<videoCapture ref="videoCaptureref"></videoCapture>
<pictureTags ref="picturetagsref"></pictureTags>
</div>
</template>
@ -177,11 +183,13 @@ import {
import moment from "moment";
import addPhotoDialog from "./components/addPhotoDialog.vue";
import imageCapture from "./components/imageCapture.vue";
import videoCapture from "./components/videoCapture.vue";
import pictureTags from "./components/pictureTags.vue";
export default {
components: {
addPhotoDialog,
imageCapture,
videoCapture,
pictureTags,
},
data() {
@ -329,6 +337,12 @@ export default {
this.$refs.imageCaptureref.getSingleAccess(data);
this.$refs.imageCaptureref.getRatio();
},
//
handleVideoCapture(data) {
this.$refs.videoCaptureref.display();
this.$refs.videoCaptureref.getSingleAccess(data);
this.$refs.videoCaptureref.getRatio();
},
//线
handlepicture(data) {
console.log(data);

@ -1,6 +1,6 @@
<template>
<div class="realTimeSearch">
<div class="searchMain" v-loading="loadingSearch">
<div class="searchMain" >
<div class="searchBox">
<el-form :inline="true" :model="formdata" class="demo-form-inline">
<el-form-item label="电压等级">
@ -24,7 +24,7 @@
</el-select>
</el-form-item>
<el-form-item label="杆塔名称">
<el-select v-model="formdata.towerid" @change="getSearchtd">
<el-select v-model="formdata.towerid" @change="getSearchzz">
<el-option
v-for="item in gtOptions"
:key="item.id"
@ -33,6 +33,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="装置名称">
<el-select v-model="formdata.deviceid" @change="getSearchtd">
<el-option v-for="item in zzOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="通道">
<el-select v-model="formdata.channelid">
<el-option
@ -149,15 +155,17 @@ export default {
zoomable: true,
url: "src",
},
dyOptions: [], //
xlOptions: [], //线
gtOptions: [], //
tdOptions: [], //
dyOptions: [{ id: 0, name: '全部'}], //
xlOptions: [{ id: 0, name: '全部'}], //线
gtOptions: [{ id: 0, name: '全部'}], //
zzOptions: [{ id: 0, name: '全部'}], //
tdOptions: [{ id: 0, name: '全部'}], //
formdata: {
dyid: "",
lineid: "",
towerid: "",
channelid: "",
deviceid: "",
timeVal: "",
},
picList: [],
@ -165,7 +173,6 @@ export default {
pageSize: 10, //
total: 0, //
loading: false,
loadingSearch: false,
signtype: 0, //0
};
},
@ -179,18 +186,17 @@ export default {
methods: {
//
getSearchdy() {
this.loadingSearch = true;
getSearchInfo({ type: 1 })
.then((res) => {
if (res.data.list.length == 0) {
this.dyOptions = [];
this.formdata.dyid = "";
} else {
this.dyOptions = res.data.list;
this.formdata.dyid = res.data.list[0].id;
}
// this.dyOptions = res.data.list;
// this.formdata.dyid = res.data.list == [] ? "" : res.data.list[0].id;
// if (res.data.list.length == 0) {
// this.dyOptions = [];
// this.formdata.dyid = "";
// } else {
// this.dyOptions = res.data.list;
// this.formdata.dyid = res.data.list[0].id;
// }
this.dyOptions = this.dyOptions.concat(res.data.list);
this.formdata.dyid = this.dyOptions[0].id;
this.getSearchxl();
})
.catch((err) => {});
@ -199,15 +205,8 @@ export default {
getSearchxl() {
getSearchInfo({ type: 2, id: this.formdata.dyid })
.then((res) => {
if (res.data.list.length == 0) {
this.xlOptions = [];
this.formdata.lineid = "";
} else {
this.xlOptions = res.data.list;
this.formdata.lineid = res.data.list[0].id;
}
// this.xlOptions = res.data.list;
// this.formdata.lineid = res.data.list == [] ? "" : res.data.list[0].id;
this.xlOptions = this.xlOptions.concat(res.data.list);
this.formdata.lineid = this.xlOptions[0].id;
this.getSearchgt();
})
.catch((err) => {});
@ -216,16 +215,18 @@ export default {
getSearchgt() {
getSearchInfo({ type: 3, id: this.formdata.lineid })
.then((res) => {
if (res.data.list.length == 0) {
this.gtOptions = [];
this.formdata.towerid = "";
} else {
this.gtOptions = res.data.list;
this.formdata.towerid = res.data.list[0].id;
}
// this.gtOptions = res.data.list;
// this.formdata.towerid =
// res.data.list == [] ? "" : res.data.list[0].id;
this.gtOptions = this.gtOptions.concat(res.data.list);
this.formdata.towerid = this.gtOptions[0].id;
this.getSearchzz()
})
.catch((err) => {});
},
//
getSearchzz() {
getSearchInfo({ type: 4, id: this.formdata.towerid })
.then((res) => {
this.zzOptions = this.zzOptions.concat(res.data.list);
this.formdata.deviceid = this.zzOptions[0].id;
this.getSearchtd();
})
.catch((err) => {});
@ -234,21 +235,12 @@ export default {
getSearchtd() {
getSearchInfo({ type: 4, id: this.formdata.towerid })
.then((res) => {
if (res.data.list.length == 0) {
this.tdOptions = [];
this.formdata.channelid = "";
} else {
this.tdOptions = res.data.list;
this.formdata.channelid = res.data.list[0].id;
}
// this.tdOptions = res.data.list;
// this.formdata.channelid =
// res.data.list == [] ? "" : res.data.list[0].id;
this.tdOptions = this.tdOptions.concat(res.data.list);
this.formdata.channelid = this.tdOptions[0].id;
if (this.signtype == 0) {
this.getPicData();
}
this.signtype = 1;
this.loadingSearch = false;
})
.catch((err) => {});
},
@ -266,6 +258,7 @@ export default {
this.loading = false;
})
.catch((err) => {
this.loading = false;
console.log(err);
});
},

Loading…
Cancel
Save