fantasy-ngzorro 1.2.15 → 1.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1118,6 +1118,7 @@
1118
1118
  function HdFilterComponent(fb) {
1119
1119
  this.fb = fb;
1120
1120
  this.searchEvent = new core.EventEmitter();
1121
+ this.resetEvent = new core.EventEmitter();
1121
1122
  this.isShowMore = true;
1122
1123
  // 对filterList取模运算
1123
1124
  this.filterListModular = 0;
@@ -1258,7 +1259,12 @@
1258
1259
  */
1259
1260
  function () {
1260
1261
  this.validateFilterForm.reset();
1261
- this.searchEvent.emit(this.validateFilterForm.getRawValue());
1262
+ if (this.resetEvent) {
1263
+ this.resetEvent.emit(this.validateFilterForm.getRawValue());
1264
+ }
1265
+ else {
1266
+ this.searchEvent.emit(this.validateFilterForm.getRawValue());
1267
+ }
1262
1268
  };
1263
1269
  /**
1264
1270
  * @return {?}
@@ -1295,8 +1301,8 @@
1295
1301
  HdFilterComponent.decorators = [
1296
1302
  { type: core.Component, args: [{
1297
1303
  selector: 'hd-filter',
1298
- template: "<form nz-form [formGroup]=\"validateFilterForm\" class=\"ant-advanced-search-form hd-filter-container\">\n <!-- \u6574\u4F53\u7ED3\u6784 -->\n <div nz-row [nzGutter]=\"24\">\n <!-- \u5BF9\u7EC4\u4EF6\u5217\u8868\u5FAA\u73AF\u5904\u7406 -->\n <ng-container *ngFor=\"let filter of filterList\">\n <div nz-col [nzSpan]=\"6\" [hidden]=\"!filter.show\">\n <nz-form-item nzFlex>\n <nz-form-label class=\"hd-filter-label\">{{filter.label}}</nz-form-label>\n <nz-form-control class=\"hd-filter-control\">\n <ng-container [ngSwitch]=\"filter.type\">\n <!-- \u8FD9\u91CC\u6570\u5B57\u5BF9\u5E94\u679A\u4E3E\u7C7B\u578B\uFF0C\u53EF\u5728hd-filter.service.ts\u6587\u4EF6\u4E2D\u67E5\u770B\u5BF9\u5E94\u5173\u7CFB -->\n <ng-container *ngSwitchCase=\"0\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\">\n <input nz-input [placeholder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u8F93\u5165' + filter.label\"\n [formControlName]=\"filter.name\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate><i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\"\n nzType=\"close-circle\" *ngIf=\"validateFilterForm.get(filter.name).value\"\n (click)=\"inputClean(filter)\"></i></ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"1\">\n <nz-select\n [nzShowSearch]=\"filter.selectOption.hdShowSearch != null ? filter.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"filter.selectOption.hdAllowClear != null ? filter.selectOption.hdAllowClear : true\"\n [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"filter.selectOption.hdDropdownMatchSelectWidth ? filter.selectOption.hdDropdownMatchSelectWidth : false\"\n (nzOnSearch)=\"triggerEvent(filter.onSearchEvent || null, $event, filter.selectOption)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\">\n <nz-option *ngFor=\"let selectItem of filter.selectOption.selectList\"\n [nzValue]=\"selectItem[filter.selectOption.value]\" [nzLabel]=\"filter.selectOption.showLabelAndValue ? '['+ selectItem[filter.selectOption.value] +']' +\n selectItem[filter.selectOption.label] : selectItem[filter.selectOption.label]\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"2\">\n <nz-date-picker *ngIf=\"filter.showTime\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzDisabledDate]=\"filter.hdDisabledDate\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker *ngIf=\"!filter.showTime\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzDisabledDate]=\"filter.hdDisabledDate\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"3\">\n <nz-range-picker [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\" [formControlName]=\"filter.name\">\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\"\n </nz-range-picker>\n </ng-container>\n <!-- \u591A\u9879\u9009\u62E9\u5668 -->\n <ng-container *ngSwitchCase=\"4\">\n <nz-select\n [nzDropdownMatchSelectWidth]=\"filter.selectOption.hdDropdownMatchSelectWidth ? filter.selectOption.hdDropdownMatchSelectWidth : false\"\n nzMode=\"multiple\"\n [nzShowSearch]=\"filter.selectOption.hdShowSearch != null ? filter.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"filter.selectOption.hdAllowClear != null ? filter.selectOption.hdAllowClear : true\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\"\n (nzOnSearch)=\"triggerEvent(filter.onSearchEvent || null, $event)\">\n <nz-option *ngFor=\"let selectItem of filter.selectOption.selectList\"\n [nzValue]=\"selectItem[filter.selectOption.value]\" [nzLabel]=\"filter.selectOption.showLabelAndValue ? '['+ selectItem[filter.selectOption.value] +']' +\n selectItem[filter.selectOption.label] : selectItem[filter.selectOption.label]\"></nz-option>\n </nz-select>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n </div>\n </ng-container>\n\n <div class=\"hd-filter-btn\" nz-col [nzSpan]=\"6\" [nzOffset]=\"computeOffset()\">\n <a *ngIf=\"filterList.length > 7\" class=\"hd-filter-more\" (click)=\"showMore()\">\n {{isShowMore ? '\u5C55\u5F00' : '\u6536\u8D77'}}\n <i nz-icon [nzType]=\"isShowMore ? 'down' : 'up'\"></i>\n </a>\n <hd-button type=\"primary\" (click)=\"submitForm()\">\u67E5\u8BE2</hd-button>\n <hd-button type=\"reset\" (click)=\"resetForm()\">\u91CD\u7F6E</hd-button>\n </div>\n </div>\n</form>",
1299
- styles: ["::ng-deep .common-btn-group>a{font-size:12px;font-weight:400;color:#12a34f!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset}::ng-deep .ant-form-item-label>label{color:#4b504e}::ng-deep .ant-input-number-input{height:28px}::ng-deep .ant-input-number{height:28px}textarea.ant-input{height:auto;min-height:28px}::ng-deep .ant-select-selection--multiple{min-height:28px}::ng-deep .ant-select-selection__rendered>ul>li{height:22px!important;margin-top:3px!important;line-height:22px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:28px!important}::ng-deep .ant-input{height:28px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:28px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:12px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:12px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.hd-filter-container{padding:20px 23px;background:#fff;box-shadow:0 0 12px 0 rgba(93,114,103,.08);border-radius:4px;margin-bottom:8px!important;font-size:12px}.hd-filter-container .ant-row{margin-right:0!important;margin-left:0!important}.hd-filter-container .ant-col-6{padding-left:0!important;padding-right:0!important}.hd-filter-container .hd-filter-label{width:108px;word-break:break-all}.hd-filter-container .hd-filter-control{width:calc(100% - 108px)}.hd-filter-container ::ng-deep .ant-calendar-picker{width:100%}.hd-filter-container .hd-filter-more{color:#12a34f}.hd-filter-container .hd-filter-btn{height:40px;display:inline-flex;align-items:center;justify-content:flex-end}.hd-filter-container hd-button{margin-left:12px}.hd-filter-container ::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}.hd-filter-container ::ng-deep .ant-select-selection--single{height:28px!important}.hd-filter-container ::ng-deep .ant-input{height:28px!important}.hd-filter-container ::ng-deep .ant-calendar-range-picker-input{text-align:left!important}.hd-filter-container .ant-input-number{width:100%}"]
1304
+ template: "<form nz-form [formGroup]=\"validateFilterForm\" class=\"ant-advanced-search-form hd-filter-container\">\n <!-- \u6574\u4F53\u7ED3\u6784 -->\n <div nz-row [nzGutter]=\"24\">\n <!-- \u5BF9\u7EC4\u4EF6\u5217\u8868\u5FAA\u73AF\u5904\u7406 -->\n <ng-container *ngFor=\"let filter of filterList\">\n <div nz-col [nzSpan]=\"6\" [hidden]=\"!filter.show\">\n <nz-form-item nzFlex>\n <nz-form-label class=\"hd-filter-label\"><span class=\"hd-red\" *ngIf=\"filter.require\">*</span>{{filter.label}}\n </nz-form-label>\n <nz-form-control class=\"hd-filter-control\">\n <ng-container [ngSwitch]=\"filter.type\">\n <!-- \u8FD9\u91CC\u6570\u5B57\u5BF9\u5E94\u679A\u4E3E\u7C7B\u578B\uFF0C\u53EF\u5728hd-filter.service.ts\u6587\u4EF6\u4E2D\u67E5\u770B\u5BF9\u5E94\u5173\u7CFB -->\n <ng-container *ngSwitchCase=\"0\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\">\n <input nz-input [placeholder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u8F93\u5165' + filter.label\"\n [formControlName]=\"filter.name\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate><i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\"\n nzType=\"close-circle\" *ngIf=\"validateFilterForm.get(filter.name).value\"\n (click)=\"inputClean(filter)\"></i></ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"1\">\n <nz-select\n [nzShowSearch]=\"filter.selectOption.hdShowSearch != null ? filter.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"filter.selectOption.hdAllowClear != null ? filter.selectOption.hdAllowClear : true\"\n [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"filter.selectOption.hdDropdownMatchSelectWidth ? filter.selectOption.hdDropdownMatchSelectWidth : false\"\n (nzOnSearch)=\"triggerEvent(filter.onSearchEvent || null, $event, filter.selectOption)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\">\n <nz-option *ngFor=\"let selectItem of filter.selectOption.selectList\"\n [nzValue]=\"selectItem[filter.selectOption.value]\" [nzLabel]=\"filter.selectOption.showLabelAndValue ? '['+ selectItem[filter.selectOption.value] +']' +\n selectItem[filter.selectOption.label] : selectItem[filter.selectOption.label]\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"2\">\n <nz-date-picker *ngIf=\"filter.showTime\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzDisabledDate]=\"filter.hdDisabledDate\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker *ngIf=\"!filter.showTime\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzDisabledDate]=\"filter.hdDisabledDate\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"3\">\n <nz-range-picker [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\" [formControlName]=\"filter.name\">\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\"\n </nz-range-picker>\n </ng-container>\n <!-- \u591A\u9879\u9009\u62E9\u5668 -->\n <ng-container *ngSwitchCase=\"4\">\n <nz-select\n [nzDropdownMatchSelectWidth]=\"filter.selectOption.hdDropdownMatchSelectWidth ? filter.selectOption.hdDropdownMatchSelectWidth : false\"\n nzMode=\"multiple\"\n [nzShowSearch]=\"filter.selectOption.hdShowSearch != null ? filter.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"filter.selectOption.hdAllowClear != null ? filter.selectOption.hdAllowClear : true\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n (ngModelChange)=\"triggerEvent(filter.onChangeEvent || null, $event)\"\n (nzOnSearch)=\"triggerEvent(filter.onSearchEvent || null, $event)\">\n <nz-option *ngFor=\"let selectItem of filter.selectOption.selectList\"\n [nzValue]=\"selectItem[filter.selectOption.value]\" [nzLabel]=\"filter.selectOption.showLabelAndValue ? '['+ selectItem[filter.selectOption.value] +']' +\n selectItem[filter.selectOption.label] : selectItem[filter.selectOption.label]\"></nz-option>\n </nz-select>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n </div>\n </ng-container>\n\n <div class=\"hd-filter-btn\" nz-col [nzSpan]=\"6\" [nzOffset]=\"computeOffset()\">\n <a *ngIf=\"filterList.length > 7\" class=\"hd-filter-more\" (click)=\"showMore()\">\n {{isShowMore ? '\u5C55\u5F00' : '\u6536\u8D77'}}\n <i nz-icon [nzType]=\"isShowMore ? 'down' : 'up'\"></i>\n </a>\n <hd-button type=\"primary\" (click)=\"submitForm()\">\u67E5\u8BE2</hd-button>\n <hd-button type=\"reset\" (click)=\"resetForm()\">\u91CD\u7F6E</hd-button>\n </div>\n </div>\n</form>",
1305
+ styles: ["::ng-deep .common-btn-group>a{font-size:12px;font-weight:400;color:#12a34f!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset}::ng-deep .ant-form-item-label>label{color:#4b504e}::ng-deep .ant-input-number-input{height:28px}::ng-deep .ant-input-number{height:28px}textarea.ant-input{height:auto;min-height:28px}::ng-deep .ant-select-selection--multiple{min-height:28px}::ng-deep .ant-select-selection__rendered>ul>li{height:22px!important;margin-top:3px!important;line-height:22px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:28px!important}::ng-deep .ant-input{height:28px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:28px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:12px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:12px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.hd-filter-container{padding:20px 23px;background:#fff;box-shadow:0 0 12px 0 rgba(93,114,103,.08);border-radius:4px;margin-bottom:8px!important;font-size:12px}.hd-filter-container .ant-row{margin-right:0!important;margin-left:0!important}.hd-filter-container .ant-col-6{padding-left:0!important;padding-right:0!important}.hd-filter-container .hd-filter-label{width:108px;word-break:break-all}.hd-filter-container .hd-filter-control{width:calc(100% - 108px)}.hd-filter-container ::ng-deep .ant-calendar-picker{width:100%}.hd-filter-container .hd-filter-more{color:#12a34f}.hd-filter-container .hd-filter-btn{height:40px;display:inline-flex;align-items:center;justify-content:flex-end}.hd-filter-container hd-button{margin-left:12px}.hd-filter-container ::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}.hd-filter-container ::ng-deep .ant-select-selection--single{height:28px!important}.hd-filter-container ::ng-deep .ant-input{height:28px!important}.hd-filter-container ::ng-deep .ant-calendar-range-picker-input{text-align:left!important}.hd-filter-container .ant-input-number{width:100%}.hd-filter-container .hd-red{color:red}"]
1300
1306
  }] }
1301
1307
  ];
1302
1308
  /** @nocollapse */
@@ -1305,7 +1311,8 @@
1305
1311
  ]; };
