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.
@@ -3533,6 +3533,102 @@
3533
3533
  return HdDetailTipModule;
3534
3534
  }());
3535
3535
 
3536
+ /**
3537
+ * @fileoverview added by tsickle
3538
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3539
+ */
3540
+ // 控件列表
3541
+ var
3542
+ // 控件列表
3543
+ Filter = /** @class */ (function () {
3544
+ function Filter() {
3545
+ // 输入框提示文案
3546
+ this.value = null; // 值 不传默认为null
3547
+ // 控件为Select时,选项列表
3548
+ this.inputNumber = new InputNumber(); // number组件的min、max、step
3549
+ // date-picker组件不可选择的日期
3550
+ this.showTime = false; // 日期选择器是否包含时间
3551
+ // 日期选择器是否包含时间
3552
+ this.require = false; // 是否必填
3553
+ }
3554
+ return Filter;
3555
+ }());
3556
+ if (false) {
3557
+ /** @type {?} */
3558
+ Filter.prototype.type;
3559
+ /** @type {?} */
3560
+ Filter.prototype.label;
3561
+ /** @type {?} */
3562
+ Filter.prototype.name;
3563
+ /** @type {?} */
3564
+ Filter.prototype.placeholder;
3565
+ /** @type {?} */
3566
+ Filter.prototype.value;
3567
+ /** @type {?} */
3568
+ Filter.prototype.show;
3569
+ /** @type {?} */
3570
+ Filter.prototype.selectOption;
3571
+ /** @type {?} */
3572
+ Filter.prototype.inputNumber;
3573
+ /** @type {?} */
3574
+ Filter.prototype.onSearchEvent;
3575
+ /** @type {?} */
3576
+ Filter.prototype.onChangeEvent;
3577
+ /** @type {?} */
3578
+ Filter.prototype.onBlurEvent;
3579
+ /** @type {?} */
3580
+ Filter.prototype.hdDisabledDate;
3581
+ /** @type {?} */
3582
+ Filter.prototype.showTime;
3583
+ /** @type {?} */
3584
+ Filter.prototype.require;
3585
+ /**
3586
+ * 是否允许清空当前筛选项(Input 清空按钮、Select/Date/Cascader 等清空图标)。
3587
+ * 不传默认 true;Select 未配此项时仍可回退到 selectOption.hdAllowClear
3588
+ * @type {?}
3589
+ */
3590
+ Filter.prototype.hdAllowClear;
3591
+ /** @type {?} */
3592
+ Filter.prototype.cascaderOption;
3593
+ /** @type {?} */
3594
+ Filter.prototype.onChangeEventDebounceTime;
3595
+ /** @type {?} */
3596
+ Filter.prototype.onSearchEventEventDebounceTime;
3597
+ }
3598
+ /** @enum {number} */
3599
+ var FilterListType = {
3600
+ Input: 0,
3601
+ Select: 1,
3602
+ Date: 2,
3603
+ DateRange: 3,
3604
+ MultipleSelect: 4,
3605
+ Cascader: 5,
3606
+ Month: 6,
3607
+ InputNumber: 7 // 数字输入
3608
+ ,
3609
+ };
3610
+ FilterListType[FilterListType.Input] = 'Input';
3611
+ FilterListType[FilterListType.Select] = 'Select';
3612
+ FilterListType[FilterListType.Date] = 'Date';
3613
+ FilterListType[FilterListType.DateRange] = 'DateRange';
3614
+ FilterListType[FilterListType.MultipleSelect] = 'MultipleSelect';
3615
+ FilterListType[FilterListType.Cascader] = 'Cascader';
3616
+ FilterListType[FilterListType.Month] = 'Month';
3617
+ FilterListType[FilterListType.InputNumber] = 'InputNumber';
3618
+ var HdFilterService = /** @class */ (function () {
3619
+ function HdFilterService() {
3620
+ }
3621
+ HdFilterService.decorators = [
3622
+ { type: core.Injectable, args: [{
3623
+ providedIn: 'root'
3624
+ },] }
3625
+ ];
3626
+ /** @nocollapse */
3627
+ HdFilterService.ctorParameters = function () { return []; };
3628
+ /** @nocollapse */ HdFilterService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function HdFilterService_Factory() { return new HdFilterService(); }, token: HdFilterService, providedIn: "root" });
3629
+ return HdFilterService;
3630
+ }());
3631
+
3536
3632
  /**
3537
3633
  * @fileoverview added by tsickle
3538
3634
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -3649,21 +3745,111 @@
3649
3745
  return Object.keys(style).length ? style : null;
3650
3746
  }
3651
3747
 
3748
+ /**
3749
+ * @fileoverview added by tsickle
3750
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3751
+ */
3752
+ /**
3753
+ * 用户筛选条件模版(与 auth UserFilterScheme 对齐)
3754
+ */
3755
+ var /**
3756
+ * 用户筛选条件模版(与 auth UserFilterScheme 对齐)
3757
+ */
3758
+ HdFilterScheme = /** @class */ (function () {
3759
+ function HdFilterScheme() {
3760
+ }
3761
+ return HdFilterScheme;
3762
+ }());
3763
+ if (false) {
3764
+ /** @type {?} */
3765
+ HdFilterScheme.prototype.uuid;
3766
+ /** @type {?} */
3767
+ HdFilterScheme.prototype.userCode;
3768
+ /** @type {?} */
3769
+ HdFilterScheme.prototype.filterKey;
3770
+ /** @type {?} */
3771
+ HdFilterScheme.prototype.templateName;
3772
+ /** @type {?} */
3773
+ HdFilterScheme.prototype.filterValue;
3774
+ }
3775
+ /**
3776
+ * 内置默认模版名
3777
+ * @type {?}
3778
+ */
3779
+ var HD_FILTER_DEFAULT_SCHEME_NAME = '默认条件';
3780
+ /**
3781
+ * 业务仓实现并 provide,hd-filter 在 enableFilterScheme 时注入使用。
3782
+ * 不提供则开启开关也不会调接口。
3783
+ * @abstract
3784
+ */
3785
+ var /**
3786
+ * 业务仓实现并 provide,hd-filter 在 enableFilterScheme 时注入使用。
3787
+ * 不提供则开启开关也不会调接口。
3788
+ * @abstract
3789
+ */
3790
+ HdFilterSchemeStore = /** @class */ (function () {
3791
+ function HdFilterSchemeStore() {
3792
+ }
3793
+ return HdFilterSchemeStore;
3794
+ }());
3795
+ if (false) {
3796
+ /**
3797
+ * @abstract
3798
+ * @param {?} filterKey
3799
+ * @return {?}
3800
+ */
3801
+ HdFilterSchemeStore.prototype.queryByFilterKey = function (filterKey) { };
3802
+ /**
3803
+ * @abstract
3804
+ * @param {?} scheme
3805
+ * @return {?}
3806
+ */
3807
+ HdFilterSchemeStore.prototype.save = function (scheme) { };
3808
+ /**
3809
+ * @abstract
3810
+ * @param {?} uuid
3811
+ * @return {?}
3812
+ */
3813
+ HdFilterSchemeStore.prototype.delete = function (uuid) { };
3814
+ }
3815
+ /** @type {?} */
3816
+ var HD_FILTER_SCHEME_STORE = new core.InjectionToken('HD_FILTER_SCHEME_STORE');
3817
+
3652
3818
  /**
3653
3819
  * @fileoverview added by tsickle
3654
3820
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3655
3821
  */
