@@ -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() {