penambahan label detail
This commit is contained in:
parent
5c5ca65f53
commit
98159a1584
|
@ -13,7 +13,7 @@
|
|||
href="https://allbestsistem.com/"
|
||||
target="_blank"
|
||||
style="background-color: #ffffff !important;"
|
||||
>Smart Building Management Systems (V@2024-08-26.2)
|
||||
>Smart Building Management Systems (V@2024-08-26.3)
|
||||
</a></span
|
||||
>
|
||||
</p>
|
||||
|
|
|
@ -175,8 +175,6 @@ export class DeviceControlComponent {
|
|||
}
|
||||
|
||||
schedulerItem(row) {
|
||||
console.log(row);
|
||||
|
||||
this.router.navigate(["/device/scheduler", row.id, row.name]);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ import { CurrencyPipe } from "@angular/common";
|
|||
import { LoginService } from "../../service/login.service";
|
||||
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { ModalExportComponent } from "../modal-export/modal-export.component";
|
||||
import { CostManagementService } from "../../service/cost-management.service";
|
||||
import { BuildingService } from "../../service/monitoring-api.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-detail",
|
||||
|
@ -16,8 +18,6 @@ export class DetailComponent {
|
|||
data: any;
|
||||
mode: string;
|
||||
breadcrumb: any;
|
||||
donutChart1: any;
|
||||
donutChart2: any;
|
||||
|
||||
// temperature
|
||||
days = [
|
||||
|
@ -36,7 +36,6 @@ export class DetailComponent {
|
|||
currentTime: string;
|
||||
chartOption: any;
|
||||
chartOptionBar: any;
|
||||
chartInstance: any;
|
||||
|
||||
// chart bar
|
||||
public barChartLabels: string[] = [];
|
||||
|
@ -45,8 +44,6 @@ export class DetailComponent {
|
|||
//..........................
|
||||
|
||||
// integrasi
|
||||
electric: any;
|
||||
water: any;
|
||||
device: any;
|
||||
room: any;
|
||||
topCard: any;
|
||||
|
@ -57,6 +54,9 @@ export class DetailComponent {
|
|||
buildingId: any;
|
||||
floorId: any;
|
||||
roomId: any;
|
||||
buildingName: any;
|
||||
floorName: any;
|
||||
roomName: any;
|
||||
//......
|
||||
|
||||
constructor(
|
||||
|
@ -65,7 +65,9 @@ export class DetailComponent {
|
|||
private currencyPipe: CurrencyPipe,
|
||||
private router: Router,
|
||||
private authService: LoginService,
|
||||
private modalService: NgbModal
|
||||
private modalService: NgbModal,
|
||||
private costService: CostManagementService,
|
||||
private buildingService: BuildingService
|
||||
) {}
|
||||
|
||||
get formattedSummaryCost(): string {
|
||||
|
@ -83,12 +85,11 @@ export class DetailComponent {
|
|||
this.route.data.subscribe((data) => {
|
||||
this.mode = data.mode;
|
||||
});
|
||||
this.breadcrumbLink();
|
||||
this.route.params.subscribe((params) => {
|
||||
this.buildingId = params["buildingId"] ? params["buildingId"] : 0;
|
||||
this.floorId = params["floorId"] ? params["floorId"] : 0;
|
||||
this.roomId = params["roomId"] ? params["roomId"] : 0;
|
||||
|
||||
this.dataBuilding(this.buildingId);
|
||||
if (
|
||||
this.buildingId !== undefined &&
|
||||
this.floorId === undefined &&
|
||||
|
@ -107,6 +108,7 @@ export class DetailComponent {
|
|||
this.dataEnergyMonitoringSummary(this.buildingId, this.floorId, 0);
|
||||
this.dataEnergyDeviceCategory(this.buildingId, this.floorId, 0);
|
||||
this.dataEnergyChartKwhWater(this.buildingId, this.floorId, 0);
|
||||
|
||||
} else if (
|
||||
this.buildingId !== undefined &&
|
||||
this.floorId !== undefined &&
|
||||
|
@ -147,7 +149,7 @@ export class DetailComponent {
|
|||
isLinkBack: true,
|
||||
links: [
|
||||
{
|
||||
name: "Building",
|
||||
name: this.buildingName,
|
||||
isLink: false,
|
||||
link: "",
|
||||
},
|
||||
|
@ -160,12 +162,12 @@ export class DetailComponent {
|
|||
isLinkBack: true,
|
||||
links: [
|
||||
{
|
||||
name: "Building",
|
||||
name: this.buildingName,
|
||||
isLink: false,
|
||||
link: "",
|
||||
},
|
||||
{
|
||||
name: "Floor",
|
||||
name: this.floorName,
|
||||
isLink: false,
|
||||
link: "",
|
||||
},
|
||||
|
@ -178,17 +180,17 @@ export class DetailComponent {
|
|||
isLinkBack: true,
|
||||
links: [
|
||||
{
|
||||
name: "Building",
|
||||
name: this.buildingName,
|
||||
isLink: false,
|
||||
link: "",
|
||||
},
|
||||
{
|
||||
name: "Floor",
|
||||
name: this.floorName,
|
||||
isLink: false,
|
||||
link: "",
|
||||
},
|
||||
{
|
||||
name: "Room",
|
||||
name: this.roomName,
|
||||
isLink: false,
|
||||
link: "",
|
||||
},
|
||||
|
@ -316,6 +318,33 @@ export class DetailComponent {
|
|||
});
|
||||
}
|
||||
|
||||
dataBuilding(buildingId) {
|
||||
this.costService.getBUildingById(buildingId).subscribe((res) => {
|
||||
this.buildingName = res.data.name
|
||||
this.breadcrumbLink();
|
||||
if (this.floorId) {
|
||||
this.dataFloor(this.floorId)
|
||||
}
|
||||
if (this.roomId) {
|
||||
this.dataRoom(this.roomId)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
dataFloor(floorId) {
|
||||
this.buildingService.getHeaderDetailParam(floorId).subscribe((res) => {
|
||||
this.floorName = res.data.name;
|
||||
this.breadcrumbLink();
|
||||
});
|
||||
}
|
||||
|
||||
dataRoom(roomId) {
|
||||
this.buildingService.getRoom(roomId).subscribe((res) => {
|
||||
this.roomName = res.data.name;
|
||||
this.breadcrumbLink();
|
||||
});
|
||||
}
|
||||
|
||||
dataEnergyMonitoringSummary(buildingId, floorId, roomId) {
|
||||
this.energyMonitoringService
|
||||
.getDashboardSummary(buildingId, floorId, roomId)
|
||||
|
|
|
@ -81,6 +81,10 @@ export class BuildingService {
|
|||
return this.get<any>('room/list');
|
||||
}
|
||||
|
||||
getRoom(id: any): Observable<any> {
|
||||
return this.get<any>(`room/${id}`);
|
||||
}
|
||||
|
||||
getListRoomDataUnmap(): Observable<any> {
|
||||
return this.get<any>('room/list/unmap');
|
||||
}
|
||||
|
@ -105,6 +109,10 @@ export class BuildingService {
|
|||
return this.put<any>(`header-detail-param/${id}`, data);
|
||||
}
|
||||
|
||||
getHeaderDetailParam(id: any): Observable<any> {
|
||||
return this.get<any>(`header-detail-param/${id}`);
|
||||
}
|
||||
|
||||
deleteHeaderDetailParam(id: string): Observable<any> {
|
||||
return this.delete<any>(`header-detail-param/${id}`);
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
<p
|
||||
class="card-subtitle line-on-side text-muted text-center font-small-3 mx-2 my-1"
|
||||
>
|
||||
<span>(v@2024.08.26.2)</span>
|
||||
<span>(v@2024.08.26.3)</span>
|
||||
</p>
|
||||
<!-- <div class="card-body">
|
||||
<a
|
||||
|
|
Loading…
Reference in New Issue