优化位置信息

This commit is contained in:
java110 2021-01-05 14:05:19 +08:00
parent 903cc0b48d
commit 7c9ff6c6f5
7 changed files with 70 additions and 24 deletions

View File

@ -22,6 +22,7 @@
<option value="1000">小区</option>
<option value="2000">单元</option>
<option value="3000">房屋</option>
<option value="4000">停车场</option>
</select> </div>
</div>

View File

@ -92,6 +92,14 @@
</vc:create>
</div>
</div>
<div class="form-group row" v-show="addMachineInfo.locationType == '4000' ">
<label class="col-sm-2 col-form-label">归属停车场</label>
<div class="col-sm-10">
<vc:create path="property/parkingAreaSelect2" parentModal="addMachineModel"
callBackListener="addMachine" callBackFunction="notify" namespace="addMachine">
</vc:create>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">设备IP</label>

View File

@ -21,6 +21,7 @@
unitId: '',
unitName: '',
roomId: '',
paId: '',
locationTypeCd: '',
locationObjId: '',
roomName: '',
@ -31,7 +32,7 @@
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('addMachine', 'openAddMachineModal', function () {
@ -52,6 +53,10 @@
if (_param.hasOwnProperty("roomId")) {
vc.component.addMachineInfo.roomId = _param.roomId;
}
if (_param.hasOwnProperty("paId")) {
vc.component.addMachineInfo.paId = _param.paId;
}
});
},
methods: {
@ -165,6 +170,8 @@
vc.component.addMachineInfo.locationObjId = vc.component.addMachineInfo.unitId;
} else if (vc.component.addMachineInfo.locationType == '3000') {
vc.component.addMachineInfo.locationObjId = vc.component.addMachineInfo.roomId;
} else if (vc.component.addMachineInfo.locationType == '4000') {
vc.component.addMachineInfo.locationObjId = vc.component.addMachineInfo.paId;
} else {
vc.toast("设备位置值错误");
return;
@ -224,7 +231,14 @@
direction: '',
locationType: '',
locations: _locations,
attrs: []
attrs: [],
floorId: '',
floorNum: '',
floorName: '',
unitId: '',
unitName: '',
roomId: '',
paId: ''
};
},
_initAddMachineData: function () {

View File

@ -1,4 +1,5 @@
<div id = "editLocationModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
<div id="editLocationModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
@ -7,25 +8,30 @@
<div>
<div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">位置名称</label>
<div class="col-sm-10">
<input v-model="editLocationInfo.locationName" type="text" placeholder="必填,请填写位置名称" class="form-control">
</div>
</div>
<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="editLocationInfo.locationType">
<option selected disabled value="">必填,请选择位置类型</option>
<option value="1000">小区</option>
<option value="2000">单元</option>
<option value="3000">房屋</option>
</select> </div>
</div>
<label class="col-sm-2 col-form-label">位置名称</label>
<div class="col-sm-10">
<input v-model="editLocationInfo.locationName" type="text" placeholder="必填,请填写位置名称"
class="form-control">
</div>
</div>
<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="editLocationInfo.locationType">
<option selected disabled value="">必填,请选择位置类型</option>
<option value="1000">小区</option>
<option value="2000">单元</option>
<option value="3000">房屋</option>
<option value="4000">停车场</option>
</select>
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="editLocation()" ><i class="fa fa-check"></i>&nbsp;保存</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
<button class="btn btn-primary float-right" type="button" v-on:click="editLocation()"><i
class="fa fa-check"></i>&nbsp;保存</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">取消</button>
</div>
</div>
</div>
@ -33,4 +39,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -91,6 +91,14 @@
</vc:create>
</div>
</div>
<div class="form-group row" v-show="addMachineInfo.locationType == '4000' ">
<label class="col-sm-2 col-form-label">归属停车场</label>
<div class="col-sm-10">
<vc:create path="property/parkingAreaSelect2" parentModal="editMachineModel"
callBackListener="editMachine" callBackFunction="notify" namespace="editMachine">
</vc:create>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">设备IP</label>
<div class="col-sm-10">

View File

@ -17,6 +17,7 @@
unitId: '',
unitNum: '',
roomId: '',
paId:'',
locationTypeCd: '',
locationObjId: '',
roomNum: '',
@ -69,6 +70,11 @@
roomId: vc.component.editMachineInfo.roomId,
roomNum: vc.component.editMachineInfo.roomNum,
});
}else if (vc.component.editMachineInfo.locationTypeCd == '4000') {
vc.emit('editMachine', 'parkingAreaSelect2', 'setParkingArea', {
paId: vc.component.editMachineInfo.paId,
num: vc.component.editMachineInfo.num
});
}
if (_params.hasOwnProperty('machineAttrs')) {
@ -232,7 +238,9 @@
vc.component.editMachineInfo.locationObjId = vc.component.editMachineInfo.unitId;
} else if (vc.component.editMachineInfo.locationType == '3000') {
vc.component.editMachineInfo.locationObjId = vc.component.editMachineInfo.roomId;
} else {
} else if (vc.component.editMachineInfo.locationType == '4000') {
vc.component.editMachineInfo.locationObjId = vc.component.editMachineInfo.paId;
}else {
vc.toast("设备位置值错误");
return;
}
@ -289,7 +297,8 @@
direction: '',
locationType: '',
locations: _locations,
attrs: _attrs
attrs: _attrs,
paId:''
}
},

View File

@ -77,7 +77,7 @@
<th class="text-center">对象名称</th>
<th class="text-center">指令</th>
<th class="text-center">状态</th>
<th class="text-center">说明</th>
<th class="text-center" width="80px">说明</th>
<th class="text-center">同步时间</th>
<th class="text-center">操作</th>
</tr>