diff --git a/src/utils/api/index.js b/src/utils/api/index.js
index 6880bc0..021044a 100644
--- a/src/utils/api/index.js
+++ b/src/utils/api/index.js
@@ -803,3 +803,13 @@ export function getOnlineTerminalListExcel() {
responseType: "blob",
});
}
+
+//调节焦距
+
+export function updateTermCamera(data) {
+ return request({
+ url: "/api/updateTermCamera",
+ method: "get",
+ params: data,
+ });
+}
diff --git a/src/views/devicePhotoSchedule/components/setdevice.vue b/src/views/devicePhotoSchedule/components/setdevice.vue
index 3c4e9d0..cd4150b 100644
--- a/src/views/devicePhotoSchedule/components/setdevice.vue
+++ b/src/views/devicePhotoSchedule/components/setdevice.vue
@@ -408,7 +408,6 @@ export default {
preset: 255,
});
}
-
// return dayArr;
}
}
diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue
index ba73e97..2858cc0 100644
--- a/src/views/realTimeMonitor/index.vue
+++ b/src/views/realTimeMonitor/index.vue
@@ -235,6 +235,49 @@
>
+
+
焦距调节
+
+ 选择通道
+
+
+ {{
+ item.alias !== null && item.alias !== ""
+ ? item.alias
+ : item.label
+ }}
+
+
+
+
+ 放大
+ 缩小
+
+
@@ -255,6 +298,7 @@ import {
getTakePicPhotoStatusJoggle,
getTakePicStatusJoggle,
setTermGPSJoggle,
+ updateTermCamera,
} from "@/utils/api/index";
import previewContain from "./previewContain.vue";
import carouselChart from "../components/carouselChart.vue";
@@ -307,6 +351,8 @@ export default {
},
channelListOption: [], //通道内容
channelOption: [], //主动拍照通道
+ channelarr: [],
+ channelarrValue: null,
selectChannelValue: null, //选中的通道
channelId: "", //选中的通道id
btnpicloading: false, //主动拍照按钮loading
@@ -466,12 +512,14 @@ export default {
.then((res) => {
console.log(res);
this.channelList = res.data.list;
+ this.channelarr = res.data.list;
if (this.channelList.length == 0) {
console.log("没有通道");
this.getTerminalPhotoList(-1, this.dateValue, this.zztermId); //获取图片列表是传当前设备的 id 和termid
} else {
console.log(this.channelList);
this.channelOption = [];
+
this.channelList.forEach((item) => {
this.channelOption.push({
label: item.channelname,
@@ -497,6 +545,7 @@ export default {
});
});
this.selectChannelValue = this.channelListOption[0].value; //默认选中所有通道
+ this.channelarrValue = this.channelOption[0].value;
this.getTerminalPhotoList(
this.selectChannelValue,
this.dateValue,
@@ -516,6 +565,10 @@ export default {
console.log(val);
this.getTerminalPhotoList(val, this.dateValue, this.zztermId);
},
+ //焦距切换通道
+ changeChannelarrValue(val) {
+ console.log(val);
+ },
//选择时间
changedate() {
console.log(this.dateValue.getTime());
@@ -1034,6 +1087,53 @@ export default {
this.timer = null;
} //利用vue的生命周期函数
},
+ //焦距放大缩小
+ amplify() {
+ getTermStatus({ termId: this.zztermId }).then((res) => {
+ console.log(res);
+ if (res.data.isonline) {
+ updateTermCamera({
+ termId: this.zztermId,
+ channelId: this.channelarrValue,
+ type: 6,
+ })
+ .then((res) => {})
+ .catch();
+ //this.$refs.infodialog_ref.getListData(this.channelId, this.cmdid);
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "装置下线,发送指令失败",
+ type: "error",
+ });
+ }
+ });
+ console.log(this.channelarrValue, this.zztermId);
+ },
+ //焦距缩小
+ reduce() {
+ getTermStatus({ termId: this.zztermId }).then((res) => {
+ console.log(res);
+ if (res.data.isonline) {
+ updateTermCamera({
+ termId: this.zztermId,
+ channelId: this.channelarrValue,
+ type: 7,
+ })
+ .then((res) => {})
+ .catch();
+ //this.$refs.infodialog_ref.getListData(this.channelId, this.cmdid);
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "装置下线,发送指令失败",
+ type: "error",
+ });
+ }
+ });
+ },
},
destroyed() {
@@ -1202,7 +1302,8 @@ export default {
}
.paramsDate,
.monitorItemBox,
- .setTimebtn {
+ .setTimebtn,
+ .setfocalLength {
margin-bottom: 16px;
position: relative;
h3 {
@@ -1226,6 +1327,31 @@ export default {
}
}
}
+ .setfocalLength {
+ .selectChannel {
+ display: flex;
+ align-items: center;
+ margin-bottom: 12px;
+ .labelname {
+ font-size: 14px;
+ margin-right: 4px;
+ width: 80px;
+ color: #666;
+ }
+ }
+ .buttonGroup {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ .el-button {
+ margin-bottom: 8px;
+ width: 104px;
+ }
+ .el-button + .el-button {
+ margin-left: 0px;
+ }
+ }
+ }
}
}
}