Commit 68cef080 authored by frank's avatar frank 🏀

传感器历史数据页面增加了一个主题的选择框

parent d4a38d7d
Pipeline #251 passed with stage
in 0 seconds
......@@ -143,6 +143,18 @@
</nz-table>
</nz-tab>
<nz-tab nzTitle="图表">
<nz-row style="min-height: 50px;">
<nz-col [nzSpan]="2">
<p>请选择主题</p>
</nz-col>
<nz-col [nzSpan]="5">
<nz-select [(ngModel)]="selectedTopicValue" nzAllowClear nzPlaceHolder="Choose" style="min-width: 300px">
<nz-option *ngFor="let one of deviceData" [nzValue]="one.topicName" [nzLabel]="one.topicName"></nz-option>
</nz-select>
</nz-col>
</nz-row>
<nz-row>
<div class="cards">
<div class="card" *ngFor="let one of actualData;let i = index">
<div class="title">
......@@ -179,6 +191,7 @@
<span>{{'close' | translate}}</span></button>
</div>
</div>
</nz-row>
</nz-tab>
</nz-tabset>
</nz-tab>
......
......@@ -52,6 +52,7 @@ export class SensorDetailComponent implements OnInit {
hisTopicName;
hisAlias;
hisDevInfo;
selectedTopicValue;
constructor(private api: ApiService, private message: NzMessageService, private router: Router, private ck: CheckService,
private ac: ActivatedRoute, private modalService: NzModalService, private translate: TranslateService) {
......@@ -180,7 +181,8 @@ export class SensorDetailComponent implements OnInit {
getHistoryData(): void {
this.hisTopicName = this.wayData[0].topicName;
// this.hisTopicName = this.wayData[0].topicName;
this.hisTopicName = this.selectedTopicValue;
this.api.data.getHisData([{ alias: this.hisDevInfo.alias, deviceList: [{sn: this.hisDevInfo.SN,
type: this.hisDevInfo.dType}], endTime: this.selectTime3 ? new Date().getTime() : this.req3.startTime,
offset: 0 - new Date().getTimezoneOffset() / 60,
......
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