|
@@ -640,19 +640,21 @@
|
|
this.$refs["dialogForm"].validate(valid => {
|
|
this.$refs["dialogForm"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if(this.dialogOpenType == 1){
|
|
if(this.dialogOpenType == 1){
|
|
- for(let i=0;i<self.mapList.length;i++){
|
|
|
|
- if(self.mapList[i].type == '1'){
|
|
|
|
- if(self.mapList[i].subId == self.dialogForm.subId){
|
|
|
|
- this.msgError(self.dialogForm.subName+'已被其他房间绑定')
|
|
|
|
- return
|
|
|
|
|
|
+ if(self.dialogForm.roomType != '-99'){
|
|
|
|
+ for(let i=0;i<self.mapList.length;i++){
|
|
|
|
+ if(self.mapList[i].type == '1'){
|
|
|
|
+ if(self.mapList[i].subId == self.dialogForm.subId){
|
|
|
|
+ this.msgError(self.dialogForm.subName+'已被其他房间绑定')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.$set(this.mapList[this.dialogIndex],'roomType',this.dialogForm.roomType);
|
|
this.$set(this.mapList[this.dialogIndex],'roomType',this.dialogForm.roomType);
|
|
this.$set(this.mapList[this.dialogIndex],'roomNum',this.dialogForm.roomNum);
|
|
this.$set(this.mapList[this.dialogIndex],'roomNum',this.dialogForm.roomNum);
|
|
- this.$set(this.mapList[this.dialogIndex],'roomName',this.dialogForm.roomName);
|
|
|
|
- this.$set(this.mapList[this.dialogIndex],'subId',this.dialogForm.subId);
|
|
|
|
- this.$set(this.mapList[this.dialogIndex],'subName',this.dialogForm.subName);
|
|
|
|
|
|
+ this.$set(this.mapList[this.dialogIndex],'roomName',self.dialogForm.roomType == '-99'?this.dialogForm.roomName:"");
|
|
|
|
+ this.$set(this.mapList[this.dialogIndex],'subId',self.dialogForm.roomType != '-99'?this.dialogForm.subId:"");
|
|
|
|
+ this.$set(this.mapList[this.dialogIndex],'subName',self.dialogForm.roomType != '-99'?this.dialogForm.subName:"");
|
|
this.dialogOpen = false;
|
|
this.dialogOpen = false;
|
|
}else if(this.dialogOpenType == 6){
|
|
}else if(this.dialogOpenType == 6){
|
|
this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'relayType',this.dialogForm.relayType);
|
|
this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'relayType',this.dialogForm.relayType);
|