通道昵称

master
fanluyan 2 years ago
parent 5176e2d4cd
commit ac41047225

@ -147,7 +147,7 @@ export default {
isShow: false, isShow: false,
formInfo: {}, formInfo: {},
channelOptions: [], // channelOptions: [], //
filterOption:[],// filterOption: [], //
lineOptions: [], //线 lineOptions: [], //线
toweridOptions: [], // toweridOptions: [], //
rules: { rules: {
@ -169,15 +169,15 @@ export default {
this.getChannel(); this.getChannel();
if (val == null) { if (val == null) {
return (this.formInfo = { return (this.formInfo = {
lineId: '', lineId: "",
towerId: '', towerId: "",
cmdId: '', cmdId: "",
equipName: '', equipName: "",
sim: '', sim: "",
list: [ list: [
{ {
id: '', id: "",
alias: '', alias: "",
}, },
], ],
}); });
@ -185,22 +185,27 @@ export default {
this.formInfo = val; this.formInfo = val;
}, },
// //
changeHandle(){ 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() { addModule() {
// //
this.formInfo.list.push({ this.formInfo.list.push({
id: '', id: "",
alias: "", 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(() => { 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.scrollHeight; this.$refs.channelBoxref.scrollTop =
this.$refs.channelBoxref.scrollHeight;
} }
}); });
}, },
@ -211,13 +216,16 @@ 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.id === val.id)) this.filterOption = this.channelOptions.filter(
(val) => !this.formInfo.list.some((item) => item.id === val.id)
);
}, },
// //
submitForm() { 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; const listLength = this.formInfo.list.length;
if(listLength > newListLength){ if (listLength > newListLength) {
return this.$message.error("通道不能重复"); return this.$message.error("通道不能重复");
} }
this.$refs.formgrapInfo.validate((valid) => { this.$refs.formgrapInfo.validate((valid) => {
@ -232,7 +240,7 @@ export default {
// list: this.formInfo.list, // list: this.formInfo.list,
// displayName: this.formInfo.cmdId, // displayName: this.formInfo.cmdId,
// }; // };
this.$set(this.formInfo,'displayName',this.formInfo.cmdId) this.$set(this.formInfo, "displayName", this.formInfo.cmdId);
addTerminalJoggle(this.formInfo) addTerminalJoggle(this.formInfo)
.then((res) => { .then((res) => {
this.isShow = false; this.isShow = false;

@ -368,6 +368,7 @@ export default {
this.photoDialogTitle = "修改"; this.photoDialogTitle = "修改";
this.$refs.addPhotoDialogref.display(); this.$refs.addPhotoDialogref.display();
this.$refs.addPhotoDialogref.getdataform(data); this.$refs.addPhotoDialogref.getdataform(data);
console.log(data);
}, },
// //
handleDeviceReset(data) { handleDeviceReset(data) {

@ -226,9 +226,6 @@ import {
getScheduleRulelListJoggle, getScheduleRulelListJoggle,
setScheduleRulel, setScheduleRulel,
getScheduleRulelAccessList, getScheduleRulelAccessList,
selectPhotoTimeGetJoggle,
selectPhotoTimeJoggle,
getPhotoTimeJoggle,
cmaSchelduleDetials, cmaSchelduleDetials,
getCmaSchelduleDetials, getCmaSchelduleDetials,
getCmaSchelduleUpload, getCmaSchelduleUpload,

Loading…
Cancel
Save