|
|
|
@ -56,6 +56,7 @@
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
@change="changeChannelId"
|
|
|
|
|
multiple
|
|
|
|
|
ref="multiSelect"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in channelOption"
|
|
|
|
@ -155,10 +156,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
currentNodekey: "", //默认选中的节点树,
|
|
|
|
|
cmdid: "", //装置id,
|
|
|
|
|
id: "", //通道装置id
|
|
|
|
|
channelId: "", //通道装置id
|
|
|
|
|
channelList: "", //通道数据
|
|
|
|
|
channelOption: [], //通道分类
|
|
|
|
|
channelValue: [],
|
|
|
|
|
channelValue: [], //选中的通道
|
|
|
|
|
terminalPhoto: [], //获取拍照装置当前数据
|
|
|
|
|
dateValue: "", //日期
|
|
|
|
|
nopicPath: require("@/assets/img/nopic.jpg"),
|
|
|
|
@ -177,12 +178,19 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {},
|
|
|
|
|
watch: {
|
|
|
|
|
// channelValue() {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// this.$refs.multiSelect.blur();
|
|
|
|
|
// }, 50);
|
|
|
|
|
// },
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mounted() {},
|
|
|
|
|
created() {
|
|
|
|
|
this.getLineTreeList();
|
|
|
|
|
this.getDateTime();
|
|
|
|
|
console.log(this.dateValue);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//获取当前时间
|
|
|
|
@ -191,6 +199,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//选择时间
|
|
|
|
|
changedate() {
|
|
|
|
|
console.log(this.dateValue);
|
|
|
|
|
console.log(this.channelList);
|
|
|
|
|
this.getTerminalPhotoList(
|
|
|
|
|
this.channelList[0].channelid,
|
|
|
|
@ -214,9 +223,9 @@ export default {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.tree.setCurrentKey(this.currentNodekey); //一定要加这个选中了否则样式没有出来
|
|
|
|
|
console.log(this.currentNodekey);
|
|
|
|
|
this.id = this.currentNodekey;
|
|
|
|
|
console.log(this.id);
|
|
|
|
|
this.getChannelList(this.id); //获取通道id接口
|
|
|
|
|
this.channelId = this.currentNodekey;
|
|
|
|
|
console.log(this.channelId);
|
|
|
|
|
this.getChannelList(this.channelId); //获取通道id接口
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.loadingBg = false;
|
|
|
|
@ -232,6 +241,7 @@ export default {
|
|
|
|
|
this.$refs.tree.setCurrentKey(data.list[0].id);
|
|
|
|
|
}
|
|
|
|
|
this.channelId = data.id; //获取当前点击的id
|
|
|
|
|
this.channelValue = [];
|
|
|
|
|
this.channelOption = [];
|
|
|
|
|
this.getChannelList(this.channelId); //获取通道id接口
|
|
|
|
|
},
|
|
|
|
@ -242,11 +252,7 @@ export default {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.channelList = res.data.list;
|
|
|
|
|
console.log(this.channelList);
|
|
|
|
|
// this.getTerminalPhotoList(
|
|
|
|
|
// this.channelList[0].channelid,
|
|
|
|
|
// this.dateValue,
|
|
|
|
|
// this.channelList[0].termId
|
|
|
|
|
// ); //获取图片列表是传当前设备的 id 和termid
|
|
|
|
|
|
|
|
|
|
this.channelOption = [];
|
|
|
|
|
this.channelList.forEach((item) => {
|
|
|
|
|
this.channelOption.push({
|
|
|
|
@ -254,9 +260,17 @@ export default {
|
|
|
|
|
value: item.channelid,
|
|
|
|
|
termid: item.termId,
|
|
|
|
|
});
|
|
|
|
|
this.channelValue.push(item.channelid); //默认选中所有通道
|
|
|
|
|
}); // 选择通道一通道二select框
|
|
|
|
|
this.channelValue = this.channelOption[0].label; //默认选中第一个
|
|
|
|
|
console.log(this.channelOption);
|
|
|
|
|
console.log(this.channelValue);
|
|
|
|
|
// console.log(JSON.parse(JSON.stringify(this.channelValue)));
|
|
|
|
|
// this.channelValue = JSON.parse(JSON.stringify(this.channelValue));
|
|
|
|
|
this.getTerminalPhotoList(
|
|
|
|
|
this.channelValue,
|
|
|
|
|
this.dateValue,
|
|
|
|
|
this.channelList[0].termId
|
|
|
|
|
); //获取图片列表是传当前设备的 id 和termid
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
@ -295,11 +309,12 @@ export default {
|
|
|
|
|
console.log(val);
|
|
|
|
|
let channelObj = {};
|
|
|
|
|
channelObj = this.channelOption.find(function (i) {
|
|
|
|
|
return i.value === val;
|
|
|
|
|
return i.value;
|
|
|
|
|
});
|
|
|
|
|
console.log(channelObj);
|
|
|
|
|
this.getTerminalPhotoList(val, this.dateValue, channelObj.termid);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//设置时间表
|
|
|
|
|
handleSetSchedule() {
|
|
|
|
|
this.$refs.setschedule_ref.display();
|
|
|
|
|