|
|
@ -61,9 +61,10 @@
|
|
|
|
<el-select
|
|
|
|
<el-select
|
|
|
|
v-model="channellist.channelVal"
|
|
|
|
v-model="channellist.channelVal"
|
|
|
|
placeholder="请选择通道号"
|
|
|
|
placeholder="请选择通道号"
|
|
|
|
|
|
|
|
@change="changeHandle"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in channelOptions"
|
|
|
|
v-for="item in filterOption"
|
|
|
|
:key="item.id"
|
|
|
|
:key="item.id"
|
|
|
|
:label="item.channelname"
|
|
|
|
:label="item.channelname"
|
|
|
|
:value="item.id"
|
|
|
|
:value="item.id"
|
|
|
@ -146,6 +147,7 @@ export default {
|
|
|
|
isShow: false,
|
|
|
|
isShow: false,
|
|
|
|
formInfo: {},
|
|
|
|
formInfo: {},
|
|
|
|
channelOptions: [], //所有通道列表
|
|
|
|
channelOptions: [], //所有通道列表
|
|
|
|
|
|
|
|
filterOption:[],//筛选后的通道列表
|
|
|
|
lineOptions: [], //线路
|
|
|
|
lineOptions: [], //线路
|
|
|
|
toweridOptions: [], //杆塔
|
|
|
|
toweridOptions: [], //杆塔
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
@ -175,34 +177,36 @@ export default {
|
|
|
|
sim: "",
|
|
|
|
sim: "",
|
|
|
|
list: [
|
|
|
|
list: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
channelVal: [],
|
|
|
|
channelVal: '',
|
|
|
|
nickname: "",
|
|
|
|
nickname: "",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.formInfo = val;
|
|
|
|
this.formInfo = val;
|
|
|
|
let channelnr = [];
|
|
|
|
// let channelnr = [];
|
|
|
|
val.list.forEach((item) => {
|
|
|
|
// val.list.forEach((item) => {
|
|
|
|
channelnr.push(item.id);
|
|
|
|
// channelnr.push(item.id);
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
this.$set(this.formInfo, "channelVal", channelnr);
|
|
|
|
// this.$set(this.formInfo, "channelVal", channelnr);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//通道号值改变
|
|
|
|
|
|
|
|
changeHandle(){
|
|
|
|
|
|
|
|
this.filterOption = this.channelOptions.filter(val => !this.formInfo.list.some(item => item.channelVal === val.id))
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//新增一行
|
|
|
|
//新增一行
|
|
|
|
addModule() {
|
|
|
|
addModule() {
|
|
|
|
//新增一行
|
|
|
|
//新增一行
|
|
|
|
this.formInfo.list.push({
|
|
|
|
this.formInfo.list.push({
|
|
|
|
channelVal: [],
|
|
|
|
channelVal: '',
|
|
|
|
nickname: "",
|
|
|
|
nickname: "",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
console.log(this.formInfo.list);
|
|
|
|
this.filterOption = this.channelOptions.filter(val => !this.formInfo.list.some(item => item.channelVal === val.id))
|
|
|
|
console.log(this.channelOptions);
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
console.log(this.$refs.channelBoxref);
|
|
|
|
console.log(this.$refs.channelBoxref);
|
|
|
|
if (this.$refs.channelBoxref) {
|
|
|
|
if (this.$refs.channelBoxref) {
|
|
|
|
console.log(this.$refs.channelBoxref.scrollHeight);
|
|
|
|
console.log(this.$refs.channelBoxref.scrollHeight);
|
|
|
|
this.$refs.channelBoxref.scrollTop =
|
|
|
|
this.$refs.channelBoxref.scrollTop = this.$refs.channelBoxref.scrollHeight;
|
|
|
|
this.$refs.channelBoxref.scrollHeight;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -213,6 +217,7 @@ export default {
|
|
|
|
if (itemList !== -1) {
|
|
|
|
if (itemList !== -1) {
|
|
|
|
this.formInfo.list.splice(index, 1);
|
|
|
|
this.formInfo.list.splice(index, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.filterOption = this.channelOptions.filter(val => !this.formInfo.list.some(item => item.channelVal === val.id))
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 保存确定操作
|
|
|
|
// 保存确定操作
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
@ -320,9 +325,8 @@ export default {
|
|
|
|
getAllChannelListJoggle()
|
|
|
|
getAllChannelListJoggle()
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
this.channelOptions = res.data.list;
|
|
|
|
this.channelOptions = res.data.list;
|
|
|
|
console.log(this.channelOptions[0].id);
|
|
|
|
this.filterOption = res.data.list;
|
|
|
|
console.log(this.formInfo.list.channelVal);
|
|
|
|
this.formInfo.list[0].channelVal = this.filterOption[0].id;
|
|
|
|
this.formInfo.list[0].channelVal = this.channelOptions[0].id;
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {});
|
|
|
|
.catch((err) => {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|