From 4d0fd6e3bb6c3dcd48763338255075e2662622e6 Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Tue, 12 Jun 2018 13:15:01 +0800 Subject: [PATCH] 监控点 区域可选 --- src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.html | 2 +- src/app/routes/reports/demo/demo.component.ts | 36 ++---------------------------------- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.html b/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.html index 7ef1c7e..c120cc2 100644 --- a/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.html +++ b/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.html @@ -26,7 +26,7 @@ <label nz-form-item-required>���/���/���</label> </div> <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback> - <nz-cascader [class.class123]="true" (nzChange)="setAreaCodes($event)" formControlName="_areas" (nzLoad)="areaLazyLoad($event)" + <nz-cascader [class.class123]="true" (nzChange)="setAreaCodes($event)" formControlName="_areas" (nzLoad)="areaLazyLoad($event)" [nzChangeOnSelect]="true" [nzPlaceHolder]="'������ ���/���/���'" > </nz-cascader> </div> diff --git a/src/app/routes/reports/demo/demo.component.ts b/src/app/routes/reports/demo/demo.component.ts index 547e6a1..9a81c7e 100644 --- a/src/app/routes/reports/demo/demo.component.ts +++ b/src/app/routes/reports/demo/demo.component.ts @@ -51,39 +51,7 @@ get sensorNames(): string { return this._sensorNames; } - options = [{ - value: 'zhejiang', - label: 'Zhejiang', - children: [{ - value: 'hangzhou', - label: 'Hangzhou', - children: [{ - value: 'xihu', - label: 'West Lake', - isLeaf: true - }] - }, { - value: 'ningbo', - label: 'Ningbo', - isLeaf: true - }] -}, { - value: 'jiangsu', - label: 'Jiangsu', - children: [{ - value: 'nanjing', - label: 'Nanjing', - children: [{ - value: 'zhonghuamen', - label: 'Zhong Hua Men', - children: [{ - value: 'zhonghuamen12', - label: 'Zhong Hua Men12', - isLeaf: true - }] - }] - }] -}]; + constructor( public http: HttpClient, public dateSrv: DateService, @@ -259,7 +227,7 @@ areaName = option.parent.parent.parent.parent.label + '/' + option.parent.parent.parent.label + '/' + option.parent.parent.label + '/' + option.parent.label + '/' + option.label; break; } - //this.items[i].areaName = areaName; + this.items[i].areaName = areaName; this.http.get(environment.SERVER_BASH_URL + 'monitor-point/list/region', {params: {name: name, value: option.value}}).subscribe((res: any) => { if (res.code === 0) { this.msgSrv.error(res.message); -- Gitblit v1.8.0