mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
加入车位 结构图
This commit is contained in:
parent
949d2fdecc
commit
bcf3ee4e51
@ -2,16 +2,17 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<vc:create path="property/floorUnitTree" callBackListener="roomStructure"></vc:create>
|
<vc:create path="property/floorUnitTree" callBackListener="carStructure"></vc:create>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10 margin-bottom">
|
<div class="col-md-10 margin-bottom">
|
||||||
<div class="row margin-top-xs bg-white">
|
<div class="row margin-top-xs bg-white">
|
||||||
|
|
||||||
<div class="col-md-1 text-center margin-sm padding-xs" title="双击查看详情" @dblclick="_toSimplifyAcceptance(room)" v-for="(room,index) in roomStructureInfo.rooms" :style="{'background-color': _getBgColor(room)}" style="color: #fff;border-radius: 5px;cursor:pointer">
|
<div class="col-md-1 text-center margin-sm padding-xs" title="双击查看详情" @dblclick="_toSimplifyAcceptance(car)" v-for="(car,index) in carStructureInfo.cars" :style="{'background-color': _getBgColor(car)}" style="color: #fff;border-radius: 5px;cursor:pointer">
|
||||||
<div>{{room.floorNum}}-{{room.unitNum}}-{{room.roomNum}}</div>
|
<div>{{car.areaNum}}-{{car.num}}</div>
|
||||||
<div>{{room.stateName}}</div>
|
<div>{{car.carNum}}</div>
|
||||||
<div>{{room.ownerName?room.ownerName:'无'}}</div>
|
<div>{{car.floorNum}}-{{car.unitNum}}-{{car.roomNum}}</div>
|
||||||
<div>欠费:{{room.oweAmount}}元</div>
|
<div>{{car.ownerName?car.ownerName:'无'}}</div>
|
||||||
|
<div>欠费:{{car.oweAmount}}元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
var DEFAULT_ROWS = 10;
|
var DEFAULT_ROWS = 10;
|
||||||
vc.extends({
|
vc.extends({
|
||||||
data: {
|
data: {
|
||||||
roomStructureInfo: {
|
carStructureInfo: {
|
||||||
rooms: [],
|
cars: [],
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -16,14 +16,14 @@
|
|||||||
},
|
},
|
||||||
_initEvent: function() {
|
_initEvent: function() {
|
||||||
|
|
||||||
vc.on('roomStructure', 'switchUnit', function(_param) {
|
vc.on('carStructure', 'switchUnit', function(_param) {
|
||||||
$that._loadRooms(_param.unitId)
|
$that._loadCars(_param.unitId)
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
_loadRooms: function(_unitId) {
|
_loadCars: function(_unitId) {
|
||||||
let param = {
|
let param = {
|
||||||
params: {
|
params: {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -32,32 +32,32 @@
|
|||||||
communityId: vc.getCurrentCommunity().communityId
|
communityId: vc.getCurrentCommunity().communityId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vc.http.apiGet('/room.listRoomStructure',
|
vc.http.apiGet('/car.listCarStructure',
|
||||||
param,
|
param,
|
||||||
function(json, res) {
|
function(json, res) {
|
||||||
let listRoomData = JSON.parse(json);
|
let listCarData = JSON.parse(json);
|
||||||
$that.roomStructureInfo.rooms = listRoomData.data;
|
$that.carStructureInfo.cars = listCarData.data;
|
||||||
},
|
},
|
||||||
function(errInfo, error) {
|
function(errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_getBgColor: function(room) {
|
_getBgColor: function(car) {
|
||||||
if (!room.ownerName) {
|
if (!car.ownerName) {
|
||||||
return "#1AB394";
|
return "#1AB394";
|
||||||
}
|
}
|
||||||
if (room.oweAmount > 0) {
|
if (car.oweAmount > 0) {
|
||||||
return "#DC3545";
|
return "#DC3545";
|
||||||
}
|
}
|
||||||
return "#1296db"
|
return "#1296db"
|
||||||
},
|
},
|
||||||
_toSimplifyAcceptance: function(_room) {
|
_toSimplifyAcceptance: function(_car) {
|
||||||
let _date = new Date();
|
let _date = new Date();
|
||||||
vc.saveData("JAVA110_IS_BACK", _date.getTime());
|
vc.saveData("JAVA110_IS_BACK", _date.getTime());
|
||||||
vc.saveData('simplifyAcceptanceSearch', {
|
vc.saveData('simplifyAcceptanceSearch', {
|
||||||
searchType: '1',
|
searchType: '1',
|
||||||
searchValue: _room.floorNum + "-" + _room.unitNum + "-" + _room.roomNum,
|
searchValue: _car.floorNum + "-" + _car.unitNum + "-" + _car.roomNum,
|
||||||
searchPlaceholder: '请输入房屋编号 楼栋-单元-房屋 如1-1-1',
|
searchPlaceholder: '请输入房屋编号 楼栋-单元-房屋 如1-1-1',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user