3656
3822
  var HdFilterComponent = /** @class */ (function () {
3657
- function HdFilterComponent(fb) {
3823
+ function HdFilterComponent(fb, schemeStore) {
3658
3824
  var _this = this;
3659
3825
  this.fb = fb;
3826
+ this.schemeStore = schemeStore;
3827
+ /**
3828
+ * 是否启用筛选组(默认关闭)
3829
+ */
3830
+ this.enableFilterScheme = false;
3660
3831
  this.searchEvent = new core.EventEmitter();
3661
3832
  this.resetEvent = new core.EventEmitter();
3662
3833
  this.isShowMore = true;
3663
- // 对filterList取模运算
3664
3834
  this.filterListModular = 0;
3665
3835
  this.searchSubject = new rxjs.Subject();
3666
- this.debounceTimeout = 0; // 默认防抖时间
3836
+ this.debounceTimeout = 0;
3837
+ /**
3838
+ * 页面配置的初始值(虚拟「默认条件」)
3839
+ */
3840
+ this.defaultFilterValues = {};
3841
+ this.defaultValuesCaptured = false;
3842
+ this.schemeList = [];
3843
+ this.currentScheme = null;
3844
+ this.currentSchemeName = HD_FILTER_DEFAULT_SCHEME_NAME;
3845
+ this.schemeLoading = false;
3846
+ this.schemeSaving = false;
3847
+ this.switchModalVisible = false;
3848
+ this.switchKeyword = '';
3849
+ this.switchSelectedUuid = null;
3850
+ this.saveAsModalVisible = false;
3851
+ this.saveAsName = '';
3852
+ this.defaultSchemeName = HD_FILTER_DEFAULT_SCHEME_NAME;
3667
3853
  this.getCascaderShowSearch = getCascaderShowSearch;
3668
3854
  this.getCascaderMenuClassName = getCascaderMenuClassName;
3669
3855
  this.getCascaderMenuStyle = getCascaderMenuStyle;
@@ -3684,16 +3870,72 @@
3684
3870
  */
3685
3871
  function () {
3686
3872
  this.init();
3873
+ this.tryLoadSchemes(true);
3687
3874
  };
3688
3875
  /**
3876
+ * @param {?} changes
3689
3877
  * @return {?}
3690
3878
  */
3691
3879
  HdFilterComponent.prototype.ngOnChanges = /**
3880
+ * @param {?} changes
3881
+ * @return {?}
3882
+ */
3883
+ function (changes) {
3884
+ if (changes['filterList']) {
3885
+ this.init();
3886
+ }
3887
+ if (changes['enableFilterScheme'] || changes['filterSchemeKey']) {
3888
+ this.tryLoadSchemes(true);
3889
+ }
3890
+ };
3891
+ /**
3892
+ * @return {?}
3893
+ */
3894
+ HdFilterComponent.prototype.ngOnDestroy = /**
3692
3895
  * @return {?}
3693
3896
  */
3694
3897
  function () {
3695
- this.init();
3898
+ if (this.searchSubscription) {
3899
+ this.searchSubscription.unsubscribe();
3900
+ }
3901
+ if (this.schemeLoadSub) {
3902
+ this.schemeLoadSub.unsubscribe();
3903
+ }
3904
+ if (this.schemeActionSub) {
3905
+ this.schemeActionSub.unsubscribe();
3906
+ }
3696
3907
  };
3908
+ Object.defineProperty(HdFilterComponent.prototype, "canUseScheme", {
3909
+ get: /**
3910
+ * @return {?}
3911
+ */
3912
+ function () {
3913
+ return !!(this.enableFilterScheme && this.filterSchemeKey && this.schemeStore);
3914
+ },
3915
+ enumerable: true,
3916
+ configurable: true
3917
+ });
3918
+ Object.defineProperty(HdFilterComponent.prototype, "filteredSwitchList", {
3919
+ get: /**
3920
+ * @return {?}
3921
+ */
3922
+ function () {
3923
+ /** @type {?} */
3924
+ var list = this.getDisplaySchemeList();
3925
+ /** @type {?} */
3926
+ var kw = (this.switchKeyword || '').trim();
3927
+ if (!kw) {
3928
+ return list;
3929
+ }
3930
+ return list.filter((/**
3931
+ * @param {?} item
3932
+ * @return {?}
3933
+ */
3934
+ function (item) { return (item.templateName || '').indexOf(kw) >= 0; }));
3935
+ },
3936
+ enumerable: true,
3937
+ configurable: true
3938
+ });
3697
3939
  /**
3698
3940
  * @private
3699
3941
  * @return {?}
@@ -3705,12 +3947,13 @@
3705
3947
  function () {
3706
3948
  var _this = this;
3707
3949
  this.isShowMore = true;
3708
- // 异常捕获
3709
3950
  if (!this.checkList(this.filterList)) {
3710
3951
  throw 'filter组件数据格式不规范';
3711
3952
  }
3953
+ if (!this.filterList) {
3954
+ this.filterList = [];
3955
+ }
3712
3956
  this.filterListModular = this.filterList.length % 4;
3713
- // 首先根据定义的组件数组 去初始化表单
3714
3957
  /** @type {?} */
3715
3958
  var formGroupList = {};
3716
3959
  this.filterList.forEach((/**
@@ -3720,10 +3963,13 @@
3720
3963
  */
3721
3964
  function (item, index) {
3722
3965
  formGroupList[item.name] = _this.fb.control(item.value, []);
3723
- // 初始化控件显影
3724
3966
  item.show = index < 7;
3725
3967
  }));
3726
3968
  this.validateFilterForm = this.fb.group(formGroupList);
3969
+ if (!this.defaultValuesCaptured) {
3970
+ this.defaultFilterValues = this.clonePlain(this.getFilterData());
3971
+ this.defaultValuesCaptured = true;
3972
+ }
3727
3973
  this.filterList.forEach((/**
3728
3974
  * @param {?} item
3729
3975
  * @return {?}
@@ -3766,13 +4012,10 @@
3766
4012
  function (fn, event, onSearchEventDebounceTime, selectOption) {
3767
4013
  var _this = this;
3768
4014
  if (onSearchEventDebounceTime) {
3769
- // 更新防抖时间
3770
4015
  this.debounceTimeout = onSearchEventDebounceTime;
3771
- // 取消之前的订阅
3772
4016
  if (this.searchSubscription) {
3773
4017
  this.searchSubscription.unsubscribe();
3774
4018
  }
3775
- // 创建新的订阅
3776
4019
  this.searchSubscription = this.searchSubject.pipe(operators.debounceTime(this.debounceTimeout)).subscribe((/**
3777
4020
  * @param {?} __0
3778
4021
  * @return {?}
@@ -3781,7 +4024,6 @@
3781
4024
  var fn = _a.fn, event = _a.event, selectOption = _a.selectOption;
3782
4025
  return _this.triggerEvent(fn, event, selectOption);
3783
4026
  }));
3784
- // 发送事件
3785
4027
  this.searchSubject.next({ fn: fn, event: event, selectOption: selectOption });
3786
4028
  }
3787
4029
  else {
@@ -3818,7 +4060,6 @@
3818
4060
  * @return {?}
3819
4061
  */
3820
4062
  function () {
3821
- // 特殊处理下等于4个选项的情况
3822
4063
  if (this.filterList.length === 4) {
3823
4064
  return 18;
3824
4065
  }
@@ -3845,157 +4086,761 @@
3845
4086
  * @return {?}
3846
4087
  */
3847
4088
  function (item) {
3848
- // 校验单项选择器
3849
- // if (item.type === FilterListType.Select && (!item.selectOption.selectList || (item.selectOption.selectList && item.selectOption.selectList.length === 0))) {
3850
- // throw 'filter组件数据格式不规范,存在单项选择器没有传入选项!'
3851
- // }
3852
4089
  nameList.push(item.name);
3853
4090
  }));
3854
- // 校验name是否重复
3855
4091
  if (__spread(new Set(nameList)).length !== list.length) {
3856
4092
  throw 'filter组件数据格式不规范,存在重复name值!';
3857
4093
  }
3858
- // ...more check
3859
4094
  return true;
3860
4095
  };
3861
4096
  /**
3862
4097
  * @return {?}
3863
4098
  */
3864
- HdFilterComponent.prototype.submitForm = /**
4099
+ HdFilterComponent.prototype.submitForm = /**
4100
+ * @return {?}
4101
+ */
4102
+ function () {
4103
+ this.searchEvent.emit(this.validateFilterForm.getRawValue());
4104
+ };
4105
+ /**
4106
+ * @return {?}
4107
+ */
4108
+ HdFilterComponent.prototype.resetForm = /**
4109
+ * @return {?}
4110
+ */
4111
+ function () {
4112
+ this.resetFilterFormWithValue();
4113
+ if (this.resetEvent.observers.length > 0) {
4114
+ this.resetEvent.emit(this.validateFilterForm.getRawValue());
4115
+ }
4116
+ else {
4117
+ this.searchEvent.emit(this.validateFilterForm.getRawValue());
4118
+ }
4119
+ };
4120
+ /**
4121
+ * @return {?}
4122
+ */
4123
+ HdFilterComponent.prototype.resetFilterFormWithValue = /**
4124
+ * @return {?}
4125
+ */
4126
+ function () {
4127
+ /** @type {?} */
4128
+ var resetValue = {};
4129
+ this.filterList.forEach((/**
4130
+ * @param {?} item
4131
+ * @return {?}
4132
+ */
4133
+ function (item) {
4134
+ resetValue[item.name] = item.value;
4135
+ }));
4136
+ this.validateFilterForm.patchValue(resetValue);
4137
+ };
4138
+ /**
4139
+ * @return {?}
4140
+ */
4141
+ HdFilterComponent.prototype.getFilterData = /**
4142
+ * @return {?}
4143
+ */
4144
+ function () {
4145
+ return this.validateFilterForm.getRawValue();
4146
+ };
4147
+ /**
4148
+ * @return {?}
4149
+ */
4150
+ HdFilterComponent.prototype.showMore = /**
4151
+ * @return {?}
4152
+ */
4153
+ function () {
4154
+ var _this = this;
4155
+ this.isShowMore = !this.isShowMore;
4156
+ this.filterList.forEach((/**
4157
+ * @param {?} item
4158
+ * @param {?} index
4159
+ * @return {?}
4160
+ */
4161
+ function (item, index) {
4162
+ item.show = _this.isShowMore ? index < 7 : true;
4163
+ }));
4164
+ };
4165
+ /**
4166
+ * @param {?} filter
4167
+ * @return {?}
4168
+ */
4169
+ HdFilterComponent.prototype.inputClean = /**
4170
+ * @param {?} filter
4171
+ * @return {?}
4172
+ */
4173
+ function (filter) {
4174
+ /** @type {?} */
4175
+ var patchObject = {};
4176
+ patchObject[filter.name] = null;
4177
+ this.validateFilterForm.patchValue(patchObject);
4178
+ };
4179
+ /**
4180
+ * @param {?} item
4181
+ * @return {?}
4182
+ */
4183
+ HdFilterComponent.prototype.isAllowClear = /**
4184
+ * @param {?} item
4185
+ * @return {?}
4186
+ */
4187
+ function (item) {
4188
+ if (!item) {
4189
+ return true;
4190
+ }
4191
+ if (item.hdAllowClear != null) {
4192
+ return !!item.hdAllowClear;
4193
+ }
4194
+ if (item.selectOption && item.selectOption.hdAllowClear != null) {
4195
+ return !!item.selectOption.hdAllowClear;
4196
+ }
4197
+ return true;
4198
+ };
4199
+ // ---------- 筛选组 ----------
4200
+ // ---------- 筛选组 ----------
4201
+ /**
4202
+ * @private
4203
+ * @param {?} applyDefault
4204
+ * @return {?}
4205
+ */
4206
+ HdFilterComponent.prototype.tryLoadSchemes =
4207
+ // ---------- 筛选组 ----------
4208
+ /**
4209
+ * @private
4210
+ * @param {?} applyDefault
4211
+ * @return {?}
4212
+ */
4213
+ function (applyDefault) {
4214
+ var _this = this;
4215
+ if (!this.canUseScheme) {
4216
+ this.schemeList = [];
4217
+ this.currentScheme = null;
4218
+ this.currentSchemeName = HD_FILTER_DEFAULT_SCHEME_NAME;
4219
+ return;
4220
+ }
4221
+ this.schemeLoading = true;
4222
+ if (this.schemeLoadSub) {
4223
+ this.schemeLoadSub.unsubscribe();
4224
+ }
4225
+ this.schemeLoadSub = this.schemeStore.queryByFilterKey(this.filterSchemeKey).subscribe((/**
4226
+ * @param {?} list
4227
+ * @return {?}
4228
+ */
4229
+ function (list) {
4230
+ _this.schemeLoading = false;
4231
+ _this.schemeList = list || [];
4232
+ if (applyDefault) {
4233
+ _this.applySchemeByName(HD_FILTER_DEFAULT_SCHEME_NAME, true);
4234
+ }
4235
+ else if (_this.currentScheme && _this.currentScheme.uuid) {
4236
+ /** @type {?} */
4237
+ var found = _this.schemeList.find((/**
4238
+ * @param {?} s
4239
+ * @return {?}
4240
+ */
4241
+ function (s) { return s.uuid === _this.currentScheme.uuid; }));
4242
+ _this.currentScheme = found || null;
4243
+ _this.currentSchemeName = found ? found.templateName : HD_FILTER_DEFAULT_SCHEME_NAME;
4244
+ }
4245
+ }), (/**
4246
+ * @param {?} err
4247
+ * @return {?}
4248
+ */
4249
+ function (err) {
4250
+ _this.schemeLoading = false;
4251
+ _this.showError('加载筛选模版失败:' + (err || ''));
4252
+ if (applyDefault) {
4253
+ _this.applySchemeByName(HD_FILTER_DEFAULT_SCHEME_NAME, true);
4254
+ }
4255
+ }));
4256
+ };
4257
+ /** 展示用列表:保证有「默认条件」 */
4258
+ /**
4259
+ * 展示用列表:保证有「默认条件」
4260
+ * @return {?}
4261
+ */
4262
+ HdFilterComponent.prototype.getDisplaySchemeList = /**
4263
+ * 展示用列表:保证有「默认条件」
4264
+ * @return {?}
4265
+ */
4266
+ function () {
4267
+ /** @type {?} */
4268
+ var result = [];
4269
+ /** @type {?} */
4270
+ var fromDb = this.schemeList.find((/**
4271
+ * @param {?} s
4272
+ * @return {?}
4273
+ */
4274
+ function (s) { return s.templateName === HD_FILTER_DEFAULT_SCHEME_NAME; }));
4275
+ if (fromDb) {
4276
+ result.push(fromDb);
4277
+ }
4278
+ else {
4279
+ result.push({
4280
+ filterKey: this.filterSchemeKey,
4281
+ templateName: HD_FILTER_DEFAULT_SCHEME_NAME,
4282
+ filterValue: JSON.stringify(this.defaultFilterValues || {})
4283
+ });
4284
+ }
4285
+ (this.schemeList || []).forEach((/**
4286
+ * @param {?} s
4287
+ * @return {?}
4288
+ */
4289
+ function (s) {
4290
+ if (s.templateName !== HD_FILTER_DEFAULT_SCHEME_NAME) {
4291
+ result.push(s);
4292
+ }
4293
+ }));
4294
+ return result;
4295
+ };
4296
+ /**
4297
+ * @return {?}
4298
+ */
4299
+ HdFilterComponent.prototype.openSwitchModal = /**
4300
+ * @return {?}
4301
+ */
4302
+ function () {
4303
+ if (!this.canUseScheme) {
4304
+ return;
4305
+ }
4306
+ this.switchKeyword = '';
4307
+ this.switchSelectedUuid = this.currentScheme && this.currentScheme.uuid
4308
+ ? this.currentScheme.uuid
4309
+ : null;
4310
+ // 虚拟默认条件:uuid 为空时用空串标记
4311
+ if (!this.currentScheme || !this.currentScheme.uuid) {
4312
+ if (this.currentSchemeName === HD_FILTER_DEFAULT_SCHEME_NAME) {
4313
+ this.switchSelectedUuid = '';
4314
+ }
4315
+ }
4316
+ this.switchModalVisible = true;
4317
+ };
4318
+ /**
4319
+ * @return {?}
4320
+ */
4321
+ HdFilterComponent.prototype.closeSwitchModal = /**
4322
+ * @return {?}
4323
+ */
4324
+ function () {
4325
+ this.switchModalVisible = false;
4326
+ };
4327
+ /**
4328
+ * @param {?} item
4329
+ * @return {?}
4330
+ */
4331
+ HdFilterComponent.prototype.selectSwitchItem = /**
4332
+ * @param {?} item
4333
+ * @return {?}
4334
+ */
4335
+ function (item) {
4336
+ this.switchSelectedUuid = item.uuid ? item.uuid : '';
4337
+ };
4338
+ /**
4339
+ * @return {?}
4340
+ */
4341
+ HdFilterComponent.prototype.confirmSwitch = /**
4342
+ * @return {?}
4343
+ */
4344
+ function () {
4345
+ var _this = this;
4346
+ /** @type {?} */
4347
+ var list = this.getDisplaySchemeList();
4348
+ /** @type {?} */
4349
+ var target = null;
4350
+ if (this.switchSelectedUuid === '' || this.switchSelectedUuid == null) {
4351
+ target = list.find((/**
4352
+ * @param {?} s
4353
+ * @return {?}
4354
+ */
4355
+ function (s) { return s.templateName === HD_FILTER_DEFAULT_SCHEME_NAME && !s.uuid; }))
4356
+ || list.find((/**
4357
+ * @param {?} s
4358
+ * @return {?}
4359
+ */
4360
+ function (s) { return s.templateName === HD_FILTER_DEFAULT_SCHEME_NAME; }));
4361
+ }
4362
+ else {
4363
+ target = list.find((/**
4364
+ * @param {?} s
4365
+ * @return {?}
4366
+ */
4367
+ function (s) { return s.uuid === _this.switchSelectedUuid; }));
4368
+ }
4369
+ if (!target) {
4370
+ this.showError('请选择筛选模版');
4371
+ return;
4372
+ }
4373
+ this.applyScheme(target, true);
4374
+ this.switchModalVisible = false;
4375
+ };
4376
+ /**
4377
+ * @param {?} item
4378
+ * @return {?}
4379
+ */
4380
+ HdFilterComponent.prototype.isDefaultScheme = /**
4381
+ * @param {?} item
4382
+ * @return {?}
4383
+ */
4384
+ function (item) {
4385
+ return !!(item && item.templateName === HD_FILTER_DEFAULT_SCHEME_NAME);
4386
+ };
4387
+ /**
4388
+ * @return {?}
4389
+ */
4390
+ HdFilterComponent.prototype.canDeleteCurrent = /**
4391
+ * @return {?}
4392
+ */
4393
+ function () {
4394
+ return !!(this.currentScheme && this.currentScheme.uuid
4395
+ && this.currentScheme.templateName !== HD_FILTER_DEFAULT_SCHEME_NAME);
4396
+ };
4397
+ /**
4398
+ * @return {?}
4399
+ */
4400
+ HdFilterComponent.prototype.saveCurrentScheme = /**
4401
+ * @return {?}
4402
+ */
4403
+ function () {
4404
+ var _this = this;
4405
+ if (!this.canUseScheme) {
4406
+ return;
4407
+ }
4408
+ /** @type {?} */
4409
+ var name = this.currentSchemeName || HD_FILTER_DEFAULT_SCHEME_NAME;
4410
+ /** @type {?} */
4411
+ var body = {
4412
+ uuid: this.currentScheme && this.currentScheme.uuid ? this.currentScheme.uuid : null,
4413
+ filterKey: this.filterSchemeKey,
4414
+ templateName: name,
4415
+ filterValue: this.serializeFilterValue()
4416
+ };
4417
+ this.schemeSaving = true;
4418
+ if (this.schemeActionSub) {
4419
+ this.schemeActionSub.unsubscribe();
4420
+ }
4421
+ this.schemeActionSub = this.schemeStore.save(body).subscribe((/**
4422
+ * @param {?} saved
4423
+ * @return {?}
4424
+ */
4425
+ function (saved) {
4426
+ _this.schemeSaving = false;
4427
+ _this.showSuccess('保存成功');
4428
+ _this.currentScheme = saved;
4429
+ _this.currentSchemeName = saved.templateName;
4430
+ _this.refreshSchemeListKeepCurrent();
4431
+ }), (/**
4432
+ * @param {?} err
4433
+ * @return {?}
4434
+ */
4435
+ function (err) {
4436
+ _this.schemeSaving = false;
4437
+ _this.showError('保存失败:' + (err || ''));
4438
+ }));
4439
+ };
4440
+ /**
4441
+ * @return {?}
4442
+ */
4443
+ HdFilterComponent.prototype.openSaveAsModal = /**
4444
+ * @return {?}
4445
+ */
4446
+ function () {
4447
+ this.saveAsName = '';
4448
+ this.saveAsModalVisible = true;
4449
+ };
4450
+ /**
4451
+ * @return {?}
4452
+ */
4453
+ HdFilterComponent.prototype.closeSaveAsModal = /**
4454
+ * @return {?}
4455
+ */
4456
+ function () {
4457
+ this.saveAsModalVisible = false;
4458
+ };
4459
+ /**
4460
+ * @return {?}
4461
+ */
4462
+ HdFilterComponent.prototype.confirmSaveAs = /**
4463
+ * @return {?}
4464
+ */
4465
+ function () {
4466
+ var _this = this;
4467
+ /** @type {?} */
4468
+ var name = (this.saveAsName || '').trim();
4469
+ if (!name) {
4470
+ this.showError('请输入模版名称');
4471
+ return;
4472
+ }
4473
+ if (name === HD_FILTER_DEFAULT_SCHEME_NAME) {
4474
+ this.showError('不能使用「默认条件」作为模版名称,请使用「保存为当前」覆盖默认条件');
4475
+ return;
4476
+ }
4477
+ /** @type {?} */
4478
+ var exists = (this.schemeList || []).some((/**
4479
+ * @param {?} s
4480
+ * @return {?}
4481
+ */
4482
+ function (s) { return s.templateName === name; }));
4483
+ if (exists) {
4484
+ this.showError('模版名称已存在');
4485
+ return;
4486
+ }
4487
+ /** @type {?} */
4488
+ var body = {
4489
+ filterKey: this.filterSchemeKey,
4490
+ templateName: name,
4491
+ filterValue: this.serializeFilterValue()
4492
+ };
4493
+ this.schemeSaving = true;
4494
+ if (this.schemeActionSub) {
4495
+ this.schemeActionSub.unsubscribe();
4496
+ }
4497
+ this.schemeActionSub = this.schemeStore.save(body).subscribe((/**
4498
+ * @param {?} saved
4499
+ * @return {?}
4500
+ */
4501
+ function (saved) {
4502
+ _this.schemeSaving = false;
4503
+ _this.saveAsModalVisible = false;
4504
+ _this.showSuccess('另存为成功');
4505
+ _this.currentScheme = saved;
4506
+ _this.currentSchemeName = saved.templateName;
4507
+ _this.refreshSchemeListKeepCurrent();
4508
+ }), (/**
4509
+ * @param {?} err
4510
+ * @return {?}
4511
+ */
4512
+ function (err) {
4513
+ _this.schemeSaving = false;
4514
+ _this.showError('另存为失败:' + (err || ''));
4515
+ }));
4516
+ };
4517
+ /**
4518
+ * @return {?}
4519
+ */
4520
+ HdFilterComponent.prototype.deleteCurrentScheme = /**
4521
+ * @return {?}
4522
+ */
4523
+ function () {
4524
+ var _this = this;
4525
+ if (!this.canDeleteCurrent()) {
4526
+ return;
4527
+ }
4528
+ /** @type {?} */
4529
+ var uuid = this.currentScheme.uuid;
4530
+ this.schemeSaving = true;
4531
+ if (this.schemeActionSub) {
4532
+ this.schemeActionSub.unsubscribe();
4533
+ }
4534
+ this.schemeActionSub = this.schemeStore.delete(uuid).subscribe((/**
4535
+ * @return {?}
4536
+ */
4537
+ function () {
4538
+ _this.schemeSaving = false;
4539
+ _this.showSuccess('删除成功');
4540
+ _this.schemeList = (_this.schemeList || []).filter((/**
4541
+ * @param {?} s
4542
+ * @return {?}
4543
+ */
4544
+ function (s) { return s.uuid !== uuid; }));
4545
+ _this.applySchemeByName(HD_FILTER_DEFAULT_SCHEME_NAME, true);
4546
+ }), (/**
4547
+ * @param {?} err
4548
+ * @return {?}
4549
+ */
4550
+ function (err) {
4551
+ _this.schemeSaving = false;
4552
+ _this.showError('删除失败:' + (err || ''));
4553
+ }));
4554
+ };
4555
+ /**
4556
+ * @private
4557
+ * @return {?}
4558
+ */
4559
+ HdFilterComponent.prototype.refreshSchemeListKeepCurrent = /**
4560
+ * @private
4561
+ * @return {?}
4562
+ */
4563
+ function () {
4564
+ var _this = this;
4565
+ if (!this.canUseScheme) {
4566
+ return;
4567
+ }
4568
+ this.schemeStore.queryByFilterKey(this.filterSchemeKey).subscribe((/**
4569
+ * @param {?} list
4570
+ * @return {?}
4571
+ */
4572
+ function (list) {
4573
+ _this.schemeList = list || [];
4574
+ if (_this.currentScheme && _this.currentScheme.uuid) {
4575
+ /** @type {?} */
4576
+ var found = _this.schemeList.find((/**
4577
+ * @param {?} s
4578
+ * @return {?}
4579
+ */
4580
+ function (s) { return s.uuid === _this.currentScheme.uuid; }));
4581
+ if (found) {
4582
+ _this.currentScheme = found;
4583
+ _this.currentSchemeName = found.templateName;
4584
+ }
4585
+ }
4586
+ }), (/**
4587
+ * @return {?}
4588
+ */
4589
+ function () { }));
4590
+ };
4591
+ /**
4592
+ * @private
4593
+ * @param {?} name
4594
+ * @param {?} emitSearch
4595
+ * @return {?}
4596
+ */
4597
+ HdFilterComponent.prototype.applySchemeByName = /**
4598
+ * @private
4599
+ * @param {?} name
4600
+ * @param {?} emitSearch
3865
4601
  * @return {?}
3866
4602
  */
3867
- function () {
3868
- this.searchEvent.emit(this.validateFilterForm.getRawValue());
4603
+ function (name, emitSearch) {
4604
+ /** @type {?} */
4605
+ var list = this.getDisplaySchemeList();
4606
+ /** @type {?} */
4607
+ var target = list.find((/**
4608
+ * @param {?} s
4609
+ * @return {?}
4610
+ */
4611
+ function (s) { return s.templateName === name; }));
4612
+ if (target) {
4613
+ this.applyScheme(target, emitSearch);
4614
+ }
3869
4615
  };
3870
4616
  /**
4617
+ * @private
4618
+ * @param {?} scheme
4619
+ * @param {?} emitSearch
3871
4620
  * @return {?}
3872
4621
  */
3873
- HdFilterComponent.prototype.resetForm = /**
4622
+ HdFilterComponent.prototype.applyScheme = /**
4623
+ * @private
4624
+ * @param {?} scheme
4625
+ * @param {?} emitSearch
3874
4626
  * @return {?}
3875
4627
  */
3876
- function () {
3877
- this.resetFilterFormWithValue();
3878
- // this.validateFilterForm.reset();
3879
- if (this.resetEvent.observers.length > 0) {
3880
- // 如果有父组件绑定了 resetEvent 的处理器
3881
- this.resetEvent.emit(this.validateFilterForm.getRawValue());
4628
+ function (scheme, emitSearch) {
4629
+ this.currentScheme = scheme && scheme.uuid ? scheme : {
4630
+ filterKey: this.filterSchemeKey,
4631
+ templateName: scheme ? scheme.templateName : HD_FILTER_DEFAULT_SCHEME_NAME,
4632
+ filterValue: scheme ? scheme.filterValue : JSON.stringify(this.defaultFilterValues || {})
4633
+ };
4634
+ this.currentSchemeName = this.currentScheme.templateName || HD_FILTER_DEFAULT_SCHEME_NAME;
4635
+ /** @type {?} */
4636
+ var values = {};
4637
+ if (this.currentSchemeName === HD_FILTER_DEFAULT_SCHEME_NAME && !(scheme && scheme.uuid)) {
4638
+ values = this.clonePlain(this.defaultFilterValues || {});
3882
4639
  }
3883
4640
  else {
3884
- // 如果没有绑定处理器,则触发 searchEvent
3885
- this.searchEvent.emit(this.validateFilterForm.getRawValue());
4641
+ try {
4642
+ values = JSON.parse(scheme.filterValue || '{}');
4643
+ }
4644
+ catch (e) {
4645
+ values = {};
4646
+ }
4647
+ if (this.currentSchemeName === HD_FILTER_DEFAULT_SCHEME_NAME) {
4648
+ // 库中默认条件覆盖初始值:以默认值为底,再叠加库值
4649
+ values = Object.assign({}, this.defaultFilterValues || {}, values || {});
4650
+ }
4651
+ }
4652
+ this.patchFilterValues(values);
4653
+ if (emitSearch) {
4654
+ this.submitForm();
3886
4655
  }
3887
4656
  };
3888
4657
  /**
3889
- * 带初始值重置表单
4658
+ * @private
4659
+ * @return {?}
3890
4660
  */
4661
+ HdFilterComponent.prototype.serializeFilterValue = /**
4662
+ * @private
4663
+ * @return {?}
4664
+ */
4665
+ function () {
4666
+ return JSON.stringify(this.getFilterData() || {});
4667
+ };
3891
4668
  /**
3892
- * 带初始值重置表单
4669
+ * @private
4670
+ * @param {?} values
3893
4671
  * @return {?}
3894
4672
  */
3895
- HdFilterComponent.prototype.resetFilterFormWithValue = /**
3896
- * 带初始值重置表单
4673
+ HdFilterComponent.prototype.patchFilterValues = /**
4674
+ * @private
4675
+ * @param {?} values
3897
4676
  * @return {?}
3898
4677
  */
3899
- function () {
4678
+ function (values) {
4679
+ var _this = this;
4680
+ if (!this.validateFilterForm || !this.filterList) {
4681
+ return;
4682
+ }
3900
4683
  /** @type {?} */
3901
- var resetValue = {};
4684
+ var patch = {};
3902
4685
  this.filterList.forEach((/**
3903
4686
  * @param {?} item
3904
4687
  * @return {?}
3905
4688
  */
3906
4689
  function (item) {
3907
- resetValue[item.name] = item.value;
4690
+ if (values && Object.prototype.hasOwnProperty.call(values, item.name)) {
4691
+ patch[item.name] = _this.reviveFilterValue(item, values[item.name]);
4692
+ }
3908
4693
  }));
3909
- // 重置表单值(会触发valueChanges事件)
3910
- this.validateFilterForm.patchValue(resetValue);
4694
+ this.validateFilterForm.patchValue(patch);
3911
4695
  };
3912
4696
  /**
4697
+ * @private
4698
+ * @param {?} filter
4699
+ * @param {?} value
3913
4700
  * @return {?}
3914
4701
  */
3915
- HdFilterComponent.prototype.getFilterData = /**
4702
+ HdFilterComponent.prototype.reviveFilterValue = /**
4703
+ * @private
4704
+ * @param {?} filter
4705
+ * @param {?} value
3916
4706
  * @return {?}
3917
4707
  */
3918
- function () {
3919
- return this.validateFilterForm.getRawValue();
4708
+ function (filter, value) {
4709
+ var _this = this;
4710
+ if (value == null) {
4711
+ return value;
4712
+ }
4713
+ if (filter.type === FilterListType.DateRange) {
4714
+ if (Array.isArray(value)) {
4715
+ return value.map((/**
4716
+ * @param {?} v
4717
+ * @return {?}
4718
+ */
4719
+ function (v) { return _this.parseDateLike(v); }));
4720
+ }
4721
+ return value;
4722
+ }
4723
+ if (filter.type === FilterListType.Date || filter.type === FilterListType.Month) {
4724
+ return this.parseDateLike(value);
4725
+ }
4726
+ return value;
3920
4727
  };
3921
4728
  /**
4729
+ * @private
4730
+ * @param {?} value
3922
4731
  * @return {?}
3923
4732
  */
3924
- HdFilterComponent.prototype.showMore = /**
4733
+ HdFilterComponent.prototype.parseDateLike = /**
4734
+ * @private
4735
+ * @param {?} value
3925
4736
  * @return {?}
3926
4737
  */
3927
- function () {
3928
- var _this = this;
3929
- this.isShowMore = !this.isShowMore;
3930
- this.filterList.forEach((/**
3931
- * @param {?} item
3932
- * @param {?} index
3933
- * @return {?}
3934
- */
3935
- function (item, index) {
3936
- item.show = _this.isShowMore ? index < 7 : true;
3937
- }));
4738
+ function (value) {
4739
+ if (value == null || value instanceof Date) {
4740
+ return value;
4741
+ }
4742
+ if (typeof value === 'string' && /^\d{4}-\d{2}-\d{2}/.test(value)) {
4743
+ /** @type {?} */
4744
+ var d = new Date(value);
4745
+ return isNaN(d.getTime()) ? value : d;
4746
+ }
4747
+ if (typeof value === 'number') {
4748
+ /** @type {?} */
4749
+ var d = new Date(value);
4750
+ return isNaN(d.getTime()) ? value : d;
4751
+ }
4752
+ return value;
3938
4753
  };
3939
4754
  /**
3940
- * @param {?} filter
4755
+ * @private
4756
+ * @param {?} obj
3941
4757
  * @return {?}
3942
4758
  */
3943
- HdFilterComponent.prototype.inputClean = /**
3944
- * @param {?} filter
4759
+ HdFilterComponent.prototype.clonePlain = /**
4760
+ * @private
4761
+ * @param {?} obj
3945
4762
  * @return {?}
3946
4763
  */
3947
- function (filter) {
3948
- /** @type {?} */
3949
- var patchObject = {};
3950
- patchObject[filter.name] = null;
3951
- this.validateFilterForm.patchValue(patchObject);
4764
+ function (obj) {
4765
+ try {
4766
+ return JSON.parse(JSON.stringify(obj == null ? {} : obj));
4767
+ }
4768
+ catch (e) {
4769
+ return {};
4770
+ }
3952
4771
  };
3953
4772
  /**
3954
- * 是否允许清空:优先 Filter.hdAllowClear,其次 selectOption.hdAllowClear,默认 true
4773
+ * @private
4774
+ * @param {?} msg
4775
+ * @return {?}
4776
+ */
4777
+ HdFilterComponent.prototype.showSuccess = /**
4778
+ * @private
4779
+ * @param {?} msg
4780
+ * @return {?}
3955
4781
  */
4782
+ function (msg) {
4783
+ if (typeof window !== 'undefined' && ((/** @type {?} */ (window))).hdMessageService) {
4784
+ ((/** @type {?} */ (window))).hdMessageService.prototype.success(msg);
4785
+ }
4786
+ };
3956
4787
  /**
3957
- * 是否允许清空:优先 Filter.hdAllowClear,其次 selectOption.hdAllowClear,默认 true
3958
- * @param {?} item
4788
+ * @private
4789
+ * @param {?} msg
3959
4790
  * @return {?}
3960
4791
  */
3961
- HdFilterComponent.prototype.isAllowClear = /**
3962
- * 是否允许清空:优先 Filter.hdAllowClear,其次 selectOption.hdAllowClear,默认 true
3963
- * @param {?} item
4792
+ HdFilterComponent.prototype.showError = /**
4793
+ * @private
4794
+ * @param {?} msg
3964
4795
  * @return {?}
3965
4796
  */
3966
- function (item) {
3967
- if (!item) {
3968
- return true;
4797
+ function (msg) {
4798
+ if (typeof window !== 'undefined' && ((/** @type {?} */ (window))).hdMessageService) {
4799
+ ((/** @type {?} */ (window))).hdMessageService.prototype.error(msg);
3969
4800
  }
3970
- if (item.hdAllowClear != null) {
3971
- return !!item.hdAllowClear;
3972
- }
3973
- if (item.selectOption && item.selectOption.hdAllowClear != null) {
3974
- return !!item.selectOption.hdAllowClear;
4801
+ else {
4802
+ // eslint-disable-next-line no-console
4803
+ console.error(msg);
3975
4804
  }
3976
- return true;
3977
4805
  };
3978
4806
  HdFilterComponent.decorators = [
3979
4807
  { type: core.Component, args: [{
3980
4808
  selector: 'hd-filter',
3981
- 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",
3982
- 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}"]
4809
+ 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",
4810
+ 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}"]
3983
4811
  }] }
3984
4812
  ];
3985
4813
  /** @nocollapse */
3986
4814
  HdFilterComponent.ctorParameters = function () { return [
3987
- { type: forms.FormBuilder }
4815
+ { type: forms.FormBuilder },
4816
+ { type: HdFilterSchemeStore, decorators: [{ type: core.Optional }, { type: core.Inject, args: [HD_FILTER_SCHEME_STORE,] }] }
3988
4817
  ]; };
3989
4818
  HdFilterComponent.propDecorators = {
3990
4819
  filterList: [{ type: core.Input }],
4820
+ enableFilterScheme: [{ type: core.Input }],
4821
+ filterSchemeKey: [{ type: core.Input }],
3991
4822
  searchEvent: [{ type: core.Output }],
3992
4823
  resetEvent: [{ type: core.Output }]
3993
4824
  };
4825
+ __decorate([
4826
+ ngZorroAntd.InputBoolean(),
4827
+ __metadata("design:type", Object)
4828
+ ], HdFilterComponent.prototype, "enableFilterScheme", void 0);
3994
4829
  return HdFilterComponent;
3995
4830
  }());
3996
4831
  if (false) {
3997
4832
  /** @type {?} */
3998
4833
  HdFilterComponent.prototype.filterList;
4834
+ /**
4835
+ * 是否启用筛选组(默认关闭)
4836
+ * @type {?}
4837
+ */
4838
+ HdFilterComponent.prototype.enableFilterScheme;
4839
+ /**
4840
+ * 筛选器标识,开启筛选组时必传
4841
+ * @type {?}
4842
+ */
4843
+ HdFilterComponent.prototype.filterSchemeKey;
3999
4844
  /** @type {?} */
4000
4845
  HdFilterComponent.prototype.searchEvent;
4001
4846
  /** @type {?} */
@@ -4021,6 +4866,49 @@
4021
4866
  * @private
4022
4867
  */
4023
4868
  HdFilterComponent.prototype.searchSubscription;
4869
+ /**
4870
+ * @type {?}
4871
+ * @private
4872
+ */
4873
+ HdFilterComponent.prototype.schemeLoadSub;
4874
+ /**
4875
+ * @type {?}
4876
+ * @private
4877
+ */
4878
+ HdFilterComponent.prototype.schemeActionSub;
4879
+ /**
4880
+ * 页面配置的初始值(虚拟「默认条件」)
4881
+ * @type {?}
4882
+ * @private
4883
+ */
4884
+ HdFilterComponent.prototype.defaultFilterValues;
4885
+ /**
4886
+ * @type {?}
4887
+ * @private
4888
+ */
4889
+ HdFilterComponent.prototype.defaultValuesCaptured;
4890
+ /** @type {?} */
4891
+ HdFilterComponent.prototype.schemeList;
4892
+ /** @type {?} */
4893
+ HdFilterComponent.prototype.currentScheme;
4894
+ /** @type {?} */
4895
+ HdFilterComponent.prototype.currentSchemeName;
4896
+ /** @type {?} */
4897
+ HdFilterComponent.prototype.schemeLoading;
4898
+ /** @type {?} */
4899
+ HdFilterComponent.prototype.schemeSaving;
4900
+ /** @type {?} */
4901
+ HdFilterComponent.prototype.switchModalVisible;
4902
+ /** @type {?} */
4903
+ HdFilterComponent.prototype.switchKeyword;
4904
+ /** @type {?} */
4905
+ HdFilterComponent.prototype.switchSelectedUuid;
4906
+ /** @type {?} */
4907
+ HdFilterComponent.prototype.saveAsModalVisible;
4908
+ /** @type {?} */
4909
+ HdFilterComponent.prototype.saveAsName;
4910
+ /** @type {?} */
4911
+ HdFilterComponent.prototype.defaultSchemeName;
4024
4912
  /** @type {?} */
4025
4913
  HdFilterComponent.prototype.getCascaderShowSearch;
4026
4914
  /** @type {?} */
@@ -4032,6 +4920,11 @@
4032
4920
  * @private
4033
4921
  */
4034
4922
  HdFilterComponent.prototype.fb;
4923
+ /**
4924
+ * @type {?}
4925
+ * @private
4926
+ */
4927
+ HdFilterComponent.prototype.schemeStore;
4035
4928
  }
4036
4929
 
4037
4930
  /**
@@ -12581,102 +13474,6 @@
12581
13474
  TotalOption.prototype.isHide;
12582
13475
  }
12583
13476
 
12584
- /**
12585
- * @fileoverview added by tsickle
12586
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12587
- */
12588
- // 控件列表
12589
- var
12590
- // 控件列表
12591
- Filter = /** @class */ (function () {
12592
- function Filter() {
12593
- // 输入框提示文案
12594
- this.value = null; // 值 不传默认为null
12595
- // 控件为Select时,选项列表
12596
- this.inputNumber = new InputNumber(); // number组件的min、max、step
12597
- // date-picker组件不可选择的日期
12598
- this.showTime = false; // 日期选择器是否包含时间
12599
- // 日期选择器是否包含时间
12600
- this.require = false; // 是否必填
12601
- }
12602
- return Filter;
12603
- }());
12604
- if (false) {
12605
- /** @type {?} */
12606
- Filter.prototype.type;
12607
- /** @type {?} */
12608
- Filter.prototype.label;
12609
- /** @type {?} */
12610
- Filter.prototype.name;
12611
- /** @type {?} */
12612
- Filter.prototype.placeholder;
12613
- /** @type {?} */
12614
- Filter.prototype.value;
12615
- /** @type {?} */
12616
- Filter.prototype.show;
12617
- /** @type {?} */
12618
- Filter.prototype.selectOption;
12619
- /** @type {?} */
12620
- Filter.prototype.inputNumber;
12621
- /** @type {?} */
12622
- Filter.prototype.onSearchEvent;
12623
- /** @type {?} */
12624
- Filter.prototype.onChangeEvent;
12625
- /** @type {?} */
12626
- Filter.prototype.onBlurEvent;
12627
- /** @type {?} */
12628
- Filter.prototype.hdDisabledDate;
12629
- /** @type {?} */
12630
- Filter.prototype.showTime;
12631
- /** @type {?} */
12632
- Filter.prototype.require;
12633
- /**
12634
- * 是否允许清空当前筛选项(Input 清空按钮、Select/Date/Cascader 等清空图标)。
12635
- * 不传默认 true;Select 未配此项时仍可回退到 selectOption.hdAllowClear
12636
- * @type {?}
12637
- */
12638
- Filter.prototype.hdAllowClear;
12639
- /** @type {?} */
12640
- Filter.prototype.cascaderOption;
12641
- /** @type {?} */
12642
- Filter.prototype.onChangeEventDebounceTime;
12643
- /** @type {?} */
12644
- Filter.prototype.onSearchEventEventDebounceTime;
12645
- }
12646
- /** @enum {number} */
12647
- var FilterListType = {
12648
- Input: 0,
12649
- Select: 1,
12650
- Date: 2,
12651
- DateRange: 3,
12652
- MultipleSelect: 4,
12653
- Cascader: 5,
12654
- Month: 6,
12655
- InputNumber: 7 // 数字输入
12656
- ,
12657
- };
12658
- FilterListType[FilterListType.Input] = 'Input';
12659
- FilterListType[FilterListType.Select] = 'Select';
12660
- FilterListType[FilterListType.Date] = 'Date';
12661
- FilterListType[FilterListType.DateRange] = 'DateRange';
12662
- FilterListType[FilterListType.MultipleSelect] = 'MultipleSelect';
12663
- FilterListType[FilterListType.Cascader] = 'Cascader';
12664
- FilterListType[FilterListType.Month] = 'Month';
12665
- FilterListType[FilterListType.InputNumber] = 'InputNumber';
12666
- var HdFilterService = /** @class */ (function () {
12667
- function HdFilterService() {
12668
- }
12669
- HdFilterService.decorators = [
12670
- { type: core.Injectable, args: [{
12671
- providedIn: 'root'
12672
- },] }
12673
- ];
12674
- /** @nocollapse */
12675
- HdFilterService.ctorParameters = function () { return []; };
12676
- /** @nocollapse */ HdFilterService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function HdFilterService_Factory() { return new HdFilterService(); }, token: HdFilterService, providedIn: "root" });
12677
- return HdFilterService;
12678
- }());
12679
-
12680
13477
  /**
12681
13478
  * @fileoverview added by tsickle
12682
13479
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -13006,6 +13803,8 @@
13006
13803
  exports.FormLinesCacheOption = FormLinesCacheOption;
13007
13804
  exports.FormListType = FormListType;
13008
13805
  exports.HD_CASCADER_MENU_CLASS = HD_CASCADER_MENU_CLASS;
13806
+ exports.HD_FILTER_DEFAULT_SCHEME_NAME = HD_FILTER_DEFAULT_SCHEME_NAME;
13807
+ exports.HD_FILTER_SCHEME_STORE = HD_FILTER_SCHEME_STORE;
13009
13808
  exports.HdAccessoryFile = HdAccessoryFile;
13010
13809
  exports.HdAccessoryGroup = HdAccessoryGroup;
13011
13810
  exports.HdAccessoryListComponent = HdAccessoryListComponent;
@@ -13013,6 +13812,8 @@
13013
13812
  exports.HdCurrentTableComponent = HdCurrentTableComponent;
13014
13813
  exports.HdDetailFormFieldType = HdDetailFormFieldType;
13015
13814
  exports.HdDetailFormService = HdDetailFormService;
13815
+ exports.HdFilterScheme = HdFilterScheme;
13816
+ exports.HdFilterSchemeStore = HdFilterSchemeStore;
13016
13817
  exports.HdFilterService = HdFilterService;
13017
13818
  exports.HdFormLinesService = HdFormLinesService;
13018
13819
  exports.HdFormService = HdFormService;