|
|
|
@ -147,7 +147,7 @@ export default {
|
|
|
|
|
isShow: false,
|
|
|
|
|
formInfo: {},
|
|
|
|
|
channelOptions: [], //所有通道列表
|
|
|
|
|
filterOption:[],//筛选后的通道列表
|
|
|
|
|
filterOption: [], //筛选后的通道列表
|
|
|
|
|
lineOptions: [], //线路
|
|
|
|
|
toweridOptions: [], //杆塔
|
|
|
|
|
rules: {
|
|
|
|
@ -169,15 +169,15 @@ export default {
|
|
|
|
|
this.getChannel();
|
|
|
|
|
if (val == null) {
|
|
|
|
|
return (this.formInfo = {
|
|
|
|
|
lineId: '',
|
|
|
|
|
towerId: '',
|
|
|
|
|
cmdId: '',
|
|
|
|
|
equipName: '',
|
|
|
|
|
sim: '',
|
|
|
|
|
lineId: "",
|
|
|
|
|
towerId: "",
|
|
|
|
|
cmdId: "",
|
|
|
|
|
equipName: "",
|
|
|
|
|
sim: "",
|
|
|
|
|
list: [
|
|
|
|
|
{
|
|
|
|
|
id: '',
|
|
|
|
|
alias: '',
|
|
|
|
|
id: "",
|
|
|
|
|
alias: "",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
});
|
|
|
|
@ -185,22 +185,27 @@ export default {
|
|
|
|
|
this.formInfo = val;
|
|
|
|
|
},
|
|
|
|
|
//通道号值改变
|
|
|
|
|
changeHandle(){
|
|
|
|
|
this.filterOption = this.channelOptions.filter(val => !this.formInfo.list.some(item => item.id === val.id))
|
|
|
|
|
changeHandle() {
|
|
|
|
|
this.filterOption = this.channelOptions.filter(
|
|
|
|
|
(val) => !this.formInfo.list.some((item) => item.id === val.id)
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
//新增一行
|
|
|
|
|
addModule() {
|
|
|
|
|
//新增一行
|
|
|
|
|
this.formInfo.list.push({
|
|
|
|
|
id: '',
|
|
|
|
|
id: "",
|
|
|
|
|
alias: "",
|
|
|
|
|
});
|
|
|
|
|
this.filterOption = this.channelOptions.filter(val => !this.formInfo.list.some(item => item.id === val.id))
|
|
|
|
|
this.filterOption = this.channelOptions.filter(
|
|
|
|
|
(val) => !this.formInfo.list.some((item) => item.id === val.id)
|
|
|
|
|
);
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
console.log(this.$refs.channelBoxref);
|
|
|
|
|
if (this.$refs.channelBoxref) {
|
|
|
|
|
console.log(this.$refs.channelBoxref.scrollHeight);
|
|
|
|
|
this.$refs.channelBoxref.scrollTop = this.$refs.channelBoxref.scrollHeight;
|
|
|
|
|
this.$refs.channelBoxref.scrollTop =
|
|
|
|
|
this.$refs.channelBoxref.scrollHeight;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -211,13 +216,16 @@ export default {
|
|
|
|
|
if (itemList !== -1) {
|
|
|
|
|
this.formInfo.list.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
this.filterOption = this.channelOptions.filter(val => !this.formInfo.list.some(item => item.id === val.id))
|
|
|
|
|
this.filterOption = this.channelOptions.filter(
|
|
|
|
|
(val) => !this.formInfo.list.some((item) => item.id === val.id)
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
// 保存确定操作
|
|
|
|
|
submitForm() {
|
|
|
|
|
const newListLength = new Set(this.formInfo.list.map(item=>item.id)).size;
|
|
|
|
|
const newListLength = new Set(this.formInfo.list.map((item) => item.id))
|
|
|
|
|
.size;
|
|
|
|
|
const listLength = this.formInfo.list.length;
|
|
|
|
|
if(listLength > newListLength){
|
|
|
|
|
if (listLength > newListLength) {
|
|
|
|
|
return this.$message.error("通道不能重复");
|
|
|
|
|
}
|
|
|
|
|
this.$refs.formgrapInfo.validate((valid) => {
|
|
|
|
@ -232,7 +240,7 @@ export default {
|
|
|
|
|
// list: this.formInfo.list,
|
|
|
|
|
// displayName: this.formInfo.cmdId,
|
|
|
|
|
// };
|
|
|
|
|
this.$set(this.formInfo,'displayName',this.formInfo.cmdId)
|
|
|
|
|
this.$set(this.formInfo, "displayName", this.formInfo.cmdId);
|
|
|
|
|
addTerminalJoggle(this.formInfo)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.isShow = false;
|
|
|
|
|