图像采集、实时监控通道选择

master
liuyi 2 years ago
parent 89bfa7d1d9
commit a2882d36ba

@ -318,7 +318,7 @@ export function getImageResolutionListJoggle(data) {
data, data,
}); });
} }
//图像参数查询 //图像参数查询--触发
export function getPhotoParamApi(data) { export function getPhotoParamApi(data) {
return request({ return request({
url: "/api/getPhotoQueryParamList", url: "/api/getPhotoQueryParamList",
@ -326,6 +326,14 @@ export function getPhotoParamApi(data) {
data, data,
}); });
} }
//图像参数查询
export function getPhotoParamnrApi(data) {
return request({
url: "/api/photoQueryParamGet",
method: "post",
data,
});
}
//图像参数设置 //图像参数设置
export function setPhotoParamApi(data) { export function setPhotoParamApi(data) {
return request({ return request({
@ -334,6 +342,14 @@ export function setPhotoParamApi(data) {
data, data,
}); });
} }
//图像参数--获取图像分辨率
export function getResolutionRatio(data) {
return request({
url: "/api/getResolutionList",
method: "post",
data,
});
}
//设置图像参数 setImageParams //设置图像参数 setImageParams

@ -70,7 +70,14 @@
<el-input-number v-model="setForm.luminance" :min="1" :max="100"></el-input-number> <el-input-number v-model="setForm.luminance" :min="1" :max="100"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="图像分辨率" prop="resolution"> <el-form-item label="图像分辨率" prop="resolution">
<el-input v-model="setForm.resolution" class="wt280"></el-input> <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>
<el-form-item label="饱和度" prop="saturation"> <el-form-item label="饱和度" prop="saturation">
<el-input-number v-model="setForm.saturation" :min="1" :max="100"></el-input-number> <el-input-number v-model="setForm.saturation" :min="1" :max="100"></el-input-number>
@ -87,7 +94,9 @@
import { import {
getChannelListJoggle, getChannelListJoggle,
getPhotoParamApi, getPhotoParamApi,
setPhotoParamApi setPhotoParamApi,
getPhotoParamnrApi,
getResolutionRatio
} from "@/utils/api/index"; } from "@/utils/api/index";
export default { export default {
data() { data() {
@ -106,6 +115,7 @@
id:1 id:1
} }
],// ],//
ratiolist:[],//
selaccess: "", // selaccess: "", //
capturenr:{}, // capturenr:{}, //
setForm:{},// setForm:{},//
@ -129,17 +139,21 @@
{ required: true, message: '请输入饱和度', trigger: 'blur' } { required: true, message: '请输入饱和度', trigger: 'blur' }
], ],
}, },
timer:null,
seltermid:'',//id seltermid:'',//id
selcmdId:'',//cmdId selcmdId:'',//cmdId
requestId:''
}; };
}, },
mounted() {}, mounted() {
},
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
}, },
// //
getSingleAccess(val) { getSingleAccess(val) {
this.setForm={}
console.log(val) console.log(val)
this.seltermid = val.id; this.seltermid = val.id;
this.selcmdId = val.cmdid this.selcmdId = val.cmdid
@ -151,21 +165,58 @@
}) })
.catch((err) => {}); .catch((err) => {});
}, },
// //
getRatio(){
this.$set(this.setForm,'color',this.colorlist[0].id)
getResolutionRatio()
.then((res) => {
this.ratiolist = res.data.list;
this.$set(this.setForm,'resolution',res.data.list[0].id)
})
.catch((err) => {});
},
//
inquirebtn() { inquirebtn() {
this.loading = true; this.loading = true;
getPhotoParamApi({ getPhotoParamApi({
channelid: this.selaccess, channelId: this.selaccess,
cmdId: this.selcmdId, cmdId: this.selcmdId,
}) })
.then((res) => { .then((res) => {
this.$message.success("查询成功"); if (res.code == 200) {
this.capturenr = res.data; this.requestId = res.data.requestId;
this.inquirenr()
this.timer = window.setInterval(() => {
this.inquirenr();
}, 10000);
}else{
this.$message.error(res.code.msg);
}
})
.catch((err) => {});
},
//
inquirenr(){
getPhotoParamnrApi({
channelId: this.selaccess,
termId: this.seltermid,
requestId: this.requestId
})
.then((res) => {
this.loading = false; this.loading = false;
if (res.code == 200) {
if (res.data.isNew == true) {
this.$message.success("查询已更新");
this.capturenr = res.data;
clearInterval(this.timer);
}else{
this.capturenr = res.data;
}
}else{
this.$message.error(res.code.msg);
}
}) })
.catch((err) => { .catch((err) => {});
this.$message.error("查询失败");
});
}, },
// //
submitbtn(setForm){ submitbtn(setForm){

@ -216,6 +216,7 @@ export default {
handleImageCapture(data){ handleImageCapture(data){
this.$refs.imageCaptureref.display() this.$refs.imageCaptureref.display()
this.$refs.imageCaptureref.getSingleAccess(data) this.$refs.imageCaptureref.getSingleAccess(data)
this.$refs.imageCaptureref.getRatio()
}, },
// //handleAddPhoto // //handleAddPhoto

@ -11,7 +11,7 @@
<div class="infoTable"> <div class="infoTable">
<el-descriptions class="margin-top" :column="1" border> <el-descriptions class="margin-top" :column="1" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 装置编号 </template>{{ infornr.termId }} <template slot="label"> 装置编号 </template>{{ cmdid }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 电池电量 </template <template slot="label"> 电池电量 </template
@ -65,12 +65,14 @@ export default {
infornr: {}, // infornr: {}, //
timer: null, timer: null,
requestId:'',//ID requestId:'',//ID
cmdid:''
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
// //
getListData(val) { getListData(val,cmdid) {
this.cmdid = cmdid
getDeviceList({ getDeviceList({
termId: val, termId: val,
}) })

@ -58,14 +58,13 @@
<h3>选择通道监拍点</h3> <h3>选择通道监拍点</h3>
<el-select <el-select
v-model="channelValue" v-model="channelListValue"
placeholder="请选择" placeholder="请选择"
@change="changeChannelId" @change="changeChannelId"
multiple
ref="multiSelect" ref="multiSelect"
> >
<el-option <el-option
v-for="item in channelOption" v-for="item in channelListOption"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@ -203,6 +202,8 @@ export default {
channelId: "", //id channelId: "", //id
channelList: "", // channelList: "", //
channelOption: [], // channelOption: [], //
channelListOption:[],//
channelListValue:'',
channelValue: [], // channelValue: [], //
terminalPhoto: [], // terminalPhoto: [], //
totalPic: "", totalPic: "",
@ -296,6 +297,7 @@ export default {
this.channelValue = []; this.channelValue = [];
this.channelOption = []; this.channelOption = [];
this.channelListOption = []
this.getChannelList(this.channelId); //id this.getChannelList(this.channelId); //id
}, },
// //
@ -317,6 +319,20 @@ export default {
}); // select }); // select
console.log(this.channelOption); console.log(this.channelOption);
console.log(this.channelValue); console.log(this.channelValue);
this.channelListOption = []
this.channelListOption.push({
label: '全部',
value: '',
termid: '',
});
this.channelList.forEach((item) => {
this.channelListOption.push({
label: item.channelname,
value: item.channelid,
termid: item.termId,
});
});
this.channelListValue = this.channelListOption[0].value; //
// console.log(JSON.parse(JSON.stringify(this.channelValue))); // console.log(JSON.parse(JSON.stringify(this.channelValue)));
// this.channelValue = JSON.parse(JSON.stringify(this.channelValue)); // this.channelValue = JSON.parse(JSON.stringify(this.channelValue));
console.log(this.channelOption.length); console.log(this.channelOption.length);
@ -376,13 +392,20 @@ export default {
}, },
// //
changeChannelId(val) { changeChannelId(val) {
console.log(val); let selchannel = []
if (!val) {
this.channelList.forEach((item) => {
selchannel.push(item.channelid); //
});
}else{
selchannel.push(val)
}
let channelObj = {}; let channelObj = {};
channelObj = this.channelOption.find(function (i) { channelObj = this.channelOption.find(function (i) {
return i.value; return i.value;
}); });
console.log(channelObj); console.log(channelObj);
this.getTerminalPhotoList(val, this.dateValue, channelObj.termid); this.getTerminalPhotoList(selchannel, this.dateValue, channelObj.termid);
}, },
// //
@ -577,7 +600,7 @@ export default {
//handleShowInfo //handleShowInfo
handleShowInfo() { handleShowInfo() {
this.$refs.infodialog_ref.display(); this.$refs.infodialog_ref.display();
this.$refs.infodialog_ref.getListData(this.channelId); this.$refs.infodialog_ref.getListData(this.channelId,this.cmdid);
}, },
// //
// handlehistoryPic() { // handlehistoryPic() {

Loading…
Cancel
Save