解决数据同步保存按钮异常问题

This commit is contained in:
zhouyuejun
2019-03-18 16:04:03 +08:00
parent 1305c8f615
commit d7bb19635a
2 changed files with 14 additions and 10 deletions
@@ -28,7 +28,7 @@
</div>
</div>
<div class="user-footer">
<button (click)='save()' nz-button nzType="primary" class="mr10" [disabled]='!dateRange'>确定</button>
<button (click)='save()' nz-button nzType="primary" class="mr10" [disabled]='!search.startDate||!search.endDate'>确定</button>
<!-- <button (click)='cancel()' nz-button nzType="default">取消</button> -->
</div>
</div>
@@ -63,6 +63,7 @@ export class DataSynchronizeComponent implements OnInit {
//日期时间处理
changeDate(time) {
if(time){
var date = new Date(time);
var Y = date.getFullYear() + '';
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '';
@@ -71,6 +72,9 @@ export class DataSynchronizeComponent implements OnInit {
var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + '';
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + '';
return Y + '-' + M + '-' + D + ' ' + h + ':' + m ;
}else{
return '';
}
}
//保存