Commit 026761a8 authored by van.chen's avatar van.chen

提交一下

parent 1f638138
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</nz-autocomplete> </nz-autocomplete>
</div> </div>
</div> </div>
<app-search-item *ngIf="!isUpdate" isMust="true" inModal="true" [label]="'belongAddress' | translate" [(value)]="req3.address"></app-search-item> <app-search-item isMust="true" inModal="true" [label]="'belongAddress' | translate" [(value)]="req3.address"></app-search-item>
</ng-template> </ng-template>
<ng-template #foot3> <ng-template #foot3>
<button nz-button nzType="default" [nzLoading]="isLoading" (click)="cancel('isBindConV')"> <button nz-button nzType="default" [nzLoading]="isLoading" (click)="cancel('isBindConV')">
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<app-search-select isMust="true" [(value)]="req4.companyNo" [label]="'selectCompany' | translate" optL="companyName" <app-search-select isMust="true" [(value)]="req4.companyNo" [label]="'selectCompany' | translate" optL="companyName"
(valueChange)="companySelected($event)" (valueChange)="companySelected($event)"
[data]="companys" inModal="true" optV="companyNo"></app-search-select> [data]="companys" inModal="true" optV="companyNo"></app-search-select>
</ng-template> </ng-template>
<ng-template #foot4> <ng-template #foot4>
<button nz-button nzType="default" [nzLoading]="isLoading" (click)="cancel('isDivideConV')"> <button nz-button nzType="default" [nzLoading]="isLoading" (click)="cancel('isDivideConV')">
<span>{{'cancel' | translate}}</span></button> <span>{{'cancel' | translate}}</span></button>
......
...@@ -96,7 +96,49 @@ ...@@ -96,7 +96,49 @@
<nz-tab nzTitle="运行状态"> <nz-tab nzTitle="运行状态">
<nz-tabset style="margin-top: -20px;"> <nz-tabset style="margin-top: -20px;">
<nz-tab nzTitle="表格"> <nz-tab nzTitle="表格">
<nz-table #nzTable5
[nzData]="actualData"
[nzSize]="'middle'"
nzShowSizeChanger
[nzShowPagination]="true"
[nzLoading]="isLoading">
<thead nz-thead>
<tr>
<th nz-th><span>{{'wayName' | translate}}</span></th>
<th nz-th><span>{{'wayAlias' | translate}}</span></th>
<th nz-th><span>{{'per' | translate}}</span></th>
<th nz-th><span>{{'wayType' | translate}}</span></th>
<th nz-th><span>{{'max' | translate}}</span></th>
<th nz-th><span>{{'min' | translate}}</span></th>
<th nz-th><span>{{'alarmMax' | translate}}</span></th>
<th nz-th><span>{{'alarmMaxMax' | translate}}</span></th>
<th nz-th><span>{{'alarmMin' | translate}}</span></th>
<th nz-th><span>{{'alarmMinMin' | translate}}</span></th>
<th nz-th><span>{{'isAlarm' | translate}}</span></th>
<th nz-th><span>{{'oper' | translate}}</span></th>
</tr>
</thead>
<tbody nz-tbody>
<tr *ngFor="let one of nzTable5.data, let i = index">
<td nz-td>{{one.name}}</td>
<td nz-td>{{one.alias}}</td>
<td nz-td>{{one.unit}}</td>
<td nz-td>{{one.type}}</td>
<td nz-td>{{one.rangeMax}}</td>
<td nz-td>{{one.rangeMin}}</td>
<td nz-td>{{one.alarmUp}}</td>
<td nz-td>{{one.upperAlarmLimit}}</td>
<td nz-td>{{one.alarmDown}}</td>
<td nz-td>{{one.lowerAlarmLimit}}</td>
<td nz-td>{{one.isAlarm === 1 ? '是': '否'}}</td>
<td nz-td>
<span class="editSpan" (click)="update2(one)">{{'update' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider>
<span class="deleteFontColor" (click)="deleteConfirm2(one)">{{'delete' | translate}}</span>
</td>
</tr>
</tbody>
</nz-table>
</nz-tab> </nz-tab>
<nz-tab nzTitle="图表"> <nz-tab nzTitle="图表">
<div class="cards"> <div class="cards">
......
...@@ -28,6 +28,7 @@ export class SensorDetailComponent implements OnInit { ...@@ -28,6 +28,7 @@ export class SensorDetailComponent implements OnInit {
isUpdate2 = false; isUpdate2 = false;
probsModels = []; probsModels = [];
topicModels = []; topicModels = [];
actualData = [];
wayData = []; wayData = [];
selectTime3 = 24; selectTime3 = 24;
items = [{ items = [{
...@@ -68,6 +69,7 @@ export class SensorDetailComponent implements OnInit { ...@@ -68,6 +69,7 @@ export class SensorDetailComponent implements OnInit {
this.getProbsModels(); this.getProbsModels();
this.getTopicModels(); this.getTopicModels();
this.getProbs(); this.getProbs();
this.getCurrent();
} }
}); });
} }
...@@ -133,6 +135,18 @@ export class SensorDetailComponent implements OnInit { ...@@ -133,6 +135,18 @@ export class SensorDetailComponent implements OnInit {
}]); }]);
} }
getCurrent() {
this.isLoading = true;
this.api.data.getRealData([{deviceNo: this.deviceNo}, (data) => {
if (data && data.constructor === Array) {
this.actualData = data;
} else {
this.message.error(data && data.message ? data.message : '获取数据失败');
}
this.isLoading = false;
}]);
}
toDetail(one) { toDetail(one) {
this.router.navigate(['/app/deviceCenter/sensorMgr/sensorDetail/sensorTopicWay'], this.router.navigate(['/app/deviceCenter/sensorMgr/sensorDetail/sensorTopicWay'],
{queryParams: {deviceNo: one.deviceNo, topicName: one.topicName}}); {queryParams: {deviceNo: one.deviceNo, topicName: one.topicName}});
......
...@@ -149,6 +149,13 @@ export class ApiService { ...@@ -149,6 +149,13 @@ export class ApiService {
updateProbes: (data) => this.trans('post', '/device/probes/updateProbes', data), updateProbes: (data) => this.trans('post', '/device/probes/updateProbes', data),
}; };
public data = {
getHisData: (data) => this.trans('post', '/data/getHisData', data),
getRealData: (data) => this.trans('post', '/data/getRealData', data),
getStatus: (data) => this.trans('post', '/data/getStatus', data),
updateRemoteControl: (data) => this.trans('post', '/data/updateRemoteControl', data),
};
private trans(type, addr, data) { private trans(type, addr, data) {
this.sendHttpReq(type, addr, data[0], data[1], data[2], data[3]); this.sendHttpReq(type, addr, data[0], data[1], data[2], data[3]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment