diff --git a/src/utils/api/index.js b/src/utils/api/index.js index aaef29f..552b2b5 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -318,7 +318,7 @@ export function getImageResolutionListJoggle(data) { data, }); } -//图像参数查询 +//图像参数查询--触发 export function getPhotoParamApi(data) { return request({ url: "/api/getPhotoQueryParamList", @@ -326,6 +326,14 @@ export function getPhotoParamApi(data) { data, }); } +//图像参数查询 +export function getPhotoParamnrApi(data) { + return request({ + url: "/api/photoQueryParamGet", + method: "post", + data, + }); +} //图像参数设置 export function setPhotoParamApi(data) { return request({ @@ -334,6 +342,14 @@ export function setPhotoParamApi(data) { data, }); } +//图像参数--获取图像分辨率 +export function getResolutionRatio(data) { + return request({ + url: "/api/getResolutionList", + method: "post", + data, + }); +} //设置图像参数 setImageParams diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue index 1317bd7..4706979 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue @@ -70,7 +70,14 @@ - + + + @@ -87,7 +94,9 @@ import { getChannelListJoggle, getPhotoParamApi, - setPhotoParamApi + setPhotoParamApi, + getPhotoParamnrApi, + getResolutionRatio } from "@/utils/api/index"; export default { data() { @@ -106,6 +115,7 @@ id:1 } ],//色彩选择器 + ratiolist:[],//图像分辨率 selaccess: "", //选中的通道 capturenr:{}, //查询后的内容 setForm:{},//设置参数 @@ -129,17 +139,21 @@ { required: true, message: '请输入饱和度', trigger: 'blur' } ], }, + timer:null, seltermid:'',//装置id selcmdId:'',//cmdId + requestId:'' }; }, - mounted() {}, + mounted() { + }, methods: { handleClick(tab, event) { console.log(tab, event); }, //获取设备通道 getSingleAccess(val) { + this.setForm={} console.log(val) this.seltermid = val.id; this.selcmdId = val.cmdid @@ -151,21 +165,58 @@ }) .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() { this.loading = true; getPhotoParamApi({ - channelid: this.selaccess, + channelId: this.selaccess, cmdId: this.selcmdId, }) .then((res) => { - this.$message.success("查询成功"); - this.capturenr = res.data; + if (res.code == 200) { + 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; + 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) => { - this.$message.error("查询失败"); - }); + .catch((err) => {}); }, //确认 submitbtn(setForm){ diff --git a/src/views/management/monitoringEquipment/photographicDevice/index.vue b/src/views/management/monitoringEquipment/photographicDevice/index.vue index c83366b..b5296ca 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/index.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/index.vue @@ -216,6 +216,7 @@ export default { handleImageCapture(data){ this.$refs.imageCaptureref.display() this.$refs.imageCaptureref.getSingleAccess(data) + this.$refs.imageCaptureref.getRatio() }, // //新建弹窗handleAddPhoto diff --git a/src/views/realTimeMonitor/components/infoDialog.vue b/src/views/realTimeMonitor/components/infoDialog.vue index fed1d14..2dff077 100644 --- a/src/views/realTimeMonitor/components/infoDialog.vue +++ b/src/views/realTimeMonitor/components/infoDialog.vue @@ -11,7 +11,7 @@
- {{ infornr.termId }} + {{ cmdid }} 选择通道监拍点 { + 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))); // this.channelValue = JSON.parse(JSON.stringify(this.channelValue)); console.log(this.channelOption.length); @@ -376,13 +392,20 @@ export default { }, //切换通道 changeChannelId(val) { - console.log(val); + let selchannel = [] + if (!val) { + this.channelList.forEach((item) => { + selchannel.push(item.channelid); //选中所有通道 + }); + }else{ + selchannel.push(val) + } let channelObj = {}; channelObj = this.channelOption.find(function (i) { return i.value; }); 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() { this.$refs.infodialog_ref.display(); - this.$refs.infodialog_ref.getListData(this.channelId); + this.$refs.infodialog_ref.getListData(this.channelId,this.cmdid); }, //历史图片 // handlehistoryPic() {