|
@@ -36,6 +36,16 @@
|
|
|
var buildingList = $scope.buildingXYAxisList.filter(x => x.BuildingName.indexOf($scope.searchInput) >= 0);
|
|
|
if (buildingList.length > 0) {
|
|
|
$scope.goBuilding(buildingList[0]);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ var searchRoomList = $scope.allRoomList.filter(x => x.DepartmentOrServiceName.indexOf($scope.searchInput) >= 0);
|
|
|
+ if (searchRoomList.length > 0) {
|
|
|
+ buildingList = $scope.buildingXYAxisList.filter(x => x.BuildingId == searchRoomList[0].BuildingId);
|
|
|
+ if (buildingList.length > 0) {
|
|
|
+ $scope.goBuilding(buildingList[0]);
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|