fantasy-ngzorro 2.2.3 → 2.2.4

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.
@@ -1,4 +1,4 @@
1
- import { Component, ContentChild, NgModule, Injectable, ɵɵdefineInjectable, EventEmitter, Input, Output, ChangeDetectorRef, ViewChild, NO_ERRORS_SCHEMA, ElementRef, ViewChildren, ɵɵinject, Pipe, ChangeDetectionStrategy, Optional } from '@angular/core';
1
+ import { Component, ContentChild, NgModule, Injectable, ɵɵdefineInjectable, EventEmitter, Input, Output, ChangeDetectorRef, ViewChild, NO_ERRORS_SCHEMA, InjectionToken, Optional, Inject, ElementRef, ViewChildren, ɵɵinject, Pipe, ChangeDetectionStrategy } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormsModule, ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
4
4
  import { NgZorroAntdModule, InputBoolean, NzInputNumberComponent, NzSelectComponent, NzDatePickerComponent, NzRangePickerComponent, NzTimePickerComponent, NzModalService } from 'ng-zorro-antd';
@@ -3329,6 +3329,102 @@ var HdDetailTipModule = /** @class */ (function () {
3329
3329
  return HdDetailTipModule;
3330
3330
  }());
3331
3331
 
3332
+ /**
3333
+ * @fileoverview added by tsickle
3334
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3335
+ */
3336
+ // 控件列表
3337
+ var
3338
+ // 控件列表
3339
+ Filter = /** @class */ (function () {
3340
+ function Filter() {
3341
+ // 输入框提示文案
3342
+ this.value = null; // 值 不传默认为null
3343
+ // 控件为Select时,选项列表
3344
+ this.inputNumber = new InputNumber(); // number组件的min、max、step
3345
+ // date-picker组件不可选择的日期
3346
+ this.showTime = false; // 日期选择器是否包含时间
3347
+ // 日期选择器是否包含时间
3348
+ this.require = false; // 是否必填
3349
+ }
3350
+ return Filter;
3351
+ }());
3352
+ if (false) {
3353
+ /** @type {?} */
3354
+ Filter.prototype.type;
3355
+ /** @type {?} */
3356
+ Filter.prototype.label;
3357
+ /** @type {?} */
3358
+ Filter.prototype.name;
3359
+ /** @type {?} */
3360
+ Filter.prototype.placeholder;
3361
+ /** @type {?} */
3362
+ Filter.prototype.value;
3363
+ /** @type {?} */
3364
+ Filter.prototype.show;
3365
+ /** @type {?} */
3366
+ Filter.prototype.selectOption;
3367
+ /** @type {?} */
3368
+ Filter.prototype.inputNumber;
3369
+ /** @type {?} */
3370
+ Filter.prototype.onSearchEvent;
3371
+ /** @type {?} */
3372
+ Filter.prototype.onChangeEvent;
3373
+ /** @type {?} */
3374
+ Filter.prototype.onBlurEvent;
3375
+ /** @type {?} */
3376
+ Filter.prototype.hdDisabledDate;
3377
+ /** @type {?} */
3378
+ Filter.prototype.showTime;
3379
+ /** @type {?} */
3380
+ Filter.prototype.require;
3381
+ /**
3382
+ * 是否允许清空当前筛选项(Input 清空按钮、Select/Date/Cascader 等清空图标)。
3383
+ * 不传默认 true;Select 未配此项时仍可回退到 selectOption.hdAllowClear
3384
+ * @type {?}
3385
+ */
3386
+ Filter.prototype.hdAllowClear;
3387
+ /** @type {?} */
3388
+ Filter.prototype.cascaderOption;
3389
+ /** @type {?} */
3390
+ Filter.prototype.onChangeEventDebounceTime;
3391
+ /** @type {?} */
3392
+ Filter.prototype.onSearchEventEventDebounceTime;
3393
+ }
3394
+ /** @enum {number} */
3395
+ var FilterListType = {
3396
+ Input: 0,
3397
+ Select: 1,
3398
+ Date: 2,
3399
+ DateRange: 3,
3400
+ MultipleSelect: 4,
3401
+ Cascader: 5,
3402
+ Month: 6,
3403
+ InputNumber: 7 // 数字输入
3404
+ ,
3405
+ };
3406
+ FilterListType[FilterListType.Input] = 'Input';
3407
+ FilterListType[FilterListType.Select] = 'Select';
3408
+ FilterListType[FilterListType.Date] = 'Date';
3409
+ FilterListType[FilterListType.DateRange] = 'DateRange';
3410
+ FilterListType[FilterListType.MultipleSelect] = 'MultipleSelect';
3411
+ FilterListType[FilterListType.Cascader] = 'Cascader';
3412
+ FilterListType[FilterListType.Month] = 'Month';
3413
+ FilterListType[FilterListType.InputNumber] = 'InputNumber';
3414
+ var HdFilterService = /** @class */ (function () {
3415
+ function HdFilterService() {
3416
+ }
3417
+ HdFilterService.decorators = [
3418
+ { type: Injectable, args: [{
3419
+ providedIn: 'root'
3420
+ },] }
3421
+ ];
3422
+ /** @nocollapse */
3423
+ HdFilterService.ctorParameters = function () { return []; };
3424
+ /** @nocollapse */ HdFilterService.ngInjectableDef = ɵɵdefineInjectable({ factory: function HdFilterService_Factory() { return new HdFilterService(); }, token: HdFilterService, providedIn: "root" });
3425
+ return HdFilterService;
3426
+ }());
3427
+
3332
3428
  /**
3333
3429
  * @fileoverview added by tsickle
3334
3430
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -3445,21 +3541,111 @@ function getCascaderMenuStyle(cascaderOption) {
3445
3541
  return Object.keys(style).length ? style : null;
3446
3542
  }
3447
3543
 
3544
+ /**
3545
+ * @fileoverview added by tsickle
3546
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3547
+ */
3548
+ /**
3549
+ * 用户筛选条件模版(与 auth UserFilterScheme 对齐)
3550
+ */
3551
+ var /**
3552
+ * 用户筛选条件模版(与 auth UserFilterScheme 对齐)
3553
+ */
3554
+ HdFilterScheme = /** @class */ (function () {
3555
+ function HdFilterScheme() {
3556
+ }
3557
+ return HdFilterScheme;
3558
+ }());
3559
+ if (false) {
3560
+ /** @type {?} */
3561
+ HdFilterScheme.prototype.uuid;
3562
+ /** @type {?} */
3563
+ HdFilterScheme.prototype.userCode;
3564
+ /** @type {?} */
3565
+ HdFilterScheme.prototype.filterKey;
3566
+ /** @type {?} */
3567
+ HdFilterScheme.prototype.templateName;
3568
+ /** @type {?} */
3569
+ HdFilterScheme.prototype.filterValue;
3570
+ }
3571
+ /**
3572
+ * 内置默认模版名
3573
+ * @type {?}
3574
+ */
3575
+ var HD_FILTER_DEFAULT_SCHEME_NAME = '默认条件';
3576
+ /**
3577
+ * 业务仓实现并 provide,hd-filter 在 enableFilterScheme 时注入使用。
3578
+ * 不提供则开启开关也不会调接口。
3579
+ * @abstract
3580
+ */
3581
+ var /**
3582
+ * 业务仓实现并 provide,hd-filter 在 enableFilterScheme 时注入使用。
3583
+ * 不提供则开启开关也不会调接口。
3584
+ * @abstract
3585
+ */
3586
+ HdFilterSchemeStore = /** @class */ (function () {
3587
+ function HdFilterSchemeStore() {
3588
+ }
3589
+ return HdFilterSchemeStore;
3590
+ }());
3591
+ if (false) {
3592
+ /**
3593
+ * @abstract
3594
+ * @param {?} filterKey
3595
+ * @return {?}
3596
+ */
3597
+ HdFilterSchemeStore.prototype.queryByFilterKey = function (filterKey) { };
3598
+ /**
3599
+ * @abstract
3600
+ * @param {?} scheme
3601
+ * @return {?}
3602
+ */
3603
+ HdFilterSchemeStore.prototype.save = function (scheme) { };
3604
+ /**
3605
+ * @abstract
3606
+ * @param {?} uuid
3607
+ * @return {?}
3608
+ */
3609
+ HdFilterSchemeStore.prototype.delete = function (uuid) { };
3610
+ }
3611
+ /** @type {?} */
3612
+ var HD_FILTER_SCHEME_STORE = new InjectionToken('HD_FILTER_SCHEME_STORE');
3613
+
3448
3614
  /**
3449
3615
  * @fileoverview added by tsickle
3450
3616
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3451
3617
  */
