拍照装置添加规约

ds1.0
fanluyan 2 years ago
parent 279b2b463a
commit 78bfd4ead9

@ -803,3 +803,13 @@ export function getOnlineTerminalListExcel() {
responseType: "blob", responseType: "blob",
}); });
} }
//调节焦距
export function updateTermCamera(data) {
return request({
url: "/api/updateTermCamera",
method: "get",
params: data,
});
}

@ -408,7 +408,6 @@ export default {
preset: 255, preset: 255,
}); });
} }
// return dayArr; // return dayArr;
} }
} }

@ -235,6 +235,49 @@
> >
</div> </div>
</div> </div>
<div class="setfocalLength">
<h3>焦距调节</h3>
<div class="selectChannel">
<span class="labelname">选择通道</span>
<el-select
v-model="channelarrValue"
placeholder="请选择通道"
@change="changeChannelarrValue"
ref="multiSelect"
>
<el-option
v-for="item in channelOption"
:key="item.value"
:label="
item.alias !== null && item.alias !== ''
? item.alias
: item.label
"
:value="item.value"
>
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.label
}}
</el-option>
</el-select>
</div>
<div class="buttonGroup">
<el-button
type="primary"
icon="el-icon-zoom-in"
@click="amplify()"
>放大</el-button
>
<el-button
type="primary"
icon="el-icon-zoom-out"
@click="reduce()"
>缩小</el-button
>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -255,6 +298,7 @@ import {
getTakePicPhotoStatusJoggle, getTakePicPhotoStatusJoggle,
getTakePicStatusJoggle, getTakePicStatusJoggle,
setTermGPSJoggle, setTermGPSJoggle,
updateTermCamera,
} from "@/utils/api/index"; } from "@/utils/api/index";
import previewContain from "./previewContain.vue"; import previewContain from "./previewContain.vue";
import carouselChart from "../components/carouselChart.vue"; import carouselChart from "../components/carouselChart.vue";
@ -307,6 +351,8 @@ export default {
}, },
channelListOption: [], // channelListOption: [], //
channelOption: [], // channelOption: [], //
channelarr: [],
channelarrValue: null,
selectChannelValue: null, // selectChannelValue: null, //
channelId: "", //id channelId: "", //id
btnpicloading: false, //loading btnpicloading: false, //loading
@ -466,12 +512,14 @@ export default {
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.channelList = res.data.list; this.channelList = res.data.list;
this.channelarr = res.data.list;
if (this.channelList.length == 0) { if (this.channelList.length == 0) {
console.log("没有通道"); console.log("没有通道");
this.getTerminalPhotoList(-1, this.dateValue, this.zztermId); // id termid this.getTerminalPhotoList(-1, this.dateValue, this.zztermId); // id termid
} else { } else {
console.log(this.channelList); console.log(this.channelList);
this.channelOption = []; this.channelOption = [];
this.channelList.forEach((item) => { this.channelList.forEach((item) => {
this.channelOption.push({ this.channelOption.push({
label: item.channelname, label: item.channelname,
@ -497,6 +545,7 @@ export default {
}); });
}); });
this.selectChannelValue = this.channelListOption[0].value; // this.selectChannelValue = this.channelListOption[0].value; //
this.channelarrValue = this.channelOption[0].value;
this.getTerminalPhotoList( this.getTerminalPhotoList(
this.selectChannelValue, this.selectChannelValue,
this.dateValue, this.dateValue,
@ -516,6 +565,10 @@ export default {
console.log(val); console.log(val);
this.getTerminalPhotoList(val, this.dateValue, this.zztermId); this.getTerminalPhotoList(val, this.dateValue, this.zztermId);
}, },
//
changeChannelarrValue(val) {
console.log(val);
},
// //
changedate() { changedate() {
console.log(this.dateValue.getTime()); console.log(this.dateValue.getTime());
@ -1034,6 +1087,53 @@ export default {
this.timer = null; this.timer = null;
} //vue } //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() { destroyed() {
@ -1202,7 +1302,8 @@ export default {
} }
.paramsDate, .paramsDate,
.monitorItemBox, .monitorItemBox,
.setTimebtn { .setTimebtn,
.setfocalLength {
margin-bottom: 16px; margin-bottom: 16px;
position: relative; position: relative;
h3 { 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;
}
}
}
} }
} }
} }

Loading…
Cancel
Save