优化通道

jc
fanluyan 1 year ago
parent 84bcc7b6e4
commit 8a6638ae1a

@ -387,6 +387,7 @@ export default {
// //
getChannelList() { getChannelList() {
console.log(this.areaData); console.log(this.areaData);
console.log("我是选择的通道号", localStorage.getItem("channelId"));
getChannelByTermidJoggle({ termid: this.areaData.id }) getChannelByTermidJoggle({ termid: this.areaData.id })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -396,8 +397,8 @@ export default {
this.channelListOption = this.channelListOption.concat(res.data.list); this.channelListOption = this.channelListOption.concat(res.data.list);
console.log(this.channelListOption); console.log(this.channelListOption);
this.channelfocalOpyion = res.data.list; // this.channelfocalOpyion = res.data.list; //
console.log("我是获取通道接口之后的通道",this.channelListOption[0].channelid)
this.selectChannelValue = this.channelListOption[0].channelid; //; this.selectChannelValue = Number(localStorage.getItem("channelId")); //;
this.$store.commit("channelId", this.selectChannelValue); //vuex this.$store.commit("channelId", this.selectChannelValue); //vuex
this.$store.commit("channelIdList", res.data.list); //vuex this.$store.commit("channelIdList", res.data.list); //vuex
this.$parent.getPhotoList( this.$parent.getPhotoList(

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

@ -287,6 +287,7 @@ export default {
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
if (tab.name == 1) { if (tab.name == 1) {
this.selectChannel = 1; this.selectChannel = 1;
this.getDataBaseTime(this.areaData.id, this.selectChannel); this.getDataBaseTime(this.areaData.id, this.selectChannel);
} }
@ -304,10 +305,18 @@ export default {
getChannelSelect() { getChannelSelect() {
getChannelListJoggle({ termid: this.areaData.id }) getChannelListJoggle({ termid: this.areaData.id })
.then((res) => { .then((res) => {
console.log("wwww",Number(localStorage.getItem("channelId")))
this.channelList = res.data.list; this.channelList = res.data.list;
this.timeChannelList = 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; 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); console.log(this.channelList);
this.changeChannel(); this.changeChannel();
}) })

Loading…
Cancel
Save