3452
3618
  var HdFilterComponent = /** @class */ (function () {
3453
- function HdFilterComponent(fb) {
3619
+ function HdFilterComponent(fb, schemeStore) {
3454
3620
  var _this = this;
3455
3621
  this.fb = fb;
3622
+ this.schemeStore = schemeStore;
3623
+ /**
3624
+ * 是否启用筛选组(默认关闭)
3625
+ */
3626
+ this.enableFilterScheme = false;
3456
3627
  this.searchEvent = new EventEmitter();
3457
3628
  this.resetEvent = new EventEmitter();
3458
3629
  this.isShowMore = true;
3459
- // 对filterList取模运算
3460
3630
  this.filterListModular = 0;
3461
3631
  this.searchSubject = new Subject();
3462
- this.debounceTimeout = 0; // 默认防抖时间
3632
+ this.debounceTimeout = 0;
3633
+ /**
3634
+ * 页面配置的初始值(虚拟「默认条件」)
3635
+ */
3636
+ this.defaultFilterValues = {};
3637
+ this.defaultValuesCaptured = false;
3638
+ this.schemeList = [];
3639
+ this.currentScheme = null;
3640
+ this.currentSchemeName = HD_FILTER_DEFAULT_SCHEME_NAME;
3641
+ this.schemeLoading = false;
3642
+ this.schemeSaving = false;
3643
+ this.switchModalVisible = false;
3644
+ this.switchKeyword = '';
3645
+ this.switchSelectedUuid = null;
3646
+ this.saveAsModalVisible = false;
3647
+ this.saveAsName = '';
3648
+ this.defaultSchemeName = HD_FILTER_DEFAULT_SCHEME_NAME;
3463
3649
  this.getCascaderShowSearch = getCascaderShowSearch;
3464
3650
  this.getCascaderMenuClassName = getCascaderMenuClassName;
3465
3651
  this.getCascaderMenuStyle = getCascaderMenuStyle;
@@ -3480,16 +3666,72 @@ var HdFilterComponent = /** @class */ (function () {
3480
3666
  */
3481
3667
  function () {
3482
3668
  this.init();
3669
+ this.tryLoadSchemes(true);
3483
3670
  };
3484
3671
  /**
3672
+ * @param {?} changes
3485
3673
  * @return {?}
3486
3674
  */
3487
3675
  HdFilterComponent.prototype.ngOnChanges = /**
3676
+ * @param {?} changes
3677
+ * @return {?}
3678
+ */
3679
+ function (changes) {
3680
+ if (changes['filterList']) {
3681
+ this.init();
3682
+ }
3683
+ if (changes['enableFilterScheme'] || changes['filterSchemeKey']) {
3684
+ this.tryLoadSchemes(true);
3685
+ }
3686
+ };
3687
+ /**
3688
+ * @return {?}
3689
+ */
3690
+ HdFilterComponent.prototype.ngOnDestroy = /**
3488
3691
  * @return {?}
3489
3692
  */
3490
3693
  function () {
3491
- this.init();
3694
+ if (this.searchSubscription) {
3695
+ this.searchSubscription.unsubscribe();
3696
+ }
3697
+ if (this.schemeLoadSub) {
3698
+ this.schemeLoadSub.unsubscribe();
3699
+ }
3700
+ if (this.schemeActionSub) {
3701
+ this.schemeActionSub.unsubscribe();
3702
+ }
3492
3703
  };
3704
+ Object.defineProperty(HdFilterComponent.prototype, "canUseScheme", {
3705
+ get: /**
3706
+ * @return {?}
3707
+ */
3708
+ function () {
3709
+ return !!(this.enableFilterScheme && this.filterSchemeKey && this.schemeStore);
3710
+ },
3711
+ enumerable: true,
3712
+ configurable: true
3713
+ });
3714
+ Object.defineProperty(HdFilterComponent.prototype, "filteredSwitchList", {
3715
+ get: /**
3716
+ * @return {?}
3717
+ */
3718
+ function () {
3719
+ /** @type {?} */
3720
+ var list = this.getDisplaySchemeList();
3721
+ /** @type {?} */
3722
+ var kw = (this.switchKeyword || '').trim();
3723
+ if (!kw) {
3724
+ return list;
3725
+ }
3726
+ return list.filter((/**
3727
+ * @param {?} item
3728
+ * @return {?}
3729
+ */
3730
+ function (item) { return (item.templateName || '').indexOf(kw) >= 0; }));
3731
+ },
3732
+ enumerable: true,
3733
+ configurable: true
3734
+ });
3493
3735
  /**
3494
3736
  * @private
3495
3737
  * @return {?}
@@ -3501,12 +3743,13 @@ var HdFilterComponent = /** @class */ (function () {
3501
3743
  function () {
3502
3744
  var _this = this;
3503
3745
  this.isShowMore = true;
3504
- // 异常捕获
3505
3746
  if (!this.checkList(this.filterList)) {
3506
3747
  throw 'filter组件数据格式不规范';
3507
3748
  }
3749
+ if (!this.filterList) {
3750
+ this.filterList = [];
3751
+ }
3508
3752
  this.filterListModular = this.filterList.length % 4;
3509
- // 首先根据定义的组件数组 去初始化表单
3510
3753
  /** @type {?} */
3511
3754
  var formGroupList = {};
3512
3755
  this.filterList.forEach((/**
@@ -3516,10 +3759,13 @@ var HdFilterComponent = /** @class */ (function () {
3516
3759
  */
3517
3760
  function (item, index) {
3518
3761
  formGroupList[item.name] = _this.fb.control(item.value, []);
3519
- // 初始化控件显影
3520
3762
  item.show = index < 7;
3521
3763
  }));
3522
3764
  this.validateFilterForm = this.fb.group(formGroupList);
3765
+ if (!this.defaultValuesCaptured) {
3766
+ this.defaultFilterValues = this.clonePlain(this.getFilterData());
3767
+ this.defaultValuesCaptured = true;
3768
+ }
3523
3769
  this.filterList.forEach((/**
3524
3770
  * @param {?} item
3525
3771
  * @return {?}
@@ -3562,13 +3808,10 @@ var HdFilterComponent = /** @class */ (function () {
3562
3808
  function (fn, event, onSearchEventDebounceTime, selectOption) {
3563
3809
  var _this = this;
3564
3810
  if (onSearchEventDebounceTime) {
3565
- // 更新防抖时间
3566
3811
  this.debounceTimeout = onSearchEventDebounceTime;
3567
- // 取消之前的订阅
3568
3812
  if (this.searchSubscription) {
3569
3813
  this.searchSubscription.unsubscribe();
3570
3814
  }
3571
- // 创建新的订阅
3572
3815
  this.searchSubscription = this.searchSubject.pipe(debounceTime(this.debounceTimeout)).subscribe((/**
3573
3816
  * @param {?} __0
3574
3817
  * @return {?}
@@ -3577,7 +3820,6 @@ var HdFilterComponent = /** @class */ (function () {
3577
3820
  var fn = _a.fn, event = _a.event, selectOption = _a.selectOption;
3578
3821
  return _this.triggerEvent(fn, event, selectOption);
3579
3822
  }));
3580
- // 发送事件
3581
3823
  this.searchSubject.next({ fn: fn, event: event, selectOption: selectOption });
3582
3824
  }
3583
3825
  else {
@@ -3614,7 +3856,6 @@ var HdFilterComponent = /** @class */ (function () {
3614
3856
  * @return {?}
3615
3857
  */
3616
3858
  function () {
3617
- // 特殊处理下等于4个选项的情况
3618
3859
  if (this.filterList.length === 4) {
3619
3860
  return 18;
3620
3861
  }
@@ -3641,157 +3882,761 @@ var HdFilterComponent = /** @class */ (function () {
3641
3882
  * @return {?}
3642
3883
  */
3643
3884
  function (item) {
3644
- // 校验单项选择器
3645
- // if (item.type === FilterListType.Select && (!item.selectOption.selectList || (item.selectOption.selectList && item.selectOption.selectList.length === 0))) {
3646
- // throw 'filter组件数据格式不规范,存在单项选择器没有传入选项!'
3647
- // }
3648
3885
  nameList.push(item.name);
3649
3886
  }));
3650
- // 校验name是否重复
3651
3887
  if (__spread(new Set(nameList)).length !== list.length) {
3652
3888
  throw 'filter组件数据格式不规范,存在重复name值!';
3653
3889
  }
3654
- // ...more check
3655
3890
  return true;
3656
3891
  };
3657
3892
  /**
3658
3893
  * @return {?}
3659
3894
  */
3660
- HdFilterComponent.prototype.submitForm = /**
3895
+ HdFilterComponent.prototype.submitForm = /**
3896
+ * @return {?}
3897
+ */
3898
+ function () {
3899
+ this.searchEvent.emit(this.validateFilterForm.getRawValue());
3900
+ };
3901
+ /**
3902
+ * @return {?}
3903
+ */
3904
+ HdFilterComponent.prototype.resetForm = /**
3905
+ * @return {?}
3906
+ */
3907
+ function () {
3908
+ this.resetFilterFormWithValue();
3909
+ if (this.resetEvent.observers.length > 0) {
3910
+ this.resetEvent.emit(this.validateFilterForm.getRawValue());
3911
+ }
3912
+ else {
3913
+ this.searchEvent.emit(this.validateFilterForm.getRawValue());
3914
+ }
3915
+ };
3916
+ /**
3917
+ * @return {?}
3918
+ */
3919
+ HdFilterComponent.prototype.resetFilterFormWithValue = /**
3920
+ * @return {?}
3921
+ */
3922
+ function () {
3923
+ /** @type {?} */
3924
+ var resetValue = {};
3925
+ this.filterList.forEach((/**
3926
+ * @param {?} item
3927
+ * @return {?}
3928
+ */
3929
+ function (item) {
3930
+ resetValue[item.name] = item.value;
3931
+ }));
3932
+ this.validateFilterForm.patchValue(resetValue);
3933
+ };
3934
+ /**
3935
+ * @return {?}
3936
+ */
3937
+ HdFilterComponent.prototype.getFilterData = /**
3938
+ * @return {?}
3939
+ */
3940
+ function () {
3941
+ return this.validateFilterForm.getRawValue();
3942
+ };
3943
+ /**
3944
+ * @return {?}
3945
+ */
3946
+ HdFilterComponent.prototype.showMore = /**
3947
+ * @return {?}
3948
+ */
3949
+ function () {
3950
+ var _this = this;
3951
+ this.isShowMore = !this.isShowMore;
3952
+ this.filterList.forEach((/**
3953
+ * @param {?} item
3954
+ * @param {?} index
3955
+ * @return {?}
3956
+ */
3957
+ function (item, index) {
3958
+ item.show = _this.isShowMore ? index < 7 : true;
3959
+ }));
3960
+ };
3961
+ /**
3962
+ * @param {?} filter
3963
+ * @return {?}
3964
+ */
3965
+ HdFilterComponent.prototype.inputClean = /**
3966
+ * @param {?} filter
3967
+ * @return {?}
3968
+ */
3969
+ function (filter) {
3970
+ /** @type {?} */
3971
+ var patchObject = {};
3972
+ patchObject[filter.name] = null;
3973
+ this.validateFilterForm.patchValue(patchObject);
3974
+ };
3975
+ /**
3976
+ * @param {?} item
3977
+ * @return {?}
3978
+ */
3979
+ HdFilterComponent.prototype.isAllowClear = /**
3980
+ * @param {?} item
3981
+ * @return {?}
3982
+ */
3983
+ function (item) {
3984
+ if (!item) {
3985
+ return true;
3986
+ }
3987
+ if (item.hdAllowClear != null) {
3988
+ return !!item.hdAllowClear;
3989
+ }
3990
+ if (item.selectOption && item.selectOption.hdAllowClear != null) {
3991
+ return !!item.selectOption.hdAllowClear;
3992
+ }
3993
+ return true;
3994
+ };
3995
+ // ---------- 筛选组 ----------
3996
+ // ---------- 筛选组 ----------
3997
+ /**
3998
+ * @private
3999
+ * @param {?} applyDefault
4000
+ * @return {?}
4001
+ */
4002
+ HdFilterComponent.prototype.tryLoadSchemes =
4003
+ // ---------- 筛选组 ----------
4004
+ /**
4005
+ * @private
4006
+ * @param {?} applyDefault
4007
+ * @return {?}
4008
+ */
4009
+ function (applyDefault) {
4010
+ var _this = this;
4011
+ if (!this.canUseScheme) {
4012
+ this.schemeList = [];
4013
+ this.currentScheme = null;
4014
+ this.currentSchemeName = HD_FILTER_DEFAULT_SCHEME_NAME;
4015
+ return;
4016
+ }
4017
+ this.schemeLoading = true;
4018
+ if (this.schemeLoadSub) {
4019
+ this.schemeLoadSub.unsubscribe();
4020
+ }
4021
+ this.schemeLoadSub = this.schemeStore.queryByFilterKey(this.filterSchemeKey).subscribe((/**
4022
+ * @param {?} list
4023
+ * @return {?}
4024
+ */
4025
+ function (list) {
4026
+ _this.schemeLoading = false;
4027
+ _this.schemeList = list || [];
4028
+ if (applyDefault) {
4029
+ _this.applySchemeByName(HD_FILTER_DEFAULT_SCHEME_NAME, true);
4030
+ }
4031
+ else if (_this.currentScheme && _this.currentScheme.uuid) {
4032
+ /** @type {?} */
4033
+ var found = _this.schemeList.find((/**
4034
+ * @param {?} s
4035
+ * @return {?}
4036
+ */
4037
+ function (s) { return s.uuid === _this.currentScheme.uuid; }));
4038
+ _this.currentScheme = found || null;
4039
+ _this.currentSchemeName = found ? found.templateName : HD_FILTER_DEFAULT_SCHEME_NAME;
4040
+ }
4041
+ }), (/**
4042
+ * @param {?} err
4043
+ * @return {?}
4044
+ */
4045
+ function (err) {
4046
+ _this.schemeLoading = false;
4047
+ _this.showError('加载筛选模版失败:' + (err || ''));
4048
+ if (applyDefault) {
4049
+ _this.applySchemeByName(HD_FILTER_DEFAULT_SCHEME_NAME, true);
4050
+ }
4051
+ }));
4052
+ };
4053
+ /** 展示用列表:保证有「默认条件」 */
4054
+ /**
4055
+ * 展示用列表:保证有「默认条件」
4056
+ * @return {?}
4057
+ */
4058
+ HdFilterComponent.prototype.getDisplaySchemeList = /**
4059
+ * 展示用列表:保证有「默认条件」
4060
+ * @return {?}
4061
+ */
4062
+ function () {
4063
+ /** @type {?} */
4064
+ var result = [];
4065
+ /** @type {?} */
4066
+ var fromDb = this.schemeList.find((/**
4067
+ * @param {?} s
4068
+ * @return {?}
4069
+ */
4070
+ function (s) { return s.templateName === HD_FILTER_DEFAULT_SCHEME_NAME; }));
4071
+ if (fromDb) {
4072
+ result.push(fromDb);
4073
+ }
4074
+ else {
4075
+ result.push({
4076
+ filterKey: this.filterSchemeKey,
4077
+ templateName: HD_FILTER_DEFAULT_SCHEME_NAME,
4078
+ filterValue: JSON.stringify(this.defaultFilterValues || {})
4079
+ });
4080
+ }
4081
+ (this.schemeList || []).forEach((/**
4082
+ * @param {?} s
4083
+ * @return {?}
4084
+ */
4085
+ function (s) {
4086
+ if (s.templateName !== HD_FILTER_DEFAULT_SCHEME_NAME) {
4087
+ result.push(s);
4088
+ }
4089
+ }));
4090
+ return result;
4091
+ };
4092
+ /**
4093
+ * @return {?}
4094
+ */
4095
+ HdFilterComponent.prototype.openSwitchModal = /**
4096
+ * @return {?}
4097
+ */
4098
+ function () {
4099
+ if (!this.canUseScheme) {
4100
+ return;
4101
+ }
4102
+ this.switchKeyword = '';
4103
+ this.switchSelectedUuid = this.currentScheme && this.currentScheme.uuid
4104
+ ? this.currentScheme.uuid
4105
+ : null;
4106
+ // 虚拟默认条件:uuid 为空时用空串标记
4107
+ if (!this.currentScheme || !this.currentScheme.uuid) {
4108
+ if (this.currentSchemeName === HD_FILTER_DEFAULT_SCHEME_NAME) {
4109
+ this.switchSelectedUuid = '';
4110
+ }
4111
+ }
4112
+ this.switchModalVisible = true;
4113
+ };
4114
+ /**
4115
+ * @return {?}
4116
+ */
4117
+ HdFilterComponent.prototype.closeSwitchModal = /**
4118
+ * @return {?}
4119
+ */
4120
+ function () {
4121
+ this.switchModalVisible = false;
4122
+ };
4123
+ /**
4124
+ * @param {?} item
4125
+ * @return {?}
4126
+ */
4127
+ HdFilterComponent.prototype.selectSwitchItem = /**
4128
+ * @param {?} item
4129
+ * @return {?}
4130
+ */
4131
+ function (item) {
4132
+ this.switchSelectedUuid = item.uuid ? item.uuid : '';
4133
+ };
4134
+ /**
4135
+ * @return {?}
4136
+ */
4137
+ HdFilterComponent.prototype.confirmSwitch = /**
4138
+ * @return {?}
4139
+ */
4140
+ function () {
4141
+ var _this = this;
4142
+ /** @type {?} */
4143
+ var list = this.getDisplaySchemeList();
4144
+ /** @type {?} */
4145
+ var target = null;
4146
+ if (this.switchSelectedUuid === '' || this.switchSelectedUuid == null) {
4147
+ target = list.find((/**
4148
+ * @param {?} s
4149
+ * @return {?}
4150
+ */
4151
+ function (s) { return s.templateName === HD_FILTER_DEFAULT_SCHEME_NAME && !s.uuid; }))
4152
+ || list.find((/**
4153
+ * @param {?} s
4154
+ * @return {?}
4155
+ */
4156
+ function (s) { return s.templateName === HD_FILTER_DEFAULT_SCHEME_NAME; }));
4157
+ }
4158
+ else {
4159
+ target = list.find((/**
4160
+ * @param {?} s
4161
+ * @return {?}
4162
+ */
4163
+ function (s) { return s.uuid === _this.switchSelectedUuid; }));
4164
+ }
4165
+ if (!target) {
4166
+ this.showError('请选择筛选模版');
4167
+ return;
4168
+ }
4169
+ this.applyScheme(target, true);
4170
+ this.switchModalVisible = false;
4171
+ };
4172
+ /**
4173
+ * @param {?} item
4174
+ * @return {?}
4175
+ */
4176
+ HdFilterComponent.prototype.isDefaultScheme = /**
4177
+ * @param {?} item
4178
+ * @return {?}
4179
+ */
4180
+ function (item) {
4181
+ return !!(item && item.templateName === HD_FILTER_DEFAULT_SCHEME_NAME);
4182
+ };
4183
+ /**
4184
+ * @return {?}
4185
+ */
4186
+ HdFilterComponent.prototype.canDeleteCurrent = /**
4187
+ * @return {?}
4188
+ */
4189
+ function () {
4190
+ return !!(this.currentScheme && this.currentScheme.uuid
4191
+ && this.currentScheme.templateName !== HD_FILTER_DEFAULT_SCHEME_NAME);
4192
+ };
4193
+ /**
4194
+ * @return {?}
4195
+ */
4196
+ HdFilterComponent.prototype.saveCurrentScheme = /**
4197
+ * @return {?}
4198
+ */
4199
+ function () {
4200
+ var _this = this;
4201
+ if (!this.canUseScheme) {
4202
+ return;
4203
+ }
4204
+ /** @type {?} */
4205
+ var name = this.currentSchemeName || HD_FILTER_DEFAULT_SCHEME_NAME;
4206
+ /** @type {?} */
4207
+ var body = {
4208
+ uuid: this.currentScheme && this.currentScheme.uuid ? this.currentScheme.uuid : null,
4209
+ filterKey: this.filterSchemeKey,
4210
+ templateName: name,
4211
+ filterValue: this.serializeFilterValue()
4212
+ };
4213
+ this.schemeSaving = true;
4214
+ if (this.schemeActionSub) {
4215
+ this.schemeActionSub.unsubscribe();
4216
+ }
4217
+ this.schemeActionSub = this.schemeStore.save(body).subscribe((/**
4218
+ * @param {?} saved
4219
+ * @return {?}
4220
+ */
4221
+ function (saved) {
4222
+ _this.schemeSaving = false;
4223
+ _this.showSuccess('保存成功');
4224
+ _this.currentScheme = saved;
4225
+ _this.currentSchemeName = saved.templateName;
4226
+ _this.refreshSchemeListKeepCurrent();
4227
+ }), (/**
4228
+ * @param {?} err
4229
+ * @return {?}
4230
+ */
4231
+ function (err) {
4232
+ _this.schemeSaving = false;
4233
+ _this.showError('保存失败:' + (err || ''));
4234
+ }));
4235
+ };
4236
+ /**
4237
+ * @return {?}
4238
+ */
4239
+ HdFilterComponent.prototype.openSaveAsModal = /**
4240
+ * @return {?}
4241
+ */
4242
+ function () {
4243
+ this.saveAsName = '';
4244
+ this.saveAsModalVisible = true;
4245
+ };
4246
+ /**
4247
+ * @return {?}
4248
+ */
4249
+ HdFilterComponent.prototype.closeSaveAsModal = /**
4250
+ * @return {?}
4251
+ */
4252
+ function () {
4253
+ this.saveAsModalVisible = false;
4254
+ };
4255
+ /**
4256
+ * @return {?}
4257
+ */
4258
+ HdFilterComponent.prototype.confirmSaveAs = /**
4259
+ * @return {?}
4260
+ */
4261
+ function () {
4262
+ var _this = this;
4263
+ /** @type {?} */
4264
+ var name = (this.saveAsName || '').trim();
4265
+ if (!name) {
4266
+ this.showError('请输入模版名称');
4267
+ return;
4268
+ }
4269
+ if (name === HD_FILTER_DEFAULT_SCHEME_NAME) {
4270
+ this.showError('不能使用「默认条件」作为模版名称,请使用「保存为当前」覆盖默认条件');
4271
+ return;
4272
+ }
4273
+ /** @type {?} */
4274
+ var exists = (this.schemeList || []).some((/**
4275
+ * @param {?} s
4276
+ * @return {?}
4277
+ */
4278
+ function (s) { return s.templateName === name; }));
4279
+ if (exists) {
4280
+ this.showError('模版名称已存在');
4281
+ return;
4282
+ }
4283
+ /** @type {?} */
4284
+ var body = {
4285
+ filterKey: this.filterSchemeKey,
4286
+ templateName: name,
4287
+ filterValue: this.serializeFilterValue()
4288
+ };
4289
+ this.schemeSaving = true;
4290
+ if (this.schemeActionSub) {
4291
+ this.schemeActionSub.unsubscribe();
4292
+ }
4293
+ this.schemeActionSub = this.schemeStore.save(body).subscribe((/**
4294
+ * @param {?} saved
4295
+ * @return {?}
4296
+ */
4297
+ function (saved) {
4298
+ _this.schemeSaving = false;
4299
+ _this.saveAsModalVisible = false;
4300
+ _this.showSuccess('另存为成功');
4301
+ _this.currentScheme = saved;
4302
+ _this.currentSchemeName = saved.templateName;
4303
+ _this.refreshSchemeListKeepCurrent();
4304
+ }), (/**
4305
+ * @param {?} err
4306
+ * @return {?}
4307
+ */
4308
+ function (err) {
4309
+ _this.schemeSaving = false;
4310
+ _this.showError('另存为失败:' + (err || ''));
4311
+ }));
4312
+ };
4313
+ /**
4314
+ * @return {?}
4315
+ */
4316
+ HdFilterComponent.prototype.deleteCurrentScheme = /**
4317
+ * @return {?}
4318
+ */
4319
+ function () {
4320
+ var _this = this;
4321
+ if (!this.canDeleteCurrent()) {
4322
+ return;
4323
+ }
4324
+ /** @type {?} */
4325
+ var uuid = this.currentScheme.uuid;
4326
+ this.schemeSaving = true;
4327
+ if (this.schemeActionSub) {
4328
+ this.schemeActionSub.unsubscribe();
4329
+ }
4330
+ this.schemeActionSub = this.schemeStore.delete(uuid).subscribe((/**
4331
+ * @return {?}
4332
+ */
4333
+ function () {
4334
+ _this.schemeSaving = false;
4335
+ _this.showSuccess('删除成功');
4336
+ _this.schemeList = (_this.schemeList || []).filter((/**
4337
+ * @param {?} s
4338
+ * @return {?}
4339
+ */
4340
+ function (s) { return s.uuid !== uuid; }));
4341
+ _this.applySchemeByName(HD_FILTER_DEFAULT_SCHEME_NAME, true);
4342
+ }), (/**
4343
+ * @param {?} err
4344
+ * @return {?}
4345
+ */
4346
+ function (err) {
4347
+ _this.schemeSaving = false;
4348
+ _this.showError('删除失败:' + (err || ''));
4349
+ }));
4350
+ };
4351
+ /**
4352
+ * @private
4353
+ * @return {?}
4354
+ */
4355
+ HdFilterComponent.prototype.refreshSchemeListKeepCurrent = /**
4356
+ * @private
4357
+ * @return {?}
4358
+ */
4359
+ function () {
4360
+ var _this = this;
4361
+ if (!this.canUseScheme) {
4362
+ return;
4363
+ }
4364
+ this.schemeStore.queryByFilterKey(this.filterSchemeKey).subscribe((/**
4365
+ * @param {?} list
4366
+ * @return {?}
4367
+ */
4368
+ function (list) {
4369
+ _this.schemeList = list || [];
4370
+ if (_this.currentScheme && _this.currentScheme.uuid) {
4371
+ /** @type {?} */
4372
+ var found = _this.schemeList.find((/**
4373
+ * @param {?} s
4374
+ * @return {?}
4375
+ */
4376
+ function (s) { return s.uuid === _this.currentScheme.uuid; }));
4377
+ if (found) {
4378
+ _this.currentScheme = found;
4379
+ _this.currentSchemeName = found.templateName;
4380
+ }
4381
+ }
4382
+ }), (/**
4383
+ * @return {?}
4384
+ */
4385
+ function () { }));
4386
+ };
4387
+ /**
4388
+ * @private
4389
+ * @param {?} name
4390
+ * @param {?} emitSearch
4391
+ * @return {?}
4392
+ */
4393
+ HdFilterComponent.prototype.applySchemeByName = /**
4394
+ * @private
4395
+ * @param {?} name
4396
+ * @param {?} emitSearch
3661
4397
  * @return {?}
3662
4398
  */
3663
- function () {
3664
- this.searchEvent.emit(this.validateFilterForm.getRawValue());
4399
+ function (name, emitSearch) {
4400
+ /** @type {?} */
4401
+ var list = this.getDisplaySchemeList();
4402
+ /** @type {?} */
4403
+ var target = list.find((/**
4404
+ * @param {?} s
4405
+ * @return {?}
4406
+ */
4407
+ function (s) { return s.templateName === name; }));
4408
+ if (target) {
4409
+ this.applyScheme(target, emitSearch);
4410
+ }
3665
4411
  };
3666
4412
  /**
4413
+ * @private
4414
+ * @param {?} scheme
4415
+ * @param {?} emitSearch
3667
4416
  * @return {?}
3668
4417
  */
3669
- HdFilterComponent.prototype.resetForm = /**
4418
+ HdFilterComponent.prototype.applyScheme = /**
4419
+ * @private
4420
+ * @param {?} scheme
4421
+ * @param {?} emitSearch
3670
4422
  * @return {?}
3671
4423
  */
3672
- function () {
3673
- this.resetFilterFormWithValue();
3674
- // this.validateFilterForm.reset();
3675
- if (this.resetEvent.observers.length > 0) {
3676
- // 如果有父组件绑定了 resetEvent 的处理器
3677
- this.resetEvent.emit(this.validateFilterForm.getRawValue());
4424
+ function (scheme, emitSearch) {
4425
+ this.currentScheme = scheme && scheme.uuid ? scheme : {
4426
+ filterKey: this.filterSchemeKey,
4427
+ templateName: scheme ? scheme.templateName : HD_FILTER_DEFAULT_SCHEME_NAME,
4428
+ filterValue: scheme ? scheme.filterValue : JSON.stringify(this.defaultFilterValues || {})
4429
+ };
4430
+ this.currentSchemeName = this.currentScheme.templateName || HD_FILTER_DEFAULT_SCHEME_NAME;
4431
+ /** @type {?} */
4432
+ var values = {};
4433
+ if (this.currentSchemeName === HD_FILTER_DEFAULT_SCHEME_NAME && !(scheme && scheme.uuid)) {
4434
+ values = this.clonePlain(this.defaultFilterValues || {});
3678
4435
  }
3679
4436
  else {
3680
- // 如果没有绑定处理器,则触发 searchEvent
3681
- this.searchEvent.emit(this.validateFilterForm.getRawValue());
4437
+ try {
4438
+ values = JSON.parse(scheme.filterValue || '{}');
4439
+ }
4440
+ catch (e) {
4441
+ values = {};
4442
+ }
4443
+ if (this.currentSchemeName === HD_FILTER_DEFAULT_SCHEME_NAME) {
4444
+ // 库中默认条件覆盖初始值:以默认值为底,再叠加库值
4445
+ values = Object.assign({}, this.defaultFilterValues || {}, values || {});
4446
+ }
4447
+ }
4448
+ this.patchFilterValues(values);
4449
+ if (emitSearch) {
4450
+ this.submitForm();
3682
4451
  }
3683
4452
  };
3684
4453
  /**
3685
- * 带初始值重置表单
4454
+ * @private
4455
+ * @return {?}
3686
4456
  */
4457
+ HdFilterComponent.prototype.serializeFilterValue = /**
4458
+ * @private
4459
+ * @return {?}
4460
+ */
4461
+ function () {
4462
+ return JSON.stringify(this.getFilterData() || {});
4463
+ };
3687
4464
  /**
3688
- * 带初始值重置表单
4465
+ * @private
4466
+ * @param {?} values
3689
4467
  * @return {?}
3690
4468
  */
3691
- HdFilterComponent.prototype.resetFilterFormWithValue = /**
3692
- * 带初始值重置表单
4469
+ HdFilterComponent.prototype.patchFilterValues = /**
4470
+ * @private
4471
+ * @param {?} values
3693
4472
  * @return {?}
3694
4473
  */
3695
- function () {
4474
+ function (values) {
4475
+ var _this = this;
4476
+ if (!this.validateFilterForm || !this.filterList) {
4477
+ return;
4478
+ }
3696
4479
  /** @type {?} */
3697
- var resetValue = {};
4480
+ var patch = {};
3698
4481
  this.filterList.forEach((/**
3699
4482
  * @param {?} item
3700
4483
  * @return {?}
3701
4484
  */
3702
4485
  function (item) {
3703
- resetValue[item.name] = item.value;
4486
+ if (values && Object.prototype.hasOwnProperty.call(values, item.name)) {
4487
+ patch[item.name] = _this.reviveFilterValue(item, values[item.name]);
4488
+ }
3704
4489
  }));
3705
- // 重置表单值(会触发valueChanges事件)
3706
- this.validateFilterForm.patchValue(resetValue);
4490
+ this.validateFilterForm.patchValue(patch);
3707
4491
  };
3708
4492
  /**
4493
+ * @private
4494
+ * @param {?} filter
4495
+ * @param {?} value
3709
4496
  * @return {?}
3710
4497
  */
3711
- HdFilterComponent.prototype.getFilterData = /**
4498
+ HdFilterComponent.prototype.reviveFilterValue = /**
4499
+ * @private
4500
+ * @param {?} filter
4501
+ * @param {?} value
3712
4502
  * @return {?}
3713
4503
  */
3714
- function () {
3715
- return this.validateFilterForm.getRawValue();
4504
+ function (filter, value) {
4505
+ var _this = this;
4506
+ if (value == null) {
4507
+ return value;
4508
+ }
4509
+ if (filter.type === FilterListType.DateRange) {
4510
+ if (Array.isArray(value)) {
4511
+ return value.map((/**
4512
+ * @param {?} v
4513
+ * @return {?}
4514
+ */
4515
+ function (v) { return _this.parseDateLike(v); }));
4516
+ }
4517
+ return value;
4518
+ }
4519
+ if (filter.type === FilterListType.Date || filter.type === FilterListType.Month) {
4520
+ return this.parseDateLike(value);
4521
+ }
4522
+ return value;
3716
4523
  };
3717
4524
  /**
4525
+ * @private
4526
+ * @param {?} value
3718
4527
  * @return {?}
3719
4528
  */
3720
- HdFilterComponent.prototype.showMore = /**
4529
+ HdFilterComponent.prototype.parseDateLike = /**
4530
+ * @private
4531
+ * @param {?} value
3721
4532
  * @return {?}
3722
4533
  */
3723
- function () {
3724
- var _this = this;
3725
- this.isShowMore = !this.isShowMore;
3726
- this.filterList.forEach((/**
3727
- * @param {?} item
3728
- * @param {?} index
3729
- * @return {?}
3730
- */
3731
- function (item, index) {
3732
- item.show = _this.isShowMore ? index < 7 : true;
3733
- }));
4534
+ function (value) {
4535
+ if (value == null || value instanceof Date) {
4536
+ return value;
4537
+ }
4538
+ if (typeof value === 'string' && /^\d{4}-\d{2}-\d{2}/.test(value)) {
4539
+ /** @type {?} */
4540
+ var d = new Date(value);
4541
+ return isNaN(d.getTime()) ? value : d;
4542
+ }
4543
+ if (typeof value === 'number') {
4544
+ /** @type {?} */
4545
+ var d = new Date(value);
4546
+ return isNaN(d.getTime()) ? value : d;
4547
+ }
4548
+ return value;
3734
4549
  };
3735
4550
  /**
3736
- * @param {?} filter
4551
+ * @private
4552
+ * @param {?} obj
3737
4553
  * @return {?}
3738
4554
  */
3739
- HdFilterComponent.prototype.inputClean = /**
3740
- * @param {?} filter
4555
+ HdFilterComponent.prototype.clonePlain = /**
4556
+ * @private
4557
+ * @param {?} obj
3741
4558
  * @return {?}
3742
4559
  */
3743
- function (filter) {
3744
- /** @type {?} */
3745
- var patchObject = {};
3746
- patchObject[filter.name] = null;
3747
- this.validateFilterForm.patchValue(patchObject);
4560
+ function (obj) {
4561
+ try {
4562
+ return JSON.parse(JSON.stringify(obj == null ? {} : obj));
4563
+ }
4564
+ catch (e) {
4565
+ return {};
4566
+ }
3748
4567
  };
3749
4568
  /**
3750
- * 是否允许清空:优先 Filter.hdAllowClear,其次 selectOption.hdAllowClear,默认 true
4569
+ * @private
4570
+ * @param {?} msg
4571
+ * @return {?}
4572
+ */
4573
+ HdFilterComponent.prototype.showSuccess = /**
4574
+ * @private
4575
+ * @param {?} msg
4576
+ * @return {?}
3751
4577
  */
4578
+ function (msg) {
4579
+ if (typeof window !== 'undefined' && ((/** @type {?} */ (window))).hdMessageService) {
4580
+ ((/** @type {?} */ (window))).hdMessageService.prototype.success(msg);
4581
+ }
4582
+ };
3752
4583
  /**
3753
- * 是否允许清空:优先 Filter.hdAllowClear,其次 selectOption.hdAllowClear,默认 true
3754
- * @param {?} item
4584
+ * @private
4585
+ * @param {?} msg
3755
4586
  * @return {?}
3756
4587
  */
3757
- HdFilterComponent.prototype.isAllowClear = /**
3758
- * 是否允许清空:优先 Filter.hdAllowClear,其次 selectOption.hdAllowClear,默认 true
3759
- * @param {?} item
4588
+ HdFilterComponent.prototype.showError = /**
4589
+ * @private
4590
+ * @param {?} msg
3760
4591
  * @return {?}
3761
4592
  */
3762
- function (item) {
3763
- if (!item) {
3764
- return true;
4593
+ function (msg) {
4594
+ if (typeof window !== 'undefined' && ((/** @type {?} */ (window))).hdMessageService) {
4595
+ ((/** @type {?} */ (window))).hdMessageService.prototype.error(msg);
3765
4596
  }
3766
- if (item.hdAllowClear != null) {
3767
- return !!item.hdAllowClear;
3768
- }
3769
- if (item.selectOption && item.selectOption.hdAllowClear != null) {
3770
- return !!item.selectOption.hdAllowClear;
4597
+ else {
4598
+ // eslint-disable-next-line no-console
4599
+ console.error(msg);
3771
4600
  }
3772
- return true;
3773
4601
  };
3774
4602
  HdFilterComponent.decorators = [
3775
4603
  { type: Component, args: [{
3776
4604
  selector: 'hd-filter',
3777
- 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\" [nzNoColon]=\"true\"><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 (blur)=\"triggerEvent(filter.onBlurEvent || null, validateFilterForm.get(filter.name).value)\"/>\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=\"isAllowClear(filter) && 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]=\"isAllowClear(filter)\"\n [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"filter.selectOption.hdDropdownMatchSelectWidth ? filter.selectOption.hdDropdownMatchSelectWidth : false\"\n (nzOnSearch)=\"onSearchEvent(filter.onSearchEvent || null, $event, filter.onSearchEventEventDebounceTime, filter.selectOption)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\">\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 [nzAllowClear]=\"isAllowClear(filter)\"\n nzShowTime 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 [nzAllowClear]=\"isAllowClear(filter)\">\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']\" [nzDisabledDate]=\"filter.hdDisabledDate\"\n [nzAllowClear]=\"isAllowClear(filter)\" [formControlName]=\"filter.name\">\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]=\"isAllowClear(filter)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n (nzOnSearch)=\"onSearchEvent(filter.onSearchEvent || null, $event, filter.onSearchEventEventDebounceTime, filter.selectOption)\">\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=\"5\">\n <nz-cascader [nzOptions]=\"filter.cascaderOption.options\" [formControlName]=\"filter.name\"\n [nzAllowClear]=\"isAllowClear(filter)\"\n [nzShowSearch]=\"getCascaderShowSearch(filter.cascaderOption)\"\n [nzMenuClassName]=\"getCascaderMenuClassName(filter.cascaderOption)\"\n [nzMenuStyle]=\"getCascaderMenuStyle(filter.cascaderOption)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\">\n </nz-cascader>\n </ng-container>\n <ng-container *ngSwitchCase=\"6\">\n <nz-month-picker [formControlName]=\"filter.name\"\n [nzAllowClear]=\"isAllowClear(filter)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"></nz-month-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"7\">\n <nz-input-number [formControlName]=\"filter.name\" [nzMin]=\"filter?.inputNumber?.min || 0\"\n [nzMax]=\"filter?.inputNumber?.max || 99999999\" [nzStep]=\"filter?.inputNumber?.step || 1\"\n [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165' + filter.label\"\n [nzPrecision]=\"filter?.inputNumber?.precision != null ? filter.inputNumber.precision : 4\"\n (nzBlur)=\"triggerEvent(filter.onBlurEvent || null, validateFilterForm.get(filter.name).value)\">\n </nz-input-number>\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>\n",
3778
- styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!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;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!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}::ng-deep .hd-table-container .ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-th-right-sticky{z-index:2;transform:translateZ(0)}::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-right-sticky{background:#f5f8f6!important}::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-right-sticky{background:#fff}::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-right-sticky{background:#ecf8f1!important}::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-th-right-sticky{box-shadow:none!important}::ng-deep .hd-table-container .ant-table-fixed-right{right:0!important}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;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:14px;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-pagination-options .ant-select,::ng-deep .ant-pagination-options .ant-select-selection--single{min-width:100px}::ng-deep .ant-pagination-options-size-changer.ant-select{min-width:100px}::ng-deep .ant-time-picker{width:100%}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child{width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;min-width:var(--hd-cascader-menu-min-width,auto);max-width:560px}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child .ant-cascader-menu-item{white-space:nowrap}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.hd-filter-container{padding:20px 23px;background:#fff;border-radius:4px;margin-bottom:8px!important;font-size:14px}.hd-filter-container .ant-row{display:flex;flex-wrap:wrap;align-items:flex-start;row-gap:4px;margin-right:0!important;margin-left:0!important}.hd-filter-container .ant-row::after,.hd-filter-container .ant-row::before{display:none}.hd-filter-container .ant-col-6{float:none;padding-left:0!important;padding-right:0!important}.hd-filter-container .hd-filter-label{width:124px;word-break:break-all;font-size:14px}.hd-filter-container .hd-filter-label ::ng-deep label{font-size:14px}.hd-filter-container .hd-filter-control{width:calc(100% - 124px)}.hd-filter-container ::ng-deep .ant-calendar-picker{width:100%}.hd-filter-container .hd-filter-more{color:#20b95d}.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:32px!important}.hd-filter-container ::ng-deep .ant-input{height:32px!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:#f5222d}"]
4605
+ 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\" [nzNoColon]=\"true\"><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 (blur)=\"triggerEvent(filter.onBlurEvent || null, validateFilterForm.get(filter.name).value)\"/>\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=\"isAllowClear(filter) && 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]=\"isAllowClear(filter)\"\n [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"filter.selectOption.hdDropdownMatchSelectWidth ? filter.selectOption.hdDropdownMatchSelectWidth : false\"\n (nzOnSearch)=\"onSearchEvent(filter.onSearchEvent || null, $event, filter.onSearchEventEventDebounceTime, filter.selectOption)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\">\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 [nzAllowClear]=\"isAllowClear(filter)\"\n nzShowTime 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 [nzAllowClear]=\"isAllowClear(filter)\">\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']\" [nzDisabledDate]=\"filter.hdDisabledDate\"\n [nzAllowClear]=\"isAllowClear(filter)\" [formControlName]=\"filter.name\">\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]=\"isAllowClear(filter)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"\n [formControlName]=\"filter.name\" [nzServerSearch]=\"filter.selectOption.hdServerSearch || false\"\n (nzOnSearch)=\"onSearchEvent(filter.onSearchEvent || null, $event, filter.onSearchEventEventDebounceTime, filter.selectOption)\">\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=\"5\">\n <nz-cascader [nzOptions]=\"filter.cascaderOption.options\" [formControlName]=\"filter.name\"\n [nzAllowClear]=\"isAllowClear(filter)\"\n [nzShowSearch]=\"getCascaderShowSearch(filter.cascaderOption)\"\n [nzMenuClassName]=\"getCascaderMenuClassName(filter.cascaderOption)\"\n [nzMenuStyle]=\"getCascaderMenuStyle(filter.cascaderOption)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\">\n </nz-cascader>\n </ng-container>\n <ng-container *ngSwitchCase=\"6\">\n <nz-month-picker [formControlName]=\"filter.name\"\n [nzAllowClear]=\"isAllowClear(filter)\"\n [nzPlaceHolder]=\"filter.placeholder ? filter.placeholder : '\u8BF7\u9009\u62E9' + filter.label\"></nz-month-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"7\">\n <nz-input-number [formControlName]=\"filter.name\" [nzMin]=\"filter?.inputNumber?.min || 0\"\n [nzMax]=\"filter?.inputNumber?.max || 99999999\" [nzStep]=\"filter?.inputNumber?.step || 1\"\n [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165' + filter.label\"\n [nzPrecision]=\"filter?.inputNumber?.precision != null ? filter.inputNumber.precision : 4\"\n (nzBlur)=\"triggerEvent(filter.onBlurEvent || null, validateFilterForm.get(filter.name).value)\">\n </nz-input-number>\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 <ng-container *ngIf=\"canUseScheme\">\n <a class=\"hd-filter-scheme-name\" (click)=\"openSwitchModal()\" nz-tooltip [nzTitle]=\"'\u5207\u6362\u7B5B\u9009\u7EC4'\">\n {{ currentSchemeName }}\n <i nz-icon nzType=\"down\"></i>\n </a>\n <a class=\"hd-filter-scheme-op\" nz-dropdown [nzDropdownMenu]=\"schemeOpMenu\" nzTrigger=\"click\">\n \u64CD\u4F5C\n <i nz-icon nzType=\"down\"></i>\n </a>\n <nz-dropdown-menu #schemeOpMenu=\"nzDropdownMenu\">\n <ul nz-menu>\n <li nz-menu-item (click)=\"saveCurrentScheme()\">\u4FDD\u5B58\u4E3A\u5F53\u524D</li>\n <li nz-menu-item (click)=\"openSaveAsModal()\">\u53E6\u5B58\u4E3A</li>\n <li nz-menu-item *ngIf=\"canDeleteCurrent()\"\n nz-popconfirm\n nzTitle=\"\u786E\u5B9A\u5220\u9664\u5F53\u524D\u7B5B\u9009\u7EC4\u5417\uFF1F\"\n nzPopconfirmPlacement=\"bottomRight\"\n (nzOnConfirm)=\"deleteCurrentScheme()\">\u5220\u9664</li>\n </ul>\n </nz-dropdown-menu>\n </ng-container>\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>\n\n<!-- \u5207\u6362\u7B5B\u9009\u7EC4 -->\n<nz-modal\n [(nzVisible)]=\"switchModalVisible\"\n nzTitle=\"\u5207\u6362\u7B5B\u9009\u7EC4\"\n nzWidth=\"480px\"\n [nzOkLoading]=\"schemeLoading\"\n (nzOnCancel)=\"closeSwitchModal()\"\n (nzOnOk)=\"confirmSwitch()\">\n <div class=\"hd-filter-scheme-switch\">\n <input nz-input placeholder=\"\u641C\u7D22\u6A21\u7248\u540D\u79F0\" [(ngModel)]=\"switchKeyword\" />\n <div class=\"hd-filter-scheme-switch-list\">\n <div\n class=\"hd-filter-scheme-switch-item\"\n *ngFor=\"let item of filteredSwitchList\"\n [class.active]=\"(item.uuid && item.uuid === switchSelectedUuid) || (!item.uuid && switchSelectedUuid === '')\"\n (click)=\"selectSwitchItem(item)\">\n <span>{{ item.templateName }}</span>\n <span class=\"hd-filter-scheme-tag\" *ngIf=\"isDefaultScheme(item)\">\u9ED8\u8BA4</span>\n </div>\n <div class=\"hd-filter-scheme-empty\" *ngIf=\"!filteredSwitchList.length\">\u6682\u65E0\u5339\u914D\u6A21\u7248</div>\n </div>\n </div>\n</nz-modal>\n\n<!-- \u53E6\u5B58\u4E3A -->\n<nz-modal\n [(nzVisible)]=\"saveAsModalVisible\"\n nzTitle=\"\u53E6\u5B58\u4E3A\u7B5B\u9009\u7EC4\"\n nzWidth=\"420px\"\n [nzOkLoading]=\"schemeSaving\"\n (nzOnCancel)=\"closeSaveAsModal()\"\n (nzOnOk)=\"confirmSaveAs()\">\n <div class=\"hd-filter-scheme-save-as\">\n <nz-form-item nzFlex>\n <nz-form-label [nzNoColon]=\"true\" [nzRequired]=\"true\">\u6A21\u7248\u540D\u79F0</nz-form-label>\n <nz-form-control>\n <input nz-input maxlength=\"100\" placeholder=\"\u8BF7\u8F93\u5165\u6A21\u7248\u540D\u79F0\" [(ngModel)]=\"saveAsName\" />\n </nz-form-control>\n </nz-form-item>\n </div>\n</nz-modal>\n",
4606
+ styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!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;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!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}::ng-deep .hd-table-container .ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-th-right-sticky{z-index:2;transform:translateZ(0)}::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-right-sticky{background:#f5f8f6!important}::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-right-sticky{background:#fff}::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-right-sticky{background:#ecf8f1!important}::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-th-right-sticky{box-shadow:none!important}::ng-deep .hd-table-container .ant-table-fixed-right{right:0!important}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;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:14px;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-pagination-options .ant-select,::ng-deep .ant-pagination-options .ant-select-selection--single{min-width:100px}::ng-deep .ant-pagination-options-size-changer.ant-select{min-width:100px}::ng-deep .ant-time-picker{width:100%}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child{width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;min-width:var(--hd-cascader-menu-min-width,auto);max-width:560px}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child .ant-cascader-menu-item{white-space:nowrap}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.hd-filter-container{padding:20px 23px;background:#fff;border-radius:4px;margin-bottom:8px!important;font-size:14px}.hd-filter-container .ant-row{display:flex;flex-wrap:wrap;align-items:flex-start;row-gap:4px;margin-right:0!important;margin-left:0!important}.hd-filter-container .ant-row::after,.hd-filter-container .ant-row::before{display:none}.hd-filter-container .ant-col-6{float:none;padding-left:0!important;padding-right:0!important}.hd-filter-container .hd-filter-label{width:124px;word-break:break-all;font-size:14px}.hd-filter-container .hd-filter-label ::ng-deep label{font-size:14px}.hd-filter-container .hd-filter-control{width:calc(100% - 124px)}.hd-filter-container ::ng-deep .ant-calendar-picker{width:100%}.hd-filter-container .hd-filter-more{color:#20b95d}.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:32px!important}.hd-filter-container ::ng-deep .ant-input{height:32px!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:#f5222d}.hd-filter-container .hd-filter-scheme-name,.hd-filter-container .hd-filter-scheme-op{color:#20b95d;margin-left:12px;white-space:nowrap}.hd-filter-scheme-switch input{margin-bottom:12px}.hd-filter-scheme-switch .hd-filter-scheme-switch-list{max-height:320px;overflow:auto;border:1px solid #e8e8e8;border-radius:4px}.hd-filter-scheme-switch .hd-filter-scheme-switch-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;cursor:pointer;border-bottom:1px solid #f0f0f0}.hd-filter-scheme-switch .hd-filter-scheme-switch-item:last-child{border-bottom:none}.hd-filter-scheme-switch .hd-filter-scheme-switch-item.active,.hd-filter-scheme-switch .hd-filter-scheme-switch-item:hover{background:#e6f7ff}.hd-filter-scheme-switch .hd-filter-scheme-tag{color:#20b95d;font-size:12px}.hd-filter-scheme-switch .hd-filter-scheme-empty{padding:24px;text-align:center;color:rgba(0,0,0,.45)}.hd-filter-scheme-save-as .ant-form-item{margin-bottom:0}"]
3779
4607
  }] }
3780
4608
  ];
3781
4609
  /** @nocollapse */
3782
4610
  HdFilterComponent.ctorParameters = function () { return [
3783
- { type: FormBuilder }
4611
+ { type: FormBuilder },
4612
+ { type: HdFilterSchemeStore, decorators: [{ type: Optional }, { type: Inject, args: [HD_FILTER_SCHEME_STORE,] }] }
3784
4613
  ]; };
3785
4614
  HdFilterComponent.propDecorators = {
3786
4615
  filterList: [{ type: Input }],
4616
+ enableFilterScheme: [{ type: Input }],
4617
+ filterSchemeKey: [{ type: Input }],
3787
4618
  searchEvent: [{ type: Output }],
3788
4619
  resetEvent: [{ type: Output }]
3789
4620
  };
4621
+ __decorate([
4622
+ InputBoolean(),
4623
+ __metadata("design:type", Object)
4624
+ ], HdFilterComponent.prototype, "enableFilterScheme", void 0);
3790
4625
  return HdFilterComponent;
3791
4626
  }());
3792
4627
  if (false) {
3793
4628
  /** @type {?} */
3794
4629
  HdFilterComponent.prototype.filterList;
4630
+ /**
4631
+ * 是否启用筛选组(默认关闭)
4632
+ * @type {?}
4633
+ */
4634
+ HdFilterComponent.prototype.enableFilterScheme;
4635
+ /**
4636
+ * 筛选器标识,开启筛选组时必传
4637
+ * @type {?}
4638
+ */
4639
+ HdFilterComponent.prototype.filterSchemeKey;
3795
4640
  /** @type {?} */
3796
4641
  HdFilterComponent.prototype.searchEvent;
3797
4642
  /** @type {?} */
@@ -3817,6 +4662,49 @@ if (false) {
3817
4662
  * @private
3818
4663
  */
3819
4664
  HdFilterComponent.prototype.searchSubscription;
4665
+ /**
4666
+ * @type {?}
4667
+ * @private
4668
+ */
4669
+ HdFilterComponent.prototype.schemeLoadSub;
4670
+ /**
4671
+ * @type {?}
4672
+ * @private
4673
+ */
4674
+ HdFilterComponent.prototype.schemeActionSub;
4675
+ /**
4676
+ * 页面配置的初始值(虚拟「默认条件」)
4677
+ * @type {?}
4678
+ * @private
4679
+ */
4680
+ HdFilterComponent.prototype.defaultFilterValues;
4681
+ /**
4682
+ * @type {?}
4683
+ * @private
4684
+ */
4685
+ HdFilterComponent.prototype.defaultValuesCaptured;
4686
+ /** @type {?} */
4687
+ HdFilterComponent.prototype.schemeList;
4688
+ /** @type {?} */
4689
+ HdFilterComponent.prototype.currentScheme;
4690
+ /** @type {?} */
4691
+ HdFilterComponent.prototype.currentSchemeName;
4692
+ /** @type {?} */
4693
+ HdFilterComponent.prototype.schemeLoading;
4694
+ /** @type {?} */
4695
+ HdFilterComponent.prototype.schemeSaving;
4696
+ /** @type {?} */
4697
+ HdFilterComponent.prototype.switchModalVisible;
4698
+ /** @type {?} */
4699
+ HdFilterComponent.prototype.switchKeyword;
4700
+ /** @type {?} */
4701
+ HdFilterComponent.prototype.switchSelectedUuid;
4702
+ /** @type {?} */
4703
+ HdFilterComponent.prototype.saveAsModalVisible;
4704
+ /** @type {?} */
4705
+ HdFilterComponent.prototype.saveAsName;
4706
+ /** @type {?} */
4707
+ HdFilterComponent.prototype.defaultSchemeName;
3820
4708
  /** @type {?} */
3821
4709
  HdFilterComponent.prototype.getCascaderShowSearch;
3822
4710
  /** @type {?} */
@@ -3828,6 +4716,11 @@ if (false) {
3828
4716
  * @private
3829
4717
  */
3830
4718
  HdFilterComponent.prototype.fb;
4719
+ /**
4720
+ * @type {?}
4721
+ * @private
4722
+ */
4723
+ HdFilterComponent.prototype.schemeStore;
3831
4724
  }
3832
4725
 
3833
4726
  /**
@@ -12377,102 +13270,6 @@ if (false) {
12377
13270
  TotalOption.prototype.isHide;
12378
13271
  }
12379
13272
 
12380
- /**
12381
- * @fileoverview added by tsickle
12382
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12383
- */
12384
- // 控件列表
12385
- var
12386
- // 控件列表
12387
- Filter = /** @class */ (function () {
12388
- function Filter() {
12389
- // 输入框提示文案
12390
- this.value = null; // 值 不传默认为null
12391
- // 控件为Select时,选项列表
12392
- this.inputNumber = new InputNumber(); // number组件的min、max、step
12393
- // date-picker组件不可选择的日期
12394
- this.showTime = false; // 日期选择器是否包含时间
12395
- // 日期选择器是否包含时间
12396
- this.require = false; // 是否必填
12397
- }
12398
- return Filter;
12399
- }());
12400
- if (false) {
12401
- /** @type {?} */
12402
- Filter.prototype.type;
12403
- /** @type {?} */
12404
- Filter.prototype.label;
12405
- /** @type {?} */
12406
- Filter.prototype.name;
12407
- /** @type {?} */
12408
- Filter.prototype.placeholder;
12409
- /** @type {?} */
12410
- Filter.prototype.value;
12411
- /** @type {?} */
12412
- Filter.prototype.show;
12413
- /** @type {?} */
12414
- Filter.prototype.selectOption;
12415
- /** @type {?} */
12416
- Filter.prototype.inputNumber;
12417
- /** @type {?} */
12418
- Filter.prototype.onSearchEvent;
12419
- /** @type {?} */
12420
- Filter.prototype.onChangeEvent;
12421
- /** @type {?} */
12422
- Filter.prototype.onBlurEvent;
12423
- /** @type {?} */
12424
- Filter.prototype.hdDisabledDate;
12425
- /** @type {?} */
12426
- Filter.prototype.showTime;
12427
- /** @type {?} */
12428
- Filter.prototype.require;
12429
- /**
12430
- * 是否允许清空当前筛选项(Input 清空按钮、Select/Date/Cascader 等清空图标)。
12431
- * 不传默认 true;Select 未配此项时仍可回退到 selectOption.hdAllowClear
12432
- * @type {?}
12433
- */
12434
- Filter.prototype.hdAllowClear;
12435
- /** @type {?} */
12436
- Filter.prototype.cascaderOption;
12437
- /** @type {?} */
12438
- Filter.prototype.onChangeEventDebounceTime;
12439
- /** @type {?} */
12440
- Filter.prototype.onSearchEventEventDebounceTime;
12441
- }
12442
- /** @enum {number} */
12443
- var FilterListType = {
12444
- Input: 0,
12445
- Select: 1,
12446
- Date: 2,
12447
- DateRange: 3,
12448
- MultipleSelect: 4,
12449
- Cascader: 5,
12450
- Month: 6,
12451
- InputNumber: 7 // 数字输入
12452
- ,
12453
- };
12454
- FilterListType[FilterListType.Input] = 'Input';
12455
- FilterListType[FilterListType.Select] = 'Select';
12456
- FilterListType[FilterListType.Date] = 'Date';
12457
- FilterListType[FilterListType.DateRange] = 'DateRange';
12458
- FilterListType[FilterListType.MultipleSelect] = 'MultipleSelect';
12459
- FilterListType[FilterListType.Cascader] = 'Cascader';
12460
- FilterListType[FilterListType.Month] = 'Month';
12461
- FilterListType[FilterListType.InputNumber] = 'InputNumber';
12462
- var HdFilterService = /** @class */ (function () {
12463
- function HdFilterService() {
12464
- }
12465
- HdFilterService.decorators = [
12466
- { type: Injectable, args: [{
12467
- providedIn: 'root'
12468
- },] }
12469
- ];
12470
- /** @nocollapse */
12471
- HdFilterService.ctorParameters = function () { return []; };
12472
- /** @nocollapse */ HdFilterService.ngInjectableDef = ɵɵdefineInjectable({ factory: function HdFilterService_Factory() { return new HdFilterService(); }, token: HdFilterService, providedIn: "root" });
12473
- return HdFilterService;
12474
- }());
12475
-
12476
13273
  /**
12477
13274
  * @fileoverview added by tsickle
12478
13275
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -12801,5 +13598,5 @@ var Utils = {
12801
13598
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12802
13599
  */
12803
13600
 
12804
- export { ButtonSize, ButtonType, CascaderOption, CheckboxOption, ColWidth, ColorOption, ExplainOption, FantasyNgzorroModule, Filter, FilterListType, FormItem, FormLine, FormLineType, FormLinesCacheOption, FormListType, HD_CASCADER_MENU_CLASS, HdAccessoryFile, HdAccessoryGroup, HdAccessoryListComponent, HdButtonService, HdCurrentTableComponent, HdDetailFormFieldType, HdDetailFormService, HdFilterService, HdFormLinesService, HdFormService, HdLogComponent, HdLogService, HdOption, HdOverlayCleanupService, HdTableColumn, HdTableTotalOption, InputNumber, OperateBtn, Page, RadioOption, SelectOption, SelectOptionTableColumn, SelectOptionTableColumnIcon, StaticConst, TableCacheOption, TableColumn, TableTotalOption, TotalOption, TreeGrid, Utils, ValidatorKey, cascaderPinyinFilter, getCascaderMenuClassName, getCascaderMenuStyle, getCascaderShowSearch, HdComponentModule as ɵa, HdButtonModule as ɵb, HdTableComponent as ɵba, HdTableCellPipe as ɵbb, HdTipModule as ɵbc, HdTipComponent as ɵbd, HdAccessoryListModule as ɵbe, HdPopconfirmModule as ɵbf, HdPopconfirmComponent as ɵbg, HdLogModule as ɵbh, HdButtonComponent as ɵc, HdButtonGroupModule as ɵd, HdButtonGroupComponent as ɵe, HdDetailFormModule as ɵf, HdDetailFormComponent as ɵg, HdDetailLinesModule as ɵh, HdSpaceModule as ɵi, HdSpaceComponent as ɵj, HdDetailLinesComponent as ɵk, HdDetailLinesPageModule as ɵl, HdDetailLinesPageComponent as ɵm, HdDetailTipModule as ɵn, HdDetailTipComponent as ɵo, HdFilterModule as ɵp, HdFilterComponent as ɵq, HdFormModule as ɵr, HdFormComponent as ɵs, HdFormLinesModule as ɵt, HdFormLinesComponent as ɵu, CommonSessionService as ɵv, HdStatusModule as ɵw, HdStatusComponent as ɵx, HdCurrentTableModule as ɵy, HdTableModule as ɵz };
13601
+ export { ButtonSize, ButtonType, CascaderOption, CheckboxOption, ColWidth, ColorOption, ExplainOption, FantasyNgzorroModule, Filter, FilterListType, FormItem, FormLine, FormLineType, FormLinesCacheOption, FormListType, HD_CASCADER_MENU_CLASS, HD_FILTER_DEFAULT_SCHEME_NAME, HD_FILTER_SCHEME_STORE, HdAccessoryFile, HdAccessoryGroup, HdAccessoryListComponent, HdButtonService, HdCurrentTableComponent, HdDetailFormFieldType, HdDetailFormService, HdFilterScheme, HdFilterSchemeStore, HdFilterService, HdFormLinesService, HdFormService, HdLogComponent, HdLogService, HdOption, HdOverlayCleanupService, HdTableColumn, HdTableTotalOption, InputNumber, OperateBtn, Page, RadioOption, SelectOption, SelectOptionTableColumn, SelectOptionTableColumnIcon, StaticConst, TableCacheOption, TableColumn, TableTotalOption, TotalOption, TreeGrid, Utils, ValidatorKey, cascaderPinyinFilter, getCascaderMenuClassName, getCascaderMenuStyle, getCascaderShowSearch, HdComponentModule as ɵa, HdButtonModule as ɵb, HdTableComponent as ɵba, HdTableCellPipe as ɵbb, HdTipModule as ɵbc, HdTipComponent as ɵbd, HdAccessoryListModule as ɵbe, HdPopconfirmModule as ɵbf, HdPopconfirmComponent as ɵbg, HdLogModule as ɵbh, HdButtonComponent as ɵc, HdButtonGroupModule as ɵd, HdButtonGroupComponent as ɵe, HdDetailFormModule as ɵf, HdDetailFormComponent as ɵg, HdDetailLinesModule as ɵh, HdSpaceModule as ɵi, HdSpaceComponent as ɵj, HdDetailLinesComponent as ɵk, HdDetailLinesPageModule as ɵl, HdDetailLinesPageComponent as ɵm, HdDetailTipModule as ɵn, HdDetailTipComponent as ɵo, HdFilterModule as ɵp, HdFilterComponent as ɵq, HdFormModule as ɵr, HdFormComponent as ɵs, HdFormLinesModule as ɵt, HdFormLinesComponent as ɵu, CommonSessionService as ɵv, HdStatusModule as ɵw, HdStatusComponent as ɵx, HdCurrentTableModule as ɵy, HdTableModule as ɵz };
12805
13602
  //# sourceMappingURL=fantasy-ngzorro.js.map