|
|
|
@ -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: "",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
});
|
|
|
|
@ -186,21 +186,26 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//通道号值改变
|
|
|
|
|
changeHandle() {
|
|
|
|
|
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)
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
//新增一行
|
|
|
|
|
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,11 +216,14 @@ 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) {
|
|
|
|
|
return this.$message.error("通道不能重复");
|
|
|
|
@ -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;
|
|
|
|
|