1306
1312
  HdFilterComponent.propDecorators = {
1307
1313
  filterList: [{ type: core.Input }],
1308
- searchEvent: [{ type: core.Output }]
1314
+ searchEvent: [{ type: core.Output }],
1315
+ resetEvent: [{ type: core.Output }]
1309
1316
  };
1310
1317
  return HdFilterComponent;
1311
1318
  }());
@@ -1315,6 +1322,8 @@
1315
1322
  /** @type {?} */
1316
1323
  HdFilterComponent.prototype.searchEvent;
1317
1324
  /** @type {?} */
1325
+ HdFilterComponent.prototype.resetEvent;
1326
+ /** @type {?} */
1318
1327
  HdFilterComponent.prototype.validateFilterForm;
1319
1328
  /** @type {?} */
1320
1329
  HdFilterComponent.prototype.isShowMore;
@@ -5066,6 +5075,8 @@
5066
5075
  this.value = null; // 值 不传默认为null
5067
5076
  // date-picker组件不可选择的日期
5068
5077
  this.showTime = false; // 日期选择器是否包含时间
5078
+ // 日期选择器是否包含时间
5079
+ this.require = false; // 是否必填
5069
5080
  }
5070
5081
  return Filter;
5071
5082
  }());
@@ -5092,6 +5103,8 @@
5092
5103
  Filter.prototype.hdDisabledDate;
5093
5104
  /** @type {?} */
5094
5105
  Filter.prototype.showTime;
5106
+ /** @type {?} */
5107
+ Filter.prototype.require;
5095
5108
  }
5096
5109
  /** @enum {number} */
5097
5110
  var FilterListType = {