@yibozhang/pro-table 0.0.5 → 0.0.7
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/yibozhang-pro-table.umd.js +410 -80
- package/bundles/yibozhang-pro-table.umd.js.map +1 -1
- package/bundles/yibozhang-pro-table.umd.min.js +1 -1
- package/bundles/yibozhang-pro-table.umd.min.js.map +1 -1
- package/esm2015/lib/page-container/page-container.component.js +4 -2
- package/esm2015/lib/page-public/antd-form.js +168 -36
- package/esm2015/lib/page-public/array-form.js +29 -1
- package/esm2015/lib/pro-table.component.js +156 -25
- package/fesm2015/yibozhang-pro-table.js +358 -63
- package/fesm2015/yibozhang-pro-table.js.map +1 -1
- package/lib/page-container/page-container.component.d.ts +1 -0
- package/lib/page-container/page-container.component.d.ts.map +1 -1
- package/lib/page-public/antd-form.d.ts +15 -1
- package/lib/page-public/antd-form.d.ts.map +1 -1
- package/lib/page-public/array-form.d.ts +2 -0
- package/lib/page-public/array-form.d.ts.map +1 -1
- package/lib/pro-table.component.d.ts +5 -0
- package/lib/pro-table.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/yibozhang-pro-table.metadata.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { __awaiter } from 'tslib';
|
|
2
|
-
import
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, EventEmitter, Component, Optional, Inject, Input, Output, ContentChild, ContentChildren, TemplateRef, NgModule, forwardRef, ChangeDetectorRef, ElementRef, ViewChild, ComponentFactoryResolver, ViewContainerRef, Injectable } from '@angular/core';
|
|
3
4
|
import { isEqual, hasIn, cloneDeep, isNil, debounce } from 'lodash-es';
|
|
4
5
|
import { isObservable } from 'rxjs';
|
|
5
6
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
6
7
|
import { CommonModule } from '@angular/common';
|
|
7
8
|
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
|
9
|
+
import * as i1 from '@angular/forms';
|
|
8
10
|
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormGroup, FormBuilder } from '@angular/forms';
|
|
9
11
|
import { RouterModule } from '@angular/router';
|
|
10
12
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
@@ -181,8 +183,10 @@ class ProTableComponent {
|
|
|
181
183
|
};
|
|
182
184
|
this._loading = false;
|
|
183
185
|
this._selectedTableRow = null;
|
|
184
|
-
//
|
|
186
|
+
// 选中的行数据(用于复选框选择)- 保留用于兼容性
|
|
185
187
|
this._selectedRows = [];
|
|
188
|
+
// 使用 Set 存储选中项的 ID,支持跨页选中
|
|
189
|
+
this._selectedRowIds = new Set();
|
|
186
190
|
// 全选状态
|
|
187
191
|
this._checkedAll = false;
|
|
188
192
|
// 半选状态(部分选中)
|
|
@@ -705,7 +709,12 @@ class ProTableComponent {
|
|
|
705
709
|
return this._selectedTableRow;
|
|
706
710
|
}
|
|
707
711
|
getCheckedRows() {
|
|
708
|
-
|
|
712
|
+
if (!this.showCheckbox) {
|
|
713
|
+
return [];
|
|
714
|
+
}
|
|
715
|
+
// 返回当前数据源中所有 checked 为 true 的项
|
|
716
|
+
// 注意:如果需要获取所有页的选中项,需要遍历所有数据源或使用 _selectedRowIds
|
|
717
|
+
return this.dataSource.filter((row) => row.checked === true);
|
|
709
718
|
}
|
|
710
719
|
// 获取指定名称的模板
|
|
711
720
|
getTemplate(name) {
|
|
@@ -752,13 +761,14 @@ class ProTableComponent {
|
|
|
752
761
|
return false;
|
|
753
762
|
return this.rowDisabled ? this.rowDisabled(data) : false;
|
|
754
763
|
}
|
|
755
|
-
//
|
|
764
|
+
// 检查行是否被复选框选中(数据驱动模式)
|
|
756
765
|
isRowChecked(data) {
|
|
757
766
|
if (!this.showCheckbox)
|
|
758
767
|
return false;
|
|
759
|
-
|
|
768
|
+
// 直接读取数据对象的 checked 属性
|
|
769
|
+
return data.checked === true;
|
|
760
770
|
}
|
|
761
|
-
//
|
|
771
|
+
// 切换行的选中状态(数据驱动模式,保留用于兼容)
|
|
762
772
|
toggleRowChecked(data, checked, event) {
|
|
763
773
|
if (event) {
|
|
764
774
|
event.stopPropagation(); // 阻止事件冒泡,避免触发行点击
|
|
@@ -767,9 +777,21 @@ class ProTableComponent {
|
|
|
767
777
|
if (this.isRowDisabled(data)) {
|
|
768
778
|
return;
|
|
769
779
|
}
|
|
770
|
-
|
|
780
|
+
// 直接设置数据对象的 checked 属性
|
|
781
|
+
data.checked = checked;
|
|
782
|
+
// 同步更新 _selectedRowIds(用于跨页选中)
|
|
783
|
+
const id = this.getRowId(data);
|
|
784
|
+
if (id !== undefined) {
|
|
785
|
+
if (checked) {
|
|
786
|
+
this._selectedRowIds.add(id);
|
|
787
|
+
}
|
|
788
|
+
else {
|
|
789
|
+
this._selectedRowIds.delete(id);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
// 同步更新 _selectedRows(用于兼容性)
|
|
793
|
+
const index = this._selectedRows.findIndex((row) => this.isSameRow(row, data));
|
|
771
794
|
if (checked) {
|
|
772
|
-
// 选中
|
|
773
795
|
if (index === -1) {
|
|
774
796
|
this._selectedRows.push(data);
|
|
775
797
|
}
|
|
@@ -777,19 +799,18 @@ class ProTableComponent {
|
|
|
777
799
|
this._selectedTableRow = data;
|
|
778
800
|
}
|
|
779
801
|
else {
|
|
780
|
-
// 取消选中
|
|
781
802
|
if (index > -1) {
|
|
782
803
|
this._selectedRows.splice(index, 1);
|
|
783
804
|
}
|
|
784
805
|
// 若当前高亮行为该行,则取消高亮
|
|
785
806
|
if (this._selectedTableRow &&
|
|
786
|
-
|
|
807
|
+
this.isSameRow(this._selectedTableRow, data)) {
|
|
787
808
|
this._selectedTableRow = null;
|
|
788
809
|
}
|
|
789
810
|
}
|
|
790
811
|
this.updateCheckAllStatus();
|
|
791
812
|
}
|
|
792
|
-
//
|
|
813
|
+
// 更新全选状态(数据驱动模式)
|
|
793
814
|
updateCheckAllStatus() {
|
|
794
815
|
if (!this.showCheckbox || !Array.isArray(this.dataSource)) {
|
|
795
816
|
this._checkedAll = false;
|
|
@@ -798,39 +819,120 @@ class ProTableComponent {
|
|
|
798
819
|
}
|
|
799
820
|
// 只计算可用的行(未禁用的行)
|
|
800
821
|
const availableRows = this.dataSource.filter((row) => !this.isRowDisabled(row));
|
|
801
|
-
|
|
822
|
+
// 基于数据对象的 checked 属性计算
|
|
823
|
+
const checkedCount = availableRows.filter((row) => row.checked === true).length;
|
|
802
824
|
const totalCount = availableRows.length;
|
|
803
825
|
this._checkedAll =
|
|
804
826
|
totalCount > 0 && checkedCount > 0 && checkedCount === totalCount;
|
|
805
827
|
this._indeterminate = checkedCount > 0 && checkedCount < totalCount;
|
|
806
828
|
}
|
|
807
|
-
//
|
|
829
|
+
// 全选/取消全选(数据驱动模式)
|
|
808
830
|
toggleCheckAll(checked, event) {
|
|
809
831
|
if (event) {
|
|
810
832
|
event.stopPropagation();
|
|
811
833
|
}
|
|
834
|
+
// 只处理可用的行(未禁用的行)
|
|
835
|
+
const availableRows = this.dataSource.filter((row) => !this.isRowDisabled(row));
|
|
836
|
+
// 批量设置 checked 属性
|
|
837
|
+
availableRows.forEach((row) => {
|
|
838
|
+
row.checked = checked;
|
|
839
|
+
// 同步更新 _selectedRowIds(用于跨页选中)
|
|
840
|
+
const id = this.getRowId(row);
|
|
841
|
+
if (id !== undefined) {
|
|
842
|
+
if (checked) {
|
|
843
|
+
this._selectedRowIds.add(id);
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
846
|
+
this._selectedRowIds.delete(id);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
// 同步更新 _selectedRows(用于兼容性)
|
|
812
851
|
if (checked) {
|
|
813
|
-
|
|
814
|
-
this._selectedRows = this.dataSource.filter((row) => !this.isRowDisabled(row));
|
|
852
|
+
this._selectedRows = [...availableRows];
|
|
815
853
|
// 同步设置高亮选中行为第一条可选数据
|
|
816
|
-
const availableRows = this._selectedRows;
|
|
817
854
|
this._selectedTableRow =
|
|
818
855
|
availableRows.length > 0 ? availableRows[0] : null;
|
|
819
856
|
}
|
|
820
857
|
else {
|
|
821
|
-
// 取消全选
|
|
822
858
|
this._selectedRows = [];
|
|
823
859
|
// 取消高亮
|
|
824
860
|
this._selectedTableRow = null;
|
|
825
861
|
}
|
|
826
862
|
this.updateCheckAllStatus();
|
|
827
863
|
}
|
|
828
|
-
//
|
|
864
|
+
// 获取选中的行数据(保留用于兼容性)
|
|
829
865
|
getSelectedRows() {
|
|
830
|
-
return this.
|
|
866
|
+
return this.getCheckedRows();
|
|
831
867
|
}
|
|
832
|
-
//
|
|
868
|
+
// 处理行 checkbox 变化事件(数据驱动模式)
|
|
869
|
+
handleRowCheckedChange(data, checked) {
|
|
870
|
+
if (this.isRowDisabled(data)) {
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
// 数据对象的 checked 属性已经通过双向绑定自动更新
|
|
874
|
+
// 这里只需要同步更新 _selectedRowIds 和 _selectedRows
|
|
875
|
+
// 同步更新 _selectedRowIds(用于跨页选中)
|
|
876
|
+
const id = this.getRowId(data);
|
|
877
|
+
if (id !== undefined) {
|
|
878
|
+
if (checked) {
|
|
879
|
+
this._selectedRowIds.add(id);
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
this._selectedRowIds.delete(id);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
// 同步更新 _selectedRows(用于兼容性)
|
|
886
|
+
const index = this._selectedRows.findIndex((row) => this.isSameRow(row, data));
|
|
887
|
+
if (checked) {
|
|
888
|
+
if (index === -1) {
|
|
889
|
+
this._selectedRows.push(data);
|
|
890
|
+
}
|
|
891
|
+
// 勾选复选框时同步设置高亮选中行
|
|
892
|
+
this._selectedTableRow = data;
|
|
893
|
+
}
|
|
894
|
+
else {
|
|
895
|
+
if (index > -1) {
|
|
896
|
+
this._selectedRows.splice(index, 1);
|
|
897
|
+
}
|
|
898
|
+
// 若当前高亮行为该行,则取消高亮
|
|
899
|
+
if (this._selectedTableRow &&
|
|
900
|
+
this.isSameRow(this._selectedTableRow, data)) {
|
|
901
|
+
this._selectedTableRow = null;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
// 更新全选状态
|
|
905
|
+
this.updateCheckAllStatus();
|
|
906
|
+
}
|
|
907
|
+
// 刷新全选状态(用于其他场景)
|
|
908
|
+
refreshCheckAllStatus() {
|
|
909
|
+
this.updateCheckAllStatus();
|
|
910
|
+
}
|
|
911
|
+
// 获取行的唯一标识(用于跨页选中)
|
|
912
|
+
getRowId(data) {
|
|
913
|
+
var _a, _b;
|
|
914
|
+
return (_b = (_a = data.id) !== null && _a !== void 0 ? _a : data.key) !== null && _b !== void 0 ? _b : undefined;
|
|
915
|
+
}
|
|
916
|
+
// 判断两行是否为同一行
|
|
917
|
+
isSameRow(row1, row2) {
|
|
918
|
+
const id1 = this.getRowId(row1);
|
|
919
|
+
const id2 = this.getRowId(row2);
|
|
920
|
+
if (id1 !== undefined && id2 !== undefined) {
|
|
921
|
+
return id1 === id2;
|
|
922
|
+
}
|
|
923
|
+
// fallback 到 JSON 比较
|
|
924
|
+
return JSON.stringify(row1) === JSON.stringify(row2);
|
|
925
|
+
}
|
|
926
|
+
// 清空选中的行(数据驱动模式)
|
|
833
927
|
clearSelectedRows() {
|
|
928
|
+
// 清空当前数据源中所有项的 checked 状态
|
|
929
|
+
if (Array.isArray(this.dataSource)) {
|
|
930
|
+
this.dataSource.forEach((row) => {
|
|
931
|
+
row.checked = false;
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
// 清空选中集合
|
|
935
|
+
this._selectedRowIds.clear();
|
|
834
936
|
this._selectedRows = [];
|
|
835
937
|
this._checkedAll = false;
|
|
836
938
|
this._indeterminate = false;
|
|
@@ -907,6 +1009,8 @@ class ProTableComponent {
|
|
|
907
1009
|
this._pageInfo.pageIndex > 1) {
|
|
908
1010
|
this._pageInfo.pageIndex = this._pageInfo.pageIndex - 1;
|
|
909
1011
|
}
|
|
1012
|
+
// 保存删除前的数据源(用于删除后查询时移除被删除项的选中状态)
|
|
1013
|
+
const previousDataSource = afterDelete && this.showCheckbox ? [...this.dataSource] : [];
|
|
910
1014
|
this._loading = true;
|
|
911
1015
|
if (this.request) {
|
|
912
1016
|
try {
|
|
@@ -916,7 +1020,38 @@ class ProTableComponent {
|
|
|
916
1020
|
} }, (this.sortMode === "server"
|
|
917
1021
|
? { sort: this.buildServerSortPayload() }
|
|
918
1022
|
: {})));
|
|
919
|
-
|
|
1023
|
+
// 自动注入 checked 字段,支持跨页选中
|
|
1024
|
+
if (this.showCheckbox) {
|
|
1025
|
+
this.dataSource = (result.data || []).map((item) => {
|
|
1026
|
+
const id = this.getRowId(item);
|
|
1027
|
+
// 如果数据已有 checked 属性,保留;否则根据 _selectedRowIds 判断
|
|
1028
|
+
const checked = item.checked !== undefined
|
|
1029
|
+
? item.checked
|
|
1030
|
+
: id !== undefined
|
|
1031
|
+
? this._selectedRowIds.has(id)
|
|
1032
|
+
: false;
|
|
1033
|
+
return Object.assign(Object.assign({}, item), { checked: checked });
|
|
1034
|
+
});
|
|
1035
|
+
// 删除后查询:移除被删除项的选中状态
|
|
1036
|
+
if (afterDelete && previousDataSource.length > 0) {
|
|
1037
|
+
const newDataIds = new Set(this.dataSource.map((item) => this.getRowId(item)));
|
|
1038
|
+
// 遍历之前的数据源,如果不在新数据源中,说明被删除了,需要清除其选中状态
|
|
1039
|
+
previousDataSource.forEach((oldItem) => {
|
|
1040
|
+
const oldId = this.getRowId(oldItem);
|
|
1041
|
+
if (oldId !== undefined && !newDataIds.has(oldId)) {
|
|
1042
|
+
// 被删除的项,从选中集合中移除
|
|
1043
|
+
this._selectedRowIds.delete(oldId);
|
|
1044
|
+
// 如果数据对象还在其他地方引用,清除其选中状态
|
|
1045
|
+
if (oldItem.checked !== undefined) {
|
|
1046
|
+
oldItem.checked = false;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
else {
|
|
1053
|
+
this.dataSource = result.data || [];
|
|
1054
|
+
}
|
|
920
1055
|
this.summaryData = result.summaryData || null;
|
|
921
1056
|
// 本地排序模式:拿到数据后在前端排序
|
|
922
1057
|
if (this.sortMode === "local") {
|
|
@@ -937,15 +1072,13 @@ class ProTableComponent {
|
|
|
937
1072
|
finally {
|
|
938
1073
|
this._loading = false;
|
|
939
1074
|
this._selectedTableRow = null;
|
|
940
|
-
// 清空选中行(可选,根据业务需求决定是否保留跨页选中)
|
|
941
|
-
// this.clearSelectedRows();
|
|
942
1075
|
}
|
|
943
1076
|
}
|
|
944
1077
|
else {
|
|
945
1078
|
console.warn("未提供 _request 回调函数");
|
|
946
1079
|
this._loading = false;
|
|
947
1080
|
}
|
|
948
|
-
|
|
1081
|
+
// 不再调用 clearSelectedRows(),保留跨页选中状态
|
|
949
1082
|
});
|
|
950
1083
|
}
|
|
951
1084
|
// 触发列排序变更
|
|
@@ -1052,7 +1185,7 @@ class ProTableComponent {
|
|
|
1052
1185
|
ProTableComponent.decorators = [
|
|
1053
1186
|
{ type: Component, args: [{
|
|
1054
1187
|
selector: "app-pro-table",
|
|
1055
|
-
template: "<app-page-container [title]=\"title\">\r\n <ng-template #header>\r\n <app-table-search-bar\r\n *ngIf=\"showSearchBar\"\r\n [labelWidth]=\"labelWidth\"\r\n [labelAlign]=\"labelAlign\"\r\n >\r\n <ng-template #leftContent>\r\n <nz-form-item\r\n *ngFor=\"let column of _searchFiledColumns\"\r\n [ngClass]=\"getFormItemClassName(column)\"\r\n >\r\n <nz-form-label *ngIf=\"!getFieldProps(column).hideLabel\" nzNoColon>\r\n <!-- \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49label\u6A21\u677F -->\r\n <ng-container\r\n *ngIf=\"\r\n column.customLabelRender &&\r\n getLabelTemplate(column.customLabelRender);\r\n else defaultLabel\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"getLabelTemplate(column.customLabelRender)\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: column,\r\n column: column,\r\n fieldProps: getFieldProps(column)\r\n }\"\r\n >\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #defaultLabel>\r\n {{ getFieldProps(column).label || column.title }}\r\n </ng-template>\r\n </nz-form-label>\r\n <nz-form-control *ngIf=\"column.valueType === 'input'\">\r\n <input\r\n nz-input\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [placeholder]=\"getFieldProps(column).placeHolder\"\r\n [disabled]=\"getFieldProps(column).disabled\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n />\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'inputPlate'\">\r\n <app-plate-input\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n ></app-plate-input>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'select'\">\r\n <nz-select\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzAllowClear]=\"getFieldProps(column).allowClear\"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [nzOptions]=\"getFieldProps(column).options\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n >\r\n </nz-select>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'selectMultiple'\">\r\n <nz-select\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzAllowClear]=\"getFieldProps(column).allowClear\"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [nzOptions]=\"getFieldProps(column).options\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n nzMode=\"multiple\"\r\n >\r\n </nz-select>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'date'\">\r\n <nz-date-picker\r\n [nzShowTime]=\"getFieldProps(column).showTime\"\r\n [nzFormat]=\"getFieldProps(column).format\"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [nzAllowClear]=\"getFieldProps(column).allowClear\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzMode]=\"getFieldProps(column).mode\"\r\n ></nz-date-picker>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'checkbox'\">\r\n <nz-checkbox-group\r\n [class]=\"\r\n getFieldProps(column).noStyle\r\n ? 'pro-table-checkboxgroup-nostyle'\r\n : ''\r\n \"\r\n [(ngModel)]=\"getFieldProps(column).options\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n (ngModelChange)=\"\r\n handleFieldCheckBoxChange(\r\n $event,\r\n getFieldProps(column).name || column.prop\r\n )\r\n \"\r\n ></nz-checkbox-group>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'autoComplete'\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column)?.name || column.prop]\r\n \"\r\n (input)=\"handleAutoCompleteInput($event, column)\"\r\n [nzAutocomplete]=\"auto\"\r\n [disabled]=\"getFieldProps(column)?.disabled\"\r\n [placeholder]=\"getFieldProps(column)?.placeHolder\"\r\n />\r\n <nz-autocomplete\r\n [nzBackfill]=\"getFieldProps(column).backFill\"\r\n [nzDefaultActiveFirstOption]=\"\r\n getFieldProps(column).defaultActiveFirstOption\r\n \"\r\n [nzWidth]=\"getFieldProps(column).width\"\r\n #auto\r\n >\r\n <nz-auto-option\r\n *ngFor=\"let option of getAutoCompleteDataSource(column)\"\r\n [nzValue]=\"\r\n getFieldProps(column).returnFullData ? option : option.value\r\n \"\r\n [nzLabel]=\"option.label\"\r\n [nzDisabled]=\"option.disabled\"\r\n >\r\n {{ option.label }}\r\n </nz-auto-option>\r\n </nz-autocomplete>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'custom'\">\r\n <app-dynamic-search-field\r\n [component]=\"getFieldProps(column).component\"\r\n [value]=\"_searchParams[getFieldProps(column).name || column.prop]\"\r\n [props]=\"getFieldProps(column)\"\r\n (valueChange)=\"\r\n setFieldValue(getFieldProps(column).name || column.prop, $event)\r\n \"\r\n ></app-dynamic-search-field>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'inputNumber'\">\r\n <nz-input-number\r\n [style.width]=\"'100%'\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n [nzFormatter]=\"getFieldProps(column).formatterPercent\"\r\n [nzParser]=\"getFieldProps(column).parserPercent\"\r\n ></nz-input-number>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </ng-template>\r\n <ng-template #actionTextBtn>\r\n <nz-space [nzSize]=\"4\">\r\n <nz-space-item *ngIf=\"showSearchBtn\">\r\n <button nz-button nzType=\"primary\" (click)=\"handleSearch()\">\r\n {{ confirmBtnText }}\r\n </button>\r\n </nz-space-item>\r\n <nz-space-item *ngIf=\"showClearBtn\">\r\n <button nz-button (click)=\"handleResetForm()\">\r\n {{ clearBtnText }}\r\n </button>\r\n </nz-space-item>\r\n </nz-space>\r\n </ng-template>\r\n <ng-template #actionImgBtn>\r\n <nz-space>\r\n <ng-container *ngTemplateOutlet=\"imgActionBarTpl\"></ng-container>\r\n <nz-space-item class=\"setting-space-item\" *ngIf=\"showColumnSetting\">\r\n <app-colmuns-setting\r\n [columns]=\"columns\"\r\n [selectedColumns]=\"_serverColumns\"\r\n [tableName]=\"tableName\"\r\n (afterConfirm)=\"handleColumnsSettingConfirm()\"\r\n ></app-colmuns-setting>\r\n </nz-space-item>\r\n </nz-space>\r\n </ng-template>\r\n </app-table-search-bar>\r\n </ng-template>\r\n <ng-template #body>\r\n <div class=\"mb-12\">\r\n <ng-container *ngIf=\"showActionBar\">\r\n <ng-container *ngTemplateOutlet=\"actionBarTpl\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngIf=\"customTableRender\">\r\n <ng-container *ngTemplateOutlet=\"customTableRender\"></ng-container>\r\n </ng-container>\r\n <nz-table\r\n *ngIf=\"!customTableRender\"\r\n #basicTable\r\n nzSize=\"small\"\r\n nzShowSizeChanger\r\n [nzBordered]=\"bordered\"\r\n [nzOuterBordered]=\"outerBordered\"\r\n [nzData]=\"dataSource\"\r\n [nzPageIndex]=\"_pageInfo.pageIndex\"\r\n [nzPageSize]=\"_pageInfo.pageSize\"\r\n [nzTotal]=\"_pageInfo.total\"\r\n [nzPageSizeOptions]=\"_pageInfo.pageSizeOptions\"\r\n [nzShowPagination]=\"showPagination\"\r\n [nzShowTotal]=\"totalTemplate\"\r\n [nzLoading]=\"_loading\"\r\n [nzFrontPagination]=\"frontPagination\"\r\n [nzScroll]=\"scroll\"\r\n (nzPageIndexChange)=\"handlePageIndexChange($event)\"\r\n (nzPageSizeChange)=\"handlePageSizeChange($event)\"\r\n >\r\n <thead>\r\n <tr>\r\n <!-- \u590D\u9009\u6846\u5217\uFF08\u5F53 showCheckbox=true \u65F6\u663E\u793A\uFF09 -->\r\n <th\r\n *ngIf=\"showCheckbox\"\r\n [nzWidth]=\"'50px'\"\r\n [nzAlign]=\"'center'\"\r\n style=\"text-align: center\"\r\n >\r\n <label\r\n nz-checkbox\r\n [(ngModel)]=\"_checkedAll\"\r\n [nzIndeterminate]=\"_indeterminate\"\r\n (ngModelChange)=\"toggleCheckAll($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n ></label>\r\n </th>\r\n <th\r\n *ngFor=\"let column of _columns\"\r\n [nzWidth]=\"column.width\"\r\n [nzAlign]=\"column.align\"\r\n [nzLeft]=\"column.fixedLeft\"\r\n [nzRight]=\"column.fixedRight\"\r\n [nzShowSort]=\"!!column.sorter\"\r\n [nzSortOrder]=\"getSortOrder(column.prop)\"\r\n (nzSortOrderChange)=\"onSortChange(column.prop, $event)\"\r\n >\r\n {{ column.title }}\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <tr\r\n style=\"cursor: pointer\"\r\n *ngFor=\"let data; let i = index; of: basicTable.data\"\r\n [ngClass]=\"{\r\n 'ant-table-custom-row-selected': !!getTableRowChecked(data),\r\n 'ant-table-custom-row-even': i % 2 === 0,\r\n 'ant-table-custom-row-odd': i % 2 !== 0\r\n }\"\r\n (click)=\"handleTableRowClick(data)\"\r\n (dblclick)=\"handleTableRowDbClick(data)\"\r\n >\r\n <!-- \u590D\u9009\u6846\u5217\uFF08\u5F53 showCheckbox=true \u65F6\u663E\u793A\uFF09 -->\r\n <td\r\n *ngIf=\"showCheckbox\"\r\n [nzAlign]=\"'center'\"\r\n style=\"text-align: center\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <label\r\n nz-checkbox\r\n [ngModel]=\"isRowChecked(data)\"\r\n [nzDisabled]=\"isRowDisabled(data)\"\r\n (ngModelChange)=\"toggleRowChecked(data, $event)\"\r\n ></label>\r\n </td>\r\n <td\r\n *ngFor=\"let column of _columns\"\r\n [nzLeft]=\"column.fixedLeft\"\r\n [nzRight]=\"column.fixedRight\"\r\n [nzAlign]=\"column.align\"\r\n class=\"pro-ellipsis\"\r\n [title]=\"data[column.prop]\"\r\n >\r\n <!-- \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49\u6A21\u677F -->\r\n <ng-container\r\n *ngIf=\"\r\n column.customRender && getTemplate(column.customRender);\r\n let template\r\n \"\r\n >\r\n <ng-template\r\n [ngTemplateOutlet]=\"template\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: data,\r\n data: data,\r\n column: column,\r\n index: i,\r\n pageInfo: _pageInfo\r\n }\"\r\n >\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \u9ED8\u8BA4\u6E32\u67D3\u903B\u8F91 -->\r\n <ng-container\r\n *ngIf=\"!column.customRender || !getTemplate(column.customRender)\"\r\n >\r\n {{ data[column.prop] }}\r\n </ng-container>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"summaryData && _pageInfo.total > 0\">\r\n <!-- \u6C47\u603B\u884C\u7684\u590D\u9009\u6846\u5217\uFF08\u5F53 showCheckbox=true \u65F6\u663E\u793A\uFF0C\u4F46\u4E3A\u7A7A\uFF09 -->\r\n <td\r\n *ngIf=\"showCheckbox\"\r\n style=\"font-weight: bold; border-right: 1px solid #e8e8e8\"\r\n ></td>\r\n <td\r\n *ngFor=\"let column; let i = index; of: _columns\"\r\n [nzLeft]=\"column.fixedLeft\"\r\n [nzRight]=\"column.fixedRight\"\r\n style=\"font-weight: bold; border-right: 1px solid #e8e8e8\"\r\n [nzAlign]=\"column.align\"\r\n >\r\n <span *ngIf=\"i === 0\">\u603B\u8BA1</span>\r\n <ng-container *ngIf=\"i !== 0 && column.summary\">\r\n {{\r\n column.summary?.format\r\n ? column.summary?.format(\r\n summaryData[column.summary?.name || column.prop]\r\n )\r\n : summaryData[column.summary?.name || column.prop]\r\n }}\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <ng-template #totalTemplate let-total\r\n >\u5171 {{ _pageInfo.total }} \u6761\u8BB0\u5F55</ng-template\r\n >\r\n </nz-table>\r\n </ng-template>\r\n</app-page-container>\r\n",
|
|
1188
|
+
template: "<app-page-container\r\n [title]=\"title\"\r\n [showHeader]=\"showSearchBar\"\r\n ngClass=\"pro-table-container\"\r\n>\r\n <ng-template #header>\r\n <app-table-search-bar\r\n *ngIf=\"showSearchBar\"\r\n [labelWidth]=\"labelWidth\"\r\n [labelAlign]=\"labelAlign\"\r\n >\r\n <ng-template #leftContent>\r\n <nz-form-item\r\n *ngFor=\"let column of _searchFiledColumns\"\r\n [ngClass]=\"getFormItemClassName(column)\"\r\n >\r\n <nz-form-label *ngIf=\"!getFieldProps(column).hideLabel\" nzNoColon>\r\n <!-- \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49label\u6A21\u677F -->\r\n <ng-container\r\n *ngIf=\"\r\n column.customLabelRender &&\r\n getLabelTemplate(column.customLabelRender);\r\n else defaultLabel\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"getLabelTemplate(column.customLabelRender)\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: column,\r\n column: column,\r\n fieldProps: getFieldProps(column)\r\n }\"\r\n >\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #defaultLabel>\r\n {{ getFieldProps(column).label || column.title }}\r\n </ng-template>\r\n </nz-form-label>\r\n <nz-form-control *ngIf=\"column.valueType === 'input'\">\r\n <input\r\n nz-input\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [placeholder]=\"getFieldProps(column).placeHolder\"\r\n [disabled]=\"getFieldProps(column).disabled\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n />\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'inputPlate'\">\r\n <app-plate-input\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n ></app-plate-input>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'select'\">\r\n <nz-select\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzAllowClear]=\"getFieldProps(column).allowClear\"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [nzOptions]=\"getFieldProps(column).options\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n >\r\n </nz-select>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'selectMultiple'\">\r\n <nz-select\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzAllowClear]=\"getFieldProps(column).allowClear\"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [name]=\"getFieldProps(column).name || column.prop\"\r\n [nzOptions]=\"getFieldProps(column).options\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n nzMode=\"multiple\"\r\n >\r\n </nz-select>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'date'\">\r\n <nz-date-picker\r\n [nzShowTime]=\"getFieldProps(column).showTime\"\r\n [nzFormat]=\"getFieldProps(column).format\"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [nzAllowClear]=\"getFieldProps(column).allowClear\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzMode]=\"getFieldProps(column).mode\"\r\n ></nz-date-picker>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'checkbox'\">\r\n <nz-checkbox-group\r\n [class]=\"\r\n getFieldProps(column).noStyle\r\n ? 'pro-table-checkboxgroup-nostyle'\r\n : ''\r\n \"\r\n [(ngModel)]=\"getFieldProps(column).options\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n (ngModelChange)=\"\r\n handleFieldCheckBoxChange(\r\n $event,\r\n getFieldProps(column).name || column.prop\r\n )\r\n \"\r\n ></nz-checkbox-group>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'autoComplete'\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column)?.name || column.prop]\r\n \"\r\n (input)=\"handleAutoCompleteInput($event, column)\"\r\n [nzAutocomplete]=\"auto\"\r\n [disabled]=\"getFieldProps(column)?.disabled\"\r\n [placeholder]=\"getFieldProps(column)?.placeHolder\"\r\n />\r\n <nz-autocomplete\r\n [nzBackfill]=\"getFieldProps(column).backFill\"\r\n [nzDefaultActiveFirstOption]=\"\r\n getFieldProps(column).defaultActiveFirstOption\r\n \"\r\n [nzWidth]=\"getFieldProps(column).width\"\r\n #auto\r\n >\r\n <nz-auto-option\r\n *ngFor=\"let option of getAutoCompleteDataSource(column)\"\r\n [nzValue]=\"\r\n getFieldProps(column).returnFullData ? option : option.value\r\n \"\r\n [nzLabel]=\"option.label\"\r\n [nzDisabled]=\"option.disabled\"\r\n >\r\n {{ option.label }}\r\n </nz-auto-option>\r\n </nz-autocomplete>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'custom'\">\r\n <app-dynamic-search-field\r\n [component]=\"getFieldProps(column).component\"\r\n [value]=\"_searchParams[getFieldProps(column).name || column.prop]\"\r\n [props]=\"getFieldProps(column)\"\r\n (valueChange)=\"\r\n setFieldValue(getFieldProps(column).name || column.prop, $event)\r\n \"\r\n ></app-dynamic-search-field>\r\n </nz-form-control>\r\n <nz-form-control *ngIf=\"column.valueType === 'inputNumber'\">\r\n <nz-input-number\r\n [style.width]=\"'100%'\"\r\n [(ngModel)]=\"\r\n _searchParams[getFieldProps(column).name || column.prop]\r\n \"\r\n [nzPlaceHolder]=\"getFieldProps(column).placeHolder\"\r\n [nzDisabled]=\"getFieldProps(column).disabled\"\r\n [nzFormatter]=\"getFieldProps(column).formatterPercent\"\r\n [nzParser]=\"getFieldProps(column).parserPercent\"\r\n ></nz-input-number>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </ng-template>\r\n <ng-template #actionTextBtn>\r\n <nz-space [nzSize]=\"4\">\r\n <nz-space-item *ngIf=\"showSearchBtn\">\r\n <button nz-button nzType=\"primary\" (click)=\"handleSearch()\">\r\n {{ confirmBtnText }}\r\n </button>\r\n </nz-space-item>\r\n <nz-space-item *ngIf=\"showClearBtn\">\r\n <button nz-button (click)=\"handleResetForm()\">\r\n {{ clearBtnText }}\r\n </button>\r\n </nz-space-item>\r\n </nz-space>\r\n </ng-template>\r\n <ng-template #actionImgBtn>\r\n <nz-space>\r\n <ng-container *ngTemplateOutlet=\"imgActionBarTpl\"></ng-container>\r\n <nz-space-item class=\"setting-space-item\" *ngIf=\"showColumnSetting\">\r\n <app-colmuns-setting\r\n [columns]=\"columns\"\r\n [selectedColumns]=\"_serverColumns\"\r\n [tableName]=\"tableName\"\r\n (afterConfirm)=\"handleColumnsSettingConfirm()\"\r\n ></app-colmuns-setting>\r\n </nz-space-item>\r\n </nz-space>\r\n </ng-template>\r\n </app-table-search-bar>\r\n </ng-template>\r\n\r\n <ng-template #body>\r\n <div class=\"mb-12\">\r\n <ng-container *ngIf=\"showActionBar\">\r\n <ng-container *ngTemplateOutlet=\"actionBarTpl\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngIf=\"customTableRender\">\r\n <ng-container *ngTemplateOutlet=\"customTableRender\"></ng-container>\r\n </ng-container>\r\n <nz-table\r\n *ngIf=\"!customTableRender\"\r\n #dynamicTable\r\n nzSize=\"small\"\r\n nzShowSizeChanger\r\n [nzBordered]=\"bordered\"\r\n [nzOuterBordered]=\"outerBordered\"\r\n [nzData]=\"dataSource\"\r\n [nzPageIndex]=\"_pageInfo.pageIndex\"\r\n [nzPageSize]=\"_pageInfo.pageSize\"\r\n [nzTotal]=\"_pageInfo.total\"\r\n [nzPageSizeOptions]=\"_pageInfo.pageSizeOptions\"\r\n [nzShowPagination]=\"showPagination\"\r\n [nzShowTotal]=\"totalTemplate\"\r\n [nzLoading]=\"_loading\"\r\n [nzFrontPagination]=\"frontPagination\"\r\n [nzScroll]=\"scroll\"\r\n (nzPageIndexChange)=\"handlePageIndexChange($event)\"\r\n (nzPageSizeChange)=\"handlePageSizeChange($event)\"\r\n >\r\n <thead>\r\n <tr>\r\n <!-- \u590D\u9009\u6846\u5217\uFF08\u5F53 showCheckbox=true \u65F6\u663E\u793A\uFF09 -->\r\n <th\r\n *ngIf=\"showCheckbox\"\r\n [nzWidth]=\"'50px'\"\r\n [nzAlign]=\"'center'\"\r\n style=\"text-align: center\"\r\n [(nzChecked)]=\"_checkedAll\"\r\n [nzIndeterminate]=\"_indeterminate\"\r\n (nzCheckedChange)=\"toggleCheckAll($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n ></th>\r\n <th\r\n *ngFor=\"let column of _columns\"\r\n [nzWidth]=\"column.width\"\r\n [nzAlign]=\"column.align\"\r\n [nzLeft]=\"column.fixedLeft\"\r\n [nzRight]=\"column.fixedRight\"\r\n [nzShowSort]=\"!!column.sorter\"\r\n [nzSortOrder]=\"getSortOrder(column.prop)\"\r\n (nzSortOrderChange)=\"onSortChange(column.prop, $event)\"\r\n >\r\n {{ column.title }}\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <tr\r\n style=\"cursor: pointer\"\r\n *ngFor=\"let data; let i = index; of: dynamicTable.data\"\r\n [ngClass]=\"{\r\n 'ant-table-custom-row-selected': !!getTableRowChecked(data),\r\n 'ant-table-custom-row-even': i % 2 === 0,\r\n 'ant-table-custom-row-odd': i % 2 !== 0\r\n }\"\r\n (click)=\"handleTableRowClick(data)\"\r\n (dblclick)=\"handleTableRowDbClick(data)\"\r\n >\r\n <!-- \u590D\u9009\u6846\u5217\uFF08\u5F53 showCheckbox=true \u65F6\u663E\u793A\uFF09 -->\r\n <td\r\n *ngIf=\"showCheckbox\"\r\n [nzAlign]=\"'center'\"\r\n style=\"text-align: center;width: 50px;\"\r\n [(nzChecked)]=\"data.checked\"\r\n [nzDisabled]=\"isRowDisabled(data)\"\r\n (nzCheckedChange)=\"handleRowCheckedChange(data, $event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n ></td>\r\n <td\r\n *ngFor=\"let column of _columns\"\r\n [nzLeft]=\"column.fixedLeft\"\r\n [nzRight]=\"column.fixedRight\"\r\n [nzAlign]=\"column.align\"\r\n class=\"pro-ellipsis\"\r\n [title]=\"data[column.prop]\"\r\n >\r\n <!-- \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49\u6A21\u677F -->\r\n <ng-container\r\n *ngIf=\"\r\n column.customRender && getTemplate(column.customRender);\r\n let template\r\n \"\r\n >\r\n <ng-template\r\n [ngTemplateOutlet]=\"template\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: data,\r\n data: data,\r\n column: column,\r\n index: i,\r\n pageInfo: _pageInfo\r\n }\"\r\n >\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \u9ED8\u8BA4\u6E32\u67D3\u903B\u8F91 -->\r\n <ng-container\r\n *ngIf=\"!column.customRender || !getTemplate(column.customRender)\"\r\n >\r\n {{ data[column.prop] }}\r\n </ng-container>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"summaryData && _pageInfo.total > 0\">\r\n <!-- \u6C47\u603B\u884C\u7684\u590D\u9009\u6846\u5217\uFF08\u5F53 showCheckbox=true \u65F6\u663E\u793A\uFF0C\u4F46\u4E3A\u7A7A\uFF09 -->\r\n <td\r\n *ngIf=\"showCheckbox\"\r\n style=\"font-weight: bold; border-right: 1px solid #e8e8e8\"\r\n ></td>\r\n <td\r\n *ngFor=\"let column; let i = index; of: _columns\"\r\n [nzLeft]=\"column.fixedLeft\"\r\n [nzRight]=\"column.fixedRight\"\r\n style=\"font-weight: bold; border-right: 1px solid #e8e8e8\"\r\n [nzAlign]=\"column.align\"\r\n >\r\n <span *ngIf=\"i === 0\">\u603B\u8BA1</span>\r\n <ng-container *ngIf=\"i !== 0 && column.summary\">\r\n {{\r\n column.summary?.format\r\n ? column.summary?.format(\r\n summaryData[column.summary?.name || column.prop]\r\n )\r\n : summaryData[column.summary?.name || column.prop]\r\n }}\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <ng-template #totalTemplate let-total\r\n >\u5171 {{ _pageInfo.total }} \u6761\u8BB0\u5F55</ng-template\r\n >\r\n </nz-table>\r\n </ng-template>\r\n</app-page-container>\r\n",
|
|
1056
1189
|
styles: [".pro-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .setting-space-item{margin-right:0!important}::ng-deep .pro-table-checkboxgroup-nostyle{white-space:nowrap}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body table{border-collapse:separate;border-spacing:0}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-tbody>tr>td{border-right:1px solid #e8e8e8!important}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-thead>tr>th{border-bottom:1px solid #e8e8e8!important;border-right:1px solid #e8e8e8!important;white-space:nowrap}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-tbody>tr>td:first-child,::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-thead>tr>th:first-child{border-left:none!important}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-cell-fix-left,::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-cell-fix-right,::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-header .ant-table-thead>tr>th.ant-table-cell-fix-left,::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-header .ant-table-thead>tr>th.ant-table-cell-fix-right{border-bottom:1px solid #e8e8e8!important;border-right:1px solid #e8e8e8!important}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-header .ant-table-thead>tr>th{border-top:1px solid #e8e8e8!important}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-tbody>tr>td:last-child,::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-thead>tr>th:last-child{border-right:1px solid #e8e8e8!important}::ng-deep .ant-table-bordered .ant-table-container .ant-table-content .ant-table-body .ant-table-tbody>tr:last-child>td{border-bottom:1px solid #e8e8e8!important}::ng-deep .table-search-bar-left .ant-form-item{margin-bottom:8px}"]
|
|
1057
1190
|
},] }
|
|
1058
1191
|
];
|
|
@@ -1099,19 +1232,21 @@ ProTableComponent.propDecorators = {
|
|
|
1099
1232
|
class PageContainerComponent {
|
|
1100
1233
|
constructor() {
|
|
1101
1234
|
this.title = "";
|
|
1235
|
+
this.showHeader = true;
|
|
1102
1236
|
}
|
|
1103
1237
|
ngOnInit() { }
|
|
1104
1238
|
}
|
|
1105
1239
|
PageContainerComponent.decorators = [
|
|
1106
1240
|
{ type: Component, args: [{
|
|
1107
1241
|
selector: "app-page-container",
|
|
1108
|
-
template: "<nz-card\r\n [nzBorderless]=\"true\"\r\n [nzBodyStyle]=\"{ padding: '10px', width: '100%' }\"\r\n>\r\n <div class=\"page-container-title\" *ngIf=\"title\">{{ title }}</div>\r\n <div class=\"page-container-header\">\r\n <ng-container *ngTemplateOutlet=\"headerTpl\"></ng-container>\r\n </div>\r\n <div class=\"page-container-body\">\r\n <ng-container *ngTemplateOutlet=\"bodyTpl\"></ng-container>\r\n </div>\r\n</nz-card>\r\n",
|
|
1242
|
+
template: "<nz-card\r\n [nzBorderless]=\"true\"\r\n [nzBodyStyle]=\"{ padding: '10px', width: '100%' }\"\r\n>\r\n <div class=\"page-container-title\" *ngIf=\"title\">{{ title }}</div>\r\n <div class=\"page-container-header\" *ngIf=\"showHeader\">\r\n <ng-container *ngTemplateOutlet=\"headerTpl\"></ng-container>\r\n </div>\r\n <div class=\"page-container-body\">\r\n <ng-container *ngTemplateOutlet=\"bodyTpl\"></ng-container>\r\n </div>\r\n</nz-card>\r\n",
|
|
1109
1243
|
styles: [".page-container-title{border-left:3px solid #096dd9;color:#1d1d1d;font-size:16px;margin-bottom:16px;padding-left:10px}.page-container-body,.page-container-header{box-sizing:border-box;padding:7px}"]
|
|
1110
1244
|
},] }
|
|
1111
1245
|
];
|
|
1112
1246
|
PageContainerComponent.ctorParameters = () => [];
|
|
1113
1247
|
PageContainerComponent.propDecorators = {
|
|
1114
1248
|
title: [{ type: Input }],
|
|
1249
|
+
showHeader: [{ type: Input }],
|
|
1115
1250
|
headerTpl: [{ type: ContentChild, args: ["header",] }],
|
|
1116
1251
|
bodyTpl: [{ type: ContentChild, args: ["body",] }]
|
|
1117
1252
|
};
|
|
@@ -1718,6 +1853,7 @@ class AntdFormService {
|
|
|
1718
1853
|
this.formStore = {};
|
|
1719
1854
|
this.formModifyType = "create";
|
|
1720
1855
|
// ==================== 私有属性 ====================
|
|
1856
|
+
this.formRegisterStore = {};
|
|
1721
1857
|
this.labelWidth = "120px";
|
|
1722
1858
|
this.labelAlign = "right";
|
|
1723
1859
|
this.labelObservers = {};
|
|
@@ -1732,18 +1868,62 @@ class AntdFormService {
|
|
|
1732
1868
|
};
|
|
1733
1869
|
}
|
|
1734
1870
|
// ==================== 表单创建和初始化 ====================
|
|
1871
|
+
// 判断是否为嵌套 FormGroup 配置
|
|
1872
|
+
isFormGroupConfig(config) {
|
|
1873
|
+
return (typeof config === "object" &&
|
|
1874
|
+
config !== null &&
|
|
1875
|
+
"type" in config &&
|
|
1876
|
+
config.type === "group");
|
|
1877
|
+
}
|
|
1878
|
+
// 递归创建嵌套 FormGroup
|
|
1879
|
+
createNestedFormGroup(fields, disabled) {
|
|
1880
|
+
const groupConfig = {};
|
|
1881
|
+
Object.entries(fields).forEach(([key, fieldConfig]) => {
|
|
1882
|
+
var _a, _b, _c, _d, _e;
|
|
1883
|
+
if (this.isFormGroupConfig(fieldConfig)) {
|
|
1884
|
+
// 递归创建嵌套的 FormGroup
|
|
1885
|
+
groupConfig[key] = this.createNestedFormGroup(fieldConfig.fields, (_a = fieldConfig.disabled) !== null && _a !== void 0 ? _a : disabled);
|
|
1886
|
+
}
|
|
1887
|
+
else {
|
|
1888
|
+
// 创建普通 FormControl
|
|
1889
|
+
groupConfig[key] = [
|
|
1890
|
+
{
|
|
1891
|
+
value: fieldConfig.value,
|
|
1892
|
+
disabled: (_c = (_b = fieldConfig.disabled) !== null && _b !== void 0 ? _b : disabled) !== null && _c !== void 0 ? _c : false,
|
|
1893
|
+
},
|
|
1894
|
+
(_e = (_d = fieldConfig.validators) === null || _d === void 0 ? void 0 : _d.call(fieldConfig)) !== null && _e !== void 0 ? _e : [],
|
|
1895
|
+
];
|
|
1896
|
+
}
|
|
1897
|
+
});
|
|
1898
|
+
return this.fb.group(groupConfig);
|
|
1899
|
+
}
|
|
1735
1900
|
// 初始化表单
|
|
1736
1901
|
createFormGroup(name, config, options) {
|
|
1737
1902
|
const groupConfig = {};
|
|
1738
1903
|
this.errorMessageStore[name] = {};
|
|
1739
1904
|
Object.entries(config).forEach(([key, fieldConfig]) => {
|
|
1740
1905
|
var _a, _b, _c;
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1906
|
+
if (this.isFormGroupConfig(fieldConfig)) {
|
|
1907
|
+
// 处理嵌套 FormGroup
|
|
1908
|
+
const nestedGroup = this.createNestedFormGroup(fieldConfig.fields, fieldConfig.disabled);
|
|
1909
|
+
groupConfig[key] = nestedGroup;
|
|
1910
|
+
// 存储嵌套 FormGroup 的错误消息(如果需要)
|
|
1911
|
+
if (fieldConfig.errorMessages) {
|
|
1912
|
+
this.errorMessageStore[name][key] = fieldConfig.errorMessages;
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
else {
|
|
1916
|
+
// 处理普通字段
|
|
1917
|
+
groupConfig[key] = [
|
|
1918
|
+
{
|
|
1919
|
+
value: fieldConfig.value,
|
|
1920
|
+
disabled: (_a = fieldConfig.disabled) !== null && _a !== void 0 ? _a : false,
|
|
1921
|
+
},
|
|
1922
|
+
(_c = (_b = fieldConfig.validators) === null || _b === void 0 ? void 0 : _b.call(fieldConfig)) !== null && _c !== void 0 ? _c : [],
|
|
1923
|
+
];
|
|
1924
|
+
if (fieldConfig.errorMessages) {
|
|
1925
|
+
this.errorMessageStore[name][key] = fieldConfig.errorMessages;
|
|
1926
|
+
}
|
|
1747
1927
|
}
|
|
1748
1928
|
});
|
|
1749
1929
|
if (options === null || options === void 0 ? void 0 : options.labelWidth) {
|
|
@@ -1753,6 +1933,7 @@ class AntdFormService {
|
|
|
1753
1933
|
this.labelAlign = options.labelAlign;
|
|
1754
1934
|
}
|
|
1755
1935
|
this.formStore[name] = this.fb.group(groupConfig);
|
|
1936
|
+
this.formRegisterStore[name] = true;
|
|
1756
1937
|
this.setCSSVariablesToTarget(name);
|
|
1757
1938
|
return this.formStore[name];
|
|
1758
1939
|
}
|
|
@@ -1762,6 +1943,46 @@ class AntdFormService {
|
|
|
1762
1943
|
var _a;
|
|
1763
1944
|
(_a = this.formStore[name]) === null || _a === void 0 ? void 0 : _a.reset(value);
|
|
1764
1945
|
}
|
|
1946
|
+
// 检测表单是否完成注册
|
|
1947
|
+
isFormRegistered(name) {
|
|
1948
|
+
var _a;
|
|
1949
|
+
return (_a = this.formRegisterStore[name]) !== null && _a !== void 0 ? _a : false;
|
|
1950
|
+
}
|
|
1951
|
+
// 销毁对应的表单
|
|
1952
|
+
destory(names) {
|
|
1953
|
+
names.forEach((name) => {
|
|
1954
|
+
// 2. 清理错误消息存储
|
|
1955
|
+
if (this.errorMessageStore[name]) {
|
|
1956
|
+
delete this.errorMessageStore[name];
|
|
1957
|
+
}
|
|
1958
|
+
// 3. 清理表单注册标记
|
|
1959
|
+
if (this.formRegisterStore[name]) {
|
|
1960
|
+
delete this.formRegisterStore[name];
|
|
1961
|
+
}
|
|
1962
|
+
// 4. 清理表单组(Angular 会自动处理 FormGroup 的清理)
|
|
1963
|
+
if (this.formStore[name]) {
|
|
1964
|
+
delete this.formStore[name];
|
|
1965
|
+
}
|
|
1966
|
+
});
|
|
1967
|
+
}
|
|
1968
|
+
// 根据路径获取嵌套的 FormGroup
|
|
1969
|
+
getNestedFormGroup(formGroup, path) {
|
|
1970
|
+
if (!path || path.trim() === "") {
|
|
1971
|
+
return formGroup;
|
|
1972
|
+
}
|
|
1973
|
+
const pathParts = path.split(".").filter((p) => p.trim() !== "");
|
|
1974
|
+
let currentGroup = formGroup;
|
|
1975
|
+
for (const part of pathParts) {
|
|
1976
|
+
if (!currentGroup || !(currentGroup instanceof FormGroup)) {
|
|
1977
|
+
return null;
|
|
1978
|
+
}
|
|
1979
|
+
currentGroup = currentGroup.get(part);
|
|
1980
|
+
if (!currentGroup || !(currentGroup instanceof FormGroup)) {
|
|
1981
|
+
return null;
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
return currentGroup instanceof FormGroup ? currentGroup : null;
|
|
1985
|
+
}
|
|
1765
1986
|
// 批量添加字段配置
|
|
1766
1987
|
addFieldsConfig(formName, fieldsConfig, options) {
|
|
1767
1988
|
var _a;
|
|
@@ -1771,8 +1992,8 @@ class AntdFormService {
|
|
|
1771
1992
|
failed: [],
|
|
1772
1993
|
};
|
|
1773
1994
|
// 1. 验证表单是否存在
|
|
1774
|
-
const
|
|
1775
|
-
if (!
|
|
1995
|
+
const rootFormGroup = this.formStore[formName];
|
|
1996
|
+
if (!rootFormGroup) {
|
|
1776
1997
|
// 如果表单不存在,所有字段都失败
|
|
1777
1998
|
Object.keys(fieldsConfig).forEach((fieldName) => {
|
|
1778
1999
|
var _a;
|
|
@@ -1786,20 +2007,41 @@ class AntdFormService {
|
|
|
1786
2007
|
result.success = false;
|
|
1787
2008
|
return result;
|
|
1788
2009
|
}
|
|
1789
|
-
// 2.
|
|
2010
|
+
// 2. 获取目标 FormGroup(支持嵌套路径)
|
|
2011
|
+
const targetPath = options === null || options === void 0 ? void 0 : options.targetPath;
|
|
2012
|
+
const targetFormGroup = targetPath
|
|
2013
|
+
? this.getNestedFormGroup(rootFormGroup, targetPath)
|
|
2014
|
+
: rootFormGroup;
|
|
2015
|
+
if (!targetFormGroup) {
|
|
2016
|
+
// 如果目标 FormGroup 不存在,所有字段都失败
|
|
2017
|
+
Object.keys(fieldsConfig).forEach((fieldName) => {
|
|
2018
|
+
var _a;
|
|
2019
|
+
const error = targetPath
|
|
2020
|
+
? `Target FormGroup at path "${targetPath}" not found`
|
|
2021
|
+
: `FormGroup not found`;
|
|
2022
|
+
result.failed.push({
|
|
2023
|
+
fieldName,
|
|
2024
|
+
error,
|
|
2025
|
+
});
|
|
2026
|
+
(_a = options === null || options === void 0 ? void 0 : options.onFieldAdded) === null || _a === void 0 ? void 0 : _a.call(options, fieldName, false, error);
|
|
2027
|
+
});
|
|
2028
|
+
result.success = false;
|
|
2029
|
+
return result;
|
|
2030
|
+
}
|
|
2031
|
+
// 3. 初始化 errorMessageStore(如果不存在)
|
|
1790
2032
|
if (!this.errorMessageStore[formName]) {
|
|
1791
2033
|
this.errorMessageStore[formName] = {};
|
|
1792
2034
|
}
|
|
1793
|
-
//
|
|
2035
|
+
// 4. 批量构建控件配置
|
|
1794
2036
|
const controlsToAdd = {};
|
|
1795
2037
|
const errorMessagesToAdd = {};
|
|
1796
|
-
//
|
|
2038
|
+
// 5. 遍历所有字段配置,进行验证和构建
|
|
1797
2039
|
Object.entries(fieldsConfig).forEach(([fieldName, fieldConfig]) => {
|
|
1798
2040
|
var _a, _b, _c, _d, _e;
|
|
1799
2041
|
try {
|
|
1800
|
-
//
|
|
1801
|
-
if (
|
|
1802
|
-
const error = `Field "${fieldName}" already exists`;
|
|
2042
|
+
// 5.1 检查字段是否已存在
|
|
2043
|
+
if (targetFormGroup.get(fieldName)) {
|
|
2044
|
+
const error = `Field "${fieldName}" already exists${targetPath ? ` in "${targetPath}"` : ""}`;
|
|
1803
2045
|
result.failed.push({
|
|
1804
2046
|
fieldName,
|
|
1805
2047
|
error,
|
|
@@ -1807,20 +2049,38 @@ class AntdFormService {
|
|
|
1807
2049
|
(_a = options === null || options === void 0 ? void 0 : options.onFieldAdded) === null || _a === void 0 ? void 0 : _a.call(options, fieldName, false, error);
|
|
1808
2050
|
return;
|
|
1809
2051
|
}
|
|
1810
|
-
//
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
2052
|
+
// 5.2 创建控件
|
|
2053
|
+
let control;
|
|
2054
|
+
if (this.isFormGroupConfig(fieldConfig)) {
|
|
2055
|
+
// 创建嵌套 FormGroup
|
|
2056
|
+
control = this.createNestedFormGroup(fieldConfig.fields, fieldConfig.disabled);
|
|
2057
|
+
// 存储嵌套 FormGroup 的错误消息(如果需要)
|
|
2058
|
+
if (fieldConfig.errorMessages) {
|
|
2059
|
+
const errorMessageKey = targetPath
|
|
2060
|
+
? `${targetPath}.${fieldName}`
|
|
2061
|
+
: fieldName;
|
|
2062
|
+
errorMessagesToAdd[errorMessageKey] = fieldConfig.errorMessages;
|
|
2063
|
+
}
|
|
1818
2064
|
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
2065
|
+
else {
|
|
2066
|
+
// 创建普通 FormControl
|
|
2067
|
+
const controlOptions = {
|
|
2068
|
+
validators: (_c = (_b = fieldConfig.validators) === null || _b === void 0 ? void 0 : _b.call(fieldConfig)) !== null && _c !== void 0 ? _c : [],
|
|
2069
|
+
};
|
|
2070
|
+
control = this.fb.control(fieldConfig.value, controlOptions);
|
|
2071
|
+
// 设置 disabled 状态
|
|
2072
|
+
if (fieldConfig.disabled) {
|
|
2073
|
+
control.disable();
|
|
2074
|
+
}
|
|
2075
|
+
// 存储错误消息
|
|
2076
|
+
if (fieldConfig.errorMessages) {
|
|
2077
|
+
const errorMessageKey = targetPath
|
|
2078
|
+
? `${targetPath}.${fieldName}`
|
|
2079
|
+
: fieldName;
|
|
2080
|
+
errorMessagesToAdd[errorMessageKey] = fieldConfig.errorMessages;
|
|
2081
|
+
}
|
|
1823
2082
|
}
|
|
2083
|
+
controlsToAdd[fieldName] = control;
|
|
1824
2084
|
result.added.push(fieldName);
|
|
1825
2085
|
(_d = options === null || options === void 0 ? void 0 : options.onFieldAdded) === null || _d === void 0 ? void 0 : _d.call(options, fieldName, true);
|
|
1826
2086
|
}
|
|
@@ -1833,18 +2093,18 @@ class AntdFormService {
|
|
|
1833
2093
|
(_e = options === null || options === void 0 ? void 0 : options.onFieldAdded) === null || _e === void 0 ? void 0 : _e.call(options, fieldName, false, errorMessage);
|
|
1834
2094
|
}
|
|
1835
2095
|
});
|
|
1836
|
-
//
|
|
2096
|
+
// 6. 批量添加到目标 FormGroup
|
|
1837
2097
|
if (Object.keys(controlsToAdd).length > 0) {
|
|
1838
2098
|
Object.entries(controlsToAdd).forEach(([fieldName, control]) => {
|
|
1839
|
-
|
|
2099
|
+
targetFormGroup.addControl(fieldName, control);
|
|
1840
2100
|
});
|
|
1841
|
-
//
|
|
2101
|
+
// 7. 批量存储错误消息
|
|
1842
2102
|
Object.entries(errorMessagesToAdd).forEach(([key, messages]) => {
|
|
1843
2103
|
this.errorMessageStore[formName][key] = messages;
|
|
1844
2104
|
});
|
|
1845
|
-
//
|
|
2105
|
+
// 8. 更新表单验证状态
|
|
1846
2106
|
if (options === null || options === void 0 ? void 0 : options.updateValueAndValidity) {
|
|
1847
|
-
|
|
2107
|
+
targetFormGroup.updateValueAndValidity({
|
|
1848
2108
|
emitEvent: (_a = options === null || options === void 0 ? void 0 : options.emitEvent) !== null && _a !== void 0 ? _a : true,
|
|
1849
2109
|
});
|
|
1850
2110
|
}
|
|
@@ -2040,10 +2300,17 @@ class AntdFormService {
|
|
|
2040
2300
|
let appliedCount = 0;
|
|
2041
2301
|
dom.forEach((item) => {
|
|
2042
2302
|
const target = item;
|
|
2043
|
-
if (target.
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2303
|
+
if (target.closest(".pro-table-container")) {
|
|
2304
|
+
return;
|
|
2305
|
+
}
|
|
2306
|
+
const customWidth = target.getAttribute("custom-width");
|
|
2307
|
+
const customAlign = target.getAttribute("custom-align");
|
|
2308
|
+
const finalWidth = customWidth || this.labelWidth;
|
|
2309
|
+
const finalTextAlign = customAlign || this.labelAlign;
|
|
2310
|
+
if (target.style.width !== finalWidth ||
|
|
2311
|
+
target.style.textAlign !== finalTextAlign) {
|
|
2312
|
+
target.style.width = finalWidth;
|
|
2313
|
+
target.style.textAlign = finalTextAlign;
|
|
2047
2314
|
appliedCount++;
|
|
2048
2315
|
}
|
|
2049
2316
|
});
|
|
@@ -2105,7 +2372,7 @@ class AntdFormService {
|
|
|
2105
2372
|
return valueChanges$.subscribe(handler);
|
|
2106
2373
|
}
|
|
2107
2374
|
}
|
|
2108
|
-
AntdFormService.ɵprov =
|
|
2375
|
+
AntdFormService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AntdFormService_Factory() { return new AntdFormService(i0.ɵɵinject(i1.FormBuilder)); }, token: AntdFormService, providedIn: "root" });
|
|
2109
2376
|
AntdFormService.decorators = [
|
|
2110
2377
|
{ type: Injectable, args: [{ providedIn: "root" },] }
|
|
2111
2378
|
];
|
|
@@ -2441,8 +2708,36 @@ class ArrayFormService {
|
|
|
2441
2708
|
}
|
|
2442
2709
|
return form.data.some((item) => item.isEdit);
|
|
2443
2710
|
}
|
|
2711
|
+
// 销毁对应的表单
|
|
2712
|
+
destory(names) {
|
|
2713
|
+
names.forEach((name) => {
|
|
2714
|
+
if (this.formStore[name]) {
|
|
2715
|
+
// 清理表单数据
|
|
2716
|
+
delete this.formStore[name];
|
|
2717
|
+
}
|
|
2718
|
+
});
|
|
2719
|
+
}
|
|
2720
|
+
// 重置表单数组
|
|
2721
|
+
resetFormArray(name) {
|
|
2722
|
+
const form = this.formStore[name];
|
|
2723
|
+
if (!form) {
|
|
2724
|
+
return;
|
|
2725
|
+
}
|
|
2726
|
+
// 1. 清空数据数组
|
|
2727
|
+
form.data = [];
|
|
2728
|
+
// 2. 清理所有快照
|
|
2729
|
+
form.initialSnapshot = {};
|
|
2730
|
+
form.editingSnapshot = {};
|
|
2731
|
+
// 3. 清理校验结果
|
|
2732
|
+
form.validationResults = {};
|
|
2733
|
+
// 4. 重置 touched 状态
|
|
2734
|
+
form.allTouched = false;
|
|
2735
|
+
form.rowTouched = {};
|
|
2736
|
+
// 5. 如果配置了自动更新,更新外部数组引用
|
|
2737
|
+
this.autoUpdateArrayReference(name);
|
|
2738
|
+
}
|
|
2444
2739
|
}
|
|
2445
|
-
ArrayFormService.ɵprov =
|
|
2740
|
+
ArrayFormService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ArrayFormService_Factory() { return new ArrayFormService(); }, token: ArrayFormService, providedIn: "root" });
|
|
2446
2741
|
ArrayFormService.decorators = [
|
|
2447
2742
|
{ type: Injectable, args: [{
|
|
2448
2743
|
providedIn: "root",
|