diff --git a/src/views/realTimeMonitor/components/parameterArea.vue b/src/views/realTimeMonitor/components/parameterArea.vue
index 735486a..0c56d2a 100644
--- a/src/views/realTimeMonitor/components/parameterArea.vue
+++ b/src/views/realTimeMonitor/components/parameterArea.vue
@@ -387,6 +387,7 @@ export default {
//获取通道的接口
getChannelList() {
console.log(this.areaData);
+ console.log("我是选择的通道号", localStorage.getItem("channelId"));
getChannelByTermidJoggle({ termid: this.areaData.id })
.then((res) => {
console.log(res);
@@ -396,8 +397,8 @@ export default {
this.channelListOption = this.channelListOption.concat(res.data.list);
console.log(this.channelListOption);
this.channelfocalOpyion = res.data.list; //焦距通道
-
- this.selectChannelValue = this.channelListOption[0].channelid; //默认选中所有通道;
+ console.log("我是获取通道接口之后的通道",this.channelListOption[0].channelid)
+ this.selectChannelValue = Number(localStorage.getItem("channelId")); //默认选中所有通道;
this.$store.commit("channelId", this.selectChannelValue); //通道保存在vuex中
this.$store.commit("channelIdList", res.data.list); //将通道保存在vuex中
this.$parent.getPhotoList(
diff --git a/src/views/realTimeMonitor/components/setChannelDialog.vue b/src/views/realTimeMonitor/components/setChannelDialog.vue
index 07cff9a..8fd1e34 100644
--- a/src/views/realTimeMonitor/components/setChannelDialog.vue
+++ b/src/views/realTimeMonitor/components/setChannelDialog.vue
@@ -115,7 +115,7 @@
-
+
{
this.channelList = res.data.list;
- this.channelForm.selectChannel = this.channelList[0].channelid;
+ if(Number(localStorage.getItem("channelId"))==1||Number(localStorage.getItem("channelId"))==-1){
+ this.channelForm.selectChannel = this.channelList[0].channelid;
+ }else{
+ this.channelForm.selectChannel = Number(localStorage.getItem("channelId"));
+
+ }
+ //this.channelForm.selectChannel = this.channelList[0].channelid;
console.log(this.channelList);
this.changeChannel();
})
diff --git a/src/views/realTimeMonitor/components/setschedule.vue b/src/views/realTimeMonitor/components/setschedule.vue
index d7a6789..05bdf2e 100644
--- a/src/views/realTimeMonitor/components/setschedule.vue
+++ b/src/views/realTimeMonitor/components/setschedule.vue
@@ -287,6 +287,7 @@ export default {
handleClick(tab, event) {
console.log(tab, event);
if (tab.name == 1) {
+
this.selectChannel = 1;
this.getDataBaseTime(this.areaData.id, this.selectChannel);
}
@@ -304,10 +305,18 @@ export default {
getChannelSelect() {
getChannelListJoggle({ termid: this.areaData.id })
.then((res) => {
+ console.log("wwww",Number(localStorage.getItem("channelId")))
this.channelList = res.data.list;
this.timeChannelList = res.data.list;
- this.timeChannel = this.channelList[0].channelid;
+ if(Number(localStorage.getItem("channelId"))==1||Number(localStorage.getItem("channelId"))==-1){
+ this.timeChannel = this.channelList[0].channelid;
this.selectChannel = this.channelList[0].channelid;
+ }else{
+ this.timeChannel = Number(localStorage.getItem("channelId"));
+ this.selectChannel = Number(localStorage.getItem("channelId"))
+ }
+ // this.timeChannel = this.channelList[0].channelid;
+ // this.selectChannel = this.channelList[0].channelid;
console.log(this.channelList);
this.changeChannel();
})