From 3fcd85e93f537ddc2f6783ec6f394bd964b79a79 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Sat, 5 Mar 2022 17:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=20=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E5=8C=96=20=E5=9B=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/components/property/floorUnitTree/floorUnitTree.js | 7 ++++++- public/pages/property/roomStructure/roomStructure.html | 5 +---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/public/components/property/floorUnitTree/floorUnitTree.js b/public/components/property/floorUnitTree/floorUnitTree.js index 3f589e940..d6ce9c66c 100644 --- a/public/components/property/floorUnitTree/floorUnitTree.js +++ b/public/components/property/floorUnitTree/floorUnitTree.js @@ -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; } } diff --git a/public/pages/property/roomStructure/roomStructure.html b/public/pages/property/roomStructure/roomStructure.html index 55965eb1e..8908a7a44 100644 --- a/public/pages/property/roomStructure/roomStructure.html +++ b/public/pages/property/roomStructure/roomStructure.html @@ -4,18 +4,15 @@