@ebuilding/form 2.4.0 → 2.4.1
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/attachment/index.d.ts +1 -0
- package/attachment/src/attachment.config.d.ts +2 -0
- package/attachment/src/attachment.module.d.ts +9 -0
- package/attachment/src/default/index.d.ts +42 -0
- package/attachment/src/public_api.d.ts +3 -0
- package/fesm2022/ebuilding-form.mjs +804 -17
- package/fesm2022/ebuilding-form.mjs.map +1 -1
- package/fesm2022/type.attachment.mjs +214 -0
- package/fesm2022/type.attachment.mjs.map +1 -0
- package/fesm2022/type.idCard.mjs +403 -0
- package/fesm2022/type.idCard.mjs.map +1 -0
- package/fesm2022/type.img.mjs +236 -0
- package/fesm2022/type.img.mjs.map +1 -0
- package/id-card/index.d.ts +1 -0
- package/id-card/src/default-back/index.d.ts +44 -0
- package/id-card/src/default-front/index.d.ts +44 -0
- package/id-card/src/idcard.config.d.ts +2 -0
- package/id-card/src/idcard.module.d.ts +9 -0
- package/id-card/src/public_api.d.ts +4 -0
- package/img/index.d.ts +1 -0
- package/img/src/default/index.d.ts +46 -0
- package/img/src/img.config.d.ts +2 -0
- package/img/src/img.module.d.ts +9 -0
- package/img/src/public_api.d.ts +3 -0
- package/index.d.ts +3 -0
- package/package.json +51 -39
|
@@ -22,32 +22,32 @@ import moment from 'moment';
|
|
|
22
22
|
import { zhCN } from 'date-fns/locale';
|
|
23
23
|
import * as i1$3 from '@ebuilding/base/shared.pipe';
|
|
24
24
|
import { GramPipeModule } from '@ebuilding/base/shared.pipe';
|
|
25
|
-
import * as
|
|
25
|
+
import * as i4$1 from 'ng-zorro-antd/icon';
|
|
26
26
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
27
|
-
import * as i4$
|
|
27
|
+
import * as i4$2 from 'ng-zorro-antd/button';
|
|
28
28
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
29
29
|
import { globalKey, ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';
|
|
30
30
|
import * as i1$4 from '@ebuilding/base/shared.srv/global.event';
|
|
31
|
-
import * as i5$
|
|
31
|
+
import * as i5$1 from 'ng-zorro-antd/core/transition-patch';
|
|
32
32
|
import * as i1$5 from 'ng-zorro-antd/modal';
|
|
33
33
|
import { NzModalModule } from 'ng-zorro-antd/modal';
|
|
34
34
|
import * as i2$1 from 'ng-zorro-antd/message';
|
|
35
35
|
import * as i8 from 'ng-zorro-antd/core/wave';
|
|
36
36
|
import * as i2$2 from 'ng-zorro-antd/grid';
|
|
37
37
|
import { NzGridModule } from 'ng-zorro-antd/grid';
|
|
38
|
-
import * as i4$
|
|
38
|
+
import * as i4$3 from 'ng-zorro-antd/dropdown';
|
|
39
39
|
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
40
40
|
import * as i3$2 from 'ng-zorro-antd/menu';
|
|
41
41
|
import * as i1$6 from 'ng-zorro-antd/divider';
|
|
42
42
|
import { NzDividerModule } from 'ng-zorro-antd/divider';
|
|
43
|
-
import * as i4$
|
|
43
|
+
import * as i4$4 from 'ng-zorro-antd/input-number';
|
|
44
44
|
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
45
45
|
import * as i2$3 from 'ng-zorro-antd/rate';
|
|
46
46
|
import { NzRateModule } from 'ng-zorro-antd/rate';
|
|
47
47
|
import * as i3$3 from 'ng-zorro-antd/select';
|
|
48
48
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
49
49
|
import _ from 'lodash';
|
|
50
|
-
import * as i4$
|
|
50
|
+
import * as i4$5 from 'ng-zorro-antd/radio';
|
|
51
51
|
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
52
52
|
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
53
53
|
import * as i6 from '@angular/cdk/drag-drop';
|
|
@@ -64,6 +64,8 @@ import { NzTabsModule } from 'ng-zorro-antd/tabs';
|
|
|
64
64
|
import * as i6$1 from 'ngx-quill';
|
|
65
65
|
import { QuillModule } from 'ngx-quill';
|
|
66
66
|
import * as i1$7 from '@delon/theme';
|
|
67
|
+
import * as i3$5 from 'ng-zorro-antd/upload';
|
|
68
|
+
import { NzUploadModule } from 'ng-zorro-antd/upload';
|
|
67
69
|
|
|
68
70
|
class DeonNzFieldCheckbox extends FieldType {
|
|
69
71
|
defaultOptions = {
|
|
@@ -701,7 +703,7 @@ class DeonNzFieldDim extends FieldType {
|
|
|
701
703
|
});
|
|
702
704
|
}
|
|
703
705
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDim, deps: [{ token: i1$4.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
704
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDim, isStandalone: true, selector: "deon-nz-field-dim", usesInheritance: true, ngImport: i0, template: "<div class=\"dim-title\">\n <ul>\n <li>\n <i nz-icon nzType=\"tags\"></i>\n <span>{{ props?.label }}</span>\n </li>\n <li\n *ngIf=\"props && props['dimConfig'] && (props['dimConfig']['dimWeightType'] === 'FIX' || props['dimConfig']['dimWeightType'] === 'SUM')\">\n <label>\u7EF4\u5EA6\u6743\u91CD</label>\n <label>{{ props['dimConfig']['dimWeight'] }}%</label>\n </li>\n <li class=\"dim-button\" *ngIf=\"props && props['dimConfig'] && \n (props['dimConfig']['izAdd'] || \n props['dimConfig']['izRef'] || \n props['dimConfig']['izKey'] || \n props['dimConfig']['izTask'])\">\n <div class=\"empty\"></div>\n <div class=\"button\">\n <a (click)=\"btnAdd()\" *ngIf=\"props['dimConfig']['izAdd']\">\n <i nz-icon nzType=\"plus-circle\"></i>\u65B0\u589E\u6307\u6807\n </a>\n <a (click)=\"btnRef()\" *ngIf=\"props['dimConfig']['izRef']\">\n <i nz-icon nzType=\"table\"></i>\u5F15\u7528\u6307\u6807\n </a>\n <a (click)=\"btnKeyResult()\" *ngIf=\"props['dimConfig']['izKey']\">\n <i nz-icon nzType=\"api\"></i>\u5F15\u7528\u5173\u952E\u7ED3\u679C\n </a>\n <a (click)=\"btnTask()\" *ngIf=\"props['dimConfig']['izTask']\">\n <i nz-icon nzType=\"book\"></i>\u5F15\u7528\u5DE5\u4F5C\u4EFB\u52A1\n </a>\n </div>\n </li>\n </ul>\n</div>\n<div class=\"dim-content\">\n\n <ng-container *ngIf=\"props && props['dimConfig'] && props['dimConfig']['showTable']==true;else tmpDefault\">\n <div class=\"dim-table\">\n <div class=\"dim-table-header\">\n <div class=\"no\" *ngIf=\"props['dimConfig']['showSn']\">\u5E8F\u53F7</div>\n <ng-container *ngIf=\"props['dimConfig']['tableRows']\">\n <ng-container *ngFor=\"let item of props['dimConfig']['tableRows']\">\n <div [ngStyle]=\"item?.widthAuto ? {'flex': '1'} : {'width': item?.width+'px'}\">{{item?.name}}</div>\n </ng-container>\n </ng-container>\n <div class=\"operate\" *ngIf=\"field?.editor==true\">\u64CD\u4F5C</div>\n </div>\n <div class=\"dim-table-body\">\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0; else tmpEmpty\">\n <ng-container *ngFor=\"let f of field.fieldGroup;let index=index\">\n <div class=\"rows\">\n <div class=\"row-no\" *ngIf=\"props['dimConfig']['showSn']\">{{index+1}}</div>\n <div class=\"row-content\">\n <formly-field [field]=\"f\" [isTable]=\"true\" [dimConfig]=\"props['dimConfig']\"\n [tableConfig]=\"props['dimConfig']['tableRows']\"></formly-field>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-container>\n\n <ng-template #tmpDefault>\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0; else tmpEmpty\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #tmpEmpty>\n <div class=\"empty-box\">\n <div class=\"image\"><img src=\"assets/images/default/empty2.png\" /></div>\n <div class=\"desc\">\n <span>\u6682\u65E0\u6570\u636E</span>\n </div>\n </div>\n </ng-template>\n\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep{width:100%;margin-bottom:5px}:host ::ng-deep .dim-title ul{padding:0;margin:0;list-style:none;display:flex;flex-direction:row;align-items:center;font-size:14px}:host ::ng-deep .dim-title ul li{padding:0 20px 0 0;margin:0}:host ::ng-deep .dim-title ul li i{margin-right:3px}:host ::ng-deep .dim-title ul li label:nth-child(1):after{content:\":\";padding:0 5px 0 3px}:host ::ng-deep .dim-title ul .dim-button{flex:1;display:flex;flex-direction:row}:host ::ng-deep .dim-title ul .dim-button .empty{flex:1}:host ::ng-deep .dim-title ul .dim-button a+a{margin-left:15px}:host ::ng-deep .dim-content{width:100%}:host ::ng-deep .empty-box{display:flex;flex-direction:column;align-items:center}:host ::ng-deep .empty-box img{width:105px}:host ::ng-deep .dim-table{width:100%;border:1px solid #eaeaea}:host ::ng-deep .dim-table-header{display:flex;flex-direction:row}:host ::ng-deep .dim-table-header div{border-left:1px solid #eaeaea;padding:0 0 0 8px;background:#f5f7fa}:host ::ng-deep .dim-table-header div:nth-child(1){border-left:0}:host ::ng-deep .dim-table-header .no{width:60px;flex:none}:host ::ng-deep .dim-table-header .operate{width:120px;flex:none}:host ::ng-deep .dim-table-body{display:flex;flex-direction:column}:host ::ng-deep .dim-table-body .rows{display:flex;flex-direction:row;padding:8px 0 0;border-bottom:1px solid #eaeaea}:host ::ng-deep .dim-table-body .rows .row-no{width:60px;padding:0 0 0 8px}:host ::ng-deep .dim-table-body .rows .row-content{flex:1}:host ::ng-deep .dim-table-body .rows .ind-list{display:flex;flex-direction:row;flex:1}:host ::ng-deep .dim-table-body .rows .ind-list .ind-item{flex:1;display:flex;flex-direction:row}:host ::ng-deep .dim-table-body .rows .ind-list .ind-operate{width:120px;padding:0 0 0 8px;text-align:center;align-self:center}:host ::ng-deep .dim-table-body .rows .ind-list .ind-operate a{margin:0 8px 0 0}:host ::ng-deep .dim-table-body .rows:nth-last-child(1){border-bottom:0}:host ::ng-deep .dim-table-body deon-nz-field-indicator{border:0}:host ::ng-deep .dim-table-body deon-nz-field-indicator .ind-list{display:flex;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type:
|
|
706
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDim, isStandalone: true, selector: "deon-nz-field-dim", usesInheritance: true, ngImport: i0, template: "<div class=\"dim-title\">\n <ul>\n <li>\n <i nz-icon nzType=\"tags\"></i>\n <span>{{ props?.label }}</span>\n </li>\n <li\n *ngIf=\"props && props['dimConfig'] && (props['dimConfig']['dimWeightType'] === 'FIX' || props['dimConfig']['dimWeightType'] === 'SUM')\">\n <label>\u7EF4\u5EA6\u6743\u91CD</label>\n <label>{{ props['dimConfig']['dimWeight'] }}%</label>\n </li>\n <li class=\"dim-button\" *ngIf=\"props && props['dimConfig'] && \n (props['dimConfig']['izAdd'] || \n props['dimConfig']['izRef'] || \n props['dimConfig']['izKey'] || \n props['dimConfig']['izTask'])\">\n <div class=\"empty\"></div>\n <div class=\"button\">\n <a (click)=\"btnAdd()\" *ngIf=\"props['dimConfig']['izAdd']\">\n <i nz-icon nzType=\"plus-circle\"></i>\u65B0\u589E\u6307\u6807\n </a>\n <a (click)=\"btnRef()\" *ngIf=\"props['dimConfig']['izRef']\">\n <i nz-icon nzType=\"table\"></i>\u5F15\u7528\u6307\u6807\n </a>\n <a (click)=\"btnKeyResult()\" *ngIf=\"props['dimConfig']['izKey']\">\n <i nz-icon nzType=\"api\"></i>\u5F15\u7528\u5173\u952E\u7ED3\u679C\n </a>\n <a (click)=\"btnTask()\" *ngIf=\"props['dimConfig']['izTask']\">\n <i nz-icon nzType=\"book\"></i>\u5F15\u7528\u5DE5\u4F5C\u4EFB\u52A1\n </a>\n </div>\n </li>\n </ul>\n</div>\n<div class=\"dim-content\">\n\n <ng-container *ngIf=\"props && props['dimConfig'] && props['dimConfig']['showTable']==true;else tmpDefault\">\n <div class=\"dim-table\">\n <div class=\"dim-table-header\">\n <div class=\"no\" *ngIf=\"props['dimConfig']['showSn']\">\u5E8F\u53F7</div>\n <ng-container *ngIf=\"props['dimConfig']['tableRows']\">\n <ng-container *ngFor=\"let item of props['dimConfig']['tableRows']\">\n <div [ngStyle]=\"item?.widthAuto ? {'flex': '1'} : {'width': item?.width+'px'}\">{{item?.name}}</div>\n </ng-container>\n </ng-container>\n <div class=\"operate\" *ngIf=\"field?.editor==true\">\u64CD\u4F5C</div>\n </div>\n <div class=\"dim-table-body\">\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0; else tmpEmpty\">\n <ng-container *ngFor=\"let f of field.fieldGroup;let index=index\">\n <div class=\"rows\">\n <div class=\"row-no\" *ngIf=\"props['dimConfig']['showSn']\">{{index+1}}</div>\n <div class=\"row-content\">\n <formly-field [field]=\"f\" [isTable]=\"true\" [dimConfig]=\"props['dimConfig']\"\n [tableConfig]=\"props['dimConfig']['tableRows']\"></formly-field>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-container>\n\n <ng-template #tmpDefault>\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0; else tmpEmpty\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #tmpEmpty>\n <div class=\"empty-box\">\n <div class=\"image\"><img src=\"assets/images/default/empty2.png\" /></div>\n <div class=\"desc\">\n <span>\u6682\u65E0\u6570\u636E</span>\n </div>\n </div>\n </ng-template>\n\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep{width:100%;margin-bottom:5px}:host ::ng-deep .dim-title ul{padding:0;margin:0;list-style:none;display:flex;flex-direction:row;align-items:center;font-size:14px}:host ::ng-deep .dim-title ul li{padding:0 20px 0 0;margin:0}:host ::ng-deep .dim-title ul li i{margin-right:3px}:host ::ng-deep .dim-title ul li label:nth-child(1):after{content:\":\";padding:0 5px 0 3px}:host ::ng-deep .dim-title ul .dim-button{flex:1;display:flex;flex-direction:row}:host ::ng-deep .dim-title ul .dim-button .empty{flex:1}:host ::ng-deep .dim-title ul .dim-button a+a{margin-left:15px}:host ::ng-deep .dim-content{width:100%}:host ::ng-deep .empty-box{display:flex;flex-direction:column;align-items:center}:host ::ng-deep .empty-box img{width:105px}:host ::ng-deep .dim-table{width:100%;border:1px solid #eaeaea}:host ::ng-deep .dim-table-header{display:flex;flex-direction:row}:host ::ng-deep .dim-table-header div{border-left:1px solid #eaeaea;padding:0 0 0 8px;background:#f5f7fa}:host ::ng-deep .dim-table-header div:nth-child(1){border-left:0}:host ::ng-deep .dim-table-header .no{width:60px;flex:none}:host ::ng-deep .dim-table-header .operate{width:120px;flex:none}:host ::ng-deep .dim-table-body{display:flex;flex-direction:column}:host ::ng-deep .dim-table-body .rows{display:flex;flex-direction:row;padding:8px 0 0;border-bottom:1px solid #eaeaea}:host ::ng-deep .dim-table-body .rows .row-no{width:60px;padding:0 0 0 8px}:host ::ng-deep .dim-table-body .rows .row-content{flex:1}:host ::ng-deep .dim-table-body .rows .ind-list{display:flex;flex-direction:row;flex:1}:host ::ng-deep .dim-table-body .rows .ind-list .ind-item{flex:1;display:flex;flex-direction:row}:host ::ng-deep .dim-table-body .rows .ind-list .ind-operate{width:120px;padding:0 0 0 8px;text-align:center;align-self:center}:host ::ng-deep .dim-table-body .rows .ind-list .ind-operate a{margin:0 8px 0 0}:host ::ng-deep .dim-table-body .rows:nth-last-child(1){border-bottom:0}:host ::ng-deep .dim-table-body deon-nz-field-indicator{border:0}:host ::ng-deep .dim-table-body deon-nz-field-indicator .ind-list{display:flex;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "directive", type: i5$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyField, selector: "formly-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
705
707
|
}
|
|
706
708
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDim, decorators: [{
|
|
707
709
|
type: Component,
|
|
@@ -782,7 +784,7 @@ class DeonNzFieldDimIndicator extends FieldType {
|
|
|
782
784
|
});
|
|
783
785
|
}
|
|
784
786
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDimIndicator, deps: [{ token: i1$5.NzModalService }, { token: i2$1.NzMessageService }, { token: i1$4.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
785
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDimIndicator, isStandalone: true, selector: "deon-nz-field-indicator", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"props && props['isTable']==true;else tmpDefault\">\n <div class=\"ind-list\">\n <div class=\"ind-item\">\n <ng-container *ngFor=\"let f of field.fieldGroup;let index=index;\">\n <div style=\"padding: 0 8px;\"\n [ngStyle]=\"props['tableConfig'][index].widthAuto ? {'flex': '1'} : {'width': props['tableConfig'][index]?.width+'px'}\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </div>\n </ng-container>\n </div>\n <div class=\"ind-operate\" *ngIf=\"field?.editor == true\">\n <a (click)=\"btnUp()\">\n <i nz-icon nzType=\"arrow-up\"></i>\n </a>\n <a (click)=\"btnDown()\">\n <i nz-icon nzType=\"arrow-down\"></i>\n </a>\n <a (click)=\"btnDelete()\" *ngIf=\"props?.['indConfig']?.['izAllowDel'] == true\">\n <i nz-icon nzType=\"delete\"></i>\n </a>\n </div>\n </div>\n</ng-container>\n<ng-template #tmpDefault>\n <div class=\"ind-button\" *ngIf=\"field?.editor == true\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"btnUp()\">\n <i nz-icon nzType=\"arrow-up\"></i>\u4E0A\u79FB\n </button>\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"btnDown()\">\n <i nz-icon nzType=\"arrow-down\"></i>\u4E0B\u79FB\n </button>\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"btnDelete()\"\n *ngIf=\"props?.['indConfig']?.['izAllowDel'] == true\">\n <i nz-icon nzType=\"delete\"></i>\u5220\u9664\n </button>\n </div>\n\n <div class=\"ind-content\">\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0\">\n <div class=\"table-box\" *ngIf=\"props?.['indConfig']?.['izIndTable'] == true; else tmpDefault2\">\n <table>\n <thead>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <th [attr.width]=\"\n f?.key == 'name'\n ? '300px'\n : f?.key == 'desc'\n ? ''\n : '130px'\n \">\n <ng-container *ngIf=\"f?.props?.required == true\">\n <label class=\"label-required\">*</label>\n </ng-container>\n {{ f.props?.label }}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <td>\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n </div>\n</ng-template>\n<ng-template #tmpDefault2>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n</ng-template>", styles: [":host ::ng-deep{width:100%;border:1px solid #eaeaea;border-radius:4px;padding:0;display:flex;flex-direction:column}:host ::ng-deep .ind-button{text-align:right;padding:8px 15px 6px;border-bottom:1px solid #eaeaea}:host ::ng-deep .ind-content{flex:1;padding:15px 15px 0}:host ::ng-deep .table-box{padding:0 0 15px}:host ::ng-deep .table-box table tr th{padding:0 8px}:host ::ng-deep .table-box table tr td{padding:10px 8px;vertical-align:top}:host ::ng-deep .table-box .ant-form-item{margin-bottom:0}:host ::ng-deep .table-box .label-required{color:red;margin-right:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type:
|
|
787
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDimIndicator, isStandalone: true, selector: "deon-nz-field-indicator", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"props && props['isTable']==true;else tmpDefault\">\n <div class=\"ind-list\">\n <div class=\"ind-item\">\n <ng-container *ngFor=\"let f of field.fieldGroup;let index=index;\">\n <div style=\"padding: 0 8px;\"\n [ngStyle]=\"props['tableConfig'][index].widthAuto ? {'flex': '1'} : {'width': props['tableConfig'][index]?.width+'px'}\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </div>\n </ng-container>\n </div>\n <div class=\"ind-operate\" *ngIf=\"field?.editor == true\">\n <a (click)=\"btnUp()\">\n <i nz-icon nzType=\"arrow-up\"></i>\n </a>\n <a (click)=\"btnDown()\">\n <i nz-icon nzType=\"arrow-down\"></i>\n </a>\n <a (click)=\"btnDelete()\" *ngIf=\"props?.['indConfig']?.['izAllowDel'] == true\">\n <i nz-icon nzType=\"delete\"></i>\n </a>\n </div>\n </div>\n</ng-container>\n<ng-template #tmpDefault>\n <div class=\"ind-button\" *ngIf=\"field?.editor == true\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"btnUp()\">\n <i nz-icon nzType=\"arrow-up\"></i>\u4E0A\u79FB\n </button>\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"btnDown()\">\n <i nz-icon nzType=\"arrow-down\"></i>\u4E0B\u79FB\n </button>\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"btnDelete()\"\n *ngIf=\"props?.['indConfig']?.['izAllowDel'] == true\">\n <i nz-icon nzType=\"delete\"></i>\u5220\u9664\n </button>\n </div>\n\n <div class=\"ind-content\">\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0\">\n <div class=\"table-box\" *ngIf=\"props?.['indConfig']?.['izIndTable'] == true; else tmpDefault2\">\n <table>\n <thead>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <th [attr.width]=\"\n f?.key == 'name'\n ? '300px'\n : f?.key == 'desc'\n ? ''\n : '130px'\n \">\n <ng-container *ngIf=\"f?.props?.required == true\">\n <label class=\"label-required\">*</label>\n </ng-container>\n {{ f.props?.label }}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <td>\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n </div>\n</ng-template>\n<ng-template #tmpDefault2>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n</ng-template>", styles: [":host ::ng-deep{width:100%;border:1px solid #eaeaea;border-radius:4px;padding:0;display:flex;flex-direction:column}:host ::ng-deep .ind-button{text-align:right;padding:8px 15px 6px;border-bottom:1px solid #eaeaea}:host ::ng-deep .ind-content{flex:1;padding:15px 15px 0}:host ::ng-deep .table-box{padding:0 0 15px}:host ::ng-deep .table-box table tr th{padding:0 8px}:host ::ng-deep .table-box table tr td{padding:10px 8px;vertical-align:top}:host ::ng-deep .table-box .ant-form-item{margin-bottom:0}:host ::ng-deep .table-box .label-required{color:red;margin-right:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyField, selector: "formly-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
786
788
|
}
|
|
787
789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDimIndicator, decorators: [{
|
|
788
790
|
type: Component,
|
|
@@ -847,7 +849,7 @@ class DeonNzFieldDimIndicatorAssess extends FieldType {
|
|
|
847
849
|
}
|
|
848
850
|
}
|
|
849
851
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDimIndicatorAssess, deps: [{ token: i1$5.NzModalService }, { token: i2$1.NzMessageService }, { token: i1$4.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
850
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDimIndicatorAssess, isStandalone: true, selector: "deon-nz-field-indicator-assess", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"props && props['isTable']==true;else tmpDefault\">\n <div class=\"ind-list\">\n <div class=\"ind-item\">\n <ng-container *ngFor=\"let f of field.fieldGroup;let i=index;\">\n\n\n <ng-container *ngIf=\"f?.key!='indScoreSelect' && f?.key!='indScoreEnter';else tmpScore\">\n <div style=\"padding: 0 8px;\"\n [ngStyle]=\"props?.['tableConfig']?.[i]?.widthAuto ? {'flex': '1'} : {'width': props['tableConfig'][i]?.width+'px'}\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </div>\n </ng-container>\n\n <ng-template #tmpScore>\n <ng-container *ngIf=\"props?.['expandInfo'] && props?.['expandInfo']?.length>0\">\n <ng-container *ngFor=\"let item of props?.['expandInfo']\">\n <div style=\"padding: 0 8px; width: 150px;\">{{item?.nodeData}}</div>\n </ng-container>\n </ng-container>\n <div style=\"padding: 0 8px; width: 150px;\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </div>\n </ng-template>\n\n\n </ng-container>\n <ng-container *ngIf=\"props['tableConfig'].length > totalRenderedColumns\">\n <ng-container *ngFor=\"let f of props['tableConfig'].slice(totalRenderedColumns);let j=index;\">\n <div style=\"padding: 0 8px; width: 150px;\">\n <ng-container\n *ngIf=\"totalRenderedColumns==(field?.fieldGroup?.length ?? 0) &&props?.['expandInfo'] && props?.['expandInfo']?.length>j;else tmpEmptyData\">\n {{props?.[\"expandInfo\"]?.[j]?.nodeData}}\n </ng-container>\n <ng-template #tmpEmptyData>---</ng-template>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #tmpDefault>\n <div class=\"ind-content\">\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0\">\n <div class=\"table-box\" *ngIf=\"props?.['indConfig']?.['izIndTable'] == true; else tmpCard\">\n <table>\n <thead>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <th [attr.width]=\"\n f?.key == 'name'\n ? '300px'\n : f?.key == 'desc'\n ? ''\n : '130px'\n \" *ngIf=\"f?.key != 'indScoreEnter' && f?.key != 'indScoreSelect'\">\n <ng-container *ngIf=\"f?.props?.required == true\">\n <label class=\"label-required\">*</label>\n </ng-container>\n {{ f.props?.label }}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <td *ngIf=\"f?.key != 'indScoreEnter' && f?.key != 'indScoreSelect'\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </td>\n </ng-container>\n </tr>\n <tr>\n <td [attr.colspan]=\"(field?.fieldGroup?.length ?? 0)\">\n <div class=\"ind-assess\">\n <div class=\"assess-nodes\" *ngIf=\"\n props?.['expandInfo'] &&\n props?.['expandInfo']?.length > 0\n \">\n <div class=\"node-title\">\n <label><span nz-icon nzType=\"bars\"></span>\u8BC4\u4F30\u8BB0\u5F55</label>\n </div>\n <div class=\"node-box\" *ngFor=\"let item of props?.['expandInfo']\">\n <label class=\"title\">{{ item?.nodeName }}</label>\n <label class=\"value\">{{ item?.nodeData }}</label>\n </div>\n </div>\n <div class=\"assess-info\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <ng-container *ngIf=\"\n f?.key == 'indScoreEnter' || f?.key == 'indScoreSelect'\n \">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #tmpCard>\n <div class=\"card-ind\">\n <div class=\"ind-info\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <formly-field [field]=\"f\" *ngIf=\"f?.key != 'indScoreEnter' && f?.key != 'indScoreSelect'\"></formly-field>\n </ng-container>\n </div>\n <div class=\"ind-assess\">\n <div class=\"assess-nodes\" *ngIf=\"\n props?.['expandInfo'] && props?.['expandInfo']?.length > 0\n \">\n <div class=\"node-title\">\n <label><span nz-icon nzType=\"bars\"></span>\u8BC4\u4F30\u8BB0\u5F55</label>\n </div>\n <div class=\"node-box\" *ngFor=\"let item of props?.['expandInfo']\">\n <label class=\"title\">{{ item?.nodeName }}</label>\n <label class=\"value\">{{ item?.nodeData }}</label>\n </div>\n </div>\n <div class=\"assess-info\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <ng-container *ngIf=\"f?.key == 'indScoreEnter' || f?.key == 'indScoreSelect'\">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-template>", styles: [":host ::ng-deep{width:100%;border:0;border-radius:4px;padding:0;display:flex;flex-direction:column}:host ::ng-deep .ind-finish{padding:8px 15px 6px;border-bottom:1px solid #eaeaea}:host ::ng-deep .ind-finish nz-form-label{width:auto!important;max-width:none!important}:host ::ng-deep .ind-finish nz-form-item{margin-bottom:0!important}:host ::ng-deep .ind-finish nz-input-number{max-width:150px}:host ::ng-deep .ind-content{flex:1;padding:15px 15px 0}:host ::ng-deep .ind-assess{padding:0 15px 0 0;display:flex;flex-direction:column}:host ::ng-deep .ind-assess .assess-nodes{display:flex;flex-direction:row;align-items:center;padding:0;margin:0}:host ::ng-deep .ind-assess .assess-nodes .node-title{display:flex;flex-direction:row;align-items:center;padding:0 20px 0 0}:host ::ng-deep .ind-assess .assess-nodes .node-title label{line-height:normal}:host ::ng-deep .ind-assess .assess-nodes .node-box{display:flex;flex-direction:row;align-items:center;padding:0 15px 0 0}:host ::ng-deep .ind-assess .assess-nodes .node-box label{line-height:normal}:host ::ng-deep .ind-assess .assess-nodes .node-box .title:after{content:\":\";padding:0 5px 0 3px}:host ::ng-deep .ind-assess .assess-nodes .node-box .value{font-size:14px;font-weight:600}:host ::ng-deep .ind-assess .assess-info{display:flex;padding:0}:host ::ng-deep .ind-assess .assess-info nz-form-label{width:auto!important;max-width:none!important;padding:0 15px 0 0!important}:host ::ng-deep .ind-assess .assess-info nz-form-item{margin-bottom:0!important}:host ::ng-deep .ind-assess .assess-info nz-input-number{max-width:150px;height:26px;min-height:26px}:host ::ng-deep .ind-assess .assess-info nz-input-number .ant-input-number-input{height:24px;line-height:24px}:host ::ng-deep .ind-assess .assess-nodes+.assess-info{padding:8px 0 0}:host ::ng-deep .table-box{padding:0 0 20px}:host ::ng-deep .table-box table tr th{padding:0 8px}:host ::ng-deep .table-box table tr td{padding:10px 8px;vertical-align:top}:host ::ng-deep .table-box .ant-form-item{margin-bottom:0}:host ::ng-deep .table-box .label-required{color:red;margin-right:2px}:host ::ng-deep .card-ind{padding:10px 15px;border:1px solid #eaeaea;border-radius:4px;margin-bottom:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type:
|
|
852
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDimIndicatorAssess, isStandalone: true, selector: "deon-nz-field-indicator-assess", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"props && props['isTable']==true;else tmpDefault\">\n <div class=\"ind-list\">\n <div class=\"ind-item\">\n <ng-container *ngFor=\"let f of field.fieldGroup;let i=index;\">\n\n\n <ng-container *ngIf=\"f?.key!='indScoreSelect' && f?.key!='indScoreEnter';else tmpScore\">\n <div style=\"padding: 0 8px;\"\n [ngStyle]=\"props?.['tableConfig']?.[i]?.widthAuto ? {'flex': '1'} : {'width': props['tableConfig'][i]?.width+'px'}\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </div>\n </ng-container>\n\n <ng-template #tmpScore>\n <ng-container *ngIf=\"props?.['expandInfo'] && props?.['expandInfo']?.length>0\">\n <ng-container *ngFor=\"let item of props?.['expandInfo']\">\n <div style=\"padding: 0 8px; width: 150px;\">{{item?.nodeData}}</div>\n </ng-container>\n </ng-container>\n <div style=\"padding: 0 8px; width: 150px;\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </div>\n </ng-template>\n\n\n </ng-container>\n <ng-container *ngIf=\"props['tableConfig'].length > totalRenderedColumns\">\n <ng-container *ngFor=\"let f of props['tableConfig'].slice(totalRenderedColumns);let j=index;\">\n <div style=\"padding: 0 8px; width: 150px;\">\n <ng-container\n *ngIf=\"totalRenderedColumns==(field?.fieldGroup?.length ?? 0) &&props?.['expandInfo'] && props?.['expandInfo']?.length>j;else tmpEmptyData\">\n {{props?.[\"expandInfo\"]?.[j]?.nodeData}}\n </ng-container>\n <ng-template #tmpEmptyData>---</ng-template>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #tmpDefault>\n <div class=\"ind-content\">\n <ng-container *ngIf=\"field?.fieldGroup && (field?.fieldGroup?.length ?? 0) > 0\">\n <div class=\"table-box\" *ngIf=\"props?.['indConfig']?.['izIndTable'] == true; else tmpCard\">\n <table>\n <thead>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <th [attr.width]=\"\n f?.key == 'name'\n ? '300px'\n : f?.key == 'desc'\n ? ''\n : '130px'\n \" *ngIf=\"f?.key != 'indScoreEnter' && f?.key != 'indScoreSelect'\">\n <ng-container *ngIf=\"f?.props?.required == true\">\n <label class=\"label-required\">*</label>\n </ng-container>\n {{ f.props?.label }}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr>\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <td *ngIf=\"f?.key != 'indScoreEnter' && f?.key != 'indScoreSelect'\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\"></formly-field>\n </td>\n </ng-container>\n </tr>\n <tr>\n <td [attr.colspan]=\"(field?.fieldGroup?.length ?? 0)\">\n <div class=\"ind-assess\">\n <div class=\"assess-nodes\" *ngIf=\"\n props?.['expandInfo'] &&\n props?.['expandInfo']?.length > 0\n \">\n <div class=\"node-title\">\n <label><span nz-icon nzType=\"bars\"></span>\u8BC4\u4F30\u8BB0\u5F55</label>\n </div>\n <div class=\"node-box\" *ngFor=\"let item of props?.['expandInfo']\">\n <label class=\"title\">{{ item?.nodeName }}</label>\n <label class=\"value\">{{ item?.nodeData }}</label>\n </div>\n </div>\n <div class=\"assess-info\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <ng-container *ngIf=\"\n f?.key == 'indScoreEnter' || f?.key == 'indScoreSelect'\n \">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #tmpCard>\n <div class=\"card-ind\">\n <div class=\"ind-info\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <formly-field [field]=\"f\" *ngIf=\"f?.key != 'indScoreEnter' && f?.key != 'indScoreSelect'\"></formly-field>\n </ng-container>\n </div>\n <div class=\"ind-assess\">\n <div class=\"assess-nodes\" *ngIf=\"\n props?.['expandInfo'] && props?.['expandInfo']?.length > 0\n \">\n <div class=\"node-title\">\n <label><span nz-icon nzType=\"bars\"></span>\u8BC4\u4F30\u8BB0\u5F55</label>\n </div>\n <div class=\"node-box\" *ngFor=\"let item of props?.['expandInfo']\">\n <label class=\"title\">{{ item?.nodeName }}</label>\n <label class=\"value\">{{ item?.nodeData }}</label>\n </div>\n </div>\n <div class=\"assess-info\">\n <ng-container *ngFor=\"let f of field.fieldGroup\">\n <ng-container *ngIf=\"f?.key == 'indScoreEnter' || f?.key == 'indScoreSelect'\">\n <formly-field [field]=\"f\"></formly-field>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-template>", styles: [":host ::ng-deep{width:100%;border:0;border-radius:4px;padding:0;display:flex;flex-direction:column}:host ::ng-deep .ind-finish{padding:8px 15px 6px;border-bottom:1px solid #eaeaea}:host ::ng-deep .ind-finish nz-form-label{width:auto!important;max-width:none!important}:host ::ng-deep .ind-finish nz-form-item{margin-bottom:0!important}:host ::ng-deep .ind-finish nz-input-number{max-width:150px}:host ::ng-deep .ind-content{flex:1;padding:15px 15px 0}:host ::ng-deep .ind-assess{padding:0 15px 0 0;display:flex;flex-direction:column}:host ::ng-deep .ind-assess .assess-nodes{display:flex;flex-direction:row;align-items:center;padding:0;margin:0}:host ::ng-deep .ind-assess .assess-nodes .node-title{display:flex;flex-direction:row;align-items:center;padding:0 20px 0 0}:host ::ng-deep .ind-assess .assess-nodes .node-title label{line-height:normal}:host ::ng-deep .ind-assess .assess-nodes .node-box{display:flex;flex-direction:row;align-items:center;padding:0 15px 0 0}:host ::ng-deep .ind-assess .assess-nodes .node-box label{line-height:normal}:host ::ng-deep .ind-assess .assess-nodes .node-box .title:after{content:\":\";padding:0 5px 0 3px}:host ::ng-deep .ind-assess .assess-nodes .node-box .value{font-size:14px;font-weight:600}:host ::ng-deep .ind-assess .assess-info{display:flex;padding:0}:host ::ng-deep .ind-assess .assess-info nz-form-label{width:auto!important;max-width:none!important;padding:0 15px 0 0!important}:host ::ng-deep .ind-assess .assess-info nz-form-item{margin-bottom:0!important}:host ::ng-deep .ind-assess .assess-info nz-input-number{max-width:150px;height:26px;min-height:26px}:host ::ng-deep .ind-assess .assess-info nz-input-number .ant-input-number-input{height:24px;line-height:24px}:host ::ng-deep .ind-assess .assess-nodes+.assess-info{padding:8px 0 0}:host ::ng-deep .table-box{padding:0 0 20px}:host ::ng-deep .table-box table tr th{padding:0 8px}:host ::ng-deep .table-box table tr td{padding:10px 8px;vertical-align:top}:host ::ng-deep .table-box .ant-form-item{margin-bottom:0}:host ::ng-deep .table-box .label-required{color:red;margin-right:2px}:host ::ng-deep .card-ind{padding:10px 15px;border:1px solid #eaeaea;border-radius:4px;margin-bottom:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "directive", type: i5$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyField, selector: "formly-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
851
853
|
}
|
|
852
854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDimIndicatorAssess, decorators: [{
|
|
853
855
|
type: Component,
|
|
@@ -1217,7 +1219,7 @@ class DeonNzFieldIcon extends FieldType {
|
|
|
1217
1219
|
}
|
|
1218
1220
|
}
|
|
1219
1221
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldIcon, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1220
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldIcon, isStandalone: true, selector: "deon-nz-field-icon", usesInheritance: true, ngImport: i0, template: "<div nz-dropdown [nzDropdownMenu]=\"menu\" class=\"icon-box\" [nzOverlayClassName]=\"'icon-component'\" [nzTrigger]=\"'click'\">\n <span class=\"icon-span\" *ngIf=\"curValue != null && curValue!!; else empty\" [ngClass]=\"curValue\"> </span>\n <span class=\"icon-down\"><i nz-icon nzType=\"down\"></i></span>\n</div>\n<nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <li nz-menu-item *ngFor=\"let item of listIcon\" (click)=\"itemClick(item)\">\n <div [ngClass]=\"item\"></div>\n </li>\n </ul>\n</nz-dropdown-menu>\n<ng-template #empty>\n <span class=\"icon-span\"> </span>\n</ng-template>\n", styles: [":host ::ng-deep .icon-box{display:flex;align-items:center;width:60px;height:30px;padding:5px 11px;font-size:12px;line-height:30px;border:1px solid #eaeaea;border-radius:2px;cursor:pointer;background-color:#fff}:host ::ng-deep .icon-span{display:inline-block;font-size:16px;flex:1}:host ::ng-deep .icon-down{margin-left:6px}:host ::ng-deep .color-control{height:32px;border:1px solid #eaeaea;width:60px;background-color:#fff;padding:8px 13px}:host ::ng-deep .color-control div{width:100%;height:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type:
|
|
1222
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldIcon, isStandalone: true, selector: "deon-nz-field-icon", usesInheritance: true, ngImport: i0, template: "<div nz-dropdown [nzDropdownMenu]=\"menu\" class=\"icon-box\" [nzOverlayClassName]=\"'icon-component'\" [nzTrigger]=\"'click'\">\n <span class=\"icon-span\" *ngIf=\"curValue != null && curValue!!; else empty\" [ngClass]=\"curValue\"> </span>\n <span class=\"icon-down\"><i nz-icon nzType=\"down\"></i></span>\n</div>\n<nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <li nz-menu-item *ngFor=\"let item of listIcon\" (click)=\"itemClick(item)\">\n <div [ngClass]=\"item\"></div>\n </li>\n </ul>\n</nz-dropdown-menu>\n<ng-template #empty>\n <span class=\"icon-span\"> </span>\n</ng-template>\n", styles: [":host ::ng-deep .icon-box{display:flex;align-items:center;width:60px;height:30px;padding:5px 11px;font-size:12px;line-height:30px;border:1px solid #eaeaea;border-radius:2px;cursor:pointer;background-color:#fff}:host ::ng-deep .icon-span{display:inline-block;font-size:16px;flex:1}:host ::ng-deep .icon-down{margin-left:6px}:host ::ng-deep .color-control{height:32px;border:1px solid #eaeaea;width:60px;background-color:#fff;padding:8px 13px}:host ::ng-deep .color-control div{width:100%;height:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i3$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i3$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i4$3.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i4$3.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: FormlyModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1221
1223
|
}
|
|
1222
1224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldIcon, decorators: [{
|
|
1223
1225
|
type: Component,
|
|
@@ -1559,7 +1561,7 @@ class DeonNzFieldNumber extends FieldType {
|
|
|
1559
1561
|
</ng-container>
|
|
1560
1562
|
|
|
1561
1563
|
<ng-template #tmpPwd> *** </ng-template>
|
|
1562
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "component", type: i3$1.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i4$
|
|
1564
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "component", type: i3$1.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i4$4.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzBlur", "nzFocus", "nzOnStep"], exportAs: ["nzInputNumber"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1563
1565
|
}
|
|
1564
1566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldNumber, decorators: [{
|
|
1565
1567
|
type: Component,
|
|
@@ -2053,7 +2055,7 @@ class DeonNzFieldRadio extends FieldType {
|
|
|
2053
2055
|
props: { options: [] },
|
|
2054
2056
|
};
|
|
2055
2057
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRadio, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2056
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRadio, isStandalone: true, selector: "deon-nz-field-radio", usesInheritance: true, ngImport: i0, template: ` <label nz-radio [formControl]="formControl" [formlyAttributes]="field"></label> `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i4$
|
|
2058
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRadio, isStandalone: true, selector: "deon-nz-field-radio", usesInheritance: true, ngImport: i0, template: ` <label nz-radio [formControl]="formControl" [formlyAttributes]="field"></label> `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i4$5.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2057
2059
|
}
|
|
2058
2060
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRadio, decorators: [{
|
|
2059
2061
|
type: Component,
|
|
@@ -2152,7 +2154,7 @@ class DeonNzFieldRadioGroup extends FieldType {
|
|
|
2152
2154
|
</ng-container>
|
|
2153
2155
|
</ng-template>
|
|
2154
2156
|
</nz-radio-group>
|
|
2155
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i4$
|
|
2157
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i4$5.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i4$5.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "ngmodule", type: FormlyModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2156
2158
|
}
|
|
2157
2159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRadioGroup, decorators: [{
|
|
2158
2160
|
type: Component,
|
|
@@ -2383,7 +2385,7 @@ class DeonNzFieldRepeat extends FieldArrayType {
|
|
|
2383
2385
|
return true;
|
|
2384
2386
|
}
|
|
2385
2387
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeat, deps: [{ token: i1$4.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2386
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeat, isStandalone: true, selector: "deon-nz-field-repeat", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-label\" *ngIf=\"props && props['hideLabel']!=false && props?.label\">{{props?.label}}</div>\n<div class=\"repeat-table\" [ngClass]=\"clasName\">\n <table>\n <thead>\n <tr>\n <th style=\"width: 50px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let headerField of field?.fieldArray['fieldGroup']\">\n <ng-container *ngIf=\"headerField?.type=='deon-group' && headerField?.hide!=true;else tmpField\">\n <ng-container *ngFor=\"let item of headerField.fieldGroup\">\n <th *ngIf=\"item?.hide!=true\">\n <ng-container *ngIf=\"item && item?.props!==undefined && item?.props!==null\">\n <span style=\"color: red\" *ngIf=\"item?.props?.required\" class=\"required\"></span>\n {{item.props.label }}\n </ng-container>\n </th>\n </ng-container>\n </ng-container>\n <ng-template #tmpField>\n <th *ngIf=\"headerField?.hide!=true &&(headerField?.type!=='line' && headerField?.type!=='htmlcontent')\">\n <ng-container *ngIf=\"headerField && headerField?.props!==undefined && headerField?.props!==null\">\n <span style=\"color: red\" *ngIf=\"headerField?.props?.required\" class=\"required\"></span>\n {{ headerField.props.label }}\n </ng-container>\n </th>\n </ng-template>\n </ng-container>\n <th style=\"width: 60px\" *ngIf=\"isRemove || operationShow\">\n <span class=\"\">\u64CD\u4F5C</span>\n </th>\n </tr>\n </thead>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngIf=\"field?.fieldGroup!==undefined && field?.fieldGroup!==null && (field?.fieldGroup?.length ?? 0) > 0;else cardEmpty\">\n <tr *ngFor=\"let fields of field.fieldGroup; let i = index\" cdkDrag [cdkDragDisabled]=\"dragDisabled\">\n <td>\n <span class=\"serial\">{{ i + 1 }}</span>\n </td>\n <ng-container *ngFor=\"let f of fields.fieldGroup\">\n <ng-container *ngIf=\"f?.type=='deon-group' && f?.hide!=true;else tmpTd\">\n <ng-container *ngFor=\"let item of f.fieldGroup\">\n <td *ngIf=\"item?.hide!=true\">\n <formly-field [field]=\"item\" [hideLabel]=\"true\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-container>\n </ng-container>\n <ng-template #tmpTd>\n <td\n *ngIf=\"f && f?.type!==undefined && f?.type!==null && f?.hide!=true &&(f?.type!=='line' && f?.type!=='htmlcontent')\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\" [editor]=\"fieldEditor(f,i,model)\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-template>\n </ng-container>\n <td style=\"text-align: center\" *ngIf=\"isRemove || operationShow\">\n <ng-container *ngIf=\"props && props['operation'] && props['operation'].length>0\">\n <ng-container *ngFor=\"let o of props['operation']\">\n <a nz-tooltip [nzTooltipTitle]=\"o.label\" (click)=\"rowOperation(o,i)\"><i nz-icon\n [nzType]=\"o.icon\"></i></a>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRemove && (model==null || model[i]?.builtin!=true)\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"(isAdd==true || props['add']==true) || props['viewRange']==true\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <ng-container *ngIf=\"isAdd==true && (props['add']==undefined || props['add']==null || props['add']==true)\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </td>\n </tr>\n </ng-container>\n <ng-template #cardEmpty>\n <tr>\n <td [attr.colspan]=\"colSpan\" style=\"text-align: center\">\n <gram-empty></gram-empty>\n </td>\n </tr>\n <tr *ngIf=\"isAdd && (props['add']==undefined || props['add']==null || props['add']==true)\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3$4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4$
|
|
2388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeat, isStandalone: true, selector: "deon-nz-field-repeat", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-label\" *ngIf=\"props && props['hideLabel']!=false && props?.label\">{{props?.label}}</div>\n<div class=\"repeat-table\" [ngClass]=\"clasName\">\n <table>\n <thead>\n <tr>\n <th style=\"width: 50px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let headerField of field?.fieldArray['fieldGroup']\">\n <ng-container *ngIf=\"headerField?.type=='deon-group' && headerField?.hide!=true;else tmpField\">\n <ng-container *ngFor=\"let item of headerField.fieldGroup\">\n <th *ngIf=\"item?.hide!=true\">\n <ng-container *ngIf=\"item && item?.props!==undefined && item?.props!==null\">\n <span style=\"color: red\" *ngIf=\"item?.props?.required\" class=\"required\"></span>\n {{item.props.label }}\n </ng-container>\n </th>\n </ng-container>\n </ng-container>\n <ng-template #tmpField>\n <th *ngIf=\"headerField?.hide!=true &&(headerField?.type!=='line' && headerField?.type!=='htmlcontent')\">\n <ng-container *ngIf=\"headerField && headerField?.props!==undefined && headerField?.props!==null\">\n <span style=\"color: red\" *ngIf=\"headerField?.props?.required\" class=\"required\"></span>\n {{ headerField.props.label }}\n </ng-container>\n </th>\n </ng-template>\n </ng-container>\n <th style=\"width: 60px\" *ngIf=\"isRemove || operationShow\">\n <span class=\"\">\u64CD\u4F5C</span>\n </th>\n </tr>\n </thead>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngIf=\"field?.fieldGroup!==undefined && field?.fieldGroup!==null && (field?.fieldGroup?.length ?? 0) > 0;else cardEmpty\">\n <tr *ngFor=\"let fields of field.fieldGroup; let i = index\" cdkDrag [cdkDragDisabled]=\"dragDisabled\">\n <td>\n <span class=\"serial\">{{ i + 1 }}</span>\n </td>\n <ng-container *ngFor=\"let f of fields.fieldGroup\">\n <ng-container *ngIf=\"f?.type=='deon-group' && f?.hide!=true;else tmpTd\">\n <ng-container *ngFor=\"let item of f.fieldGroup\">\n <td *ngIf=\"item?.hide!=true\">\n <formly-field [field]=\"item\" [hideLabel]=\"true\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-container>\n </ng-container>\n <ng-template #tmpTd>\n <td\n *ngIf=\"f && f?.type!==undefined && f?.type!==null && f?.hide!=true &&(f?.type!=='line' && f?.type!=='htmlcontent')\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\" [editor]=\"fieldEditor(f,i,model)\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-template>\n </ng-container>\n <td style=\"text-align: center\" *ngIf=\"isRemove || operationShow\">\n <ng-container *ngIf=\"props && props['operation'] && props['operation'].length>0\">\n <ng-container *ngFor=\"let o of props['operation']\">\n <a nz-tooltip [nzTooltipTitle]=\"o.label\" (click)=\"rowOperation(o,i)\"><i nz-icon\n [nzType]=\"o.icon\"></i></a>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRemove && (model==null || model[i]?.builtin!=true)\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"(isAdd==true || props['add']==true) || props['viewRange']==true\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <ng-container *ngIf=\"isAdd==true && (props['add']==undefined || props['add']==null || props['add']==true)\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </td>\n </tr>\n </ng-container>\n <ng-template #cardEmpty>\n <tr>\n <td [attr.colspan]=\"colSpan\" style=\"text-align: center\">\n <gram-empty></gram-empty>\n </td>\n </tr>\n <tr *ngIf=\"isAdd && (props['add']==undefined || props['add']==null || props['add']==true)\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3$4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyField, selector: "formly-field" }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i9.BaseEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }] });
|
|
2387
2389
|
}
|
|
2388
2390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeat, decorators: [{
|
|
2389
2391
|
type: Component,
|
|
@@ -2554,7 +2556,7 @@ class DeonNzFieldRepeatCard extends FieldArrayType {
|
|
|
2554
2556
|
return true;
|
|
2555
2557
|
}
|
|
2556
2558
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeatCard, deps: [{ token: i1$4.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2557
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeatCard, isStandalone: true, selector: "deon-nz-field-repeat-card", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-card\" [ngClass]=\"clasName\">\n <ng-container *ngIf=\"props && props.label\">\n <div class=\"card-label\">{{props.label}}</div>\n </ng-container>\n <ng-container\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0;else cardEmpty\">\n <ng-container *ngFor=\"let fields of field.fieldGroup; let i = index\">\n <div class=\"card-header\">\n <div class=\"serial\">\u5E8F\u53F7\uFF1A{{ i + 1 }}</div>\n <div calss=\"delete\">\n <ng-container *ngIf=\"editor!=false\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </div>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of fields.fieldGroup\">\n <formly-field [field]=\"item\"></formly-field>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #cardEmpty>\n <gram-empty></gram-empty>\n <ng-container *ngIf=\"editor!=false\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"editor!=false\">\n <div class=\"card-bottom\"\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"addData()\">+\u6DFB\u52A0</button>\n </div>\n </ng-container>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3$4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4$
|
|
2559
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeatCard, isStandalone: true, selector: "deon-nz-field-repeat-card", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-card\" [ngClass]=\"clasName\">\n <ng-container *ngIf=\"props && props.label\">\n <div class=\"card-label\">{{props.label}}</div>\n </ng-container>\n <ng-container\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0;else cardEmpty\">\n <ng-container *ngFor=\"let fields of field.fieldGroup; let i = index\">\n <div class=\"card-header\">\n <div class=\"serial\">\u5E8F\u53F7\uFF1A{{ i + 1 }}</div>\n <div calss=\"delete\">\n <ng-container *ngIf=\"editor!=false\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </div>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of fields.fieldGroup\">\n <formly-field [field]=\"item\"></formly-field>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #cardEmpty>\n <gram-empty></gram-empty>\n <ng-container *ngIf=\"editor!=false\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"editor!=false\">\n <div class=\"card-bottom\"\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"addData()\">+\u6DFB\u52A0</button>\n </div>\n </ng-container>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3$4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyField, selector: "formly-field" }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i9.BaseEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }] });
|
|
2558
2560
|
}
|
|
2559
2561
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeatCard, decorators: [{
|
|
2560
2562
|
type: Component,
|
|
@@ -3269,7 +3271,7 @@ class DeonNzFieldTextCode extends FieldType {
|
|
|
3269
3271
|
<button nz-button nzType="default" type="button" [nzLoading]="loading" (click)="btnRefresh()">刷新</button>
|
|
3270
3272
|
</div>
|
|
3271
3273
|
</ng-template>
|
|
3272
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i3$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4$
|
|
3274
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i3$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: DeonNzFormFieldModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3273
3275
|
}
|
|
3274
3276
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldTextCode, decorators: [{
|
|
3275
3277
|
type: Component,
|
|
@@ -3325,9 +3327,794 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
3325
3327
|
}]
|
|
3326
3328
|
}] });
|
|
3327
3329
|
|
|
3330
|
+
class DeonNzFieldImg extends FieldType {
|
|
3331
|
+
http;
|
|
3332
|
+
msg;
|
|
3333
|
+
fileList = [];
|
|
3334
|
+
previewImage;
|
|
3335
|
+
previewVisible = false;
|
|
3336
|
+
constructor(http, msg) {
|
|
3337
|
+
super();
|
|
3338
|
+
this.http = http;
|
|
3339
|
+
this.msg = msg;
|
|
3340
|
+
}
|
|
3341
|
+
/** 是否多图 */
|
|
3342
|
+
get isMultiple() {
|
|
3343
|
+
return this.to?.selectType === 'multiple';
|
|
3344
|
+
}
|
|
3345
|
+
/** 最大数量 */
|
|
3346
|
+
get maxCount() {
|
|
3347
|
+
if (!this.isMultiple)
|
|
3348
|
+
return 1;
|
|
3349
|
+
return this.to?.max || 8;
|
|
3350
|
+
}
|
|
3351
|
+
ngOnInit() {
|
|
3352
|
+
this.initValue();
|
|
3353
|
+
/** 解决页面渲染后赋值 */
|
|
3354
|
+
this.formControl.valueChanges.subscribe(() => {
|
|
3355
|
+
if (this.fileList.length === 0) {
|
|
3356
|
+
this.initValue();
|
|
3357
|
+
}
|
|
3358
|
+
});
|
|
3359
|
+
}
|
|
3360
|
+
/**
|
|
3361
|
+
* 初始化回显
|
|
3362
|
+
*/
|
|
3363
|
+
initValue() {
|
|
3364
|
+
const value = this.formControl.value;
|
|
3365
|
+
if (!value)
|
|
3366
|
+
return;
|
|
3367
|
+
const arr = Array.isArray(value) ? value : [value];
|
|
3368
|
+
this.fileList = arr.map((item, index) => ({
|
|
3369
|
+
uid: item.id || String(index),
|
|
3370
|
+
name: item.fileName,
|
|
3371
|
+
status: 'done',
|
|
3372
|
+
url: item.fileUrl,
|
|
3373
|
+
thumbUrl: item.fileUrl
|
|
3374
|
+
}));
|
|
3375
|
+
}
|
|
3376
|
+
/**
|
|
3377
|
+
* 上传前
|
|
3378
|
+
*/
|
|
3379
|
+
beforeUpload = (file) => {
|
|
3380
|
+
const realFile = file;
|
|
3381
|
+
if (!realFile)
|
|
3382
|
+
return false;
|
|
3383
|
+
/** 限制 5MB */
|
|
3384
|
+
const isLt5M = realFile.size / 1024 / 1024 < 5;
|
|
3385
|
+
if (!isLt5M) {
|
|
3386
|
+
this.msg.warning('图片不能超过5MB');
|
|
3387
|
+
return false;
|
|
3388
|
+
}
|
|
3389
|
+
const reader = new FileReader();
|
|
3390
|
+
reader.onload = () => {
|
|
3391
|
+
const target = this.fileList.find(f => f.uid === file.uid);
|
|
3392
|
+
if (target) {
|
|
3393
|
+
target.thumbUrl = reader.result;
|
|
3394
|
+
this.fileList = [...this.fileList];
|
|
3395
|
+
}
|
|
3396
|
+
};
|
|
3397
|
+
reader.readAsDataURL(realFile);
|
|
3398
|
+
return true;
|
|
3399
|
+
};
|
|
3400
|
+
/**
|
|
3401
|
+
* 上传
|
|
3402
|
+
*/
|
|
3403
|
+
uploadRequest = (item) => {
|
|
3404
|
+
const file = item.file;
|
|
3405
|
+
const realFile = file.originFileObj ||
|
|
3406
|
+
item.file;
|
|
3407
|
+
const formData = new FormData();
|
|
3408
|
+
formData.append('type', 'IMG');
|
|
3409
|
+
formData.append('multipartFile', realFile);
|
|
3410
|
+
return this.http
|
|
3411
|
+
.post(`${ModuleAPI.system}/user/comm/uploadFile`, formData)
|
|
3412
|
+
.subscribe({
|
|
3413
|
+
next: (res) => {
|
|
3414
|
+
if (res && res?.result) {
|
|
3415
|
+
const data = res.result;
|
|
3416
|
+
file.status = 'done';
|
|
3417
|
+
file.url = data.fileUrl;
|
|
3418
|
+
file.thumbUrl = data.fileUrl;
|
|
3419
|
+
/** 保存 id */
|
|
3420
|
+
file.id = data.id;
|
|
3421
|
+
if (!this.isMultiple) {
|
|
3422
|
+
this.fileList = [file];
|
|
3423
|
+
}
|
|
3424
|
+
else {
|
|
3425
|
+
this.fileList = [...this.fileList];
|
|
3426
|
+
}
|
|
3427
|
+
this.updateModel();
|
|
3428
|
+
item.onSuccess?.(res, file, null);
|
|
3429
|
+
}
|
|
3430
|
+
else {
|
|
3431
|
+
file.status = 'error';
|
|
3432
|
+
item.onError?.(res, file);
|
|
3433
|
+
}
|
|
3434
|
+
},
|
|
3435
|
+
error: err => {
|
|
3436
|
+
file.status = 'error';
|
|
3437
|
+
item.onError?.(err, file);
|
|
3438
|
+
}
|
|
3439
|
+
});
|
|
3440
|
+
};
|
|
3441
|
+
/**
|
|
3442
|
+
* 删除
|
|
3443
|
+
*/
|
|
3444
|
+
remove = (file) => {
|
|
3445
|
+
const index = this.fileList.indexOf(file);
|
|
3446
|
+
if (index > -1) {
|
|
3447
|
+
this.fileList.splice(index, 1);
|
|
3448
|
+
}
|
|
3449
|
+
this.updateModel();
|
|
3450
|
+
return true;
|
|
3451
|
+
};
|
|
3452
|
+
/**
|
|
3453
|
+
* 预览
|
|
3454
|
+
*/
|
|
3455
|
+
handlePreview = async (file) => {
|
|
3456
|
+
if (!file.url && !file.preview) {
|
|
3457
|
+
const realFile = file.originFileObj;
|
|
3458
|
+
if (realFile) {
|
|
3459
|
+
file.preview = await this.getBase64(realFile);
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
this.previewImage = file.url || file.preview;
|
|
3463
|
+
this.previewVisible = true;
|
|
3464
|
+
};
|
|
3465
|
+
getBase64(file) {
|
|
3466
|
+
return new Promise((resolve, reject) => {
|
|
3467
|
+
const reader = new FileReader();
|
|
3468
|
+
reader.readAsDataURL(file);
|
|
3469
|
+
reader.onload = () => resolve(reader.result);
|
|
3470
|
+
reader.onerror = reject;
|
|
3471
|
+
});
|
|
3472
|
+
}
|
|
3473
|
+
/**
|
|
3474
|
+
* 写回 model
|
|
3475
|
+
*/
|
|
3476
|
+
updateModel() {
|
|
3477
|
+
let arr = [];
|
|
3478
|
+
if (this.fileList && this.fileList.length > 0) {
|
|
3479
|
+
this.fileList.forEach((item) => {
|
|
3480
|
+
if (item?.originFileObj && item?.originFileObj["status"] === 'done' && item?.originFileObj["url"]) {
|
|
3481
|
+
let obj = item?.originFileObj;
|
|
3482
|
+
arr.push({
|
|
3483
|
+
id: obj.id,
|
|
3484
|
+
fileName: obj.name,
|
|
3485
|
+
fileUrl: obj.url
|
|
3486
|
+
});
|
|
3487
|
+
}
|
|
3488
|
+
});
|
|
3489
|
+
}
|
|
3490
|
+
if (this.isMultiple) {
|
|
3491
|
+
this.formControl.setValue(arr);
|
|
3492
|
+
}
|
|
3493
|
+
else {
|
|
3494
|
+
this.formControl.setValue(arr[0] || null);
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldImg, deps: [{ token: i1$7._HttpClient }, { token: i2$1.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3498
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldImg, isStandalone: true, selector: "deon-nz-field-img", usesInheritance: true, ngImport: i0, template: "<nz-upload nzListType=\"picture-card\" [(nzFileList)]=\"fileList\" [nzShowButton]=\"fileList.length < maxCount\"\r\n [nzPreview]=\"handlePreview\" [nzBeforeUpload]=\"beforeUpload\" [nzCustomRequest]=\"uploadRequest\" [nzRemove]=\"remove\"\r\n nzAccept=\"image/*\" [nzMultiple]=\"isMultiple\">\r\n <div class=\"upload-empty-box\">\r\n <span nz-icon nzType=\"plus\"></span>\r\n <div style=\"margin-top: 8px\">\u70B9\u51FB\u4E0A\u4F20</div>\r\n </div>\r\n</nz-upload>\r\n\r\n<nz-modal [nzVisible]=\"previewVisible\" [nzFooter]=\"null\" (nzOnCancel)=\"previewVisible = false\">\r\n <img [src]=\"previewImage\" style=\"width: 100%\" />\r\n</nz-modal>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i3$5.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i1$5.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3499
|
+
}
|
|
3500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldImg, decorators: [{
|
|
3501
|
+
type: Component,
|
|
3502
|
+
args: [{ selector: 'deon-nz-field-img', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
3503
|
+
CommonModule,
|
|
3504
|
+
ReactiveFormsModule,
|
|
3505
|
+
FormlyModule,
|
|
3506
|
+
NzUploadModule,
|
|
3507
|
+
NzIconModule,
|
|
3508
|
+
NzModalModule
|
|
3509
|
+
], template: "<nz-upload nzListType=\"picture-card\" [(nzFileList)]=\"fileList\" [nzShowButton]=\"fileList.length < maxCount\"\r\n [nzPreview]=\"handlePreview\" [nzBeforeUpload]=\"beforeUpload\" [nzCustomRequest]=\"uploadRequest\" [nzRemove]=\"remove\"\r\n nzAccept=\"image/*\" [nzMultiple]=\"isMultiple\">\r\n <div class=\"upload-empty-box\">\r\n <span nz-icon nzType=\"plus\"></span>\r\n <div style=\"margin-top: 8px\">\u70B9\u51FB\u4E0A\u4F20</div>\r\n </div>\r\n</nz-upload>\r\n\r\n<nz-modal [nzVisible]=\"previewVisible\" [nzFooter]=\"null\" (nzOnCancel)=\"previewVisible = false\">\r\n <img [src]=\"previewImage\" style=\"width: 100%\" />\r\n</nz-modal>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"] }]
|
|
3510
|
+
}], ctorParameters: () => [{ type: i1$7._HttpClient }, { type: i2$1.NzMessageService }] });
|
|
3511
|
+
|
|
3512
|
+
function withFormlyFieldImg() {
|
|
3513
|
+
return {
|
|
3514
|
+
types: [
|
|
3515
|
+
{
|
|
3516
|
+
name: 'img',
|
|
3517
|
+
component: DeonNzFieldImg,
|
|
3518
|
+
wrappers: ['formly-form-field'],
|
|
3519
|
+
}
|
|
3520
|
+
],
|
|
3521
|
+
};
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
class DeonNzImgModule {
|
|
3525
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzImgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3526
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzImgModule, imports: [CommonModule,
|
|
3527
|
+
DeonNzFormFieldModule, i1$1.FormlyModule] });
|
|
3528
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzImgModule, imports: [CommonModule,
|
|
3529
|
+
DeonNzFormFieldModule,
|
|
3530
|
+
FormlyModule.forChild(withFormlyFieldImg())] });
|
|
3531
|
+
}
|
|
3532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzImgModule, decorators: [{
|
|
3533
|
+
type: NgModule,
|
|
3534
|
+
args: [{
|
|
3535
|
+
imports: [
|
|
3536
|
+
CommonModule,
|
|
3537
|
+
DeonNzFormFieldModule,
|
|
3538
|
+
FormlyModule.forChild(withFormlyFieldImg()),
|
|
3539
|
+
],
|
|
3540
|
+
}]
|
|
3541
|
+
}] });
|
|
3542
|
+
|
|
3543
|
+
class DeonNzFieldAttachment extends FieldType {
|
|
3544
|
+
http;
|
|
3545
|
+
msg;
|
|
3546
|
+
fileList = [];
|
|
3547
|
+
previewImage;
|
|
3548
|
+
previewVisible = false;
|
|
3549
|
+
constructor(http, msg) {
|
|
3550
|
+
super();
|
|
3551
|
+
this.http = http;
|
|
3552
|
+
this.msg = msg;
|
|
3553
|
+
}
|
|
3554
|
+
/** 是否多图 */
|
|
3555
|
+
get isMultiple() {
|
|
3556
|
+
return this.to?.selectType === 'multiple';
|
|
3557
|
+
}
|
|
3558
|
+
/** 最大数量 */
|
|
3559
|
+
get maxCount() {
|
|
3560
|
+
if (!this.isMultiple)
|
|
3561
|
+
return 1;
|
|
3562
|
+
return this.to?.max || 8;
|
|
3563
|
+
}
|
|
3564
|
+
ngOnInit() {
|
|
3565
|
+
this.initValue();
|
|
3566
|
+
/** 解决页面渲染后赋值 */
|
|
3567
|
+
this.formControl.valueChanges.subscribe(() => {
|
|
3568
|
+
if (this.fileList.length === 0) {
|
|
3569
|
+
this.initValue();
|
|
3570
|
+
}
|
|
3571
|
+
});
|
|
3572
|
+
}
|
|
3573
|
+
/**
|
|
3574
|
+
* 初始化回显
|
|
3575
|
+
*/
|
|
3576
|
+
initValue() {
|
|
3577
|
+
const value = this.formControl.value;
|
|
3578
|
+
if (!value)
|
|
3579
|
+
return;
|
|
3580
|
+
const arr = Array.isArray(value) ? value : [value];
|
|
3581
|
+
this.fileList = arr.map((item, index) => ({
|
|
3582
|
+
uid: item.id || String(index),
|
|
3583
|
+
name: item.fileName,
|
|
3584
|
+
status: 'done',
|
|
3585
|
+
url: item.fileUrl,
|
|
3586
|
+
thumbUrl: item.fileUrl
|
|
3587
|
+
}));
|
|
3588
|
+
}
|
|
3589
|
+
/**
|
|
3590
|
+
* 上传前
|
|
3591
|
+
*/
|
|
3592
|
+
beforeUpload = (file) => {
|
|
3593
|
+
const realFile = file;
|
|
3594
|
+
if (!realFile)
|
|
3595
|
+
return false;
|
|
3596
|
+
/** 限制 50MB */
|
|
3597
|
+
const isLt5M = realFile.size / 1024 / 1024 < 50;
|
|
3598
|
+
if (!isLt5M) {
|
|
3599
|
+
this.msg.warning('附件不能超过50MB');
|
|
3600
|
+
return false;
|
|
3601
|
+
}
|
|
3602
|
+
const reader = new FileReader();
|
|
3603
|
+
reader.onload = () => {
|
|
3604
|
+
const target = this.fileList.find(f => f.uid === file.uid);
|
|
3605
|
+
if (target) {
|
|
3606
|
+
target.thumbUrl = reader.result;
|
|
3607
|
+
this.fileList = [...this.fileList];
|
|
3608
|
+
}
|
|
3609
|
+
};
|
|
3610
|
+
reader.readAsDataURL(realFile);
|
|
3611
|
+
return true;
|
|
3612
|
+
};
|
|
3613
|
+
/**
|
|
3614
|
+
* 上传
|
|
3615
|
+
*/
|
|
3616
|
+
uploadRequest = (item) => {
|
|
3617
|
+
const file = item.file;
|
|
3618
|
+
const realFile = file.originFileObj ||
|
|
3619
|
+
item.file;
|
|
3620
|
+
const formData = new FormData();
|
|
3621
|
+
formData.append('type', 'OTHER');
|
|
3622
|
+
formData.append('multipartFile', realFile);
|
|
3623
|
+
return this.http
|
|
3624
|
+
.post(`${ModuleAPI.system}/user/comm/uploadFile`, formData)
|
|
3625
|
+
.subscribe({
|
|
3626
|
+
next: (res) => {
|
|
3627
|
+
if (res && res?.result) {
|
|
3628
|
+
const data = res.result;
|
|
3629
|
+
file.status = 'done';
|
|
3630
|
+
file.url = data.fileUrl;
|
|
3631
|
+
file.thumbUrl = data.fileUrl;
|
|
3632
|
+
/** 保存 id */
|
|
3633
|
+
file.id = data.id;
|
|
3634
|
+
if (!this.isMultiple) {
|
|
3635
|
+
this.fileList = [file];
|
|
3636
|
+
}
|
|
3637
|
+
else {
|
|
3638
|
+
this.fileList = [...this.fileList];
|
|
3639
|
+
}
|
|
3640
|
+
this.updateModel();
|
|
3641
|
+
item.onSuccess?.(res, file, null);
|
|
3642
|
+
}
|
|
3643
|
+
else {
|
|
3644
|
+
file.status = 'error';
|
|
3645
|
+
item.onError?.(res, file);
|
|
3646
|
+
}
|
|
3647
|
+
},
|
|
3648
|
+
error: err => {
|
|
3649
|
+
file.status = 'error';
|
|
3650
|
+
item.onError?.(err, file);
|
|
3651
|
+
}
|
|
3652
|
+
});
|
|
3653
|
+
};
|
|
3654
|
+
/**
|
|
3655
|
+
* 删除
|
|
3656
|
+
*/
|
|
3657
|
+
remove = (file) => {
|
|
3658
|
+
const index = this.fileList.indexOf(file);
|
|
3659
|
+
if (index > -1) {
|
|
3660
|
+
this.fileList.splice(index, 1);
|
|
3661
|
+
}
|
|
3662
|
+
this.updateModel();
|
|
3663
|
+
return true;
|
|
3664
|
+
};
|
|
3665
|
+
fileChange(e) { }
|
|
3666
|
+
/**
|
|
3667
|
+
* 写回 model
|
|
3668
|
+
*/
|
|
3669
|
+
updateModel() {
|
|
3670
|
+
let arr = [];
|
|
3671
|
+
if (this.fileList && this.fileList.length > 0) {
|
|
3672
|
+
this.fileList.forEach((item) => {
|
|
3673
|
+
if (item && item["status"] === 'done' && item["url"]) {
|
|
3674
|
+
arr.push({
|
|
3675
|
+
id: item.id,
|
|
3676
|
+
fileName: item.name,
|
|
3677
|
+
fileUrl: item.url
|
|
3678
|
+
});
|
|
3679
|
+
}
|
|
3680
|
+
});
|
|
3681
|
+
}
|
|
3682
|
+
if (this.isMultiple) {
|
|
3683
|
+
this.formControl.setValue(arr);
|
|
3684
|
+
}
|
|
3685
|
+
else {
|
|
3686
|
+
this.formControl.setValue(arr[0] || null);
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldAttachment, deps: [{ token: i1$7._HttpClient }, { token: i2$1.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3690
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldAttachment, isStandalone: true, selector: "deon-nz-field-attachment", usesInheritance: true, ngImport: i0, template: "<nz-upload nzType=\"drag\" [nzLimit]=\"1\" [nzShowButton]=\"fileList.length < maxCount\" [nzMultiple]=\"isMultiple\"\r\n [nzDisabled]=\"fileList && fileList.length>=maxCount\" [(nzFileList)]=\"fileList\" [nzBeforeUpload]=\"beforeUpload\"\r\n [nzRemove]=\"remove\" [nzCustomRequest]=\"uploadRequest\" [(nzFileList)]=\"fileList\">\r\n <p class=\"ant-upload-drag-icon\">\r\n <i nz-icon nzType=\"inbox\"></i>\r\n </p>\r\n <p class=\"ant-upload-text\">\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4EE5\u4E0A\u4F20</p>\r\n <p class=\"ant-upload-hint\">\u5355\u4E2A\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC750MB\uFF08\u6700\u591A\u53EF\u4EE5\u4E0A\u4F20{{maxCount}}\u4E2A\u6587\u4EF6\uFF09</p>\r\n</nz-upload>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i3$5.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzModalModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3691
|
+
}
|
|
3692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldAttachment, decorators: [{
|
|
3693
|
+
type: Component,
|
|
3694
|
+
args: [{ selector: 'deon-nz-field-attachment', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
3695
|
+
CommonModule,
|
|
3696
|
+
ReactiveFormsModule,
|
|
3697
|
+
FormlyModule,
|
|
3698
|
+
NzUploadModule,
|
|
3699
|
+
NzIconModule,
|
|
3700
|
+
NzModalModule
|
|
3701
|
+
], template: "<nz-upload nzType=\"drag\" [nzLimit]=\"1\" [nzShowButton]=\"fileList.length < maxCount\" [nzMultiple]=\"isMultiple\"\r\n [nzDisabled]=\"fileList && fileList.length>=maxCount\" [(nzFileList)]=\"fileList\" [nzBeforeUpload]=\"beforeUpload\"\r\n [nzRemove]=\"remove\" [nzCustomRequest]=\"uploadRequest\" [(nzFileList)]=\"fileList\">\r\n <p class=\"ant-upload-drag-icon\">\r\n <i nz-icon nzType=\"inbox\"></i>\r\n </p>\r\n <p class=\"ant-upload-text\">\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4EE5\u4E0A\u4F20</p>\r\n <p class=\"ant-upload-hint\">\u5355\u4E2A\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC750MB\uFF08\u6700\u591A\u53EF\u4EE5\u4E0A\u4F20{{maxCount}}\u4E2A\u6587\u4EF6\uFF09</p>\r\n</nz-upload>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"] }]
|
|
3702
|
+
}], ctorParameters: () => [{ type: i1$7._HttpClient }, { type: i2$1.NzMessageService }] });
|
|
3703
|
+
|
|
3704
|
+
function withFormlyFieldAttachment() {
|
|
3705
|
+
return {
|
|
3706
|
+
types: [
|
|
3707
|
+
{
|
|
3708
|
+
name: 'attachment',
|
|
3709
|
+
component: DeonNzFieldAttachment,
|
|
3710
|
+
wrappers: ['formly-form-field'],
|
|
3711
|
+
}
|
|
3712
|
+
],
|
|
3713
|
+
};
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
class DeonNzAttachmentModule {
|
|
3717
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3718
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, imports: [CommonModule,
|
|
3719
|
+
DeonNzFormFieldModule, i1$1.FormlyModule] });
|
|
3720
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, imports: [CommonModule,
|
|
3721
|
+
DeonNzFormFieldModule,
|
|
3722
|
+
FormlyModule.forChild(withFormlyFieldAttachment())] });
|
|
3723
|
+
}
|
|
3724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, decorators: [{
|
|
3725
|
+
type: NgModule,
|
|
3726
|
+
args: [{
|
|
3727
|
+
imports: [
|
|
3728
|
+
CommonModule,
|
|
3729
|
+
DeonNzFormFieldModule,
|
|
3730
|
+
FormlyModule.forChild(withFormlyFieldAttachment()),
|
|
3731
|
+
],
|
|
3732
|
+
}]
|
|
3733
|
+
}] });
|
|
3734
|
+
|
|
3735
|
+
class DeonNzFieldCardFront extends FieldType {
|
|
3736
|
+
http;
|
|
3737
|
+
msg;
|
|
3738
|
+
fileList = [];
|
|
3739
|
+
maxCount = 1;
|
|
3740
|
+
previewImage;
|
|
3741
|
+
previewVisible = false;
|
|
3742
|
+
isMultiple = false;
|
|
3743
|
+
constructor(http, msg) {
|
|
3744
|
+
super();
|
|
3745
|
+
this.http = http;
|
|
3746
|
+
this.msg = msg;
|
|
3747
|
+
}
|
|
3748
|
+
ngOnInit() {
|
|
3749
|
+
this.initValue();
|
|
3750
|
+
/** 解决页面渲染后赋值 */
|
|
3751
|
+
this.formControl.valueChanges.subscribe(() => {
|
|
3752
|
+
if (this.fileList.length === 0) {
|
|
3753
|
+
this.initValue();
|
|
3754
|
+
}
|
|
3755
|
+
});
|
|
3756
|
+
}
|
|
3757
|
+
/**
|
|
3758
|
+
* 初始化回显
|
|
3759
|
+
*/
|
|
3760
|
+
initValue() {
|
|
3761
|
+
const value = this.formControl.value;
|
|
3762
|
+
if (!value)
|
|
3763
|
+
return;
|
|
3764
|
+
const arr = Array.isArray(value) ? value : [value];
|
|
3765
|
+
this.fileList = arr.map((item, index) => ({
|
|
3766
|
+
uid: item.id || String(index),
|
|
3767
|
+
name: item.fileName,
|
|
3768
|
+
status: 'done',
|
|
3769
|
+
url: item.fileUrl,
|
|
3770
|
+
thumbUrl: item.fileUrl
|
|
3771
|
+
}));
|
|
3772
|
+
}
|
|
3773
|
+
/**
|
|
3774
|
+
* 上传前
|
|
3775
|
+
*/
|
|
3776
|
+
beforeUpload = (file) => {
|
|
3777
|
+
const realFile = file;
|
|
3778
|
+
if (!realFile)
|
|
3779
|
+
return false;
|
|
3780
|
+
/** 限制 5MB */
|
|
3781
|
+
const isLt5M = realFile.size / 1024 / 1024 < 5;
|
|
3782
|
+
if (!isLt5M) {
|
|
3783
|
+
this.msg.warning('图片不能超过5MB');
|
|
3784
|
+
return false;
|
|
3785
|
+
}
|
|
3786
|
+
const reader = new FileReader();
|
|
3787
|
+
reader.onload = () => {
|
|
3788
|
+
const target = this.fileList.find(f => f.uid === file.uid);
|
|
3789
|
+
if (target) {
|
|
3790
|
+
target.thumbUrl = reader.result;
|
|
3791
|
+
this.fileList = [...this.fileList];
|
|
3792
|
+
}
|
|
3793
|
+
};
|
|
3794
|
+
reader.readAsDataURL(realFile);
|
|
3795
|
+
return true;
|
|
3796
|
+
};
|
|
3797
|
+
/**
|
|
3798
|
+
* 上传
|
|
3799
|
+
*/
|
|
3800
|
+
uploadRequest = (item) => {
|
|
3801
|
+
const file = item.file;
|
|
3802
|
+
const realFile = file.originFileObj ||
|
|
3803
|
+
item.file;
|
|
3804
|
+
const formData = new FormData();
|
|
3805
|
+
formData.append('type', 'CARD_FRONT');
|
|
3806
|
+
formData.append('multipartFile', realFile);
|
|
3807
|
+
let url = `${ModuleAPI.system}/user/comm/uploadFile`;
|
|
3808
|
+
if (this.to && this.to["ocr"] == true) {
|
|
3809
|
+
url = `${ModuleAPI.system}/user/comm/uploadFileOCR`;
|
|
3810
|
+
}
|
|
3811
|
+
return this.http.post(url, formData)
|
|
3812
|
+
.subscribe({
|
|
3813
|
+
next: (res) => {
|
|
3814
|
+
if (res && res?.result) {
|
|
3815
|
+
const data = res.result;
|
|
3816
|
+
file.status = 'done';
|
|
3817
|
+
file.url = data.fileUrl;
|
|
3818
|
+
file.thumbUrl = data.fileUrl;
|
|
3819
|
+
/** 保存 id */
|
|
3820
|
+
file.id = data.id;
|
|
3821
|
+
if (!this.isMultiple) {
|
|
3822
|
+
this.fileList = [file];
|
|
3823
|
+
}
|
|
3824
|
+
else {
|
|
3825
|
+
this.fileList = [...this.fileList];
|
|
3826
|
+
}
|
|
3827
|
+
this.updateModel(data);
|
|
3828
|
+
item.onSuccess?.(res, file, null);
|
|
3829
|
+
}
|
|
3830
|
+
else {
|
|
3831
|
+
file.status = 'error';
|
|
3832
|
+
item.onError?.(res, file);
|
|
3833
|
+
}
|
|
3834
|
+
},
|
|
3835
|
+
error: err => {
|
|
3836
|
+
file.status = 'error';
|
|
3837
|
+
item.onError?.(err, file);
|
|
3838
|
+
}
|
|
3839
|
+
});
|
|
3840
|
+
};
|
|
3841
|
+
/**
|
|
3842
|
+
* 删除
|
|
3843
|
+
*/
|
|
3844
|
+
remove = (file) => {
|
|
3845
|
+
const index = this.fileList.indexOf(file);
|
|
3846
|
+
if (index > -1) {
|
|
3847
|
+
this.fileList.splice(index, 1);
|
|
3848
|
+
}
|
|
3849
|
+
this.updateModel(null);
|
|
3850
|
+
return true;
|
|
3851
|
+
};
|
|
3852
|
+
/**
|
|
3853
|
+
* 预览
|
|
3854
|
+
*/
|
|
3855
|
+
handlePreview = async (file) => {
|
|
3856
|
+
if (!file.url && !file.preview) {
|
|
3857
|
+
const realFile = file.originFileObj;
|
|
3858
|
+
if (realFile) {
|
|
3859
|
+
file.preview = await this.getBase64(realFile);
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
this.previewImage = file.url || file.preview;
|
|
3863
|
+
this.previewVisible = true;
|
|
3864
|
+
};
|
|
3865
|
+
getBase64(file) {
|
|
3866
|
+
return new Promise((resolve, reject) => {
|
|
3867
|
+
const reader = new FileReader();
|
|
3868
|
+
reader.readAsDataURL(file);
|
|
3869
|
+
reader.onload = () => resolve(reader.result);
|
|
3870
|
+
reader.onerror = reject;
|
|
3871
|
+
});
|
|
3872
|
+
}
|
|
3873
|
+
/**
|
|
3874
|
+
* 写回 model
|
|
3875
|
+
*/
|
|
3876
|
+
updateModel(e) {
|
|
3877
|
+
let arr = [];
|
|
3878
|
+
if (this.fileList && this.fileList.length > 0) {
|
|
3879
|
+
this.fileList.forEach((item) => {
|
|
3880
|
+
if (item?.originFileObj && item?.originFileObj["status"] === 'done' && item?.originFileObj["url"]) {
|
|
3881
|
+
let obj = item?.originFileObj;
|
|
3882
|
+
arr.push({
|
|
3883
|
+
id: obj.id,
|
|
3884
|
+
fileName: obj.name,
|
|
3885
|
+
fileUrl: obj.url
|
|
3886
|
+
});
|
|
3887
|
+
}
|
|
3888
|
+
});
|
|
3889
|
+
}
|
|
3890
|
+
this.formControl.setValue(arr[0] || null);
|
|
3891
|
+
}
|
|
3892
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldCardFront, deps: [{ token: i1$7._HttpClient }, { token: i2$1.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3893
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldCardFront, isStandalone: true, selector: "deon-nz-field-card-front", usesInheritance: true, ngImport: i0, template: "<nz-upload nzListType=\"picture-card\" [(nzFileList)]=\"fileList\" [nzShowButton]=\"fileList.length < maxCount\"\r\n [nzPreview]=\"handlePreview\" [nzBeforeUpload]=\"beforeUpload\" [nzCustomRequest]=\"uploadRequest\" [nzRemove]=\"remove\"\r\n nzAccept=\"image/*\" [nzMultiple]=\"isMultiple\">\r\n <div class=\"upload-empty-box\">\r\n <span nz-icon nzType=\"plus\"></span>\r\n <div style=\"margin-top: 8px\">\u70B9\u51FB\u4E0A\u4F20</div>\r\n </div>\r\n</nz-upload>\r\n\r\n<nz-modal [nzVisible]=\"previewVisible\" [nzFooter]=\"null\" (nzOnCancel)=\"previewVisible = false\">\r\n <img [src]=\"previewImage\" style=\"width: 100%\" />\r\n</nz-modal>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i3$5.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i1$5.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3894
|
+
}
|
|
3895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldCardFront, decorators: [{
|
|
3896
|
+
type: Component,
|
|
3897
|
+
args: [{ selector: 'deon-nz-field-card-front', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
3898
|
+
CommonModule,
|
|
3899
|
+
ReactiveFormsModule,
|
|
3900
|
+
FormlyModule,
|
|
3901
|
+
NzUploadModule,
|
|
3902
|
+
NzIconModule,
|
|
3903
|
+
NzModalModule
|
|
3904
|
+
], template: "<nz-upload nzListType=\"picture-card\" [(nzFileList)]=\"fileList\" [nzShowButton]=\"fileList.length < maxCount\"\r\n [nzPreview]=\"handlePreview\" [nzBeforeUpload]=\"beforeUpload\" [nzCustomRequest]=\"uploadRequest\" [nzRemove]=\"remove\"\r\n nzAccept=\"image/*\" [nzMultiple]=\"isMultiple\">\r\n <div class=\"upload-empty-box\">\r\n <span nz-icon nzType=\"plus\"></span>\r\n <div style=\"margin-top: 8px\">\u70B9\u51FB\u4E0A\u4F20</div>\r\n </div>\r\n</nz-upload>\r\n\r\n<nz-modal [nzVisible]=\"previewVisible\" [nzFooter]=\"null\" (nzOnCancel)=\"previewVisible = false\">\r\n <img [src]=\"previewImage\" style=\"width: 100%\" />\r\n</nz-modal>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"] }]
|
|
3905
|
+
}], ctorParameters: () => [{ type: i1$7._HttpClient }, { type: i2$1.NzMessageService }] });
|
|
3906
|
+
|
|
3907
|
+
class DeonNzFieldCardBack extends FieldType {
|
|
3908
|
+
http;
|
|
3909
|
+
msg;
|
|
3910
|
+
fileList = [];
|
|
3911
|
+
maxCount = 1;
|
|
3912
|
+
previewImage;
|
|
3913
|
+
previewVisible = false;
|
|
3914
|
+
isMultiple = false;
|
|
3915
|
+
constructor(http, msg) {
|
|
3916
|
+
super();
|
|
3917
|
+
this.http = http;
|
|
3918
|
+
this.msg = msg;
|
|
3919
|
+
}
|
|
3920
|
+
ngOnInit() {
|
|
3921
|
+
this.initValue();
|
|
3922
|
+
/** 解决页面渲染后赋值 */
|
|
3923
|
+
this.formControl.valueChanges.subscribe(() => {
|
|
3924
|
+
if (this.fileList.length === 0) {
|
|
3925
|
+
this.initValue();
|
|
3926
|
+
}
|
|
3927
|
+
});
|
|
3928
|
+
}
|
|
3929
|
+
/**
|
|
3930
|
+
* 初始化回显
|
|
3931
|
+
*/
|
|
3932
|
+
initValue() {
|
|
3933
|
+
const value = this.formControl.value;
|
|
3934
|
+
if (!value)
|
|
3935
|
+
return;
|
|
3936
|
+
const arr = Array.isArray(value) ? value : [value];
|
|
3937
|
+
this.fileList = arr.map((item, index) => ({
|
|
3938
|
+
uid: item.id || String(index),
|
|
3939
|
+
name: item.fileName,
|
|
3940
|
+
status: 'done',
|
|
3941
|
+
url: item.fileUrl,
|
|
3942
|
+
thumbUrl: item.fileUrl
|
|
3943
|
+
}));
|
|
3944
|
+
}
|
|
3945
|
+
/**
|
|
3946
|
+
* 上传前
|
|
3947
|
+
*/
|
|
3948
|
+
beforeUpload = (file) => {
|
|
3949
|
+
const realFile = file;
|
|
3950
|
+
if (!realFile)
|
|
3951
|
+
return false;
|
|
3952
|
+
/** 限制 5MB */
|
|
3953
|
+
const isLt5M = realFile.size / 1024 / 1024 < 5;
|
|
3954
|
+
if (!isLt5M) {
|
|
3955
|
+
this.msg.warning('图片不能超过5MB');
|
|
3956
|
+
return false;
|
|
3957
|
+
}
|
|
3958
|
+
const reader = new FileReader();
|
|
3959
|
+
reader.onload = () => {
|
|
3960
|
+
const target = this.fileList.find(f => f.uid === file.uid);
|
|
3961
|
+
if (target) {
|
|
3962
|
+
target.thumbUrl = reader.result;
|
|
3963
|
+
this.fileList = [...this.fileList];
|
|
3964
|
+
}
|
|
3965
|
+
};
|
|
3966
|
+
reader.readAsDataURL(realFile);
|
|
3967
|
+
return true;
|
|
3968
|
+
};
|
|
3969
|
+
/**
|
|
3970
|
+
* 上传
|
|
3971
|
+
*/
|
|
3972
|
+
uploadRequest = (item) => {
|
|
3973
|
+
const file = item.file;
|
|
3974
|
+
const realFile = file.originFileObj ||
|
|
3975
|
+
item.file;
|
|
3976
|
+
const formData = new FormData();
|
|
3977
|
+
formData.append('type', 'CARD_BACK');
|
|
3978
|
+
formData.append('multipartFile', realFile);
|
|
3979
|
+
let url = `${ModuleAPI.system}/user/comm/uploadFile`;
|
|
3980
|
+
if (this.to && this.to["ocr"] == true) {
|
|
3981
|
+
url = `${ModuleAPI.system}/user/comm/uploadFileOCR`;
|
|
3982
|
+
}
|
|
3983
|
+
return this.http.post(url, formData)
|
|
3984
|
+
.subscribe({
|
|
3985
|
+
next: (res) => {
|
|
3986
|
+
if (res && res?.result) {
|
|
3987
|
+
const data = res.result;
|
|
3988
|
+
file.status = 'done';
|
|
3989
|
+
file.url = data.fileUrl;
|
|
3990
|
+
file.thumbUrl = data.fileUrl;
|
|
3991
|
+
/** 保存 id */
|
|
3992
|
+
file.id = data.id;
|
|
3993
|
+
if (!this.isMultiple) {
|
|
3994
|
+
this.fileList = [file];
|
|
3995
|
+
}
|
|
3996
|
+
else {
|
|
3997
|
+
this.fileList = [...this.fileList];
|
|
3998
|
+
}
|
|
3999
|
+
this.updateModel(data);
|
|
4000
|
+
item.onSuccess?.(res, file, null);
|
|
4001
|
+
}
|
|
4002
|
+
else {
|
|
4003
|
+
file.status = 'error';
|
|
4004
|
+
item.onError?.(res, file);
|
|
4005
|
+
}
|
|
4006
|
+
},
|
|
4007
|
+
error: err => {
|
|
4008
|
+
file.status = 'error';
|
|
4009
|
+
item.onError?.(err, file);
|
|
4010
|
+
}
|
|
4011
|
+
});
|
|
4012
|
+
};
|
|
4013
|
+
/**
|
|
4014
|
+
* 删除
|
|
4015
|
+
*/
|
|
4016
|
+
remove = (file) => {
|
|
4017
|
+
const index = this.fileList.indexOf(file);
|
|
4018
|
+
if (index > -1) {
|
|
4019
|
+
this.fileList.splice(index, 1);
|
|
4020
|
+
}
|
|
4021
|
+
this.updateModel(null);
|
|
4022
|
+
return true;
|
|
4023
|
+
};
|
|
4024
|
+
/**
|
|
4025
|
+
* 预览
|
|
4026
|
+
*/
|
|
4027
|
+
handlePreview = async (file) => {
|
|
4028
|
+
if (!file.url && !file.preview) {
|
|
4029
|
+
const realFile = file.originFileObj;
|
|
4030
|
+
if (realFile) {
|
|
4031
|
+
file.preview = await this.getBase64(realFile);
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
this.previewImage = file.url || file.preview;
|
|
4035
|
+
this.previewVisible = true;
|
|
4036
|
+
};
|
|
4037
|
+
getBase64(file) {
|
|
4038
|
+
return new Promise((resolve, reject) => {
|
|
4039
|
+
const reader = new FileReader();
|
|
4040
|
+
reader.readAsDataURL(file);
|
|
4041
|
+
reader.onload = () => resolve(reader.result);
|
|
4042
|
+
reader.onerror = reject;
|
|
4043
|
+
});
|
|
4044
|
+
}
|
|
4045
|
+
/**
|
|
4046
|
+
* 写回 model
|
|
4047
|
+
*/
|
|
4048
|
+
updateModel(e) {
|
|
4049
|
+
let arr = [];
|
|
4050
|
+
if (this.fileList && this.fileList.length > 0) {
|
|
4051
|
+
this.fileList.forEach((item) => {
|
|
4052
|
+
if (item?.originFileObj && item?.originFileObj["status"] === 'done' && item?.originFileObj["url"]) {
|
|
4053
|
+
let obj = item?.originFileObj;
|
|
4054
|
+
arr.push({
|
|
4055
|
+
id: obj.id,
|
|
4056
|
+
fileName: obj.name,
|
|
4057
|
+
fileUrl: obj.url
|
|
4058
|
+
});
|
|
4059
|
+
}
|
|
4060
|
+
});
|
|
4061
|
+
}
|
|
4062
|
+
this.formControl.setValue(arr[0] || null);
|
|
4063
|
+
}
|
|
4064
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldCardBack, deps: [{ token: i1$7._HttpClient }, { token: i2$1.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4065
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldCardBack, isStandalone: true, selector: "deon-nz-field-card-back", usesInheritance: true, ngImport: i0, template: "<nz-upload nzListType=\"picture-card\" [(nzFileList)]=\"fileList\" [nzShowButton]=\"fileList.length < maxCount\"\r\n [nzPreview]=\"handlePreview\" [nzBeforeUpload]=\"beforeUpload\" [nzCustomRequest]=\"uploadRequest\" [nzRemove]=\"remove\"\r\n nzAccept=\"image/*\" [nzMultiple]=\"isMultiple\">\r\n <div class=\"upload-empty-box\">\r\n <span nz-icon nzType=\"plus\"></span>\r\n <div style=\"margin-top: 8px\">\u70B9\u51FB\u4E0A\u4F20</div>\r\n </div>\r\n</nz-upload>\r\n\r\n<nz-modal [nzVisible]=\"previewVisible\" [nzFooter]=\"null\" (nzOnCancel)=\"previewVisible = false\">\r\n <img [src]=\"previewImage\" style=\"width: 100%\" />\r\n</nz-modal>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i3$5.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i1$5.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4066
|
+
}
|
|
4067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldCardBack, decorators: [{
|
|
4068
|
+
type: Component,
|
|
4069
|
+
args: [{ selector: 'deon-nz-field-card-back', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
4070
|
+
CommonModule,
|
|
4071
|
+
ReactiveFormsModule,
|
|
4072
|
+
FormlyModule,
|
|
4073
|
+
NzUploadModule,
|
|
4074
|
+
NzIconModule,
|
|
4075
|
+
NzModalModule
|
|
4076
|
+
], template: "<nz-upload nzListType=\"picture-card\" [(nzFileList)]=\"fileList\" [nzShowButton]=\"fileList.length < maxCount\"\r\n [nzPreview]=\"handlePreview\" [nzBeforeUpload]=\"beforeUpload\" [nzCustomRequest]=\"uploadRequest\" [nzRemove]=\"remove\"\r\n nzAccept=\"image/*\" [nzMultiple]=\"isMultiple\">\r\n <div class=\"upload-empty-box\">\r\n <span nz-icon nzType=\"plus\"></span>\r\n <div style=\"margin-top: 8px\">\u70B9\u51FB\u4E0A\u4F20</div>\r\n </div>\r\n</nz-upload>\r\n\r\n<nz-modal [nzVisible]=\"previewVisible\" [nzFooter]=\"null\" (nzOnCancel)=\"previewVisible = false\">\r\n <img [src]=\"previewImage\" style=\"width: 100%\" />\r\n</nz-modal>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}\n"] }]
|
|
4077
|
+
}], ctorParameters: () => [{ type: i1$7._HttpClient }, { type: i2$1.NzMessageService }] });
|
|
4078
|
+
|
|
4079
|
+
function withFormlyFieldIdCard() {
|
|
4080
|
+
return {
|
|
4081
|
+
types: [
|
|
4082
|
+
{
|
|
4083
|
+
name: 'card_front',
|
|
4084
|
+
component: DeonNzFieldCardFront,
|
|
4085
|
+
wrappers: ['formly-form-field'],
|
|
4086
|
+
},
|
|
4087
|
+
{
|
|
4088
|
+
name: 'card_back',
|
|
4089
|
+
component: DeonNzFieldCardBack,
|
|
4090
|
+
wrappers: ['formly-form-field'],
|
|
4091
|
+
}
|
|
4092
|
+
],
|
|
4093
|
+
};
|
|
4094
|
+
}
|
|
4095
|
+
|
|
4096
|
+
class DeonNzIdCardModule {
|
|
4097
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzIdCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4098
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzIdCardModule, imports: [CommonModule,
|
|
4099
|
+
DeonNzFormFieldModule, i1$1.FormlyModule] });
|
|
4100
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzIdCardModule, imports: [CommonModule,
|
|
4101
|
+
DeonNzFormFieldModule,
|
|
4102
|
+
FormlyModule.forChild(withFormlyFieldIdCard())] });
|
|
4103
|
+
}
|
|
4104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzIdCardModule, decorators: [{
|
|
4105
|
+
type: NgModule,
|
|
4106
|
+
args: [{
|
|
4107
|
+
imports: [
|
|
4108
|
+
CommonModule,
|
|
4109
|
+
DeonNzFormFieldModule,
|
|
4110
|
+
FormlyModule.forChild(withFormlyFieldIdCard()),
|
|
4111
|
+
],
|
|
4112
|
+
}]
|
|
4113
|
+
}] });
|
|
4114
|
+
|
|
3328
4115
|
/**
|
|
3329
4116
|
* Generated bundle index. Do not edit.
|
|
3330
4117
|
*/
|
|
3331
4118
|
|
|
3332
|
-
export { DeonNzCheckboxGroupModule, DeonNzCheckboxModule, DeonNzColorModule, DeonNzDateTimeModule, DeonNzDescModule, DeonNzDimIndicatorModule, DeonNzDimModule, DeonNzGridModule, DeonNzGroupModule, DeonNzHtmlModule, DeonNzIconModule, DeonNzLabelModule, DeonNzLineModule, DeonNzListModule, DeonNzNumberModule, DeonNzOverTimeModule, DeonNzPanelModule, DeonNzRadioGroupModule, DeonNzRadioModule, DeonNzReformModule, DeonNzRepeatCardModule, DeonNzRepeatModule, DeonNzSelectModule, DeonNzSwitchModule, DeonNzTabsModule, DeonNzTextAreaModule, DeonNzTextCodeModule, DeonNzTextModule, withFormlyFieldCheckbox, withFormlyFieldCheckboxGroup, withFormlyFieldColor, withFormlyFieldDateTime, withFormlyFieldDesc, withFormlyFieldDim, withFormlyFieldGrid, withFormlyFieldGroup, withFormlyFieldHtml, withFormlyFieldIcon, withFormlyFieldIndicator, withFormlyFieldLabel, withFormlyFieldLine, withFormlyFieldList, withFormlyFieldNumber, withFormlyFieldOverTime, withFormlyFieldPanel, withFormlyFieldRadio, withFormlyFieldRadioGroup, withFormlyFieldReform, withFormlyFieldRepeat, withFormlyFieldRepeatCard, withFormlyFieldSelect, withFormlyFieldSwitch, withFormlyFieldTab, withFormlyFieldText, withFormlyFieldTextArea, withFormlyFieldTextCode };
|
|
4119
|
+
export { DeonNzAttachmentModule, DeonNzCheckboxGroupModule, DeonNzCheckboxModule, DeonNzColorModule, DeonNzDateTimeModule, DeonNzDescModule, DeonNzDimIndicatorModule, DeonNzDimModule, DeonNzGridModule, DeonNzGroupModule, DeonNzHtmlModule, DeonNzIconModule, DeonNzIdCardModule, DeonNzImgModule, DeonNzLabelModule, DeonNzLineModule, DeonNzListModule, DeonNzNumberModule, DeonNzOverTimeModule, DeonNzPanelModule, DeonNzRadioGroupModule, DeonNzRadioModule, DeonNzReformModule, DeonNzRepeatCardModule, DeonNzRepeatModule, DeonNzSelectModule, DeonNzSwitchModule, DeonNzTabsModule, DeonNzTextAreaModule, DeonNzTextCodeModule, DeonNzTextModule, withFormlyFieldAttachment, withFormlyFieldCheckbox, withFormlyFieldCheckboxGroup, withFormlyFieldColor, withFormlyFieldDateTime, withFormlyFieldDesc, withFormlyFieldDim, withFormlyFieldGrid, withFormlyFieldGroup, withFormlyFieldHtml, withFormlyFieldIcon, withFormlyFieldIdCard, withFormlyFieldImg, withFormlyFieldIndicator, withFormlyFieldLabel, withFormlyFieldLine, withFormlyFieldList, withFormlyFieldNumber, withFormlyFieldOverTime, withFormlyFieldPanel, withFormlyFieldRadio, withFormlyFieldRadioGroup, withFormlyFieldReform, withFormlyFieldRepeat, withFormlyFieldRepeatCard, withFormlyFieldSelect, withFormlyFieldSwitch, withFormlyFieldTab, withFormlyFieldText, withFormlyFieldTextArea, withFormlyFieldTextCode };
|
|
3333
4120
|
//# sourceMappingURL=ebuilding-form.mjs.map
|