Browse Source

[新增]视频流页面

develop
邵佳豪 3 years ago
parent
commit
d7c3d57da5
  1. 28
      src/app/system-management/video-streaming/video-streaming.component.html
  2. 39
      src/app/system-management/video-streaming/video-streaming.component.ts

28
src/app/system-management/video-streaming/video-streaming.component.html

@ -61,7 +61,7 @@
<tr>
<!-- <th [nzChecked]="checked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="onAllChecked($event)">
</th> -->
<th>IP</th>
<!-- <th>IP</th> -->
<th>所属油站</th>
<th>设备状态</th>
<th>报告时间</th>
@ -73,7 +73,7 @@
<tr *ngFor="let data of basicTable.data">
<!-- <td [nzChecked]="setOfCheckedId.has(data.id)" [nzDisabled]="data.disabled"
(nzCheckedChange)="onItemChecked(data.id, $event)"></td> -->
<td>{{ data.hostIPAddress }}</td>
<!-- <td>{{ data.hostIPAddress }}</td> -->
<td>{{ data.gasStationName }}</td>
<td>
<ng-container *ngIf="data.hubConnectionState == 'Disconnected'; else elseTemplate">
@ -83,9 +83,27 @@
<span style="color: rgb(52, 204, 52);">在线</span>
</ng-template>
</td>
<td>报告时间</td>
<td>详情</td>
<td>处置</td>
<td>
<p>
开始时间:{{data.beginTime ? (data.beginTime | date:"yyyy-MM-dd HH:mm:ss")
:'/'}}
</p>
<p>
结束时间:{{data.endTime ? (data.endTime | date:"yyyy-MM-dd HH:mm:ss") :'/'}}
</p>
</td>
<td>
<span class="blue" (click)="showModal()">详情</span>
<nz-modal [(nzVisible)]="isVisible" nzTitle="详情" (nzOnCancel)="handleCancel()"
(nzOnOk)="handleOk()">
<ng-container *nzModalContent>
{{data.detail}}
</ng-container>
</nz-modal>
</td>
<td>
<span class="blue" (click)="dispose(data)">处置</span>
</td>
</tr>
</tbody>
</nz-table>

39
src/app/system-management/video-streaming/video-streaming.component.ts

@ -77,11 +77,10 @@ export class VideoStreamingComponent implements OnInit {
ContainsChildren: true,
OrganizationId: this.defaultOrId,
PageNumber: this.PageNumber,
PageSize: 10,
HubConnectionState: this.validateForm.value.state
PageSize: 10
}
this.isLoading = true
this.http.get('/api/EdgeDevices/Statuses', { params: params }).subscribe(
this.http.get('/api/ErrorReports', { params: params }).subscribe(
(data: any) => {
console.log(data)
this.isLoading = false
@ -134,4 +133,38 @@ export class VideoStreamingComponent implements OnInit {
this.refreshCheckedStatus();
}
isVisible = false;
showModal(): void {
this.isVisible = true;
}
handleOk(): void {
console.log('Button ok clicked!');
this.isVisible = false;
}
handleCancel(): void {
console.log('Button cancel clicked!');
this.isVisible = false;
}
dispose(data) {
let body = {
isHandled: true
}
this.http.put(`/api/ErrorReports/${data.id}`, body).subscribe(
{
next: (data: any) => {
this.message.create('success', '处置成功');
this.getConditionMonitoring()
},
error: err => {
this.message.create('error', '处置失败');
this.getConditionMonitoring()
}
}
)
}
}

Loading…
Cancel
Save