优化通道

jc
fanluyan 1 year ago
parent 84bcc7b6e4
commit 8a6638ae1a

@ -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(

@ -115,7 +115,7 @@
</div>
<div class="roteAiBox">
<el-form-item label="模式选择">
<el-form-item label="场景选择">
<el-select v-model="channelForm.modelVal" placeholder="请选择">
<el-option
v-for="item in modelOptions"
@ -242,7 +242,7 @@ export default {
{
"name": "DISABLED",
"id": 0,
"chName": "禁用"
"chName": "无场景"
},
{
"name": "FACE_PRIORITY",
@ -432,7 +432,13 @@ export default {
getChannelListJoggle({ termid: this.areaData.id })
.then((res) => {
this.channelList = res.data.list;
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();
})

@ -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;
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();
})

Loading…
Cancel
Save