fantasy-ngzorro 2.1.7 → 2.1.8
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.
- package/bundles/fantasy-ngzorro.umd.js +119 -67
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-form/hd-form.component.js +83 -43
- package/esm2015/hd-form/hd-form.service.js +6 -8
- package/esm2015/hd-form-lines/hd-form-lines.component.js +30 -20
- package/esm2015/hd-form-lines/hd-form-lines.service.js +14 -15
- package/esm5/hd-form/hd-form.component.js +80 -38
- package/esm5/hd-form/hd-form.service.js +5 -6
- package/esm5/hd-form-lines/hd-form-lines.component.js +33 -21
- package/esm5/hd-form-lines/hd-form-lines.service.js +14 -15
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +120 -73
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +119 -67
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form/hd-form.component.d.ts +3 -3
- package/hd-form/hd-form.service.d.ts +2 -2
- package/hd-form-lines/hd-form-lines.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2415,24 +2415,23 @@
|
|
|
2415
2415
|
}
|
|
2416
2416
|
/** @enum {string} */
|
|
2417
2417
|
var FormLineType = {
|
|
2418
|
-
Input:
|
|
2419
|
-
Select:
|
|
2420
|
-
Date:
|
|
2421
|
-
DateRange:
|
|
2422
|
-
TextArea:
|
|
2423
|
-
InputNumber:
|
|
2424
|
-
MultipleSelect:
|
|
2425
|
-
ViewDom:
|
|
2426
|
-
Switch:
|
|
2427
|
-
Time:
|
|
2428
|
-
,
|
|
2418
|
+
Input: "Input",
|
|
2419
|
+
Select: "Select",
|
|
2420
|
+
Date: "Date",
|
|
2421
|
+
DateRange: "DateRange",
|
|
2422
|
+
TextArea: "TextArea",
|
|
2423
|
+
InputNumber: "InputNumber",
|
|
2424
|
+
MultipleSelect: "MultipleSelect",
|
|
2425
|
+
ViewDom: "ViewDom",
|
|
2426
|
+
Switch: "Switch",
|
|
2427
|
+
Time: "Time",
|
|
2429
2428
|
};
|
|
2430
2429
|
var HdFormLinesService = /** @class */ (function () {
|
|
2431
2430
|
function HdFormLinesService() {
|
|
2432
2431
|
}
|
|
2433
2432
|
HdFormLinesService.decorators = [
|
|
2434
2433
|
{ type: core.Injectable, args: [{
|
|
2435
|
-
providedIn:
|
|
2434
|
+
providedIn: "root",
|
|
2436
2435
|
},] }
|
|
2437
2436
|
];
|
|
2438
2437
|
/** @nocollapse */
|
|
@@ -2684,11 +2683,12 @@
|
|
|
2684
2683
|
var _this = this;
|
|
2685
2684
|
/** @type {?} */
|
|
2686
2685
|
var pageLines = this.getCurrentPageLines();
|
|
2687
|
-
return pageLines.length > 0 &&
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2686
|
+
return (pageLines.length > 0 &&
|
|
2687
|
+
pageLines.every((/**
|
|
2688
|
+
* @param {?} line
|
|
2689
|
+
* @return {?}
|
|
2690
|
+
*/
|
|
2691
|
+
function (line) { return _this.isLineChecked(line); })));
|
|
2692
2692
|
};
|
|
2693
2693
|
/**
|
|
2694
2694
|
* @return {?}
|
|
@@ -2705,7 +2705,9 @@
|
|
|
2705
2705
|
* @param {?} line
|
|
2706
2706
|
* @return {?}
|
|
2707
2707
|
*/
|
|
2708
|
-
function (line) {
|
|
2708
|
+
function (line) {
|
|
2709
|
+
return _this.isLineChecked(line);
|
|
2710
|
+
})).length;
|
|
2709
2711
|
return checkedCount > 0 && checkedCount < pageLines.length;
|
|
2710
2712
|
};
|
|
2711
2713
|
/**
|
|
@@ -2865,7 +2867,9 @@
|
|
|
2865
2867
|
var empty = control.value === null ||
|
|
2866
2868
|
control.value === undefined ||
|
|
2867
2869
|
control.value === "";
|
|
2868
|
-
if ((control.dirty || control.touched) &&
|
|
2870
|
+
if ((control.dirty || control.touched) &&
|
|
2871
|
+
empty &&
|
|
2872
|
+
control.hasError("required")) {
|
|
2869
2873
|
return "error";
|
|
2870
2874
|
}
|
|
2871
2875
|
return "";
|
|
@@ -2970,7 +2974,8 @@
|
|
|
2970
2974
|
* @param {?} item
|
|
2971
2975
|
* @return {?}
|
|
2972
2976
|
*/
|
|
2973
|
-
function (item) { return item && item._hdRowId === id; })) &&
|
|
2977
|
+
function (item) { return item && item._hdRowId === id; })) &&
|
|
2978
|
+
mountedById.has(id)) {
|
|
2974
2979
|
result.push(mountedById.get(id));
|
|
2975
2980
|
}
|
|
2976
2981
|
}));
|
|
@@ -3847,9 +3852,8 @@
|
|
|
3847
3852
|
if (!fn) {
|
|
3848
3853
|
return;
|
|
3849
3854
|
}
|
|
3850
|
-
// 父组件未配置时默认 500ms 防抖
|
|
3851
3855
|
/** @type {?} */
|
|
3852
|
-
var debounceMs = onSearchEventDebounceTime != null ? onSearchEventDebounceTime :
|
|
3856
|
+
var debounceMs = onSearchEventDebounceTime != null ? onSearchEventDebounceTime : 0;
|
|
3853
3857
|
this.debounceTimeout = debounceMs;
|
|
3854
3858
|
if (this.searchSubscription) {
|
|
3855
3859
|
this.searchSubscription.unsubscribe();
|
|
@@ -3891,9 +3895,10 @@
|
|
|
3891
3895
|
if (!fn) {
|
|
3892
3896
|
return;
|
|
3893
3897
|
}
|
|
3894
|
-
// 父组件未配置时默认 500ms 防抖
|
|
3895
3898
|
/** @type {?} */
|
|
3896
|
-
var debounceMs = onOpenChangeEventDebounceTime != null
|
|
3899
|
+
var debounceMs = onOpenChangeEventDebounceTime != null
|
|
3900
|
+
? onOpenChangeEventDebounceTime
|
|
3901
|
+
: 0;
|
|
3897
3902
|
this.openChangeDebounceTimeout = debounceMs;
|
|
3898
3903
|
if (this.openChangeSubscription) {
|
|
3899
3904
|
this.openChangeSubscription.unsubscribe();
|
|
@@ -3981,9 +3986,10 @@
|
|
|
3981
3986
|
*/
|
|
3982
3987
|
function (item) {
|
|
3983
3988
|
if (item.onChangeEvent) {
|
|
3984
|
-
// 父组件未配置时默认 500ms 防抖
|
|
3985
3989
|
/** @type {?} */
|
|
3986
|
-
var debounceMs = item.onChangeEventDebounceTime != null
|
|
3990
|
+
var debounceMs = item.onChangeEventDebounceTime != null
|
|
3991
|
+
? item.onChangeEventDebounceTime
|
|
3992
|
+
: 0;
|
|
3987
3993
|
formGroupTmp
|
|
3988
3994
|
.get(item.name)
|
|
3989
3995
|
.valueChanges.pipe(operators.debounceTime(debounceMs))
|
|
@@ -4317,11 +4323,15 @@
|
|
|
4317
4323
|
: item.value,
|
|
4318
4324
|
disabled: item.disabled,
|
|
4319
4325
|
}, isEmptyLine
|
|
4320
|
-
?
|
|
4321
|
-
|
|
4326
|
+
? item.require && !item.hide
|
|
4327
|
+
? [forms.Validators.required]
|
|
4328
|
+
: []
|
|
4329
|
+
: item.require
|
|
4330
|
+
? [forms.Validators.required]
|
|
4331
|
+
: []);
|
|
4322
4332
|
if (item.selectOption && item.selectOption.label) {
|
|
4323
4333
|
formGroupObj[item.selectOption.label] = _this.fb.control(formLinesDataItem != null
|
|
4324
|
-
?
|
|
4334
|
+
? formLinesDataItem[item.selectOption.label] || null
|
|
4325
4335
|
: null, []);
|
|
4326
4336
|
}
|
|
4327
4337
|
}));
|
|
@@ -4362,7 +4372,9 @@
|
|
|
4362
4372
|
function (item) {
|
|
4363
4373
|
if (item.onChangeEvent) {
|
|
4364
4374
|
/** @type {?} */
|
|
4365
|
-
var debounceMs = item.onChangeEventDebounceTime != null
|
|
4375
|
+
var debounceMs = item.onChangeEventDebounceTime != null
|
|
4376
|
+
? item.onChangeEventDebounceTime
|
|
4377
|
+
: 0;
|
|
4366
4378
|
formGroupSubmit
|
|
4367
4379
|
.get(item.name)
|
|
4368
4380
|
.valueChanges.pipe(operators.debounceTime(debounceMs))
|
|
@@ -4589,8 +4601,7 @@
|
|
|
4589
4601
|
* @return {?}
|
|
4590
4602
|
*/
|
|
4591
4603
|
function (globalIndex) {
|
|
4592
|
-
return (globalIndex -
|
|
4593
|
-
(this.paginationPageIndex - 1) * this.paginationPageSize);
|
|
4604
|
+
return (globalIndex - (this.paginationPageIndex - 1) * this.paginationPageSize);
|
|
4594
4605
|
};
|
|
4595
4606
|
/**
|
|
4596
4607
|
* @param {?} event
|
|
@@ -5304,8 +5315,7 @@
|
|
|
5304
5315
|
Time: 9,
|
|
5305
5316
|
Cascader: 10,
|
|
5306
5317
|
Radio: 11,
|
|
5307
|
-
Checkbox: 12
|
|
5308
|
-
,
|
|
5318
|
+
Checkbox: 12,
|
|
5309
5319
|
};
|
|
5310
5320
|
FormListType[FormListType.Input] = 'Input';
|
|
5311
5321
|
FormListType[FormListType.Select] = 'Select';
|
|
@@ -5325,7 +5335,7 @@
|
|
|
5325
5335
|
}
|
|
5326
5336
|
HdFormService.decorators = [
|
|
5327
5337
|
{ type: core.Injectable, args: [{
|
|
5328
|
-
providedIn:
|
|
5338
|
+
providedIn: "root",
|
|
5329
5339
|
},] }
|
|
5330
5340
|
];
|
|
5331
5341
|
/** @nocollapse */
|
|
@@ -5358,7 +5368,9 @@
|
|
|
5358
5368
|
* @return {?}
|
|
5359
5369
|
*/
|
|
5360
5370
|
function (value) { return value; });
|
|
5361
|
-
this.searchSubscription = this.searchSubject
|
|
5371
|
+
this.searchSubscription = this.searchSubject
|
|
5372
|
+
.pipe(operators.debounceTime(this.debounceTimeout))
|
|
5373
|
+
.subscribe((/**
|
|
5362
5374
|
* @param {?} __0
|
|
5363
5375
|
* @return {?}
|
|
5364
5376
|
*/
|
|
@@ -5366,7 +5378,9 @@
|
|
|
5366
5378
|
var fn = _a.fn, event = _a.event;
|
|
5367
5379
|
return _this.triggerEvent(fn, event);
|
|
5368
5380
|
}));
|
|
5369
|
-
this.openChangeSubscription = this.openChangeSubject
|
|
5381
|
+
this.openChangeSubscription = this.openChangeSubject
|
|
5382
|
+
.pipe(operators.debounceTime(this.openChangeDebounceTimeout))
|
|
5383
|
+
.subscribe((/**
|
|
5370
5384
|
* @param {?} __0
|
|
5371
5385
|
* @return {?}
|
|
5372
5386
|
*/
|
|
@@ -5399,7 +5413,9 @@
|
|
|
5399
5413
|
* @return {?}
|
|
5400
5414
|
*/
|
|
5401
5415
|
function (changes) {
|
|
5402
|
-
if (changes[
|
|
5416
|
+
if (changes["formList"] &&
|
|
5417
|
+
JSON.stringify(changes["formList"].currentValue) !==
|
|
5418
|
+
JSON.stringify(changes["formList"].previousValue)) {
|
|
5403
5419
|
if (!this.formList || this.formList.length === 0) {
|
|
5404
5420
|
return;
|
|
5405
5421
|
}
|
|
@@ -5423,14 +5439,15 @@
|
|
|
5423
5439
|
if (!fn) {
|
|
5424
5440
|
return;
|
|
5425
5441
|
}
|
|
5426
|
-
// 父组件未配置时默认 500ms 防抖
|
|
5427
5442
|
/** @type {?} */
|
|
5428
|
-
var debounceMs = onSearchEventDebounceTime != null ? onSearchEventDebounceTime :
|
|
5443
|
+
var debounceMs = onSearchEventDebounceTime != null ? onSearchEventDebounceTime : 0;
|
|
5429
5444
|
this.debounceTimeout = debounceMs;
|
|
5430
5445
|
if (this.searchSubscription) {
|
|
5431
5446
|
this.searchSubscription.unsubscribe();
|
|
5432
5447
|
}
|
|
5433
|
-
this.searchSubscription = this.searchSubject
|
|
5448
|
+
this.searchSubscription = this.searchSubject
|
|
5449
|
+
.pipe(operators.debounceTime(this.debounceTimeout))
|
|
5450
|
+
.subscribe((/**
|
|
5434
5451
|
* @param {?} __0
|
|
5435
5452
|
* @return {?}
|
|
5436
5453
|
*/
|
|
@@ -5457,14 +5474,17 @@
|
|
|
5457
5474
|
if (!fn) {
|
|
5458
5475
|
return;
|
|
5459
5476
|
}
|
|
5460
|
-
// 父组件未配置时默认 500ms 防抖
|
|
5461
5477
|
/** @type {?} */
|
|
5462
|
-
var debounceMs = onOpenChangeEventDebounceTime != null
|
|
5478
|
+
var debounceMs = onOpenChangeEventDebounceTime != null
|
|
5479
|
+
? onOpenChangeEventDebounceTime
|
|
5480
|
+
: 0;
|
|
5463
5481
|
this.openChangeDebounceTimeout = debounceMs;
|
|
5464
5482
|
if (this.openChangeSubscription) {
|
|
5465
5483
|
this.openChangeSubscription.unsubscribe();
|
|
5466
5484
|
}
|
|
5467
|
-
this.openChangeSubscription = this.openChangeSubject
|
|
5485
|
+
this.openChangeSubscription = this.openChangeSubject
|
|
5486
|
+
.pipe(operators.debounceTime(this.openChangeDebounceTimeout))
|
|
5487
|
+
.subscribe((/**
|
|
5468
5488
|
* @param {?} __0
|
|
5469
5489
|
* @return {?}
|
|
5470
5490
|
*/
|
|
@@ -5503,7 +5523,7 @@
|
|
|
5503
5523
|
var _this = this;
|
|
5504
5524
|
// 异常捕获
|
|
5505
5525
|
if (!this.checkList(this.formList)) {
|
|
5506
|
-
throw
|
|
5526
|
+
throw "form组件数据格式不规范";
|
|
5507
5527
|
}
|
|
5508
5528
|
// 对表单数据做初始化,用row隔离每行数据item
|
|
5509
5529
|
this.dealRow();
|
|
@@ -5518,17 +5538,26 @@
|
|
|
5518
5538
|
function (item, index) {
|
|
5519
5539
|
// 日期相关的控件做特殊处理
|
|
5520
5540
|
if (item.type === 2 && item.value) {
|
|
5521
|
-
var _a = __read(item.value
|
|
5541
|
+
var _a = __read(item.value
|
|
5542
|
+
.toString()
|
|
5543
|
+
.split("-")
|
|
5544
|
+
.map((/**
|
|
5522
5545
|
* @param {?} str
|
|
5523
5546
|
* @return {?}
|
|
5524
5547
|
*/
|
|
5525
5548
|
function (str) { return parseInt(str); })), 3), year = _a[0], month = _a[1], day = _a[2];
|
|
5526
5549
|
/** @type {?} */
|
|
5527
5550
|
var newDateStr = new Date(year, month - 1, day)
|
|
5528
|
-
.toLocaleDateString(
|
|
5529
|
-
|
|
5551
|
+
.toLocaleDateString("zh-Hans-CN", {
|
|
5552
|
+
year: "numeric",
|
|
5553
|
+
month: "2-digit",
|
|
5554
|
+
day: "2-digit",
|
|
5555
|
+
})
|
|
5556
|
+
.replace(/\//g, "-");
|
|
5530
5557
|
if (item.validator) {
|
|
5531
|
-
formGroupList[item.name] = _this.fb.control({ value: new Date(newDateStr), disabled: item.disabled }, item.require && !item.hide
|
|
5558
|
+
formGroupList[item.name] = _this.fb.control({ value: new Date(newDateStr), disabled: item.disabled }, item.require && !item.hide
|
|
5559
|
+
? [forms.Validators.required, item.validator]
|
|
5560
|
+
: []);
|
|
5532
5561
|
}
|
|
5533
5562
|
else {
|
|
5534
5563
|
formGroupList[item.name] = _this.fb.control({ value: new Date(newDateStr), disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5543,33 +5572,43 @@
|
|
|
5543
5572
|
* @return {?}
|
|
5544
5573
|
*/
|
|
5545
5574
|
function (item) {
|
|
5546
|
-
var _a = __read(item
|
|
5575
|
+
var _a = __read(item
|
|
5576
|
+
.split("-")
|
|
5577
|
+
.map((/**
|
|
5547
5578
|
* @param {?} str
|
|
5548
5579
|
* @return {?}
|
|
5549
5580
|
*/
|
|
5550
5581
|
function (str) { return parseInt(str); })), 3), year = _a[0], month = _a[1], day = _a[2];
|
|
5551
5582
|
/** @type {?} */
|
|
5552
5583
|
var newDateStr = new Date(year, month - 1, day)
|
|
5553
|
-
.toLocaleDateString(
|
|
5554
|
-
|
|
5584
|
+
.toLocaleDateString("zh-Hans-CN", {
|
|
5585
|
+
year: "numeric",
|
|
5586
|
+
month: "2-digit",
|
|
5587
|
+
day: "2-digit",
|
|
5588
|
+
})
|
|
5589
|
+
.replace(/\//g, "-");
|
|
5555
5590
|
item = new Date(newDateStr);
|
|
5556
5591
|
}));
|
|
5557
5592
|
if (item.validator) {
|
|
5558
|
-
formGroupList[item.name] = _this.fb.control({ value: formItemDate, disabled: item.disabled }, item.require && !item.hide
|
|
5593
|
+
formGroupList[item.name] = _this.fb.control({ value: formItemDate, disabled: item.disabled }, item.require && !item.hide
|
|
5594
|
+
? [forms.Validators.required, item.validator]
|
|
5595
|
+
: []);
|
|
5559
5596
|
}
|
|
5560
5597
|
else {
|
|
5561
5598
|
formGroupList[item.name] = _this.fb.control({ value: formItemDate, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
5562
5599
|
}
|
|
5563
5600
|
}
|
|
5564
5601
|
else {
|
|
5565
|
-
throw
|
|
5602
|
+
throw "form组件中DateRange控件value值格式不规范,正确示例['2020-01-22', '2020-01-23']";
|
|
5566
5603
|
}
|
|
5567
5604
|
}
|
|
5568
5605
|
else if (item.type === FormListType.Checkbox && item.checkboxOption) {
|
|
5569
5606
|
/** @type {?} */
|
|
5570
5607
|
var checkboxValue = Array.isArray(item.value) ? item.value : [];
|
|
5571
5608
|
if (item.validator) {
|
|
5572
|
-
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide
|
|
5609
|
+
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide
|
|
5610
|
+
? [forms.Validators.required, item.validator]
|
|
5611
|
+
: []);
|
|
5573
5612
|
}
|
|
5574
5613
|
else {
|
|
5575
5614
|
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5579,7 +5618,9 @@
|
|
|
5579
5618
|
/** @type {?} */
|
|
5580
5619
|
var checkboxValue = item.value != null ? item.value : false;
|
|
5581
5620
|
if (item.validator) {
|
|
5582
|
-
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide
|
|
5621
|
+
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide
|
|
5622
|
+
? [forms.Validators.required, item.validator]
|
|
5623
|
+
: []);
|
|
5583
5624
|
}
|
|
5584
5625
|
else {
|
|
5585
5626
|
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5587,7 +5628,9 @@
|
|
|
5587
5628
|
}
|
|
5588
5629
|
else {
|
|
5589
5630
|
if (item.validator) {
|
|
5590
|
-
formGroupList[item.name] = _this.fb.control({ value: item.value, disabled: item.disabled }, item.require && !item.hide
|
|
5631
|
+
formGroupList[item.name] = _this.fb.control({ value: item.value, disabled: item.disabled }, item.require && !item.hide
|
|
5632
|
+
? [forms.Validators.required, item.validator]
|
|
5633
|
+
: []);
|
|
5591
5634
|
}
|
|
5592
5635
|
else {
|
|
5593
5636
|
formGroupList[item.name] = _this.fb.control({ value: item.value, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5601,11 +5644,13 @@
|
|
|
5601
5644
|
*/
|
|
5602
5645
|
function (item) {
|
|
5603
5646
|
if (item.onChangeEvent) {
|
|
5604
|
-
// 父组件未配置时默认 500ms 防抖
|
|
5605
5647
|
/** @type {?} */
|
|
5606
|
-
var debounceMs = item.onChangeEventDebounceTime != null
|
|
5607
|
-
|
|
5608
|
-
|
|
5648
|
+
var debounceMs = item.onChangeEventDebounceTime != null
|
|
5649
|
+
? item.onChangeEventDebounceTime
|
|
5650
|
+
: 0;
|
|
5651
|
+
_this.validateHdForm
|
|
5652
|
+
.get(item.name)
|
|
5653
|
+
.valueChanges.pipe(operators.debounceTime(debounceMs))
|
|
5609
5654
|
.subscribe((/**
|
|
5610
5655
|
* @param {?} value
|
|
5611
5656
|
* @return {?}
|
|
@@ -5617,7 +5662,9 @@
|
|
|
5617
5662
|
* @param {?} data
|
|
5618
5663
|
* @return {?}
|
|
5619
5664
|
*/
|
|
5620
|
-
function (data) {
|
|
5665
|
+
function (data) {
|
|
5666
|
+
return _this.onHdFormValueChanged(data);
|
|
5667
|
+
}));
|
|
5621
5668
|
this.onHdFormValueChanged();
|
|
5622
5669
|
};
|
|
5623
5670
|
/**
|
|
@@ -5645,8 +5692,11 @@
|
|
|
5645
5692
|
// 去找到前一个非hide的控件
|
|
5646
5693
|
for (var j = i - 1; j >= 0; j--) {
|
|
5647
5694
|
if (this.formList[j].totalWidth) {
|
|
5648
|
-
this.formList[i].totalWidth =
|
|
5649
|
-
|
|
5695
|
+
this.formList[i].totalWidth =
|
|
5696
|
+
this.formList[j].totalWidth + (this.formList[i].width || 1);
|
|
5697
|
+
if (this.formList[j].totalWidth + (this.formList[i].width || 1) >
|
|
5698
|
+
step &&
|
|
5699
|
+
this.formList[j].totalWidth <= step) {
|
|
5650
5700
|
step = step + 4;
|
|
5651
5701
|
this.formList[i].isRowFirst = 1;
|
|
5652
5702
|
}
|
|
@@ -5669,7 +5719,9 @@
|
|
|
5669
5719
|
if (space === 4 || this.formList[m + n].isRowFirst === 1) {
|
|
5670
5720
|
break;
|
|
5671
5721
|
}
|
|
5672
|
-
if (!this.formList[m + n].hide &&
|
|
5722
|
+
if (!this.formList[m + n].hide &&
|
|
5723
|
+
this.formList[m + n] &&
|
|
5724
|
+
this.formList[m + n].isRowFirst === 0) {
|
|
5673
5725
|
this.formList[m].columnItems.push(this.formList[m + n]);
|
|
5674
5726
|
space++;
|
|
5675
5727
|
}
|
|
@@ -5719,7 +5771,7 @@
|
|
|
5719
5771
|
}));
|
|
5720
5772
|
// 校验name是否重复
|
|
5721
5773
|
if (__spread(new Set(nameList)).length !== list.length) {
|
|
5722
|
-
throw
|
|
5774
|
+
throw "form组件数据格式不规范,存在重复name值!";
|
|
5723
5775
|
}
|
|
5724
5776
|
// ...more check
|
|
5725
5777
|
return true;
|
|
@@ -5824,7 +5876,7 @@
|
|
|
5824
5876
|
};
|
|
5825
5877
|
HdFormComponent.decorators = [
|
|
5826
5878
|
{ type: core.Component, args: [{
|
|
5827
|
-
selector:
|
|
5879
|
+
selector: "hd-form",
|
|
5828
5880
|
template: "<form nz-form [formGroup]=\"validateHdForm\" class=\"ant-advanced-search-form hd-formItem-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 formItem of formList;index as i\">\n <div nz-row *ngIf=\"formItem.isRowFirst && formItem.isRowFirst === 1\">\n <div nz-col *ngIf=\"!formItem.hide\" [nzSpan]=\"formItem.width? formItem.width * 6 : 6\">\n <nz-form-item nzFlex>\n <nz-form-label class=\"hd-formItem-label\" [nzNoColon]=\"true\">\n <div class=\"hd-formItem-label-flex\">\n <span>\n <span class=\"hd-formItem-label-require\" *ngIf=\"formItem.require\">*</span>\n <span [ngStyle]=\"{'color': formItem?.labelColor ? formItem.labelColor : null}\">{{ formItem.label\n }}</span>\n </span>\n <ng-container *ngIf=\"formItem.explain\">\n <span class=\"hd-formItem-label-explain\">{{ formItem.explain }}</span>\n </ng-container>\n </div>\n </nz-form-label>\n <nz-form-control class=\"hd-formItem-control\" [nzErrorTip]=\"formItemErrorTpl\">\n <ng-template #formItemErrorTpl let-control>\n <ng-container *ngFor=\"let validatorKey of formItem.validatorKeys;index as i\">\n <ng-container *ngIf=\"control.hasError(validatorKey.key)\">\n {{ validatorKey.label }}\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"control.hasError('required')\">\n {{ formItem.label + '\u4E0D\u80FD\u4E3A\u7A7A' }}\n </ng-container>\n </ng-template>\n <ng-container [ngSwitch]=\"formItem.type\">\n <ng-container *ngSwitchCase=\"0\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\"\n [nzPrefix]=\"formItem.prefixIcon ? inputPrefixIconTemplate : formItem.prefix\">\n <input nz-input [ngStyle]=\"{'color': formItem?.color ? formItem.color : null}\"\n [maxlength]=\"formItem.maxLength || null\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [formControlName]=\"formItem.name\" />\n </nz-input-group>\n <ng-template #inputPrefixIconTemplate><i nz-icon [nzType]=\"formItem.prefixIcon\"></i></ng-template>\n <ng-template #inputCleanTemplate><i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\"\n nzType=\"close-circle\"\n *ngIf=\"validateHdForm.get(formItem.name).value && !formItem.disabled && !validateHdForm.get(formItem.name).disabled\"\n (click)=\"inputClean(formItem)\"></i></ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"1\">\n <nz-select\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOpenChange)=\"onOpenChangeEvent(formItem.onOpenChangeEvent || null, $event, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, formItem.onSearchEventEventDebounceTime)\">\n <nz-option *ngFor=\"let selectItem of formItem.selectOption.selectList\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\"></nz-option>\n <nz-option *ngIf=\"formItem.defaultLabel\" [nzLabel]=\"formItem.defaultLabel\"\n [nzValue]=\"formItem.value\" nzHide></nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && validateHdForm.get(formItem.name) && validateHdForm.get(formItem.selectOption.label)?.value && validateHdForm.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.showLabelAndValue || formItem.selectOption.hdShowItemCode) ? ('['+ validateHdForm.get(formItem.selectOption.value).value + ']' + validateHdForm.get(formItem.selectOption.label).value) : validateHdForm.get(formItem.selectOption.label).value\"\n [nzValue]=\"validateHdForm.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"2\">\n <nz-date-picker *ngIf=\"!formItem.showTime\" [nzDisabledDate]=\"formItem.hdDisabledDate\"\n [nzShowToday]=\"formItem.hdShowToday !== false\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\">\n </nz-date-picker>\n <nz-date-picker *ngIf=\"formItem.showTime\" [nzDisabledDate]=\"formItem.hdDisabledDate\"\n [nzShowToday]=\"formItem.hdShowToday !== false\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" nzShowTime nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"3\">\n <nz-range-picker [nzPlaceHolder]=\"formItem.showTime ? ['\u5F00\u59CB\u65F6\u95F4','\u7ED3\u675F\u65F6\u95F4'] : ['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\"\n [nzDisabledDate]=\"formItem.hdDisabledDate\" [formControlName]=\"formItem.name\"\n [nzShowTime]=\"formItem.showTime ? true : false\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"4\">\n <textarea [ngStyle]=\"{'color': formItem?.color ? formItem.color : null}\"\n [rows]=\"formItem.textAreaRows ? formItem.textAreaRows : 1\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\" rows=\"1\"\n nz-input [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"5\">\n <nz-input-number [ngStyle]=\"{'color': formItem?.color ? formItem.color : null}\"\n [formControlName]=\"formItem.name\" [nzMin]=\"formItem?.inputNumber?.min || 0\"\n [nzMax]=\"formItem?.inputNumber?.max || 99999999\" [nzStep]=\"formItem?.inputNumber?.step || 1\"\n [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165' + formItem.label\"\n [nzFormatter]=\"formItem?.inputNumber?.nzFormatter || inputNumberDefaultFormatter\"\n [nzParser]=\"formItem?.inputNumber?.nzParser || inputNumberDefaultParser\"\n [nzPrecision]=\"formItem?.inputNumber?.precision != null ? formItem.inputNumber.precision : 4\">\n </nz-input-number>\n </ng-container>\n <!-- \u591A\u9879\u9009\u62E9\u5668 -->\n <ng-container *ngSwitchCase=\"6\">\n <nz-select [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n nzMode=\"multiple\"\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOpenChange)=\"onOpenChangeEvent(formItem.onOpenChangeEvent || null, $event, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, formItem.onSearchEventEventDebounceTime)\">\n <nz-option *ngFor=\"let selectItem of formItem.selectOption.selectList\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\"></nz-option>\n <ng-container *ngIf=\"formItem.defaultLabel\">\n <nz-option *ngFor=\"let option of formItem.defaultLabel;index as i\" [nzLabel]=\"option\"\n [nzValue]=\"formItem.value[i]\" nzHide></nz-option>\n </ng-container>\n <ng-container\n *ngIf=\"formItem.selectOption.label && validateHdForm.get(formItem.name) && validateHdForm.get(formItem.selectOption.label)?.value && validateHdForm.get(formItem.selectOption.value)?.value\">\n <nz-option *ngFor=\"let option of validateHdForm.get(formItem.selectOption.value).value;index as i\"\n [nzLabel]=\"validateHdForm.get(formItem.selectOption.label).value[i]\" [nzValue]=\"option\" nzHide>\n </nz-option>\n </ng-container>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"7\">\n <span>{{ formItem.value || validateHdForm.get(formItem.name).value }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"8\">\n <nz-switch [formControlName]=\"formItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"9\">\n <nz-time-picker [formControlName]=\"formItem.name\" [nzFormat]=\"formItem.format\"\n [nzAllowEmpty]=\"!formItem.disabled\"></nz-time-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"10\">\n <nz-cascader [nzOptions]=\"formItem.cascaderOption.options\" [formControlName]=\"formItem.name\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\">\n </nz-cascader>\n </ng-container>\n <ng-container *ngSwitchCase=\"11\">\n <nz-radio-group [formControlName]=\"formItem.name\">\n <label nz-radio *ngFor=\"let radioItem of formItem.radioOption.optionList\"\n [nzValue]=\"radioItem[formItem.radioOption.value]\">\n {{ formItem.radioOption.showLabelAndValue ? '[' + radioItem[formItem.radioOption.value] + ']' +\n radioItem[formItem.radioOption.label] : radioItem[formItem.radioOption.label] }}\n </label>\n </nz-radio-group>\n </ng-container>\n <ng-container *ngSwitchCase=\"12\">\n <ng-container *ngIf=\"formItem.checkboxOption; else singleCheckboxTpl\">\n <label nz-checkbox\n *ngFor=\"let checkboxItem of formItem.checkboxOption.optionList\"\n [nzDisabled]=\"formItem.disabled || validateHdForm.get(formItem.name).disabled\"\n [ngModel]=\"isCheckboxChecked(formItem.name, checkboxItem[formItem.checkboxOption.value])\"\n (ngModelChange)=\"onCheckboxItemChange(formItem.name, checkboxItem[formItem.checkboxOption.value], $event)\"\n [ngModelOptions]=\"{standalone: true}\">\n {{ formItem.checkboxOption.showLabelAndValue\n ? '[' + checkboxItem[formItem.checkboxOption.value] + ']' + checkboxItem[formItem.checkboxOption.label]\n : checkboxItem[formItem.checkboxOption.label] }}\n </label>\n </ng-container>\n <ng-template #singleCheckboxTpl>\n <label nz-checkbox [formControlName]=\"formItem.name\"></label>\n </ng-template>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n </div>\n <!-- \u5FAA\u73AF\u6700\u591A\u56DB\u6B21 -->\n <ng-container *ngFor=\"let columnItem of formItem.columnItems;index as columnItemIndex\">\n <div nz-col *ngIf=\"!columnItem.hide\" [nzSpan]=\"columnItem.width? columnItem.width * 6 : 6\">\n <nz-form-item nzFlex>\n <nz-form-label class=\"hd-formItem-label\" [nzNoColon]=\"true\">\n <div class=\"hd-formItem-label-flex\">\n <span>\n <span class=\"hd-formItem-label-require\" *ngIf=\"columnItem.require\">*</span>\n <span [ngStyle]=\"{'color': columnItem?.labelColor ? columnItem.labelColor : null}\">{{\n columnItem.label }}</span>\n </span>\n <ng-container *ngIf=\"columnItem.explain\">\n <span class=\"hd-formItem-label-explain\">{{ columnItem.explain }}</span>\n </ng-container>\n </div>\n </nz-form-label>\n <nz-form-control class=\"hd-formItem-control\" [nzErrorTip]=\"columnItemErrorTpl\">\n <ng-template #columnItemErrorTpl let-control>\n <ng-container *ngFor=\"let validatorKey of columnItem.validatorKeys;index as i\">\n <ng-container *ngIf=\"control.hasError(validatorKey.key)\">\n {{ validatorKey.label }}\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"control.hasError('required')\">\n {{ columnItem.label + '\u4E0D\u80FD\u4E3A\u7A7A' }}\n </ng-container>\n </ng-template>\n <ng-container [ngSwitch]=\"columnItem.type\">\n <ng-container *ngSwitchCase=\"0\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\"\n [nzPrefix]=\"columnItem.prefixIcon ? inputPrefixIconTemplate : columnItem.prefix\">\n <input *ngIf=\"columnItem.disabled === true;else inputTemplate\" nz-input\n [ngStyle]=\"{'color': columnItem?.color ? columnItem.color : null}\" [disabled]=\"true\"\n [attr.disabled]=\"true\" [maxlength]=\"columnItem.maxLength || null\"\n [placeholder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u8F93\u5165' + columnItem.label\"\n [formControlName]=\"columnItem.name\" />\n <ng-template #inputTemplate>\n <input nz-input [ngStyle]=\"{'color': columnItem?.color ? formItem.color : null}\"\n [maxlength]=\"columnItem.maxLength || null\"\n [placeholder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u8F93\u5165' + columnItem.label\"\n [formControlName]=\"columnItem.name\" />\n </ng-template>\n </nz-input-group>\n <ng-template #inputPrefixIconTemplate><i nz-icon [nzType]=\"columnItem.prefixIcon\"></i></ng-template>\n <ng-template #inputCleanTemplate><i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\"\n nzType=\"close-circle\"\n *ngIf=\"validateHdForm.get(columnItem.name).value && !columnItem.disabled && !validateHdForm.get(formItem.name).disabled\"\n (click)=\"inputClean(columnItem)\"></i></ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"1\">\n <nz-select [nzServerSearch]=\"columnItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"columnItem.selectOption.hdDropdownMatchSelectWidth ? columnItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzShowSearch]=\"columnItem.selectOption.hdShowSearch != null ? columnItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"columnItem.selectOption.hdAllowClear != null ? columnItem.selectOption.hdAllowClear : true\"\n [nzPlaceHolder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u9009\u62E9' + columnItem.label\"\n [formControlName]=\"columnItem.name\"\n (nzOpenChange)=\"onOpenChangeEvent(columnItem.onOpenChangeEvent || null, $event, columnItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(columnItem.onSearchEvent || null, $event, columnItem.onSearchEventEventDebounceTime)\">\n <nz-option *ngFor=\"let selectItem of columnItem.selectOption.selectList\"\n [nzValue]=\"selectItem[columnItem.selectOption.value]\" [nzLabel]=\"columnItem.selectOption.showLabelAndValue ? '['+ selectItem[columnItem.selectOption.value] +']' +\n selectItem[columnItem.selectOption.label] : selectItem[columnItem.selectOption.label]\">\n </nz-option>\n <nz-option\n *ngIf=\"columnItem.selectOption.label && validateHdForm.get(columnItem.name) && validateHdForm.get(columnItem.selectOption.label)?.value && validateHdForm.get(columnItem.selectOption.value)?.value\"\n [nzLabel]=\"(columnItem.selectOption.showLabelAndValue || columnItem.selectOption.hdShowItemCode) ? ('['+ validateHdForm.get(columnItem.selectOption.value).value + ']' + validateHdForm.get(columnItem.selectOption.label).value) : validateHdForm.get(columnItem.selectOption.label).value\"\n [nzValue]=\"validateHdForm.get(columnItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"2\">\n <nz-date-picker *ngIf=\"columnItem.showTime\" [nzDisabledDate]=\"columnItem.hdDisabledDate\"\n [nzShowToday]=\"columnItem.hdShowToday !== false\"\n [nzPlaceHolder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u9009\u62E9' + columnItem.label\"\n [formControlName]=\"columnItem.name\" nzShowTime nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker *ngIf=\"!columnItem.showTime\" [nzDisabledDate]=\"columnItem.hdDisabledDate\"\n [nzShowToday]=\"columnItem.hdShowToday !== false\"\n [nzPlaceHolder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u9009\u62E9' + columnItem.label\"\n [formControlName]=\"columnItem.name\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"3\">\n <nz-range-picker [nzPlaceHolder]=\"columnItem.showTime ? ['\u5F00\u59CB\u65F6\u95F4','\u7ED3\u675F\u65F6\u95F4'] : ['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\"\n [nzDisabledDate]=\"columnItem.hdDisabledDate\" [formControlName]=\"columnItem.name\"\n [nzShowTime]=\"columnItem.showTime ? true : false\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"4\">\n <textarea [ngStyle]=\"{'color': columnItem?.color ? columnItem.color : null}\"\n [rows]=\"columnItem.textAreaRows ? columnItem.textAreaRows : 1\" rows=\"1\" nz-input\n [placeholder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u8F93\u5165' + columnItem.label\"\n [maxlength]=\"columnItem.maxLength || null\" [formControlName]=\"columnItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"5\">\n <nz-input-number [ngStyle]=\"{'color': columnItem?.color ? columnItem.color : null}\"\n [formControlName]=\"columnItem.name\" [nzMin]=\"columnItem?.inputNumber?.min || 0\"\n [nzMax]=\"columnItem?.inputNumber?.max || 99999999\" [nzStep]=\"columnItem?.inputNumber?.step || 1\"\n [nzFormatter]=\"columnItem?.inputNumber?.nzFormatter || inputNumberDefaultFormatter\"\n [nzParser]=\"columnItem?.inputNumber?.nzParser || inputNumberDefaultParser\"\n [nzPlaceHolder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u8F93\u5165' + columnItem.label\"\n [nzPrecision]=\"columnItem?.inputNumber?.precision != null ? columnItem.inputNumber.precision : 4\">\n </nz-input-number>\n </ng-container>\n <!-- \u591A\u9879\u9009\u62E9\u5668 -->\n <ng-container *ngSwitchCase=\"6\">\n <nz-select [nzServerSearch]=\"columnItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"columnItem.selectOption.hdDropdownMatchSelectWidth ? columnItem.selectOption.hdDropdownMatchSelectWidth : false\"\n nzMode=\"multiple\"\n [nzShowSearch]=\"columnItem.selectOption.hdShowSearch != null ? columnItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"columnItem.selectOption.hdAllowClear != null ? columnItem.selectOption.hdAllowClear : true\"\n [nzPlaceHolder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u9009\u62E9' + columnItem.label\"\n [formControlName]=\"columnItem.name\"\n (nzOpenChange)=\"onOpenChangeEvent(columnItem.onOpenChangeEvent || null, $event, columnItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(columnItem.onSearchEvent || null, $event, columnItem.onSearchEventEventDebounceTime)\">\n <nz-option *ngFor=\"let selectItem of columnItem.selectOption.selectList\"\n [nzValue]=\"selectItem[columnItem.selectOption.value]\" [nzLabel]=\"columnItem.selectOption.showLabelAndValue ? '['+ selectItem[columnItem.selectOption.value] +']' +\n selectItem[columnItem.selectOption.label] : selectItem[columnItem.selectOption.label]\">\n </nz-option>\n <ng-container *ngIf=\"columnItem.defaultLabel\">\n <nz-option *ngFor=\"let option of columnItem.defaultLabel;index as i\" [nzLabel]=\"option\"\n [nzValue]=\"columnItem.value[i]\" nzHide></nz-option>\n </ng-container>\n <ng-container\n *ngIf=\"columnItem.selectOption.label && validateHdForm.get(columnItem.name) && validateHdForm.get(columnItem.selectOption.label)?.value && validateHdForm.get(columnItem.selectOption.value)?.value\">\n <nz-option\n *ngFor=\"let option of validateHdForm.get(columnItem.selectOption.value).value;index as i\"\n [nzLabel]=\"validateHdForm.get(columnItem.selectOption.label).value[i]\" [nzValue]=\"option\"\n nzHide>\n </nz-option>\n </ng-container>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"7\">\n <span>{{ columnItem.value || validateHdForm.get(columnItem.name).value }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"8\">\n <nz-switch [formControlName]=\"columnItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"9\">\n <nz-time-picker [formControlName]=\"columnItem.name\" [nzFormat]=\"columnItem.format\"\n [nzAllowEmpty]=\"!columnItem.disabled\"></nz-time-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"10\">\n <nz-cascader [nzOptions]=\"columnItem.cascaderOption.options\" [formControlName]=\"columnItem.name\"\n [nzPlaceHolder]=\"columnItem.placeholder ? columnItem.placeholder : '\u8BF7\u9009\u62E9' + columnItem.label\">\n </nz-cascader>\n </ng-container>\n <ng-container *ngSwitchCase=\"11\">\n <nz-radio-group [formControlName]=\"columnItem.name\">\n <label nz-radio *ngFor=\"let radioItem of columnItem.radioOption.optionList\"\n [nzValue]=\"radioItem[columnItem.radioOption.value]\">\n {{ columnItem.radioOption.showLabelAndValue ? '[' + radioItem[columnItem.radioOption.value] + ']' +\n radioItem[columnItem.radioOption.label] : radioItem[columnItem.radioOption.label] }}\n </label>\n </nz-radio-group>\n </ng-container>\n <ng-container *ngSwitchCase=\"12\">\n <ng-container *ngIf=\"columnItem.checkboxOption; else singleColumnCheckboxTpl\">\n <label nz-checkbox\n *ngFor=\"let checkboxItem of columnItem.checkboxOption.optionList\"\n [nzDisabled]=\"columnItem.disabled || validateHdForm.get(columnItem.name).disabled\"\n [ngModel]=\"isCheckboxChecked(columnItem.name, checkboxItem[columnItem.checkboxOption.value])\"\n (ngModelChange)=\"onCheckboxItemChange(columnItem.name, checkboxItem[columnItem.checkboxOption.value], $event)\"\n [ngModelOptions]=\"{standalone: true}\">\n {{ columnItem.checkboxOption.showLabelAndValue\n ? '[' + checkboxItem[columnItem.checkboxOption.value] + ']' + checkboxItem[columnItem.checkboxOption.label]\n : checkboxItem[columnItem.checkboxOption.label] }}\n </label>\n </ng-container>\n <ng-template #singleColumnCheckboxTpl>\n <label nz-checkbox [formControlName]=\"columnItem.name\"></label>\n </ng-template>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n</form>\n",
|
|
5829
5881
|
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}: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-time-picker{width:100%}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.hd-formItem-container .hd-formItem-label{width:124px;word-break:break-all;text-align:right}.hd-formItem-container .hd-formItem-control{width:calc(100% - 124px)}.hd-formItem-container .ant-input-number{width:100%}.hd-formItem-container .hd-formItem-label-flex{display:inline-flex;flex-direction:column}.hd-formItem-container .hd-formItem-label-flex span{display:inline-block}.hd-formItem-container .hd-formItem-label-flex .hd-formItem-label-require{margin-right:4px;color:#f5222d;font-size:14px;font-family:SimSun,sans-serif}.hd-formItem-container .hd-formItem-label-flex .hd-formItem-label-explain{margin-top:-13px;color:#f5222d}.hd-formItem-container textarea{margin-top:8px}.hd-formItem-container ::ng-deep label[nz-checkbox]{margin-right:12px;line-height:32px}"]
|
|
5830
5882
|
}] }
|