完成 结构化 图功能

This commit is contained in:
java110 2022-03-05 17:05:31 +08:00
parent 502ff36e34
commit 3fcd85e93f
2 changed files with 7 additions and 5 deletions

View File

@ -42,6 +42,10 @@
_initJsTreeFloorUnit: function() {
let _data = $that._doJsTreeData();
_data = _data.sort(function(a, b) {
return a.floorNum - b.floorNum
})
$.jstree.destroy()
$("#jstree_floorUnit").jstree({
"checkbox": {
@ -100,6 +104,7 @@
let _floorItem = {
id: 'f_' + pItem.floorId,
floorId: pItem.floorId,
floorNum: pItem.floorNum,
icon: "/img/floor.png",
text: pItem.floorNum + "栋",
state: {
@ -121,7 +126,7 @@
if (_floorItem.floorId == _units[_pIndex].floorId) {
let _includeMenu = false;
for (let _mgIndex = 0; _mgIndex < _children.length; _mgIndex++) {
if (_units[_pIndex].mId == _children[_mgIndex].mId) {
if (_units[_pIndex].unitId == _children[_mgIndex].unitId) {
_includeMenu = true;
}
}

View File

@ -4,18 +4,15 @@
<div class="col-md-2">
<vc:create path="property/floorUnitTree" callBackListener="roomStructure"></vc:create>
</div>
<div class="col-md-10">
<div class="col-md-10 margin-bottom">
<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>{{room.floorNum}}-{{room.unitNum}}-{{room.roomNum}}</div>
<div>{{room.stateName}}</div>
<div>{{room.ownerName?room.ownerName:'无'}}</div>
<div>欠费:{{room.oweAmount}}元</div>
</div>
</div>
</div>