From 051a77599ca8b7972df8728ff46822d308627cbc Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Wed, 28 Mar 2018 14:32:32 +0800
Subject: [PATCH] 报表 优化

---
 src/app/routes/reports/excel/excel.component.html |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/app/routes/reports/excel/excel.component.html b/src/app/routes/reports/excel/excel.component.html
index 4ecbfe3..6ba33e1 100644
--- a/src/app/routes/reports/excel/excel.component.html
+++ b/src/app/routes/reports/excel/excel.component.html
@@ -8,8 +8,8 @@
 						<label>&nbsp;&nbsp;������</label>
 					</div>
 					<div nz-form-control class="flex-1">
-						<nz-select [(ngModel)]="query.sensorKey" name="sensorKey" [nzSize]="'large'" [nzPlaceHolder]="'���������'" nzAllowClear (ngModelChange)="sensorChange($event)">
-							<nz-option *ngFor="let option of sensorOptions" [nzLabel]="option.name" [nzValue]="option.sensorKey" ></nz-option>
+						<nz-select [(ngModel)]="query.sensorKey" name="sensorKey" [nzSize]="'large'" [nzPlaceHolder]="'���������'" [nzMode]="'multiple'">
+							<nz-option *ngFor="let option of sensorOptions" [nzLabel]="option.name" [nzValue]="option.sensorKey + '-' + option.name + '-' + option.unit" ></nz-option>
             			</nz-select>
 					</div>
 				</div>
@@ -48,8 +48,8 @@
 						<label nz-form-item-required>������</label>
 					</div>
 					<div nz-form-control class="flex-1">
-						<nz-select [(ngModel)]="query.type" name="isDelete" [nzSize]="'large'" [nzPlaceHolder]="'���������'" (ngModelChange)="typeChange($event)">
-							<nz-option *ngFor="let option of typeOptions" [nzLabel]="option.label" [nzValue]="option.value" ></nz-option>
+						<nz-select [(ngModel)]="timeType" name="timeType" [nzSize]="'large'" [nzPlaceHolder]="'���������'">
+							<nz-option *ngFor="let option of typeOptions" [nzLabel]="option.label" [nzValue]="option" ></nz-option>
             			</nz-select>
 					</div>
 				</div>
@@ -60,7 +60,8 @@
 						<label nz-form-item-required>���������</label>
 					</div>
 					<div nz-form-control class="flex-1">
-						<nz-datepicker style="width: 100%;" [(ngModel)]="query.time" name="time" [nzPlaceHolder]="'���������'" [nzFormat]="time.format" [nzMode]="time.mode" [nzSize]="'large'" nzShowTime></nz-datepicker>
+						<nz-datepicker style="width: 100%;" [(ngModel)]="query.time" name="time" [nzPlaceHolder]="'���������'"  [nzSize]="'large'" [nzFormat]="timeType.format" 
+							[nzMode]="timeType.value=='hour'||timeType.value=='day'?'day':'month'" [nzShowTime]="timeType.value=='hour'?true:false"></nz-datepicker>
 					</div>
 				</div>
 			</div>
@@ -70,7 +71,8 @@
 						<label >&nbsp;&nbsp;&nbsp;&nbsp;���</label>
 					</div>
 					<div nz-form-control class="flex-1">
-						<nz-datepicker style="width: 100%;" [(ngModel)]="query.timeb" name="timeb" [nzPlaceHolder]="'���������'" [nzFormat]="time.format" [nzMode]="time.mode" [nzSize]="'large'" nzShowTime></nz-datepicker>
+						<nz-datepicker style="width: 100%;" [(ngModel)]="query.timeb" name="timeb" [nzPlaceHolder]="'���������'" [nzSize]="'large'" [nzFormat]="timeType.format" 
+							[nzMode]="timeType.value=='hour'||timeType.value=='day'?'day':'month'" [nzShowTime]="timeType.value=='hour'?true:false"></nz-datepicker>
 					</div>
 				</div>
 			</div>
@@ -81,7 +83,7 @@
 		<div nz-row [nzGutter]="24">
 			<div nz-col [nzSpan]="6" class="mb-md">
 				<button nz-button type="submit" [nzType]="'primary'" [nzSize]="'large'">������</button>
-				<button nz-button type="reset" [nzSize]="'large'" class="mx-sm">������</button>
+				<!-- <button nz-button type="reset" [nzSize]="'large'" class="mx-sm">������</button> -->
 			</div>
 		</div>
 	</form>

--
Gitblit v1.8.0