ds1.0
fanluyan 2 years ago
parent 1e63720f56
commit 08bb06f78c

@ -658,3 +658,12 @@ export function getTermListByChannelJoggle(data) {
data,
});
}
//调节焦距
export function updateTermCamera(data) {
return request({
url: "/api/updateTermCamera",
method: "get",
params: data,
});
}

@ -82,6 +82,42 @@
<el-button type="primary">主动拍照 </el-button> -->
</div>
</div>
<div class="setfocalLength" v-if="areaData.protocol == '65286'">
<h3>焦距调节</h3>
<div class="selectChannel">
<span class="labelname">选择通道</span>
<el-select
v-model="channelarrValue"
placeholder="请选择通道"
ref="multiSelect"
>
<el-option
v-for="item in channelfocalOpyion"
:key="item.channelid"
:label="
item.alias !== null && item.alias !== ''
? item.alias
: item.channelname
"
:value="item.channelid"
>
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channelname
}}
</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>
<parameterSetDialog ref="parameterSetref"></parameterSetDialog>
</div>
</template>
@ -94,7 +130,11 @@ import alarmButton from "./alarmButton.vue";
import cableButton from "./cableButton.vue";
import gpsButton from "./gpsButton.vue";
import parameterSetDialog from "../../photographicDevice/components/parameterSetDialog.vue";
import { getChannelByTermidJoggle } from "@/utils/api/index";
import {
getChannelByTermidJoggle,
updateTermCamera,
getTermStatus,
} from "@/utils/api/index";
export default {
components: {
takePicButton,
@ -110,6 +150,8 @@ export default {
return {
selectChannelValue: null, //
channelListOption: [], //
channelarrValue: null,
channelfocalOpyion: [], //
dateValue: "", //
pickerOptions: {
disabledDate(date) {
@ -165,7 +207,8 @@ export default {
];
this.channelListOption = this.channelListOption.concat(res.data.list);
console.log(this.channelListOption);
this.channelfocalOpyion = res.data.list; //
this.channelarrValue = this.channelfocalOpyion[0].channelid;
this.selectChannelValue = this.channelListOption[0].channelid; //;
this.$store.commit("channelId", this.selectChannelValue); //vuex
this.$store.commit("channelIdList", res.data.list); //vuex
@ -216,6 +259,53 @@ export default {
console.log(this.areaData);
this.$refs.parameterSetref.display(this.areaData);
},
//
amplify() {
getTermStatus({ termId: this.areaData.id }).then((res) => {
console.log(res);
if (res.data.isonline) {
updateTermCamera({
termId: this.areaData.id,
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.areaData.id);
},
//
reduce() {
getTermStatus({ termId: this.areaData.id }).then((res) => {
console.log(res);
if (res.data.isonline) {
updateTermCamera({
termId: this.areaData.id,
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",
});
}
});
},
},
};
</script>
@ -269,5 +359,38 @@ export default {
}
}
}
.setfocalLength {
margin-bottom: 16px;
position: relative;
h3 {
font-size: 14px;
font-weight: normal;
color: #303133;
margin-bottom: 8px;
}
.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;
}
}
}
}
</style>

Loading…
Cancel
Save