master
fanluyan 2 years ago
parent 3c5ffe8de0
commit be901e4d39

@ -139,6 +139,15 @@ export function getChannelListJoggle(data) {
data,
});
}
//根据装置号获取通道接口
export function getChannelByTermidJoggle(data) {
return request({
url: "/test/getChannelByTermid",
method: "post",
data,
});
}
//拍照时间表设置
//1.获取任务规则列表接口

@ -49,7 +49,7 @@
>
</el-date-picker>
</div>
<div class="monitorItemBox">
<div class="monitorItemBox" v-if="channelOption.length !== 0">
<h3>通道</h3>
<el-select
v-model="channelValue"
@ -67,9 +67,12 @@
</div>
<div class="setTimebtn">
<h3>设置</h3>
<div class="buttonGroup">
<el-button type="primary" @click.native.stop="handleSetSchedule()"
>时间表设置</el-button
>
<el-button type="primary">手动拍照</el-button>
</div>
</div>
</div>
</div>
@ -82,7 +85,7 @@
<script>
import {
getdyTreeListJoggle,
getChannelListJoggle,
getChannelByTermidJoggle,
getTerminalPhotoListJoggle,
} from "@/utils/api/index";
import carouselChart from "../components/carouselChart.vue";
@ -125,28 +128,6 @@ export default {
this.getLineTreeList();
this.getDateTime();
console.log(this.dateValue);
getTerminalPhotoListJoggle({
channelid: 1,
time: 1681833600000,
terminalid: 5,
})
.then((res) => {
console.log(res);
if (res.data.list.length == 0) {
this.terminalPhoto = [
{
path: this.nopicPath,
},
];
//alert("");
} else {
this.terminalPhoto = res.data.list;
}
console.log(this.terminalPhoto);
})
.catch((err) => {
console.log(err); //
});
},
methods: {
//
@ -193,26 +174,27 @@ export default {
this.$refs.tree.setCurrentKey(data.list[0].id);
}
this.channelId = data.id; //id
this.channelOption = [];
this.getChannelList(this.channelId); //id
},
//
getChannelList(id) {
getChannelListJoggle({ termid: id })
getChannelByTermidJoggle({ termid: id })
.then((res) => {
console.log(res);
this.channelList = res.data.list;
console.log(this.channelList);
this.getTerminalPhotoList(
this.channelList[0].id,
this.channelList[0].channelid,
this.dateValue,
this.channelList[0].termId
); // id termid
this.channelOption = [];
this.channelList.forEach((item) => {
this.channelOption.push({
label: item.channelName,
value: item.id,
label: item.channelname,
value: item.channelid,
termid: item.termId,
});
}); // select

Loading…
Cancel
Save