fantasy-ngzorro 2.1.6 → 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 +203 -94
- 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 +87 -43
- 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 +117 -48
- package/esm5/hd-form-lines/hd-form-lines.service.js +14 -15
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +177 -96
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +203 -94
- 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.component.d.ts +15 -4
- 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))
|
|
@@ -4212,7 +4218,7 @@
|
|
|
4212
4218
|
(!this.formLinesData ||
|
|
4213
4219
|
(this.formLinesData && this.formLinesData.length === 0))) {
|
|
4214
4220
|
this.tableLoading = false;
|
|
4215
|
-
this.addFormLine(
|
|
4221
|
+
this.addFormLine(null, false);
|
|
4216
4222
|
this.showForm = true;
|
|
4217
4223
|
}
|
|
4218
4224
|
else {
|
|
@@ -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))
|
|
@@ -4423,19 +4435,27 @@
|
|
|
4423
4435
|
this.showForm = true;
|
|
4424
4436
|
};
|
|
4425
4437
|
/**
|
|
4426
|
-
*
|
|
4438
|
+
* 在指定行下方新增空行;不传 afterLine 则追加到末尾
|
|
4439
|
+
* @param afterLine 当前行 FormGroup(不要传 lineIndex,避免序号偏移导致插错位置)
|
|
4440
|
+
*/
|
|
4441
|
+
/**
|
|
4442
|
+
* 在指定行下方新增空行;不传 afterLine 则追加到末尾
|
|
4443
|
+
* @param {?=} afterLine 当前行 FormGroup(不要传 lineIndex,避免序号偏移导致插错位置)
|
|
4427
4444
|
* @param {?=} isFocus
|
|
4428
4445
|
* @return {?}
|
|
4429
4446
|
*/
|
|
4430
4447
|
HdFormLinesComponent.prototype.addFormLine = /**
|
|
4431
|
-
*
|
|
4448
|
+
* 在指定行下方新增空行;不传 afterLine 则追加到末尾
|
|
4449
|
+
* @param {?=} afterLine 当前行 FormGroup(不要传 lineIndex,避免序号偏移导致插错位置)
|
|
4432
4450
|
* @param {?=} isFocus
|
|
4433
4451
|
* @return {?}
|
|
4434
4452
|
*/
|
|
4435
|
-
function (
|
|
4453
|
+
function (afterLine, isFocus) {
|
|
4436
4454
|
var _this = this;
|
|
4437
4455
|
if (isFocus === void 0) { isFocus = true; }
|
|
4438
|
-
|
|
4456
|
+
/** @type {?} */
|
|
4457
|
+
var insertAt = this.getInsertIndexAfter(afterLine);
|
|
4458
|
+
this.linesFormArray.insert(insertAt, this.newLineItem());
|
|
4439
4459
|
this.calculateLineNumber();
|
|
4440
4460
|
setTimeout((/**
|
|
4441
4461
|
* @return {?}
|
|
@@ -4443,12 +4463,7 @@
|
|
|
4443
4463
|
function () {
|
|
4444
4464
|
_this.collectDomData();
|
|
4445
4465
|
if (isFocus) {
|
|
4446
|
-
|
|
4447
|
-
_this.activeDomX = index;
|
|
4448
|
-
}
|
|
4449
|
-
else {
|
|
4450
|
-
_this.activeDomX = _this.collectDomList.length - 1;
|
|
4451
|
-
}
|
|
4466
|
+
_this.activeDomX = _this.toPageLocalRowIndex(insertAt);
|
|
4452
4467
|
_this.activeDomY = 0;
|
|
4453
4468
|
console.log("执行过程13");
|
|
4454
4469
|
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
@@ -4457,53 +4472,69 @@
|
|
|
4457
4472
|
};
|
|
4458
4473
|
/**
|
|
4459
4474
|
* 复制当前行:在当前行下方新增一行,复制所有字段值(含隐藏字段)
|
|
4460
|
-
* @param index 当前行 lineIndex(从 1 开始)
|
|
4461
4475
|
*/
|
|
4462
4476
|
/**
|
|
4463
4477
|
* 复制当前行:在当前行下方新增一行,复制所有字段值(含隐藏字段)
|
|
4464
|
-
* @param {?}
|
|
4478
|
+
* @param {?} line
|
|
4465
4479
|
* @return {?}
|
|
4466
4480
|
*/
|
|
4467
4481
|
HdFormLinesComponent.prototype.copyFormLine = /**
|
|
4468
4482
|
* 复制当前行:在当前行下方新增一行,复制所有字段值(含隐藏字段)
|
|
4469
|
-
* @param {?}
|
|
4483
|
+
* @param {?} line
|
|
4470
4484
|
* @return {?}
|
|
4471
4485
|
*/
|
|
4472
|
-
function (
|
|
4486
|
+
function (line) {
|
|
4473
4487
|
var _this = this;
|
|
4474
4488
|
/** @type {?} */
|
|
4475
|
-
var sourceIndex =
|
|
4476
|
-
|
|
4477
|
-
var sourceLine = (/** @type {?} */ (this.linesFormArray.at(sourceIndex)));
|
|
4478
|
-
if (!sourceLine) {
|
|
4489
|
+
var sourceIndex = this.linesFormArray.controls.indexOf(line);
|
|
4490
|
+
if (sourceIndex < 0) {
|
|
4479
4491
|
return;
|
|
4480
4492
|
}
|
|
4481
4493
|
// getRawValue 包含 disabled 字段;复制行使用新的 _hdRowId
|
|
4482
4494
|
/** @type {?} */
|
|
4483
|
-
var sourceValues =
|
|
4484
|
-
|
|
4495
|
+
var sourceValues = line.getRawValue();
|
|
4496
|
+
/** @type {?} */
|
|
4497
|
+
var insertAt = sourceIndex + 1;
|
|
4498
|
+
this.linesFormArray.insert(insertAt, this.createLineFromValues(sourceValues, false, true));
|
|
4485
4499
|
this.calculateLineNumber();
|
|
4486
4500
|
setTimeout((/**
|
|
4487
4501
|
* @return {?}
|
|
4488
4502
|
*/
|
|
4489
4503
|
function () {
|
|
4490
4504
|
_this.collectDomData();
|
|
4491
|
-
_this.activeDomX =
|
|
4505
|
+
_this.activeDomX = _this.toPageLocalRowIndex(insertAt);
|
|
4492
4506
|
_this.activeDomY = 0;
|
|
4493
4507
|
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
4494
4508
|
}), 0);
|
|
4495
4509
|
};
|
|
4496
4510
|
/**
|
|
4497
|
-
*
|
|
4511
|
+
* 删除行
|
|
4512
|
+
* @param lineOrIndex 行 FormGroup,或 1-based 的 lineIndex(兼容 resetForm)
|
|
4513
|
+
*/
|
|
4514
|
+
/**
|
|
4515
|
+
* 删除行
|
|
4516
|
+
* @param {?} lineOrIndex 行 FormGroup,或 1-based 的 lineIndex(兼容 resetForm)
|
|
4498
4517
|
* @return {?}
|
|
4499
4518
|
*/
|
|
4500
4519
|
HdFormLinesComponent.prototype.deleteFormLine = /**
|
|
4501
|
-
*
|
|
4520
|
+
* 删除行
|
|
4521
|
+
* @param {?} lineOrIndex 行 FormGroup,或 1-based 的 lineIndex(兼容 resetForm)
|
|
4502
4522
|
* @return {?}
|
|
4503
4523
|
*/
|
|
4504
|
-
function (
|
|
4524
|
+
function (lineOrIndex) {
|
|
4505
4525
|
var _this = this;
|
|
4506
|
-
|
|
4526
|
+
/** @type {?} */
|
|
4527
|
+
var removeAt = -1;
|
|
4528
|
+
if (typeof lineOrIndex === "number") {
|
|
4529
|
+
removeAt = lineOrIndex - 1;
|
|
4530
|
+
}
|
|
4531
|
+
else if (lineOrIndex) {
|
|
4532
|
+
removeAt = this.linesFormArray.controls.indexOf(lineOrIndex);
|
|
4533
|
+
}
|
|
4534
|
+
console.log("index", typeof lineOrIndex === "number" ? lineOrIndex : removeAt);
|
|
4535
|
+
if (removeAt < 0) {
|
|
4536
|
+
return;
|
|
4537
|
+
}
|
|
4507
4538
|
// 最后一条数据的时候要判断一下
|
|
4508
4539
|
if (this.linesFormArray.controls.length === 1 && !this.allowEmpty) {
|
|
4509
4540
|
if (this.deleteLastLineEvent) {
|
|
@@ -4512,8 +4543,8 @@
|
|
|
4512
4543
|
return;
|
|
4513
4544
|
}
|
|
4514
4545
|
/** @type {?} */
|
|
4515
|
-
var removedLine = (/** @type {?} */ (this.linesFormArray.at(
|
|
4516
|
-
this.linesFormArray.removeAt(
|
|
4546
|
+
var removedLine = (/** @type {?} */ (this.linesFormArray.at(removeAt)));
|
|
4547
|
+
this.linesFormArray.removeAt(removeAt);
|
|
4517
4548
|
this.removeLineFromSelection(removedLine);
|
|
4518
4549
|
if (!this.isFilterData &&
|
|
4519
4550
|
this.linesFormArray.controls &&
|
|
@@ -4535,6 +4566,43 @@
|
|
|
4535
4566
|
_this.collectDomData();
|
|
4536
4567
|
}), 0);
|
|
4537
4568
|
};
|
|
4569
|
+
/** 在指定行后方的插入下标;无行则追加到末尾 */
|
|
4570
|
+
/**
|
|
4571
|
+
* 在指定行后方的插入下标;无行则追加到末尾
|
|
4572
|
+
* @private
|
|
4573
|
+
* @param {?=} afterLine
|
|
4574
|
+
* @return {?}
|
|
4575
|
+
*/
|
|
4576
|
+
HdFormLinesComponent.prototype.getInsertIndexAfter = /**
|
|
4577
|
+
* 在指定行后方的插入下标;无行则追加到末尾
|
|
4578
|
+
* @private
|
|
4579
|
+
* @param {?=} afterLine
|
|
4580
|
+
* @return {?}
|
|
4581
|
+
*/
|
|
4582
|
+
function (afterLine) {
|
|
4583
|
+
if (!afterLine) {
|
|
4584
|
+
return this.linesFormArray.controls.length;
|
|
4585
|
+
}
|
|
4586
|
+
/** @type {?} */
|
|
4587
|
+
var idx = this.linesFormArray.controls.indexOf(afterLine);
|
|
4588
|
+
return idx >= 0 ? idx + 1 : this.linesFormArray.controls.length;
|
|
4589
|
+
};
|
|
4590
|
+
/** 全局行下标转当前页内的行下标(供聚焦用) */
|
|
4591
|
+
/**
|
|
4592
|
+
* 全局行下标转当前页内的行下标(供聚焦用)
|
|
4593
|
+
* @private
|
|
4594
|
+
* @param {?} globalIndex
|
|
4595
|
+
* @return {?}
|
|
4596
|
+
*/
|
|
4597
|
+
HdFormLinesComponent.prototype.toPageLocalRowIndex = /**
|
|
4598
|
+
* 全局行下标转当前页内的行下标(供聚焦用)
|
|
4599
|
+
* @private
|
|
4600
|
+
* @param {?} globalIndex
|
|
4601
|
+
* @return {?}
|
|
4602
|
+
*/
|
|
4603
|
+
function (globalIndex) {
|
|
4604
|
+
return (globalIndex - (this.paginationPageIndex - 1) * this.paginationPageSize);
|
|
4605
|
+
};
|
|
4538
4606
|
/**
|
|
4539
4607
|
* @param {?} event
|
|
4540
4608
|
* @return {?}
|
|
@@ -4874,7 +4942,7 @@
|
|
|
4874
4942
|
HdFormLinesComponent.decorators = [
|
|
4875
4943
|
{ type: core.Component, args: [{
|
|
4876
4944
|
selector: "hd-form-lines",
|
|
4877
|
-
template: "<ng-container *ngIf=\"showForm && showToolbar\">\n <hd-button-group class=\"hd-formLines-toolbar\">\n <ng-template #buttonGroupLeft>\n <!-- \u6709\u5168\u5C40\u641C\u7D22\uFF1A\u5DE6\u4FA7\u653E\u641C\u7D22\u6846 -->\n <ng-container *ngIf=\"showSearch\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\">\n <input type=\"text\" nz-input (keyup.enter)=\"searchLines()\" placeholder=\"\u8BF7\u8F93\u5165\u5185\u5BB9\u641C\u7D22\" style=\"width: 300px;\"\n [(ngModel)]=\"filterStr\" />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <i nz-icon nzType=\"search\" (click)=\"searchLines()\"></i>\n </ng-template>\n </ng-container>\n <!-- \u65E0\u5168\u5C40\u641C\u7D22\uFF1A\u5DE6\u4FA7\u653E\u81EA\u5B9A\u4E49\u6309\u94AE -->\n <ng-container *ngIf=\"!showSearch\">\n <ng-container *ngTemplateOutlet=\"formLinesLeftButton\"></ng-container>\n </ng-container>\n </ng-template>\n <ng-template #buttonGroupRight>\n <!-- \u6709\u5168\u5C40\u641C\u7D22\uFF1A\u53F3\u4FA7\u8303\u56F4\u518D\u5DE6\u53F3\u5206\u5F00 -->\n <div class=\"hd-formLines-toolbar-right\" *ngIf=\"showSearch\">\n <div class=\"hd-formLines-toolbar-right-left\">\n <ng-container *ngTemplateOutlet=\"formLinesLeftButton\"></ng-container>\n </div>\n <div class=\"hd-formLines-toolbar-right-right\">\n <ng-container *ngTemplateOutlet=\"formLinesRightButton\"></ng-container>\n </div>\n </div>\n <!-- \u65E0\u5168\u5C40\u641C\u7D22\uFF1A\u53F3\u4FA7\u53EA\u653E\u81EA\u5B9A\u4E49\u53F3\u4FA7\u6309\u94AE -->\n <ng-container *ngIf=\"!showSearch\">\n <ng-container *ngTemplateOutlet=\"formLinesRightButton\"></ng-container>\n </ng-container>\n </ng-template>\n </hd-button-group>\n <hd-space background=\"transparent\" type=\"row\" size=\"12\"></hd-space>\n</ng-container>\n\n<!-- \u52FE\u9009\u63D0\u793A\uFF1A\u5355\u72EC\u4E00\u884C\uFF0C\u653E\u5728\u8868\u5355\u4E0A\u65B9 -->\n<ng-container *ngIf=\"showForm && showCheckbox && getSelectedCount() > 0\">\n <nz-alert nzType=\"info\" [nzMessage]=\"selectionAlertTemplate\" nzShowIcon></nz-alert>\n <hd-space background=\"transparent\" type=\"row\" size=\"12\"></hd-space>\n</ng-container>\n<ng-template #selectionAlertTemplate>\n <span>\u5DF2\u9009\u62E9{{ getSelectedCount() }}\u6761\u6570\u636E</span> \n <span class=\"common-btn-group\">\n <a (click)=\"clearSelection()\">\u6E05\u7A7A</a>\n </span>\n</ng-template>\n\n<!-- <hd-button type=\"primary\" (clickAction)=\"focusDom(0, 0)\">\u805A\u7126\u7B2C\u4E00\u4E2A</hd-button> -->\n\n<form *ngIf=\"showForm\" nz-form [formGroup]=\"validateHdFormLines\" class=\"ant-advanced-search-form hd-formLines-container\"\n (keydown)=\"onKeyDown($event)\">\n <nz-table nzTemplateMode [nzFrontPagination]=\"false\" [nzLoading]=\"tableLoading\" [nzScroll]=\"scroll\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200 ]\">\n <thead>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showCheckbox\">\n <label nz-checkbox\n [ngModel]=\"isAllChecked()\"\n [nzIndeterminate]=\"isIndeterminate()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onAllChecked($event)\"></label>\n </th>\n <th nzWidth=\"58px\" [nzLeft]=\"lineNumberLeft\" *ngIf=\"showLineNumber\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let item of formLines\">\n <th *ngIf=\"!item.hide\" [nzAlign]=\"item.align ? item.align : 'left'\">\n <span *ngIf=\"item.require\" style=\"color: red;\">*</span>{{ item.label }}\n </th>\n </ng-container>\n <th [style.width.px]=\"operateColWidth\" nzRight=\"0\">\u64CD\u4F5C</th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let line of linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize);index as dataIndex\"\n formArrayName=\"lines\">\n <tr [formGroup]=\"line\">\n <td nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showCheckbox\">\n <label nz-checkbox\n [ngModel]=\"isLineChecked(line)\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onLineCheckedChange(line, $event)\"></label>\n </td>\n <td nzWidth=\"58px\" [nzLeft]=\"lineNumberLeft\" *ngIf=\"showLineNumber\">\n {{ line.get('lineIndex').value }}\n </td>\n <ng-container *ngFor=\"let formItem of formLines; index as innerIndex\">\n <td *ngIf=\"!formItem.hide\" [nzAlign]=\"formItem.align ? formItem.align : 'left'\">\n <nz-form-item>\n <nz-form-control\n [nzValidateStatus]=\"getControlValidateStatus(line, formItem)\"\n [nzErrorTip]=\"formItem.label + '\u4E0D\u80FD\u4E3A\u7A7A'\">\n <ng-container [ngSwitch]=\"formItem.type\">\n <ng-container *ngSwitchCase=\"'Input'\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\">\n <input #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [ngStyle]=\"getStyle(line, formItem, '100px')\" nz-input\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name ).value : null}\"\n [id]=\"'input-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#input-' + formItem.name + line.get('lineIndex').value, dataIndex , innerIndex) : null\"\n (input)=\"limitInputLength($event, line, formItem)\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [formControlName]=\"formItem.name\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate>\n <i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"line.get(formItem.name).value && !line.get(formItem.name).disabled\"\n (click)=\"inputClean(formItem ,line)\"></i>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Select'\">\n <nz-select #formInputDom (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n nzDropdownClassName=\"hd-select-table\"\n *ngIf=\"formItem.selectOption.tableColumns;else nomarlSelectTemplate\"\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, line, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <div class=\"hd-select-empty\"\n *ngIf=\"!(formItem.selectOption?.selectList?.length > 0 || line.get(formItem.selectOption.selectListName)?.value?.length > 0)\">\n <img\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNjRweCIgaGVpZ2h0PSI0MXB4IiB2aWV3Qm94PSIwIDAgNjQgNDEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00NzIuMDAwMDAwLCAtMTMzNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY0LjAwMDAwMCwgMTExNC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MC4wMDAwMDAsIDc4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjguMDAwMDAwLCAxNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxnID4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxlbGxpcHNlICBmaWxsPSIjRjVGNUY1IiBjeD0iMzIiIGN5PSIzMyIgcng9IjMyIiByeT0iNyI+PC9lbGxpcHNlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5LjAwMDAwMCwgMC4wMDAwMDApIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ2LDEyLjc2MDU2MDQgTDM1Ljg1NDMwNDcsMS4yNTczOTYzMyBDMzUuMzY3NDQxNCwwLjQ3MzgyNjYwNSAzNC42NTU4Nzg5LDAgMzMuOTA2NzYxNywwIEwxMi4wOTMyMzgzLDAgQzExLjM0NDEyMTEsMCAxMC42MzI1NTg2LDAuNDczOTUwMjU1IDEwLjE0NTY5NTMsMS4yNTczOTYzMyBMMi42MTQ3OTcyN2UtMTIsMTIuNzYwNTYwNCBMMCwyMiBMNDYsMjIgTDQ2LDEyLjc2MDU2MDQgWiIgID48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTMyLjYxMzI4MTMsMTUuOTMxNSBDMzIuNjEzMjgxMywxNC4zMjU4NTExIDMzLjYwNjk1MzEsMTMuMDAwMjM0IDM0LjgzOTY5OTIsMTMgTDQ2LDEzIEw0NiwzMS4xMzcxMjc3IEM0NiwzMy4yNTg5NTc0IDQ0LjY3OTM4NjcsMzUgNDMuMDUwNDI5NywzNSBMMi45NDk1NzAzMSwzNSBDMS4zMjA1MjM0NCwzNSAwLDMzLjI1ODg0MDQgMCwzMS4xMzcxMjc3IEwwLDEzIEwxMS4xNjAzMDA4LDEzIEMxMi4zOTMwNDY5LDEzIDEzLjM4NjcxODgsMTQuMzIyODA4NSAxMy4zODY3MTg4LDE1LjkyODQ1NzQgTDEzLjM4NjcxODgsMTUuOTQ5NjM4MyBDMTMuMzg2NzE4OCwxNy41NTUyODcyIDE0LjM5MTcxMDksMTguODUxMTgwOSAxNS42MjQ0NTcsMTguODUxMTgwOSBMMzAuMzc1NTQzLDE4Ljg1MTE4MDkgQzMxLjYwODI4OTEsMTguODUxMTgwOSAzMi42MTMyODEzLDE3LjU0MzM1MTEgMzIuNjEzMjgxMywxNS45Mzc3MDIxIEwzMi42MTMyODEzLDE1LjkzMTUgWiIgIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+\"\n alt=\"empty\">\n <p class=\"ant-empty-description\">\u6682\u65E0\u6570\u636E</p>\n </div>\n\n <nz-option nzCustomContent\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n <div class=\"hd-option-line\">\n <div *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns\"\n [ngStyle]=\"getSelectTableColumnStyle(selectOptionTableColumn)\">\n <ng-container *ngIf=\"selectOptionTableColumn.icons;else notPictureTemplate\">\n <div class=\"hd-option-icons\">\n <ng-container *ngFor=\"let icon of selectOptionTableColumn.icons\">\n <img *ngIf=\"icon.iconName === 'hd-recommend-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVpJREFUOE+l07FLQkEcB/Dv7713Zg1GQ0SgW9AmTYVp1BRUokZBEI1u/QVBUBD1D0Rt0dQaPYmotXza1tKQzQ1Fk0iDHr5vPEOTUpO88e77+9zvjjtBh8HTOb8e0hu0eN8Xzz22ikonoGzHdgXcAVB16S75U/mbn/m2AK+mglqbBUAGvCIRuVCJ7HLXQCUTPQOxXi8Q4FolnYWuAH0+HaEpjrdxAyC3VSq33xKgPTWiYYUai8IjUCabw4Zw1XWNF2+OZrXoi+cLImBth4odfQAw0elCW6zdKvU2/wVkYs8ggzBlRqrcI/DrrK1wQ7DWAIToV8lsqGxHDwTY6qYbA1jpCVAux3oBSirhDPYCOL6kE/s/QB77UrnNJoDDVkCN6pI+BJH+6xINQdpKOCf1d/AEYBxgUUQC5PcLbPMDXy1lhGXx7r0G6ExklpBwI0xh2w7ID+UzL71iL/MJdzuZdDL/kXcAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n <img *ngIf=\"icon.iconName === 'hd-img-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAyhJREFUWEe1ll1o1XYYxp8nPUmUihdCV3bAirvYzUC80Xpy3KwTZNR2CdOhDkTBwe6G32XzwqpjE3Qt4pUKZQqDyQZNTp1uY8yCJG0F2d2+LlWOOkShovQkaV45lcJpTdOTHJubBPI+z/Pj//H+/0TGR66uf8sPoz8A/Kstkp38YORxFitmEVU1vm1cBPlp9ZuQXtX0jmfxygQgvxSWBRWlDECvhgrwQFuqLufG4TAtRCaAwCl+IcDXtWEi2KFb7pUFBxCBEpSMMsDWGWEiNzXLe2/BASp2cTuJH+KCRMJ3dGvsrzQQqafAtw0XpBEfIhc00/tswQD8QWM1FP45d4A8V9XJN9k5Nl4vRKoR8G3jMshdyebRPs0cOftaAaRUbAsRrRRRhuczFsF/lPATNQrL3Hr7/nz1lGvvtkwGUSEC8gLkWfMGkAfQMp9J0n8ByhS5J+QDVr+BshBlUu6q3d5v9G3jIcg3GgnJqp2C853iCIB1WU0a1F2iOO2tPnK3CLQ1aJZKLpCfddPrmtoF8uuqZn9iyfcEzVQumYtlQDO9vS8PsprHd4xvAR7I7FuHUIBvdNP9crr0lT7g24U+UNlfh1f6Esrn2ofeuVphbCPyneJuAN+lT0jokZCduum9cobM2Qn9krEGEa6+hi36jEC3aro34vASW3FoG9si8sdGRoKCY6rlnpjLIxGgYhunSPY0AiAiP+mW93EmAN8ujoJobwgAuKOb7orUAHKjY1EwHjwFkGsEoKpVJ6WVH3n/p1oDwVBhk0TK742GV/UKYOZMt5QKoGIbX5E8mgwg4wCbADQn1c1uPvP2gWqB7xjDADck7OwBVan0QFFyQaj2A9wxV60A13XT7Uw1Ar5TlDiBQP6hRHs0a3Ss9n8wuK4jYtN5Em/H6B5ppht7r4jvhEOFtYiUGQEAnhDoV033ZNJwB45xRAS9IBfX1qnhRD7uhhQLENiFQ0Ll9LSBCM7olnu43gUpTjEfiPSB3D6tUQRbcpZ7bbZHLEBYKnRFogxV505rmjzIrtG/6w2fMS0l430RHAVoULBZtdybdQFkCcuqSXUtzxqSpHsBfmUdgJhaiDQAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n <span *ngIf=\"icon.iconName === 'hd-select-close' && selectItem[icon.fieldName]\"\n class=\"hd-select-close\">\n \u7981\u7528\n </span>\n <span *ngIf=\"icon.iconName === 'hd-select-purchase' && selectItem[icon.fieldName]\"\n class=\"hd-select-purchase\">\n \u534F\n </span>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #notPictureTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name], selectOptionTableColumn.width);else overflowTemplate\">\n <div>{{\n judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])\n }}\n </div>\n </ng-container>\n <ng-template #overflowTemplate>\n <div class=\"hd-option-overflow\" nz-tooltip\n [nzTooltipTitle]=\"selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name]\">\n {{\n judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])\n }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n </div>\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n <ng-template #nomarlSelectTemplate>\n <nz-select #formInputDom (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\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, line, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-template>\n\n </ng-container>\n <ng-container *ngSwitchCase=\"'Date'\">\n <nz-date-picker #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\" *ngIf=\"formItem.showTime\"\n [ngStyle]=\"getStyle(line, formItem, '150px')\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\"\n [nzShowToday]=\"formItem.hdShowToday !== false\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker #formInputDom *ngIf=\"!formItem.showTime\"\n [ngStyle]=\"getStyle(line, formItem, '150px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\"\n [nzShowToday]=\"formItem.hdShowToday !== false\">\n </nz-date-picker>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n {{ line.get(formItem.explainOptionRight.name).value }}\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'DateRange'\">\n <nz-range-picker #formInputDom [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [nzDisabledDate]=\"formItem.hdDisabledDate\" [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\"\n [formControlName]=\"formItem.name\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'TextArea'\">\n <textarea #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name).value : null}\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [maxlength]=\"formItem.maxLength || null\" rows=\"4\" nz-input\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"'InputNumber'\">\n <div style=\"display: flex;align-items: center;\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\">\n <nz-input-number #formInputDom [ngStyle]=\"getStyle(line, formItem, '100px')\"\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"\n [nzMin]=\"formItem?.inputNumber?.min || 0\" [nzMax]=\"formItem?.inputNumber?.max || 99999999\"\n [nzStep]=\"formItem?.inputNumber?.step || 1\"\n [nzPrecision]=\"formItem?.inputNumber?.precision != null ? formItem.inputNumber.precision : 2\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [nzId]=\"'inputNumber-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#inputNumber-' + formItem.name + line.get('lineIndex').value, dataIndex , innerIndex) : setActiveDomInFormLines(dataIndex , innerIndex)\">\n </nz-input-number>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n {{ line.get(formItem.explainOptionRight.name).value }}\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'MultipleSelect'\">\n <nz-select #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\" nzMode=\"multiple\"\n [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\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\" [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (nzOpenChange)=\"onOpenChangeEvent(formItem.onOpenChangeEvent || null, $event, line, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, 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\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\">\n <nz-option *ngFor=\"let option of line.get(formItem.selectOption.value).value;index as i\"\n [nzLabel]=\"line.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=\"'ViewDom'\">\n <span *ngIf=\"!formItem?.hideViewDomValue\">\n {{\n (formItem.preserveNumber && line.get(formItem.name).value) ?\n LodashRound(line.get(formItem.name).value,\n formItem.preserveNumber).toFixed(formItem.preserveNumber)\n : line.get(formItem.name).value\n }}\n </span>\n <ng-container\n *ngTemplateOutlet=\"ViewDomRightTemplate;context:{formItem: formItem, formLine: line}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Switch'\">\n <nz-switch (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [formControlName]=\"formItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Time'\">\n <nz-time-picker #formInputDom [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [formControlName]=\"formItem.name\"></nz-time-picker>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n <div *ngIf=\"formItem?.explainOption?.show\"\n [style.color]=\"formItem?.explainOption?.color ? formItem.explainOption.color : null\">\n {{ line.get(formItem.explainOption.name).value }}\n </div>\n </td>\n </ng-container>\n <td [style.width.px]=\"operateColWidth\" nzRight=\"0\">\n <span class=\"common-btn-group\">\n <a *ngIf=\"operateButtons.includes('add')\" (click)=\"addFormLine(line.get('lineIndex').value)\">\u6DFB\u52A0</a>\n <a *ngIf=\"operateButtons.includes('copy')\" (click)=\"copyFormLine(line.get('lineIndex').value)\">\u590D\u5236</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && !showDeleteConfirm\"\n (click)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && showDeleteConfirm\" nz-popconfirm\n nzPopconfirmTitle=\"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u884C\u5417?\" nzPopconfirmPlacement=\"bottom\"\n (nzOnConfirm)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n </span>\n </td>\n </tr>\n </ng-container>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td *ngIf=\"showCheckbox\"></td>\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{\n (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal) ? totalOption.value :\n LodashRound(totalOption.value, 2).toFixed(2)) : ''\n }}\n </td>\n </ng-container>\n </tr>\n </tbody>\n </nz-table>\n <nz-list\n *ngIf=\"linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize).length === 0\"\n [nzDataSource]=\"[]\"></nz-list>\n <ng-container>\n <hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n <div class=\"hd-formLines-pagination\">\n <div class=\"hd-formLines-pagination-left\">\n <div *ngIf=\"showKeyboardOperateTip\">\u652F\u6301\u952E\u76D8\u64CD\u4F5C\uFF0C\u4F7F\u7528\n <i nz-icon nzType=\"up-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <i nz-icon nzType=\"down-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <i nz-icon nzType=\"left-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <i nz-icon nzType=\"right-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <span style=\"font-size: 14px;margin-left: 4px;font-weight: bolder;\">Enter</span>\n \u952E\u5207\u6362\u8868\u5355\u9879\n </div>\n </div>\n <nz-pagination [nzSize]=\"'small'\" style=\"text-align: right;\" [nzPageIndex]=\"paginationPageIndex\"\n [nzPageSize]=\"paginationPageSize\" [nzPageSizeOptions]=\"[10, 20, 30, 40, 50]\"\n [nzTotal]=\"linesFormArray.controls.length\" nzShowSizeChanger (nzPageIndexChange)=\"pageIndexChange($event)\"\n (nzPageSizeChange)=\"pageSizeChange($event)\" [nzShowTotal]=\"totalTemplate\"></nz-pagination>\n <ng-template #totalTemplate let-total>\u5171 {{ linesFormArray.controls.length }} \u6761\u6570\u636E</ng-template>\n </div>\n\n </ng-container>\n</form>\n",
|
|
4945
|
+
template: "<ng-container *ngIf=\"showForm && showToolbar\">\n <hd-button-group class=\"hd-formLines-toolbar\">\n <ng-template #buttonGroupLeft>\n <!-- \u6709\u5168\u5C40\u641C\u7D22\uFF1A\u5DE6\u4FA7\u653E\u641C\u7D22\u6846 -->\n <ng-container *ngIf=\"showSearch\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\">\n <input type=\"text\" nz-input (keyup.enter)=\"searchLines()\" placeholder=\"\u8BF7\u8F93\u5165\u5185\u5BB9\u641C\u7D22\" style=\"width: 300px;\"\n [(ngModel)]=\"filterStr\" />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <i nz-icon nzType=\"search\" (click)=\"searchLines()\"></i>\n </ng-template>\n </ng-container>\n <!-- \u65E0\u5168\u5C40\u641C\u7D22\uFF1A\u5DE6\u4FA7\u653E\u81EA\u5B9A\u4E49\u6309\u94AE -->\n <ng-container *ngIf=\"!showSearch\">\n <ng-container *ngTemplateOutlet=\"formLinesLeftButton\"></ng-container>\n </ng-container>\n </ng-template>\n <ng-template #buttonGroupRight>\n <!-- \u6709\u5168\u5C40\u641C\u7D22\uFF1A\u53F3\u4FA7\u8303\u56F4\u518D\u5DE6\u53F3\u5206\u5F00 -->\n <div class=\"hd-formLines-toolbar-right\" *ngIf=\"showSearch\">\n <div class=\"hd-formLines-toolbar-right-left\">\n <ng-container *ngTemplateOutlet=\"formLinesLeftButton\"></ng-container>\n </div>\n <div class=\"hd-formLines-toolbar-right-right\">\n <ng-container *ngTemplateOutlet=\"formLinesRightButton\"></ng-container>\n </div>\n </div>\n <!-- \u65E0\u5168\u5C40\u641C\u7D22\uFF1A\u53F3\u4FA7\u53EA\u653E\u81EA\u5B9A\u4E49\u53F3\u4FA7\u6309\u94AE -->\n <ng-container *ngIf=\"!showSearch\">\n <ng-container *ngTemplateOutlet=\"formLinesRightButton\"></ng-container>\n </ng-container>\n </ng-template>\n </hd-button-group>\n <hd-space background=\"transparent\" type=\"row\" size=\"12\"></hd-space>\n</ng-container>\n\n<!-- \u52FE\u9009\u63D0\u793A\uFF1A\u5355\u72EC\u4E00\u884C\uFF0C\u653E\u5728\u8868\u5355\u4E0A\u65B9 -->\n<ng-container *ngIf=\"showForm && showCheckbox && getSelectedCount() > 0\">\n <nz-alert nzType=\"info\" [nzMessage]=\"selectionAlertTemplate\" nzShowIcon></nz-alert>\n <hd-space background=\"transparent\" type=\"row\" size=\"12\"></hd-space>\n</ng-container>\n<ng-template #selectionAlertTemplate>\n <span>\u5DF2\u9009\u62E9{{ getSelectedCount() }}\u6761\u6570\u636E</span> \n <span class=\"common-btn-group\">\n <a (click)=\"clearSelection()\">\u6E05\u7A7A</a>\n </span>\n</ng-template>\n\n<!-- <hd-button type=\"primary\" (clickAction)=\"focusDom(0, 0)\">\u805A\u7126\u7B2C\u4E00\u4E2A</hd-button> -->\n\n<form *ngIf=\"showForm\" nz-form [formGroup]=\"validateHdFormLines\" class=\"ant-advanced-search-form hd-formLines-container\"\n (keydown)=\"onKeyDown($event)\">\n <nz-table nzTemplateMode [nzFrontPagination]=\"false\" [nzLoading]=\"tableLoading\" [nzScroll]=\"scroll\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200 ]\">\n <thead>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showCheckbox\">\n <label nz-checkbox\n [ngModel]=\"isAllChecked()\"\n [nzIndeterminate]=\"isIndeterminate()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onAllChecked($event)\"></label>\n </th>\n <th nzWidth=\"58px\" [nzLeft]=\"lineNumberLeft\" *ngIf=\"showLineNumber\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let item of formLines\">\n <th *ngIf=\"!item.hide\" [nzAlign]=\"item.align ? item.align : 'left'\">\n <span *ngIf=\"item.require\" style=\"color: red;\">*</span>{{ item.label }}\n </th>\n </ng-container>\n <th [style.width.px]=\"operateColWidth\" nzRight=\"0\">\u64CD\u4F5C</th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let line of linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize);index as dataIndex\"\n formArrayName=\"lines\">\n <tr [formGroup]=\"line\">\n <td nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showCheckbox\">\n <label nz-checkbox\n [ngModel]=\"isLineChecked(line)\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onLineCheckedChange(line, $event)\"></label>\n </td>\n <td nzWidth=\"58px\" [nzLeft]=\"lineNumberLeft\" *ngIf=\"showLineNumber\">\n {{ line.get('lineIndex').value }}\n </td>\n <ng-container *ngFor=\"let formItem of formLines; index as innerIndex\">\n <td *ngIf=\"!formItem.hide\" [nzAlign]=\"formItem.align ? formItem.align : 'left'\">\n <nz-form-item>\n <nz-form-control\n [nzValidateStatus]=\"getControlValidateStatus(line, formItem)\"\n [nzErrorTip]=\"formItem.label + '\u4E0D\u80FD\u4E3A\u7A7A'\">\n <ng-container [ngSwitch]=\"formItem.type\">\n <ng-container *ngSwitchCase=\"'Input'\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\">\n <input #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [ngStyle]=\"getStyle(line, formItem, '100px')\" nz-input\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name ).value : null}\"\n [id]=\"'input-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#input-' + formItem.name + line.get('lineIndex').value, dataIndex , innerIndex) : null\"\n (input)=\"limitInputLength($event, line, formItem)\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [formControlName]=\"formItem.name\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate>\n <i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"line.get(formItem.name).value && !line.get(formItem.name).disabled\"\n (click)=\"inputClean(formItem ,line)\"></i>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Select'\">\n <nz-select #formInputDom (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n nzDropdownClassName=\"hd-select-table\"\n *ngIf=\"formItem.selectOption.tableColumns;else nomarlSelectTemplate\"\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, line, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <div class=\"hd-select-empty\"\n *ngIf=\"!(formItem.selectOption?.selectList?.length > 0 || line.get(formItem.selectOption.selectListName)?.value?.length > 0)\">\n <img\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNjRweCIgaGVpZ2h0PSI0MXB4IiB2aWV3Qm94PSIwIDAgNjQgNDEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00NzIuMDAwMDAwLCAtMTMzNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY0LjAwMDAwMCwgMTExNC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MC4wMDAwMDAsIDc4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjguMDAwMDAwLCAxNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxnID4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxlbGxpcHNlICBmaWxsPSIjRjVGNUY1IiBjeD0iMzIiIGN5PSIzMyIgcng9IjMyIiByeT0iNyI+PC9lbGxpcHNlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5LjAwMDAwMCwgMC4wMDAwMDApIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ2LDEyLjc2MDU2MDQgTDM1Ljg1NDMwNDcsMS4yNTczOTYzMyBDMzUuMzY3NDQxNCwwLjQ3MzgyNjYwNSAzNC42NTU4Nzg5LDAgMzMuOTA2NzYxNywwIEwxMi4wOTMyMzgzLDAgQzExLjM0NDEyMTEsMCAxMC42MzI1NTg2LDAuNDczOTUwMjU1IDEwLjE0NTY5NTMsMS4yNTczOTYzMyBMMi42MTQ3OTcyN2UtMTIsMTIuNzYwNTYwNCBMMCwyMiBMNDYsMjIgTDQ2LDEyLjc2MDU2MDQgWiIgID48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTMyLjYxMzI4MTMsMTUuOTMxNSBDMzIuNjEzMjgxMywxNC4zMjU4NTExIDMzLjYwNjk1MzEsMTMuMDAwMjM0IDM0LjgzOTY5OTIsMTMgTDQ2LDEzIEw0NiwzMS4xMzcxMjc3IEM0NiwzMy4yNTg5NTc0IDQ0LjY3OTM4NjcsMzUgNDMuMDUwNDI5NywzNSBMMi45NDk1NzAzMSwzNSBDMS4zMjA1MjM0NCwzNSAwLDMzLjI1ODg0MDQgMCwzMS4xMzcxMjc3IEwwLDEzIEwxMS4xNjAzMDA4LDEzIEMxMi4zOTMwNDY5LDEzIDEzLjM4NjcxODgsMTQuMzIyODA4NSAxMy4zODY3MTg4LDE1LjkyODQ1NzQgTDEzLjM4NjcxODgsMTUuOTQ5NjM4MyBDMTMuMzg2NzE4OCwxNy41NTUyODcyIDE0LjM5MTcxMDksMTguODUxMTgwOSAxNS42MjQ0NTcsMTguODUxMTgwOSBMMzAuMzc1NTQzLDE4Ljg1MTE4MDkgQzMxLjYwODI4OTEsMTguODUxMTgwOSAzMi42MTMyODEzLDE3LjU0MzM1MTEgMzIuNjEzMjgxMywxNS45Mzc3MDIxIEwzMi42MTMyODEzLDE1LjkzMTUgWiIgIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+\"\n alt=\"empty\">\n <p class=\"ant-empty-description\">\u6682\u65E0\u6570\u636E</p>\n </div>\n\n <nz-option nzCustomContent\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n <div class=\"hd-option-line\">\n <div *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns\"\n [ngStyle]=\"getSelectTableColumnStyle(selectOptionTableColumn)\">\n <ng-container *ngIf=\"selectOptionTableColumn.icons;else notPictureTemplate\">\n <div class=\"hd-option-icons\">\n <ng-container *ngFor=\"let icon of selectOptionTableColumn.icons\">\n <img *ngIf=\"icon.iconName === 'hd-recommend-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVpJREFUOE+l07FLQkEcB/Dv7713Zg1GQ0SgW9AmTYVp1BRUokZBEI1u/QVBUBD1D0Rt0dQaPYmotXza1tKQzQ1Fk0iDHr5vPEOTUpO88e77+9zvjjtBh8HTOb8e0hu0eN8Xzz22ikonoGzHdgXcAVB16S75U/mbn/m2AK+mglqbBUAGvCIRuVCJ7HLXQCUTPQOxXi8Q4FolnYWuAH0+HaEpjrdxAyC3VSq33xKgPTWiYYUai8IjUCabw4Zw1XWNF2+OZrXoi+cLImBth4odfQAw0elCW6zdKvU2/wVkYs8ggzBlRqrcI/DrrK1wQ7DWAIToV8lsqGxHDwTY6qYbA1jpCVAux3oBSirhDPYCOL6kE/s/QB77UrnNJoDDVkCN6pI+BJH+6xINQdpKOCf1d/AEYBxgUUQC5PcLbPMDXy1lhGXx7r0G6ExklpBwI0xh2w7ID+UzL71iL/MJdzuZdDL/kXcAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n <img *ngIf=\"icon.iconName === 'hd-img-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAyhJREFUWEe1ll1o1XYYxp8nPUmUihdCV3bAirvYzUC80Xpy3KwTZNR2CdOhDkTBwe6G32XzwqpjE3Qt4pUKZQqDyQZNTp1uY8yCJG0F2d2+LlWOOkShovQkaV45lcJpTdOTHJubBPI+z/Pj//H+/0TGR66uf8sPoz8A/Kstkp38YORxFitmEVU1vm1cBPlp9ZuQXtX0jmfxygQgvxSWBRWlDECvhgrwQFuqLufG4TAtRCaAwCl+IcDXtWEi2KFb7pUFBxCBEpSMMsDWGWEiNzXLe2/BASp2cTuJH+KCRMJ3dGvsrzQQqafAtw0XpBEfIhc00/tswQD8QWM1FP45d4A8V9XJN9k5Nl4vRKoR8G3jMshdyebRPs0cOftaAaRUbAsRrRRRhuczFsF/lPATNQrL3Hr7/nz1lGvvtkwGUSEC8gLkWfMGkAfQMp9J0n8ByhS5J+QDVr+BshBlUu6q3d5v9G3jIcg3GgnJqp2C853iCIB1WU0a1F2iOO2tPnK3CLQ1aJZKLpCfddPrmtoF8uuqZn9iyfcEzVQumYtlQDO9vS8PsprHd4xvAR7I7FuHUIBvdNP9crr0lT7g24U+UNlfh1f6Esrn2ofeuVphbCPyneJuAN+lT0jokZCduum9cobM2Qn9krEGEa6+hi36jEC3aro34vASW3FoG9si8sdGRoKCY6rlnpjLIxGgYhunSPY0AiAiP+mW93EmAN8ujoJobwgAuKOb7orUAHKjY1EwHjwFkGsEoKpVJ6WVH3n/p1oDwVBhk0TK742GV/UKYOZMt5QKoGIbX5E8mgwg4wCbADQn1c1uPvP2gWqB7xjDADck7OwBVan0QFFyQaj2A9wxV60A13XT7Uw1Ar5TlDiBQP6hRHs0a3Ss9n8wuK4jYtN5Em/H6B5ppht7r4jvhEOFtYiUGQEAnhDoV033ZNJwB45xRAS9IBfX1qnhRD7uhhQLENiFQ0Ll9LSBCM7olnu43gUpTjEfiPSB3D6tUQRbcpZ7bbZHLEBYKnRFogxV505rmjzIrtG/6w2fMS0l430RHAVoULBZtdybdQFkCcuqSXUtzxqSpHsBfmUdgJhaiDQAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n <span *ngIf=\"icon.iconName === 'hd-select-close' && selectItem[icon.fieldName]\"\n class=\"hd-select-close\">\n \u7981\u7528\n </span>\n <span *ngIf=\"icon.iconName === 'hd-select-purchase' && selectItem[icon.fieldName]\"\n class=\"hd-select-purchase\">\n \u534F\n </span>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #notPictureTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name], selectOptionTableColumn.width);else overflowTemplate\">\n <div>{{\n judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])\n }}\n </div>\n </ng-container>\n <ng-template #overflowTemplate>\n <div class=\"hd-option-overflow\" nz-tooltip\n [nzTooltipTitle]=\"selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name]\">\n {{\n judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])\n }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n </div>\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n <ng-template #nomarlSelectTemplate>\n <nz-select #formInputDom (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\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, line, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-template>\n\n </ng-container>\n <ng-container *ngSwitchCase=\"'Date'\">\n <nz-date-picker #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\" *ngIf=\"formItem.showTime\"\n [ngStyle]=\"getStyle(line, formItem, '150px')\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\"\n [nzShowToday]=\"formItem.hdShowToday !== false\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker #formInputDom *ngIf=\"!formItem.showTime\"\n [ngStyle]=\"getStyle(line, formItem, '150px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\"\n [nzShowToday]=\"formItem.hdShowToday !== false\">\n </nz-date-picker>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n {{ line.get(formItem.explainOptionRight.name).value }}\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'DateRange'\">\n <nz-range-picker #formInputDom [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [nzDisabledDate]=\"formItem.hdDisabledDate\" [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\"\n [formControlName]=\"formItem.name\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'TextArea'\">\n <textarea #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name).value : null}\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [maxlength]=\"formItem.maxLength || null\" rows=\"4\" nz-input\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"'InputNumber'\">\n <div style=\"display: flex;align-items: center;\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\">\n <nz-input-number #formInputDom [ngStyle]=\"getStyle(line, formItem, '100px')\"\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"\n [nzMin]=\"formItem?.inputNumber?.min || 0\" [nzMax]=\"formItem?.inputNumber?.max || 99999999\"\n [nzStep]=\"formItem?.inputNumber?.step || 1\"\n [nzPrecision]=\"formItem?.inputNumber?.precision != null ? formItem.inputNumber.precision : 2\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [nzId]=\"'inputNumber-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#inputNumber-' + formItem.name + line.get('lineIndex').value, dataIndex , innerIndex) : setActiveDomInFormLines(dataIndex , innerIndex)\">\n </nz-input-number>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n {{ line.get(formItem.explainOptionRight.name).value }}\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'MultipleSelect'\">\n <nz-select #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\" nzMode=\"multiple\"\n [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\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\" [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (nzOpenChange)=\"onOpenChangeEvent(formItem.onOpenChangeEvent || null, $event, line, formItem.onOpenChangeEventDebounceTime)\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, 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\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\">\n <nz-option *ngFor=\"let option of line.get(formItem.selectOption.value).value;index as i\"\n [nzLabel]=\"line.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=\"'ViewDom'\">\n <span *ngIf=\"!formItem?.hideViewDomValue\">\n {{\n (formItem.preserveNumber && line.get(formItem.name).value) ?\n LodashRound(line.get(formItem.name).value,\n formItem.preserveNumber).toFixed(formItem.preserveNumber)\n : line.get(formItem.name).value\n }}\n </span>\n <ng-container\n *ngTemplateOutlet=\"ViewDomRightTemplate;context:{formItem: formItem, formLine: line}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Switch'\">\n <nz-switch (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [formControlName]=\"formItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Time'\">\n <nz-time-picker #formInputDom [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n (focusin)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [formControlName]=\"formItem.name\"></nz-time-picker>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n <div *ngIf=\"formItem?.explainOption?.show\"\n [style.color]=\"formItem?.explainOption?.color ? formItem.explainOption.color : null\">\n {{ line.get(formItem.explainOption.name).value }}\n </div>\n </td>\n </ng-container>\n <td [style.width.px]=\"operateColWidth\" nzRight=\"0\">\n <span class=\"common-btn-group\">\n <a *ngIf=\"operateButtons.includes('add')\" (click)=\"addFormLine(line)\">\u6DFB\u52A0</a>\n <a *ngIf=\"operateButtons.includes('copy')\" (click)=\"copyFormLine(line)\">\u590D\u5236</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && !showDeleteConfirm\"\n (click)=\"deleteFormLine(line)\">\u5220\u9664</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && showDeleteConfirm\" nz-popconfirm\n nzPopconfirmTitle=\"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u884C\u5417?\" nzPopconfirmPlacement=\"bottom\"\n (nzOnConfirm)=\"deleteFormLine(line)\">\u5220\u9664</a>\n </span>\n </td>\n </tr>\n </ng-container>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td *ngIf=\"showCheckbox\"></td>\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{\n (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal) ? totalOption.value :\n LodashRound(totalOption.value, 2).toFixed(2)) : ''\n }}\n </td>\n </ng-container>\n </tr>\n </tbody>\n </nz-table>\n <nz-list\n *ngIf=\"linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize).length === 0\"\n [nzDataSource]=\"[]\"></nz-list>\n <ng-container>\n <hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n <div class=\"hd-formLines-pagination\">\n <div class=\"hd-formLines-pagination-left\">\n <div *ngIf=\"showKeyboardOperateTip\">\u652F\u6301\u952E\u76D8\u64CD\u4F5C\uFF0C\u4F7F\u7528\n <i nz-icon nzType=\"up-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <i nz-icon nzType=\"down-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <i nz-icon nzType=\"left-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <i nz-icon nzType=\"right-circle\" nzTheme=\"outline\" style=\"font-size: 16px;margin-left: 4px;\"></i>\n <span style=\"font-size: 14px;margin-left: 4px;font-weight: bolder;\">Enter</span>\n \u952E\u5207\u6362\u8868\u5355\u9879\n </div>\n </div>\n <nz-pagination [nzSize]=\"'small'\" style=\"text-align: right;\" [nzPageIndex]=\"paginationPageIndex\"\n [nzPageSize]=\"paginationPageSize\" [nzPageSizeOptions]=\"[10, 20, 30, 40, 50]\"\n [nzTotal]=\"linesFormArray.controls.length\" nzShowSizeChanger (nzPageIndexChange)=\"pageIndexChange($event)\"\n (nzPageSizeChange)=\"pageSizeChange($event)\" [nzShowTotal]=\"totalTemplate\"></nz-pagination>\n <ng-template #totalTemplate let-total>\u5171 {{ linesFormArray.controls.length }} \u6761\u6570\u636E</ng-template>\n </div>\n\n </ng-container>\n</form>\n",
|
|
4878
4946
|
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-formLines-toolbar{display:block}.hd-formLines-toolbar ::ng-deep .hd-button-group-right{flex:1;min-width:0;display:flex;justify-content:flex-end}.hd-formLines-toolbar-right{display:flex;align-items:center;justify-content:space-between;width:100%;margin-left:16px}.hd-formLines-toolbar-right-left,.hd-formLines-toolbar-right-right{display:flex;align-items:center}.hd-formLines-container ::ng-deep td{padding:4px 8px!important}.hd-formLines-container .ant-table-tbody>tr>td,.hd-formLines-container ::ng-deep .ant-table-thead>tr>th{padding:16px 8px}.hd-formLines-container ::ng-deep .hd-table-total>td{border:0!important}.hd-formLines-container ::ng-deep .ant-form-item{margin-bottom:0}.hd-formLines-container .ant-input-number{width:100%}::ng-deep .hd-select-table .ant-select-dropdown-menu-item-disabled{background:#f5f8f6!important;border-bottom:1px solid #e8e8e8;position:-webkit-sticky;position:sticky;top:0;z-index:10;padding:0}::ng-deep .hd-select-table .ant-select-dropdown-menu-item-disabled:hover{background:#f5f8f6!important}::ng-deep .hd-option-header{display:flex;align-items:center;color:rgba(0,0,0,.85);background:#f5f8f6}::ng-deep .hd-option-header-column{padding:5px 0}.hd-option-line{display:flex;align-items:center}.hd-option-overflow{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.hd-select-empty{display:flex;align-items:center;flex-direction:column;padding:20px 0;background:#fff}::ng-deep .ant-empty-small{background:#fff!important;padding:8px 0;margin:0}.hd-formLines-pagination{display:flex;align-items:center;justify-content:space-between}.hd-formLines-pagination .hd-formLines-pagination-left{margin-left:10px;display:flex;align-items:center}.hd-option-icons{display:flex;align-items:center}.hd-select-close{display:block;height:16px;line-height:14px;text-align:center;padding:0 4px;border:1px solid #f5222d;color:#f5222d;font-size:14px}.hd-select-purchase{display:block;height:16px;line-height:14px;text-align:center;padding:0 4px;border:1px solid #20bd62;color:#20bd62;font-size:14px}"]
|
|
4879
4947
|
}] }
|
|
4880
4948
|
];
|
|
@@ -5247,8 +5315,7 @@
|
|
|
5247
5315
|
Time: 9,
|
|
5248
5316
|
Cascader: 10,
|
|
5249
5317
|
Radio: 11,
|
|
5250
|
-
Checkbox: 12
|
|
5251
|
-
,
|
|
5318
|
+
Checkbox: 12,
|
|
5252
5319
|
};
|
|
5253
5320
|
FormListType[FormListType.Input] = 'Input';
|
|
5254
5321
|
FormListType[FormListType.Select] = 'Select';
|
|
@@ -5268,7 +5335,7 @@
|
|
|
5268
5335
|
}
|
|
5269
5336
|
HdFormService.decorators = [
|
|
5270
5337
|
{ type: core.Injectable, args: [{
|
|
5271
|
-
providedIn:
|
|
5338
|
+
providedIn: "root",
|
|
5272
5339
|
},] }
|
|
5273
5340
|
];
|
|
5274
5341
|
/** @nocollapse */
|
|
@@ -5301,7 +5368,9 @@
|
|
|
5301
5368
|
* @return {?}
|
|
5302
5369
|
*/
|
|
5303
5370
|
function (value) { return value; });
|
|
5304
|
-
this.searchSubscription = this.searchSubject
|
|
5371
|
+
this.searchSubscription = this.searchSubject
|
|
5372
|
+
.pipe(operators.debounceTime(this.debounceTimeout))
|
|
5373
|
+
.subscribe((/**
|
|
5305
5374
|
* @param {?} __0
|
|
5306
5375
|
* @return {?}
|
|
5307
5376
|
*/
|
|
@@ -5309,7 +5378,9 @@
|
|
|
5309
5378
|
var fn = _a.fn, event = _a.event;
|
|
5310
5379
|
return _this.triggerEvent(fn, event);
|
|
5311
5380
|
}));
|
|
5312
|
-
this.openChangeSubscription = this.openChangeSubject
|
|
5381
|
+
this.openChangeSubscription = this.openChangeSubject
|
|
5382
|
+
.pipe(operators.debounceTime(this.openChangeDebounceTimeout))
|
|
5383
|
+
.subscribe((/**
|
|
5313
5384
|
* @param {?} __0
|
|
5314
5385
|
* @return {?}
|
|
5315
5386
|
*/
|
|
@@ -5342,7 +5413,9 @@
|
|
|
5342
5413
|
* @return {?}
|
|
5343
5414
|
*/
|
|
5344
5415
|
function (changes) {
|
|
5345
|
-
if (changes[
|
|
5416
|
+
if (changes["formList"] &&
|
|
5417
|
+
JSON.stringify(changes["formList"].currentValue) !==
|
|
5418
|
+
JSON.stringify(changes["formList"].previousValue)) {
|
|
5346
5419
|
if (!this.formList || this.formList.length === 0) {
|
|
5347
5420
|
return;
|
|
5348
5421
|
}
|
|
@@ -5366,14 +5439,15 @@
|
|
|
5366
5439
|
if (!fn) {
|
|
5367
5440
|
return;
|
|
5368
5441
|
}
|
|
5369
|
-
// 父组件未配置时默认 500ms 防抖
|
|
5370
5442
|
/** @type {?} */
|
|
5371
|
-
var debounceMs = onSearchEventDebounceTime != null ? onSearchEventDebounceTime :
|
|
5443
|
+
var debounceMs = onSearchEventDebounceTime != null ? onSearchEventDebounceTime : 0;
|
|
5372
5444
|
this.debounceTimeout = debounceMs;
|
|
5373
5445
|
if (this.searchSubscription) {
|
|
5374
5446
|
this.searchSubscription.unsubscribe();
|
|
5375
5447
|
}
|
|
5376
|
-
this.searchSubscription = this.searchSubject
|
|
5448
|
+
this.searchSubscription = this.searchSubject
|
|
5449
|
+
.pipe(operators.debounceTime(this.debounceTimeout))
|
|
5450
|
+
.subscribe((/**
|
|
5377
5451
|
* @param {?} __0
|
|
5378
5452
|
* @return {?}
|
|
5379
5453
|
*/
|
|
@@ -5400,14 +5474,17 @@
|
|
|
5400
5474
|
if (!fn) {
|
|
5401
5475
|
return;
|
|
5402
5476
|
}
|
|
5403
|
-
// 父组件未配置时默认 500ms 防抖
|
|
5404
5477
|
/** @type {?} */
|
|
5405
|
-
var debounceMs = onOpenChangeEventDebounceTime != null
|
|
5478
|
+
var debounceMs = onOpenChangeEventDebounceTime != null
|
|
5479
|
+
? onOpenChangeEventDebounceTime
|
|
5480
|
+
: 0;
|
|
5406
5481
|
this.openChangeDebounceTimeout = debounceMs;
|
|
5407
5482
|
if (this.openChangeSubscription) {
|
|
5408
5483
|
this.openChangeSubscription.unsubscribe();
|
|
5409
5484
|
}
|
|
5410
|
-
this.openChangeSubscription = this.openChangeSubject
|
|
5485
|
+
this.openChangeSubscription = this.openChangeSubject
|
|
5486
|
+
.pipe(operators.debounceTime(this.openChangeDebounceTimeout))
|
|
5487
|
+
.subscribe((/**
|
|
5411
5488
|
* @param {?} __0
|
|
5412
5489
|
* @return {?}
|
|
5413
5490
|
*/
|
|
@@ -5446,7 +5523,7 @@
|
|
|
5446
5523
|
var _this = this;
|
|
5447
5524
|
// 异常捕获
|
|
5448
5525
|
if (!this.checkList(this.formList)) {
|
|
5449
|
-
throw
|
|
5526
|
+
throw "form组件数据格式不规范";
|
|
5450
5527
|
}
|
|
5451
5528
|
// 对表单数据做初始化,用row隔离每行数据item
|
|
5452
5529
|
this.dealRow();
|
|
@@ -5461,17 +5538,26 @@
|
|
|
5461
5538
|
function (item, index) {
|
|
5462
5539
|
// 日期相关的控件做特殊处理
|
|
5463
5540
|
if (item.type === 2 && item.value) {
|
|
5464
|
-
var _a = __read(item.value
|
|
5541
|
+
var _a = __read(item.value
|
|
5542
|
+
.toString()
|
|
5543
|
+
.split("-")
|
|
5544
|
+
.map((/**
|
|
5465
5545
|
* @param {?} str
|
|
5466
5546
|
* @return {?}
|
|
5467
5547
|
*/
|
|
5468
5548
|
function (str) { return parseInt(str); })), 3), year = _a[0], month = _a[1], day = _a[2];
|
|
5469
5549
|
/** @type {?} */
|
|
5470
5550
|
var newDateStr = new Date(year, month - 1, day)
|
|
5471
|
-
.toLocaleDateString(
|
|
5472
|
-
|
|
5551
|
+
.toLocaleDateString("zh-Hans-CN", {
|
|
5552
|
+
year: "numeric",
|
|
5553
|
+
month: "2-digit",
|
|
5554
|
+
day: "2-digit",
|
|
5555
|
+
})
|
|
5556
|
+
.replace(/\//g, "-");
|
|
5473
5557
|
if (item.validator) {
|
|
5474
|
-
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
|
+
: []);
|
|
5475
5561
|
}
|
|
5476
5562
|
else {
|
|
5477
5563
|
formGroupList[item.name] = _this.fb.control({ value: new Date(newDateStr), disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5486,33 +5572,43 @@
|
|
|
5486
5572
|
* @return {?}
|
|
5487
5573
|
*/
|
|
5488
5574
|
function (item) {
|
|
5489
|
-
var _a = __read(item
|
|
5575
|
+
var _a = __read(item
|
|
5576
|
+
.split("-")
|
|
5577
|
+
.map((/**
|
|
5490
5578
|
* @param {?} str
|
|
5491
5579
|
* @return {?}
|
|
5492
5580
|
*/
|
|
5493
5581
|
function (str) { return parseInt(str); })), 3), year = _a[0], month = _a[1], day = _a[2];
|
|
5494
5582
|
/** @type {?} */
|
|
5495
5583
|
var newDateStr = new Date(year, month - 1, day)
|
|
5496
|
-
.toLocaleDateString(
|
|
5497
|
-
|
|
5584
|
+
.toLocaleDateString("zh-Hans-CN", {
|
|
5585
|
+
year: "numeric",
|
|
5586
|
+
month: "2-digit",
|
|
5587
|
+
day: "2-digit",
|
|
5588
|
+
})
|
|
5589
|
+
.replace(/\//g, "-");
|
|
5498
5590
|
item = new Date(newDateStr);
|
|
5499
5591
|
}));
|
|
5500
5592
|
if (item.validator) {
|
|
5501
|
-
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
|
+
: []);
|
|
5502
5596
|
}
|
|
5503
5597
|
else {
|
|
5504
5598
|
formGroupList[item.name] = _this.fb.control({ value: formItemDate, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
5505
5599
|
}
|
|
5506
5600
|
}
|
|
5507
5601
|
else {
|
|
5508
|
-
throw
|
|
5602
|
+
throw "form组件中DateRange控件value值格式不规范,正确示例['2020-01-22', '2020-01-23']";
|
|
5509
5603
|
}
|
|
5510
5604
|
}
|
|
5511
5605
|
else if (item.type === FormListType.Checkbox && item.checkboxOption) {
|
|
5512
5606
|
/** @type {?} */
|
|
5513
5607
|
var checkboxValue = Array.isArray(item.value) ? item.value : [];
|
|
5514
5608
|
if (item.validator) {
|
|
5515
|
-
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
|
+
: []);
|
|
5516
5612
|
}
|
|
5517
5613
|
else {
|
|
5518
5614
|
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5522,7 +5618,9 @@
|
|
|
5522
5618
|
/** @type {?} */
|
|
5523
5619
|
var checkboxValue = item.value != null ? item.value : false;
|
|
5524
5620
|
if (item.validator) {
|
|
5525
|
-
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
|
+
: []);
|
|
5526
5624
|
}
|
|
5527
5625
|
else {
|
|
5528
5626
|
formGroupList[item.name] = _this.fb.control({ value: checkboxValue, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5530,7 +5628,9 @@
|
|
|
5530
5628
|
}
|
|
5531
5629
|
else {
|
|
5532
5630
|
if (item.validator) {
|
|
5533
|
-
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
|
+
: []);
|
|
5534
5634
|
}
|
|
5535
5635
|
else {
|
|
5536
5636
|
formGroupList[item.name] = _this.fb.control({ value: item.value, disabled: item.disabled }, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
@@ -5544,11 +5644,13 @@
|
|
|
5544
5644
|
*/
|
|
5545
5645
|
function (item) {
|
|
5546
5646
|
if (item.onChangeEvent) {
|
|
5547
|
-
// 父组件未配置时默认 500ms 防抖
|
|
5548
5647
|
/** @type {?} */
|
|
5549
|
-
var debounceMs = item.onChangeEventDebounceTime != null
|
|
5550
|
-
|
|
5551
|
-
|
|
5648
|
+
var debounceMs = item.onChangeEventDebounceTime != null
|
|
5649
|
+
? item.onChangeEventDebounceTime
|
|
5650
|
+
: 0;
|
|
5651
|
+
_this.validateHdForm
|
|
5652
|
+
.get(item.name)
|
|
5653
|
+
.valueChanges.pipe(operators.debounceTime(debounceMs))
|
|
5552
5654
|
.subscribe((/**
|
|
5553
5655
|
* @param {?} value
|
|
5554
5656
|
* @return {?}
|
|
@@ -5560,7 +5662,9 @@
|
|
|
5560
5662
|
* @param {?} data
|
|
5561
5663
|
* @return {?}
|
|
5562
5664
|
*/
|
|
5563
|
-
function (data) {
|
|
5665
|
+
function (data) {
|
|
5666
|
+
return _this.onHdFormValueChanged(data);
|
|
5667
|
+
}));
|
|
5564
5668
|
this.onHdFormValueChanged();
|
|
5565
5669
|
};
|
|
5566
5670
|
/**
|
|
@@ -5588,8 +5692,11 @@
|
|
|
5588
5692
|
// 去找到前一个非hide的控件
|
|
5589
5693
|
for (var j = i - 1; j >= 0; j--) {
|
|
5590
5694
|
if (this.formList[j].totalWidth) {
|
|
5591
|
-
this.formList[i].totalWidth =
|
|
5592
|
-
|
|
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) {
|
|
5593
5700
|
step = step + 4;
|
|
5594
5701
|
this.formList[i].isRowFirst = 1;
|
|
5595
5702
|
}
|
|
@@ -5612,7 +5719,9 @@
|
|
|
5612
5719
|
if (space === 4 || this.formList[m + n].isRowFirst === 1) {
|
|
5613
5720
|
break;
|
|
5614
5721
|
}
|
|
5615
|
-
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) {
|
|
5616
5725
|
this.formList[m].columnItems.push(this.formList[m + n]);
|
|
5617
5726
|
space++;
|
|
5618
5727
|
}
|
|
@@ -5662,7 +5771,7 @@
|
|
|
5662
5771
|
}));
|
|
5663
5772
|
// 校验name是否重复
|
|
5664
5773
|
if (__spread(new Set(nameList)).length !== list.length) {
|
|
5665
|
-
throw
|
|
5774
|
+
throw "form组件数据格式不规范,存在重复name值!";
|
|
5666
5775
|
}
|
|
5667
5776
|
// ...more check
|
|
5668
5777
|
return true;
|
|
@@ -5767,7 +5876,7 @@
|
|
|
5767
5876
|
};
|
|
5768
5877
|
HdFormComponent.decorators = [
|
|
5769
5878
|
{ type: core.Component, args: [{
|
|
5770
|
-
selector:
|
|
5879
|
+
selector: "hd-form",
|
|
5771
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",
|
|
5772
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}"]
|
|
5773
5882
|
}] }
|