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