Browse Source

update alarm position

features/reconnect-socket
Trung Nguyen 1 year ago
parent
commit
6afe844bda
2 changed files with 10 additions and 12 deletions
  1. +6
    -8
      src/app/modules/overview/overall-ground/overall-ground.component.html
  2. +4
    -4
      src/app/modules/overview/overall-ground/overall-ground.component.ts

+ 6
- 8
src/app/modules/overview/overall-ground/overall-ground.component.html View File

@@ -14,30 +14,28 @@

<div class="state t2" id="State2">
<div>
<div [ngClass]="{'sensor-on': Sstate3,
'sensor-off': !(Sstate3)}">
<div class="sensor-off" [class.sensor-on]="(Sstate3 && Sstate1)">
<img [src]="Sstate3 ? 'assets/images/sensor-on.png' : 'assets/images/sensor-off.png'" style="width: 30px; height: 30px">
</div>
<a href="/overview/camera-stream" target="_blank">
<img style="width: 30px; height: 30px;" src="assets/images/camera.png">
</a>
</div>
<div *ngIf="Sstate3" class="alarm-text"
[ngClass]="{'alarm-text-on': Sstate3 }">ALARM: <br>VIBRATION ALERT</div>
<div *ngIf="(Sstate3 && Sstate1)" class="alarm-text"
[ngClass]="{'alarm-text-on': (Sstate3 && Sstate1) }">ALARM: <br>VIBRATION ALERT</div>
</div>

<div class="state t3" id="State3">
<div>
<div [ngClass]="{'sensor-on': Sstate4,
'sensor-off': !(Sstate4)}">
<div class="sensor-off" [class.sensor-on]="(Sstate4 && Sstate1)">
<img [src]="Sstate4 ? 'assets/images/sensor-on.png' : 'assets/images/sensor-off.png'" style="width: 30px; height: 30px">
</div>
<a href="/overview/camera-stream" target="_blank">
<img style="width: 30px; height: 30px;" src="assets/images/camera.png">
</a>
</div>
<div *ngIf="Sstate4" class="alarm-text"
[ngClass]="{'alarm-text-on': Sstate4 }">ALARM: <br>DOOR OPENING</div>
<div *ngIf="(Sstate4 && Sstate1)" class="alarm-text"
[ngClass]="{'alarm-text-on': (Sstate4 && Sstate1) }">ALARM: <br>DOOR OPENING</div>
</div>
<div class="state t4" id="State4">
<div>

+ 4
- 4
src/app/modules/overview/overall-ground/overall-ground.component.ts View File

@@ -88,11 +88,11 @@ export class OverallGroundComponent implements OnInit, OnDestroy {
this.state4 = message.state4 === '1' ? 'ON' : 'OFF';
this.state5 = message.state5 === '1' ? 'ON' : 'OFF';
this.state6 = message.state6 === '1' ? 'ON' : 'OFF';
this.Sstate1 = this.state5 === 'ON';
this.Sstate2 = this.state6 === 'ON';
this.Sstate1 = this.state5 === 'ON';// alarm 9h && 6h
this.Sstate2 = this.state6 === 'ON';// alarm 9h && 6h

this.Sstate3 = this.state1 === 'ON';
this.Sstate4 = this.state2 === 'ON';
this.Sstate3 = this.state1 === 'ON';// alarm 12h
this.Sstate4 = this.state2 === 'ON';// alarm 1h
}
if(this.Sstate1 && this.Sstate2)
this.title = 'ALARM: VIBRATION ALERT'

Loading…
Cancel
Save