优化 设备添加页面

This commit is contained in:
java110 2020-06-04 19:32:03 +08:00
parent f904aca34a
commit 595b3c3665
2 changed files with 9 additions and 4 deletions

View File

@ -58,7 +58,7 @@
<div class="form-group row">
<label class="col-sm-2 col-form-label">设备位置</label>
<div class="col-sm-10">
<select class="custom-select" v-model="addMachineInfo.locationTypeCd">
<select class="custom-select" v-model="addMachineInfo.locationTypeCd" @change="onChangeLocation">
<option selected disabled value="">必填,请选择设备位置</option>
<option v-for="item in addMachineInfo.locations"
:label="item.locationName"
@ -69,7 +69,7 @@
</div>
</div>
<div class="form-group row"
v-show="addMachineInfo.locationTypeCd == '2000' || addMachineInfo.locationTypeCd == '3000' ">
v-show="addMachineInfo.locationType == '2000' || addMachineInfo.locationType == '3000' ">
<label class="col-sm-2 col-form-label">归属楼栋</label>
<div class="col-sm-10">
<vc:create path="property/floorSelect2"
@ -79,7 +79,7 @@
</div>
</div>
<div class="form-group row"
v-show="addMachineInfo.locationTypeCd == '2000' || addMachineInfo.locationTypeCd == '3000' ">
v-show="addMachineInfo.locationType == '2000' || addMachineInfo.locationType == '3000' ">
<label class="col-sm-2 col-form-label">归属单元</label>
<div class="col-sm-10">
<vc:create path="property/unitSelect2"
@ -91,7 +91,7 @@
</div>
</div>
<div class="form-group row"
v-show="addMachineInfo.locationTypeCd == '3000' ">
v-show="addMachineInfo.locationType == '3000' ">
<label class="col-sm-2 col-form-label">归属房屋</label>
<div class="col-sm-10">
<vc:create path="property/roomSelect2"

View File

@ -22,6 +22,7 @@
roomNum: '',
machineUrl: '',
direction:'',
locationType:'',
locations: []
}
@ -272,6 +273,7 @@
roomNum: '',
machineUrl: '',
direction:'',
locationType:'',
locations: _locations
}
@ -294,6 +296,9 @@
console.log('请求失败处理');
}
);
},
onChangeLocation:function(e){
console.log(e);
}
}
});