Browse Source

[完善]修改设备在线状态字段

develop
邵佳豪 3 years ago
parent
commit
44eb5a6e1c
  1. 14
      src/app/system-management/condition-monitoring/condition-monitoring.component.html
  2. 2
      src/app/system-management/host-config/host-config.component.ts

14
src/app/system-management/condition-monitoring/condition-monitoring.component.html

@ -23,8 +23,8 @@
<!-- <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="state">设备状态</nz-form-label> -->
<nz-form-control>
<nz-select formControlName="state" nzPlaceHolder="请选择设备状态">
<nz-option [nzValue]="0" nzLabel="未连接"></nz-option>
<nz-option [nzValue]="1" nzLabel="已连接"></nz-option>
<nz-option [nzValue]="0" nzLabel="离线"></nz-option>
<nz-option [nzValue]="1" nzLabel="在线"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -91,7 +91,15 @@
(nzCheckedChange)="onItemChecked(data.id, $event)"></td>
<td>{{ data.hostIPAddress }}</td>
<td>{{ data.gasStationName }}</td>
<td>{{ data.hubConnectionState == 'Disconnected' ? '未连接' : '已连接' }}</td>
<td>
<ng-container *ngIf="data.hubConnectionState == 'Disconnected'; else elseTemplate">
<span style="color: red;">离线</span>
</ng-container>
<ng-template #elseTemplate>
<span style="color: rgb(52, 204, 52);">在线</span>
</ng-template>
</td>
<!-- <td>
<span *ngIf="data.linuxServiceState == 'Dead'">未启动</span>
<span *ngIf="data.linuxServiceState == 'Waiting'">启动中</span>

2
src/app/system-management/host-config/host-config.component.ts

@ -267,7 +267,7 @@ export class HostConfigComponent implements OnInit {
sourceYaml() {
let config4 = `video_rate: 5
inference_buffer_second: 10
inference_buffer_second: 6
sources:`
this.listOfData.forEach((item: any, index) => {
config4 += `

Loading…
Cancel
Save