@ebuilding/biz-form 2.0.0
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/LICENSE +0 -0
- package/README.md +0 -0
- package/advanced/index.d.ts +1 -0
- package/advanced/src/index.module.d.ts +8 -0
- package/advanced/src/main/index.d.ts +29 -0
- package/advanced/src/public_api.d.ts +2 -0
- package/basic/index.d.ts +1 -0
- package/basic/src/basic.d.ts +53 -0
- package/basic/src/basic.drawer.d.ts +30 -0
- package/basic/src/default/index.d.ts +27 -0
- package/basic/src/index.module.d.ts +9 -0
- package/basic/src/main/index.d.ts +32 -0
- package/basic/src/public_api.d.ts +3 -0
- package/custom/index.d.ts +1 -0
- package/custom/src/default/index.d.ts +30 -0
- package/custom/src/index.module.d.ts +9 -0
- package/custom/src/main/index.d.ts +27 -0
- package/custom/src/public_api.d.ts +3 -0
- package/design/index.d.ts +1 -0
- package/design/src/default/index.d.ts +25 -0
- package/design/src/index.module.d.ts +8 -0
- package/design/src/public_api.d.ts +2 -0
- package/empInfo/index.d.ts +1 -0
- package/empInfo/src/children/index.d.ts +28 -0
- package/empInfo/src/default/index.d.ts +34 -0
- package/empInfo/src/index.module.d.ts +9 -0
- package/empInfo/src/public_api.d.ts +2 -0
- package/empInfo/src/service.d.ts +14 -0
- package/fesm2022/advanced.mjs +114 -0
- package/fesm2022/advanced.mjs.map +1 -0
- package/fesm2022/basic.mjs +431 -0
- package/fesm2022/basic.mjs.map +1 -0
- package/fesm2022/custom.mjs +156 -0
- package/fesm2022/custom.mjs.map +1 -0
- package/fesm2022/design.mjs +109 -0
- package/fesm2022/design.mjs.map +1 -0
- package/fesm2022/ebuilding-biz-form.mjs +7 -0
- package/fesm2022/ebuilding-biz-form.mjs.map +1 -0
- package/fesm2022/empInfo.mjs +273 -0
- package/fesm2022/empInfo.mjs.map +1 -0
- package/fesm2022/history.mjs +119 -0
- package/fesm2022/history.mjs.map +1 -0
- package/fesm2022/page.mjs +200 -0
- package/fesm2022/page.mjs.map +1 -0
- package/fesm2022/preview.mjs +317 -0
- package/fesm2022/preview.mjs.map +1 -0
- package/fesm2022/rule.mjs +204 -0
- package/fesm2022/rule.mjs.map +1 -0
- package/fesm2022/service.mjs +813 -0
- package/fesm2022/service.mjs.map +1 -0
- package/fesm2022/srv.basic.default.mjs +48 -0
- package/fesm2022/srv.basic.default.mjs.map +1 -0
- package/fesm2022/srv.basic.drawer.mjs +70 -0
- package/fesm2022/srv.basic.drawer.mjs.map +1 -0
- package/fesm2022/srv.basic.flow.mjs +353 -0
- package/fesm2022/srv.basic.flow.mjs.map +1 -0
- package/fesm2022/srv.basic.mjs +813 -0
- package/fesm2022/srv.basic.mjs.map +1 -0
- package/fesm2022/srv.default.service.mjs +186 -0
- package/fesm2022/srv.default.service.mjs.map +1 -0
- package/fesm2022/srv.form.default.service.mjs +224 -0
- package/fesm2022/srv.form.default.service.mjs.map +1 -0
- package/fesm2022/srv.form.service.mjs +502 -0
- package/fesm2022/srv.form.service.mjs.map +1 -0
- package/fesm2022/srv.form.workflow.mjs +573 -0
- package/fesm2022/srv.form.workflow.mjs.map +1 -0
- package/fesm2022/srv.form2.service.mjs +238 -0
- package/fesm2022/srv.form2.service.mjs.map +1 -0
- package/fesm2022/srv.formGroup.service.mjs +242 -0
- package/fesm2022/srv.formGroup.service.mjs.map +1 -0
- package/history/index.d.ts +1 -0
- package/history/src/default/index.d.ts +34 -0
- package/history/src/index.module.d.ts +8 -0
- package/history/src/public_api.d.ts +2 -0
- package/index.d.ts +2 -0
- package/package.json +100 -0
- package/page/index.d.ts +1 -0
- package/page/src/default/index.d.ts +35 -0
- package/page/src/index.module.d.ts +8 -0
- package/page/src/public_api.d.ts +2 -0
- package/preview/index.d.ts +1 -0
- package/preview/src/default/index.d.ts +37 -0
- package/preview/src/index.module.d.ts +9 -0
- package/preview/src/main/index.d.ts +38 -0
- package/preview/src/public_api.d.ts +3 -0
- package/rule/index.d.ts +1 -0
- package/rule/src/default/index.d.ts +39 -0
- package/rule/src/index.module.d.ts +8 -0
- package/rule/src/public_api.d.ts +2 -0
- package/service/basic/index.d.ts +166 -0
- package/service/basic.default/index.d.ts +25 -0
- package/service/basic.drawer/index.d.ts +36 -0
- package/service/basic.flow/index.d.ts +103 -0
- package/service/default.service/index.d.ts +59 -0
- package/service/form.default.service/index.d.ts +45 -0
- package/service/form.service/index.d.ts +77 -0
- package/service/form.workflow/index.d.ts +139 -0
- package/service/form2.service/index.d.ts +51 -0
- package/service/formGroup.service/index.d.ts +52 -0
- package/service/index.d.ts +1 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Input, Component, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import * as i8 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i11 from '@angular/forms';
|
|
6
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i3 from '@kre-form/core';
|
|
8
|
+
import { FormlyModule } from '@kre-form/core';
|
|
9
|
+
import * as i9 from 'ng-zorro-antd/spin';
|
|
10
|
+
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
11
|
+
import * as i10 from 'ng-zorro-antd/empty';
|
|
12
|
+
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
13
|
+
import * as i12 from 'ng-zorro-antd/button';
|
|
14
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
15
|
+
import * as i15 from 'ng-zorro-antd/icon';
|
|
16
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
17
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
18
|
+
import * as i16 from 'ng-zorro-antd/tabs';
|
|
19
|
+
import { NzTabsModule } from 'ng-zorro-antd/tabs';
|
|
20
|
+
import * as i6 from '@ebuilding/base/shared.srv/commApi.service';
|
|
21
|
+
import { CommAPIService } from '@ebuilding/base/shared.srv/commApi.service';
|
|
22
|
+
import { GramDeonAntdModule } from '@ebuilding/biz-comm/type';
|
|
23
|
+
import * as i17 from '@ebuilding/biz-comm/other/card';
|
|
24
|
+
import { CardContentModule } from '@ebuilding/biz-comm/other/card';
|
|
25
|
+
import { FormGroupBasicService } from '@ebuilding/biz-form/service/formGroup.service';
|
|
26
|
+
import * as i1 from '@delon/theme';
|
|
27
|
+
import * as i2 from '@ebuilding/base/shared.srv/deon.util';
|
|
28
|
+
import * as i4 from '@ebuilding/base/shared.srv/global.event';
|
|
29
|
+
import * as i5 from 'ng-zorro-antd/message';
|
|
30
|
+
import * as i13 from 'ng-zorro-antd/core/transition-patch';
|
|
31
|
+
import * as i14 from 'ng-zorro-antd/core/wave';
|
|
32
|
+
import _ from 'lodash';
|
|
33
|
+
|
|
34
|
+
class GroupService {
|
|
35
|
+
/**
|
|
36
|
+
* 外部传入的配置
|
|
37
|
+
*/
|
|
38
|
+
sourceConfig = null;
|
|
39
|
+
/**
|
|
40
|
+
* 头部配置 */
|
|
41
|
+
headerConfig = null;
|
|
42
|
+
groupForm = null;
|
|
43
|
+
groupData = null;
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GroupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GroupService });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GroupService, decorators: [{
|
|
48
|
+
type: Injectable
|
|
49
|
+
}] });
|
|
50
|
+
|
|
51
|
+
class GroupChildrenComponent extends FormGroupBasicService {
|
|
52
|
+
http;
|
|
53
|
+
utilService;
|
|
54
|
+
deonFormBuilder;
|
|
55
|
+
globalSrv;
|
|
56
|
+
msg;
|
|
57
|
+
commAPISrv;
|
|
58
|
+
groupSrv;
|
|
59
|
+
formInfo = null;
|
|
60
|
+
height = 0;
|
|
61
|
+
constructor(http, utilService, deonFormBuilder, globalSrv, msg, commAPISrv, groupSrv) {
|
|
62
|
+
super(http, utilService, deonFormBuilder, globalSrv, msg, commAPISrv);
|
|
63
|
+
this.http = http;
|
|
64
|
+
this.utilService = utilService;
|
|
65
|
+
this.deonFormBuilder = deonFormBuilder;
|
|
66
|
+
this.globalSrv = globalSrv;
|
|
67
|
+
this.msg = msg;
|
|
68
|
+
this.commAPISrv = commAPISrv;
|
|
69
|
+
this.groupSrv = groupSrv;
|
|
70
|
+
}
|
|
71
|
+
ngOnInit() { }
|
|
72
|
+
ngOnChanges(changes) {
|
|
73
|
+
if (changes['formInfo']) {
|
|
74
|
+
if (this.formInfo) {
|
|
75
|
+
this.pageConfig = {
|
|
76
|
+
type: 'ADD',
|
|
77
|
+
id: null,
|
|
78
|
+
formId: this.formInfo.id,
|
|
79
|
+
moduleCode: this.groupSrv.sourceConfig.moduleCode, //buttonConfig.moduleCode,
|
|
80
|
+
api: this.groupSrv.sourceConfig.api,
|
|
81
|
+
argInfo: this.groupSrv.sourceConfig.argInfo,
|
|
82
|
+
};
|
|
83
|
+
this.getPageConfig();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/*
|
|
88
|
+
获取配置-表单数据
|
|
89
|
+
*/
|
|
90
|
+
getFromModel() {
|
|
91
|
+
let params = {
|
|
92
|
+
formId: this.pageConfig.formId,
|
|
93
|
+
id: this.groupSrv.sourceConfig.id,
|
|
94
|
+
};
|
|
95
|
+
let apiName = this.commAPISrv.getFormModelChildren(this.pageConfig.moduleCode);
|
|
96
|
+
return this.http.post(`${apiName}`, params);
|
|
97
|
+
}
|
|
98
|
+
save() {
|
|
99
|
+
if (!this.form.valid) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
this.loading = true;
|
|
103
|
+
let apiName = this.commAPISrv.getFormSaveChildren(this.pageConfig.moduleCode);
|
|
104
|
+
this.http
|
|
105
|
+
.post(`${apiName}`, {
|
|
106
|
+
id: this.groupSrv.sourceConfig.id,
|
|
107
|
+
formId: this.pageConfig.formId,
|
|
108
|
+
modelJson: this.model,
|
|
109
|
+
})
|
|
110
|
+
.subscribe((res) => {
|
|
111
|
+
this.loading = false;
|
|
112
|
+
if (res && res.success == true) {
|
|
113
|
+
this.msg.success('保存成功!');
|
|
114
|
+
}
|
|
115
|
+
}, () => {
|
|
116
|
+
this.loading = false;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GroupChildrenComponent, deps: [{ token: i1._HttpClient }, { token: i2.DeonFormUtilService }, { token: i3.FormlyFormBuilder }, { token: i4.GramGlobalService }, { token: i5.NzMessageService }, { token: i6.CommAPIService }, { token: GroupService }], target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GroupChildrenComponent, isStandalone: true, selector: "group-children", inputs: { formInfo: "formInfo", height: "height" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <ng-container *ngIf=\"pageConfig!!\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <div class=\"deon-from\" [ngStyle]=\"{'height':height-68+'px'}\">\r\n <ng-container *ngIf=\"fields && fields.length>0;else emptyPage\">\r\n <formly-form [model]=\"model\" [fields]=\"fields\" [options]=\"options\" [form]=\"form\"> </formly-form>\r\n </ng-container>\r\n <ng-template #emptyPage>\r\n <nz-empty *ngIf=\"loading!==true\"></nz-empty>\r\n </ng-template>\r\n </div>\r\n <div class=\"deon-button\" *ngIf=\"pageConfig.type!='VIEW' && pageConfig.type!='PREVIEW'\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"reload\"></i>\u91CD\u7F6E</button>\r\n <!-- <button nz-button nzType=\"primary\" id=\"DRAFT\" *ngIf=\"draft==true\"><i nz-icon nzType=\"hourglass\"></i>\u6682\u5B58</button> -->\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n </form>\r\n </ng-container>\r\n</nz-spin>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;padding:0 5px}:host ::ng-deep form{flex:1;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i9.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i10.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i11.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i11.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i11.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵ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: i14.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i15.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "ngmodule", type: GramDeonAntdModule }] });
|
|
121
|
+
}
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GroupChildrenComponent, decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{ selector: 'group-children', imports: [
|
|
125
|
+
CommonModule,
|
|
126
|
+
NzSpinModule,
|
|
127
|
+
NzEmptyModule,
|
|
128
|
+
FormlyModule,
|
|
129
|
+
FormsModule, ReactiveFormsModule,
|
|
130
|
+
NzButtonModule,
|
|
131
|
+
NzIconModule,
|
|
132
|
+
NzFormModule,
|
|
133
|
+
GramDeonAntdModule
|
|
134
|
+
], template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <ng-container *ngIf=\"pageConfig!!\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <div class=\"deon-from\" [ngStyle]=\"{'height':height-68+'px'}\">\r\n <ng-container *ngIf=\"fields && fields.length>0;else emptyPage\">\r\n <formly-form [model]=\"model\" [fields]=\"fields\" [options]=\"options\" [form]=\"form\"> </formly-form>\r\n </ng-container>\r\n <ng-template #emptyPage>\r\n <nz-empty *ngIf=\"loading!==true\"></nz-empty>\r\n </ng-template>\r\n </div>\r\n <div class=\"deon-button\" *ngIf=\"pageConfig.type!='VIEW' && pageConfig.type!='PREVIEW'\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"reload\"></i>\u91CD\u7F6E</button>\r\n <!-- <button nz-button nzType=\"primary\" id=\"DRAFT\" *ngIf=\"draft==true\"><i nz-icon nzType=\"hourglass\"></i>\u6682\u5B58</button> -->\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n </form>\r\n </ng-container>\r\n</nz-spin>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;padding:0 5px}:host ::ng-deep form{flex:1;overflow:auto}\n"] }]
|
|
135
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.DeonFormUtilService }, { type: i3.FormlyFormBuilder }, { type: i4.GramGlobalService }, { type: i5.NzMessageService }, { type: i6.CommAPIService }, { type: GroupService }], propDecorators: { formInfo: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], height: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}] } });
|
|
140
|
+
|
|
141
|
+
class EmpFormGroupComponent extends FormGroupBasicService {
|
|
142
|
+
http;
|
|
143
|
+
elementRef;
|
|
144
|
+
renderer;
|
|
145
|
+
utilService;
|
|
146
|
+
deonFormBuilder;
|
|
147
|
+
globalSrv;
|
|
148
|
+
msg;
|
|
149
|
+
commAPISrv;
|
|
150
|
+
groupSrv;
|
|
151
|
+
_config = null;
|
|
152
|
+
set config(value) {
|
|
153
|
+
this._config = value;
|
|
154
|
+
if (value) {
|
|
155
|
+
this.getPageData();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
get config() {
|
|
159
|
+
return this._config;
|
|
160
|
+
}
|
|
161
|
+
height = 0;
|
|
162
|
+
constructor(http, elementRef, renderer, utilService, deonFormBuilder, globalSrv, msg, commAPISrv, groupSrv) {
|
|
163
|
+
super(http, utilService, deonFormBuilder, globalSrv, msg, commAPISrv);
|
|
164
|
+
this.http = http;
|
|
165
|
+
this.elementRef = elementRef;
|
|
166
|
+
this.renderer = renderer;
|
|
167
|
+
this.utilService = utilService;
|
|
168
|
+
this.deonFormBuilder = deonFormBuilder;
|
|
169
|
+
this.globalSrv = globalSrv;
|
|
170
|
+
this.msg = msg;
|
|
171
|
+
this.commAPISrv = commAPISrv;
|
|
172
|
+
this.groupSrv = groupSrv;
|
|
173
|
+
}
|
|
174
|
+
ngOnInit() { }
|
|
175
|
+
ngOnChanges(changes) { }
|
|
176
|
+
getPageData() {
|
|
177
|
+
this.loading = true;
|
|
178
|
+
this.groupSrv.groupData = null;
|
|
179
|
+
let apiName = this.commAPISrv.getFormDesign(this.config.moduleCode, this.config.formId);
|
|
180
|
+
this.http.post(`${apiName}`).subscribe((res) => {
|
|
181
|
+
this.groupSrv.sourceConfig = _.cloneDeep(this.config);
|
|
182
|
+
if (res.success) {
|
|
183
|
+
this.groupSrv.groupData = res.result;
|
|
184
|
+
}
|
|
185
|
+
if (this.groupSrv.groupData &&
|
|
186
|
+
this.groupSrv.groupData.listChildren &&
|
|
187
|
+
Array.isArray(this.groupSrv.groupData.listChildren) &&
|
|
188
|
+
this.groupSrv.groupData.listChildren.length > 0) {
|
|
189
|
+
let firstData = this.groupSrv.groupData.listChildren[0];
|
|
190
|
+
this.pageConfig = {
|
|
191
|
+
type: this.groupSrv.sourceConfig.type,
|
|
192
|
+
id: this.groupSrv.sourceConfig.id,
|
|
193
|
+
formId: firstData.formInfo.id,
|
|
194
|
+
moduleCode: this.groupSrv.sourceConfig.moduleCode,
|
|
195
|
+
api: this.groupSrv.sourceConfig.api,
|
|
196
|
+
argInfo: this.groupSrv.sourceConfig.argInfo,
|
|
197
|
+
};
|
|
198
|
+
this.getPageConfig();
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
this.loading = false;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
getPageConfigAfter() {
|
|
206
|
+
if (this.groupSrv.headerConfig == null) {
|
|
207
|
+
if (this.groupSrv.groupData && this.groupSrv.groupData.basic && this.groupSrv.groupData.basic.izHeader == true) {
|
|
208
|
+
this.groupSrv.headerConfig = { headerId: this.groupSrv.groupData.basic.headerId, dataId: this.groupSrv.sourceConfig.id };
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
this.groupSrv.headerConfig = null;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
this.resizeTable();
|
|
216
|
+
}, 0);
|
|
217
|
+
}
|
|
218
|
+
resize() {
|
|
219
|
+
this.resizeTable();
|
|
220
|
+
}
|
|
221
|
+
resizeTable() {
|
|
222
|
+
if (this.elementRef.nativeElement.querySelector('.basic-info')) {
|
|
223
|
+
let header = this.elementRef.nativeElement.querySelector('.basic-info').clientHeight;
|
|
224
|
+
this.height = this.elementRef.nativeElement.clientHeight - header - 65;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EmpFormGroupComponent, deps: [{ token: i1._HttpClient }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.DeonFormUtilService }, { token: i3.FormlyFormBuilder }, { token: i4.GramGlobalService }, { token: i5.NzMessageService }, { token: i6.CommAPIService }, { token: GroupService }], target: i0.ɵɵFactoryTarget.Component });
|
|
228
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: EmpFormGroupComponent, isStandalone: true, selector: "emp-group-default", inputs: { config: "config" }, host: { listeners: { "window:resize": "resize($event)" } }, providers: [CommAPIService, GroupService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<nz-spin [nzSpinning]=\"loading\" class=\"deon-list-spin\">\r\n <div class=\"basic\" *ngIf=\"this.groupSrv.groupData!! && this.groupSrv.groupData.basic!!\">\r\n <ng-container *ngIf=\"this.groupSrv.groupData.basic?.izHeader==true && this.groupSrv.headerConfig!!\">\r\n <div class=\"basic-info\">\r\n <card-main [defaultConfig]=\"this.groupSrv.headerConfig\" (pageLoadAfter)=\"resizeTable()\"></card-main>\r\n </div>\r\n </ng-container>\r\n <div class=\"basic-tabset\">\r\n <nz-tabset>\r\n <ng-container *ngFor=\"let item of groupSrv.groupData.listChildren;let i=index;\">\r\n <nz-tab [nzTitle]=\"item.formInfo.name\">\r\n <ng-template nz-tab>\r\n <ng-container *ngIf=\"i==0\">\r\n <div class=\"basic-form\" [ngStyle]=\"{'height':height+'px'}\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <div class=\"deon-from\" [ngStyle]=\"{'height':height-68+'px'}\">\r\n <ng-container *ngIf=\"fields && fields.length>0;else emptyPage\">\r\n <formly-form [model]=\"model\" [fields]=\"fields\" [options]=\"options\" [form]=\"form\"> </formly-form>\r\n </ng-container>\r\n <ng-template #emptyPage>\r\n <nz-empty *ngIf=\"loading!==true\"></nz-empty>\r\n </ng-template>\r\n </div>\r\n <div class=\"deon-button\" *ngIf=\"pageConfig.type!='VIEW' && pageConfig.type!='PREVIEW'\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon\r\n nzType=\"reload\"></i>\u91CD\u7F6E</button>\r\n <!-- <button nz-button nzType=\"primary\" id=\"DRAFT\" *ngIf=\"draft==true\"><i nz-icon\r\n nzType=\"hourglass\"></i>\u6682\u5B58</button> -->\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n </form>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"i>0\">\r\n <group-children [formInfo]=\"item.formInfo\" [height]=\"height\"\r\n [ngStyle]=\"{'height':height+'px'}\"></group-children>\r\n </ng-container>\r\n </ng-template>\r\n </nz-tab>\r\n </ng-container>\r\n </nz-tabset>\r\n </div>\r\n </div>\r\n</nz-spin>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .basic{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .basic-info{display:inline-block;display:flex;align-items:center;width:100%}:host ::ng-deep .basic-info ul{display:flex;flex-direction:row;align-items:center;margin:0;padding:0 20px;list-style:none}:host ::ng-deep .basic-info ul li{margin:0;padding:0 20px 0 0}:host ::ng-deep .basic-info ul li:nth-last-child(1){padding:0 0 0 130px}:host ::ng-deep .basic-info ul .name{height:35px;color:#262626;font-weight:600;font-size:20px;line-height:28px}:host ::ng-deep .basic-info ul .position{color:#262626;font-weight:400;font-size:14px;line-height:20px}:host ::ng-deep .basic-info ul .org,:host ::ng-deep .basic-info ul .code{color:#262626;font-weight:400;font-size:14px;line-height:20px;line-height:35px}:host ::ng-deep .basic-info ul .org i,:host ::ng-deep .basic-info ul .code i{margin-right:3px;color:#8c8c8c}:host ::ng-deep .basic-tabset{display:flex;flex:1;padding:8px 20px;overflow:auto}:host ::ng-deep .basic-tabset nz-tabset{width:100%}:host ::ng-deep .basic-tabset form{position:relative;flex:1}:host ::ng-deep .basic-tabset form .deon-from{padding:0;overflow:auto}:host ::ng-deep .basic-tabset form .deon-button{position:fixed;right:0;bottom:0;width:auto;line-height:68px;text-align:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i9.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i10.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i11.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i11.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i11.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵ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: i14.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i15.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i16.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i16.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "directive", type: i16.NzTabDirective, selector: "[nz-tab]", exportAs: ["nzTab"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "ngmodule", type: CardContentModule }, { kind: "component", type: i17.CardMainComponent, selector: "card-main", inputs: ["dynamicConfig", "defaultConfig", "defaultData"], outputs: ["pageLoadAfter"] }, { kind: "component", type: GroupChildrenComponent, selector: "group-children", inputs: ["formInfo", "height"] }, { kind: "ngmodule", type: GramDeonAntdModule }] });
|
|
229
|
+
}
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EmpFormGroupComponent, decorators: [{
|
|
231
|
+
type: Component,
|
|
232
|
+
args: [{ selector: 'emp-group-default', providers: [CommAPIService, GroupService], imports: [
|
|
233
|
+
CommonModule,
|
|
234
|
+
NzSpinModule,
|
|
235
|
+
NzEmptyModule,
|
|
236
|
+
FormlyModule,
|
|
237
|
+
FormsModule, ReactiveFormsModule,
|
|
238
|
+
NzButtonModule,
|
|
239
|
+
NzIconModule,
|
|
240
|
+
NzTabsModule,
|
|
241
|
+
NzFormModule,
|
|
242
|
+
CardContentModule,
|
|
243
|
+
GroupChildrenComponent,
|
|
244
|
+
GramDeonAntdModule
|
|
245
|
+
], template: "<nz-spin [nzSpinning]=\"loading\" class=\"deon-list-spin\">\r\n <div class=\"basic\" *ngIf=\"this.groupSrv.groupData!! && this.groupSrv.groupData.basic!!\">\r\n <ng-container *ngIf=\"this.groupSrv.groupData.basic?.izHeader==true && this.groupSrv.headerConfig!!\">\r\n <div class=\"basic-info\">\r\n <card-main [defaultConfig]=\"this.groupSrv.headerConfig\" (pageLoadAfter)=\"resizeTable()\"></card-main>\r\n </div>\r\n </ng-container>\r\n <div class=\"basic-tabset\">\r\n <nz-tabset>\r\n <ng-container *ngFor=\"let item of groupSrv.groupData.listChildren;let i=index;\">\r\n <nz-tab [nzTitle]=\"item.formInfo.name\">\r\n <ng-template nz-tab>\r\n <ng-container *ngIf=\"i==0\">\r\n <div class=\"basic-form\" [ngStyle]=\"{'height':height+'px'}\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <div class=\"deon-from\" [ngStyle]=\"{'height':height-68+'px'}\">\r\n <ng-container *ngIf=\"fields && fields.length>0;else emptyPage\">\r\n <formly-form [model]=\"model\" [fields]=\"fields\" [options]=\"options\" [form]=\"form\"> </formly-form>\r\n </ng-container>\r\n <ng-template #emptyPage>\r\n <nz-empty *ngIf=\"loading!==true\"></nz-empty>\r\n </ng-template>\r\n </div>\r\n <div class=\"deon-button\" *ngIf=\"pageConfig.type!='VIEW' && pageConfig.type!='PREVIEW'\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon\r\n nzType=\"reload\"></i>\u91CD\u7F6E</button>\r\n <!-- <button nz-button nzType=\"primary\" id=\"DRAFT\" *ngIf=\"draft==true\"><i nz-icon\r\n nzType=\"hourglass\"></i>\u6682\u5B58</button> -->\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n </form>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"i>0\">\r\n <group-children [formInfo]=\"item.formInfo\" [height]=\"height\"\r\n [ngStyle]=\"{'height':height+'px'}\"></group-children>\r\n </ng-container>\r\n </ng-template>\r\n </nz-tab>\r\n </ng-container>\r\n </nz-tabset>\r\n </div>\r\n </div>\r\n</nz-spin>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .basic{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .basic-info{display:inline-block;display:flex;align-items:center;width:100%}:host ::ng-deep .basic-info ul{display:flex;flex-direction:row;align-items:center;margin:0;padding:0 20px;list-style:none}:host ::ng-deep .basic-info ul li{margin:0;padding:0 20px 0 0}:host ::ng-deep .basic-info ul li:nth-last-child(1){padding:0 0 0 130px}:host ::ng-deep .basic-info ul .name{height:35px;color:#262626;font-weight:600;font-size:20px;line-height:28px}:host ::ng-deep .basic-info ul .position{color:#262626;font-weight:400;font-size:14px;line-height:20px}:host ::ng-deep .basic-info ul .org,:host ::ng-deep .basic-info ul .code{color:#262626;font-weight:400;font-size:14px;line-height:20px;line-height:35px}:host ::ng-deep .basic-info ul .org i,:host ::ng-deep .basic-info ul .code i{margin-right:3px;color:#8c8c8c}:host ::ng-deep .basic-tabset{display:flex;flex:1;padding:8px 20px;overflow:auto}:host ::ng-deep .basic-tabset nz-tabset{width:100%}:host ::ng-deep .basic-tabset form{position:relative;flex:1}:host ::ng-deep .basic-tabset form .deon-from{padding:0;overflow:auto}:host ::ng-deep .basic-tabset form .deon-button{position:fixed;right:0;bottom:0;width:auto;line-height:68px;text-align:inherit}\n"] }]
|
|
246
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.DeonFormUtilService }, { type: i3.FormlyFormBuilder }, { type: i4.GramGlobalService }, { type: i5.NzMessageService }, { type: i6.CommAPIService }, { type: GroupService }], propDecorators: { config: [{
|
|
247
|
+
type: Input
|
|
248
|
+
}], resize: [{
|
|
249
|
+
type: HostListener,
|
|
250
|
+
args: ['window:resize', ['$event']]
|
|
251
|
+
}] } });
|
|
252
|
+
|
|
253
|
+
const COMPONENTS = [EmpFormGroupComponent];
|
|
254
|
+
const COMPONENTS_NOROUNT = [GroupChildrenComponent];
|
|
255
|
+
class EmpFormGroupModule {
|
|
256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EmpFormGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
257
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: EmpFormGroupModule, imports: [CommonModule, EmpFormGroupComponent, GroupChildrenComponent], exports: [EmpFormGroupComponent] });
|
|
258
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EmpFormGroupModule, imports: [CommonModule, COMPONENTS, COMPONENTS_NOROUNT] });
|
|
259
|
+
}
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EmpFormGroupModule, decorators: [{
|
|
261
|
+
type: NgModule,
|
|
262
|
+
args: [{
|
|
263
|
+
imports: [CommonModule, ...COMPONENTS, ...COMPONENTS_NOROUNT],
|
|
264
|
+
exports: [...COMPONENTS],
|
|
265
|
+
}]
|
|
266
|
+
}] });
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Generated bundle index. Do not edit.
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
export { EmpFormGroupComponent, EmpFormGroupModule };
|
|
273
|
+
//# sourceMappingURL=empInfo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empInfo.mjs","sources":["../../../../packages/biz-form/empInfo/src/service.ts","../../../../packages/biz-form/empInfo/src/children/index.ts","../../../../packages/biz-form/empInfo/src/children/index.html","../../../../packages/biz-form/empInfo/src/default/index.ts","../../../../packages/biz-form/empInfo/src/default/index.html","../../../../packages/biz-form/empInfo/src/index.module.ts","../../../../packages/biz-form/empInfo/empInfo.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n@Injectable()\r\nexport class GroupService {\r\n /**\r\n * 外部传入的配置\r\n */\r\n sourceConfig: any = null;\r\n\r\n /**\r\n * 头部配置 */\r\n headerConfig: any = null;\r\n\r\n groupForm: any = null;\r\n\r\n groupData: any = null;\r\n}\r\n","import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { _HttpClient } from '@delon/theme';\r\nimport { FormlyFormBuilder, FormlyModule } from '@kre-form/core';\r\nimport { NzMessageService } from 'ng-zorro-antd/message';\r\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\r\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzFormModule } from 'ng-zorro-antd/form';\r\n\r\nimport { DeonFormUtilService } from '@ebuilding/base/shared.srv/deon.util';\r\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\r\nimport { CommAPIService } from '@ebuilding/base/shared.srv/commApi.service';\r\n\r\nimport { GramDeonAntdModule } from '@ebuilding/biz-comm/type';\r\nimport { FormGroupBasicService } from '@ebuilding/biz-form/service/formGroup.service';\r\n\r\nimport { GroupService } from '../service';\r\nimport _ from 'lodash';\r\n\r\n@Component({\r\n selector: 'group-children',\r\n styleUrls: ['./index.less'],\r\n templateUrl: './index.html',\r\n imports: [\r\n CommonModule,\r\n NzSpinModule,\r\n NzEmptyModule,\r\n FormlyModule,\r\n FormsModule, ReactiveFormsModule,\r\n NzButtonModule,\r\n NzIconModule,\r\n NzFormModule,\r\n GramDeonAntdModule\r\n ],\r\n})\r\nexport class GroupChildrenComponent extends FormGroupBasicService implements OnInit, OnChanges {\r\n @Input() formInfo: any = null;\r\n @Input() height: number = 0;\r\n constructor(\r\n public override http: _HttpClient,\r\n public override utilService: DeonFormUtilService,\r\n public override deonFormBuilder: FormlyFormBuilder,\r\n public override globalSrv: GramGlobalService,\r\n public override msg: NzMessageService,\r\n public override commAPISrv: CommAPIService,\r\n public groupSrv: GroupService,\r\n ) {\r\n super(http, utilService, deonFormBuilder, globalSrv, msg, commAPISrv);\r\n }\r\n\r\n ngOnInit() { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['formInfo']) {\r\n if (this.formInfo!!) {\r\n this.pageConfig = {\r\n type: 'ADD',\r\n id: null,\r\n formId: this.formInfo.id,\r\n moduleCode: this.groupSrv.sourceConfig.moduleCode, //buttonConfig.moduleCode,\r\n api: this.groupSrv.sourceConfig.api,\r\n argInfo: this.groupSrv.sourceConfig.argInfo,\r\n };\r\n\r\n this.getPageConfig();\r\n }\r\n }\r\n }\r\n\r\n /*\r\n 获取配置-表单数据\r\n */\r\n override getFromModel() {\r\n let params: any = {\r\n formId: this.pageConfig.formId,\r\n id: this.groupSrv.sourceConfig.id,\r\n };\r\n\r\n let apiName: any = this.commAPISrv.getFormModelChildren(this.pageConfig.moduleCode);\r\n\r\n return this.http.post(`${apiName}`, params);\r\n }\r\n\r\n override save() {\r\n if (!this.form.valid) {\r\n return;\r\n }\r\n this.loading = true;\r\n let apiName = this.commAPISrv.getFormSaveChildren(this.pageConfig.moduleCode);\r\n this.http\r\n .post(`${apiName}`, {\r\n id: this.groupSrv.sourceConfig.id,\r\n formId: this.pageConfig.formId,\r\n modelJson: this.model,\r\n })\r\n .subscribe(\r\n (res: any) => {\r\n this.loading = false;\r\n if (res && res.success == true) {\r\n this.msg.success('保存成功!');\r\n }\r\n },\r\n () => {\r\n this.loading = false;\r\n },\r\n );\r\n }\r\n}\r\n","<nz-spin [nzSpinning]=\"loading\" nzTip=\"拼命加载中...\" class=\"deon-list-spin\">\r\n <ng-container *ngIf=\"pageConfig!!\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <div class=\"deon-from\" [ngStyle]=\"{'height':height-68+'px'}\">\r\n <ng-container *ngIf=\"fields && fields.length>0;else emptyPage\">\r\n <formly-form [model]=\"model\" [fields]=\"fields\" [options]=\"options\" [form]=\"form\"> </formly-form>\r\n </ng-container>\r\n <ng-template #emptyPage>\r\n <nz-empty *ngIf=\"loading!==true\"></nz-empty>\r\n </ng-template>\r\n </div>\r\n <div class=\"deon-button\" *ngIf=\"pageConfig.type!='VIEW' && pageConfig.type!='PREVIEW'\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"reload\"></i>重置</button>\r\n <!-- <button nz-button nzType=\"primary\" id=\"DRAFT\" *ngIf=\"draft==true\"><i nz-icon nzType=\"hourglass\"></i>暂存</button> -->\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>保存</button>\r\n </div>\r\n </form>\r\n </ng-container>\r\n</nz-spin>","import { Component, OnInit, HostListener, Input, Renderer2, ElementRef, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { _HttpClient } from '@delon/theme';\r\nimport { FormlyFormBuilder, FormlyModule } from '@kre-form/core';\r\nimport { NzMessageService } from 'ng-zorro-antd/message';\r\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\r\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzFormModule } from 'ng-zorro-antd/form';\r\nimport { NzTabsModule } from 'ng-zorro-antd/tabs';\r\n\r\nimport { DeonFormUtilService } from '@ebuilding/base/shared.srv/deon.util';\r\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\r\nimport { CommAPIService } from '@ebuilding/base/shared.srv/commApi.service';\r\n\r\nimport { GramDeonAntdModule } from '@ebuilding/biz-comm/type';\r\nimport { CardContentModule } from '@ebuilding/biz-comm/other/card';\r\nimport { FormGroupBasicService } from '@ebuilding/biz-form/service/formGroup.service';\r\n\r\nimport { GroupChildrenComponent } from \"../children\";\r\nimport { GroupService } from '../service';\r\nimport _ from 'lodash';\r\n\r\n\r\n@Component({\r\n selector: 'emp-group-default',\r\n styleUrls: ['./index.less'],\r\n templateUrl: './index.html',\r\n providers: [CommAPIService, GroupService],\r\n imports: [\r\n CommonModule,\r\n NzSpinModule,\r\n NzEmptyModule,\r\n FormlyModule,\r\n FormsModule, ReactiveFormsModule,\r\n NzButtonModule,\r\n NzIconModule,\r\n NzTabsModule,\r\n NzFormModule,\r\n CardContentModule,\r\n GroupChildrenComponent,\r\n GramDeonAntdModule\r\n ],\r\n})\r\nexport class EmpFormGroupComponent extends FormGroupBasicService implements OnInit, OnChanges {\r\n _config: any = null;\r\n\r\n @Input()\r\n set config(value: any) {\r\n this._config = value;\r\n if (value!!) {\r\n this.getPageData();\r\n }\r\n }\r\n get config() {\r\n return this._config;\r\n }\r\n\r\n height: number = 0;\r\n\r\n constructor(\r\n public override http: _HttpClient,\r\n public elementRef: ElementRef,\r\n public renderer: Renderer2,\r\n public override utilService: DeonFormUtilService,\r\n public override deonFormBuilder: FormlyFormBuilder,\r\n public override globalSrv: GramGlobalService,\r\n public override msg: NzMessageService,\r\n public override commAPISrv: CommAPIService,\r\n public groupSrv: GroupService,\r\n ) {\r\n super(http, utilService, deonFormBuilder, globalSrv, msg, commAPISrv);\r\n }\r\n\r\n ngOnInit() { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void { }\r\n\r\n getPageData() {\r\n this.loading = true;\r\n this.groupSrv.groupData = null;\r\n let apiName: any = this.commAPISrv.getFormDesign(this.config.moduleCode, this.config.formId);\r\n this.http.post(`${apiName}`).subscribe((res: any) => {\r\n this.groupSrv.sourceConfig = _.cloneDeep(this.config);\r\n if (res.success) {\r\n this.groupSrv.groupData = res.result;\r\n }\r\n if (\r\n this.groupSrv.groupData!! &&\r\n this.groupSrv.groupData.listChildren!! &&\r\n Array.isArray(this.groupSrv.groupData.listChildren) &&\r\n this.groupSrv.groupData.listChildren.length > 0\r\n ) {\r\n let firstData: any = this.groupSrv.groupData.listChildren[0];\r\n\r\n this.pageConfig = {\r\n type: this.groupSrv.sourceConfig.type,\r\n id: this.groupSrv.sourceConfig.id,\r\n formId: firstData.formInfo.id,\r\n moduleCode: this.groupSrv.sourceConfig.moduleCode,\r\n api: this.groupSrv.sourceConfig.api,\r\n argInfo: this.groupSrv.sourceConfig.argInfo,\r\n };\r\n\r\n this.getPageConfig();\r\n } else {\r\n this.loading = false;\r\n }\r\n });\r\n }\r\n\r\n getPageConfigAfter() {\r\n if (this.groupSrv.headerConfig == null) {\r\n if (this.groupSrv.groupData!! && this.groupSrv.groupData.basic!! && this.groupSrv.groupData.basic.izHeader == true) {\r\n this.groupSrv.headerConfig = { headerId: this.groupSrv.groupData.basic.headerId, dataId: this.groupSrv.sourceConfig.id };\r\n } else {\r\n this.groupSrv.headerConfig = null;\r\n }\r\n }\r\n setTimeout(() => {\r\n this.resizeTable();\r\n }, 0);\r\n }\r\n\r\n @HostListener('window:resize', ['$event'])\r\n resize() {\r\n this.resizeTable();\r\n }\r\n resizeTable() {\r\n if (this.elementRef.nativeElement.querySelector('.basic-info')!!) {\r\n let header: number = this.elementRef.nativeElement.querySelector('.basic-info').clientHeight;\r\n this.height = this.elementRef.nativeElement.clientHeight - header - 65;\r\n }\r\n }\r\n}\r\n","<nz-spin [nzSpinning]=\"loading\" class=\"deon-list-spin\">\r\n <div class=\"basic\" *ngIf=\"this.groupSrv.groupData!! && this.groupSrv.groupData.basic!!\">\r\n <ng-container *ngIf=\"this.groupSrv.groupData.basic?.izHeader==true && this.groupSrv.headerConfig!!\">\r\n <div class=\"basic-info\">\r\n <card-main [defaultConfig]=\"this.groupSrv.headerConfig\" (pageLoadAfter)=\"resizeTable()\"></card-main>\r\n </div>\r\n </ng-container>\r\n <div class=\"basic-tabset\">\r\n <nz-tabset>\r\n <ng-container *ngFor=\"let item of groupSrv.groupData.listChildren;let i=index;\">\r\n <nz-tab [nzTitle]=\"item.formInfo.name\">\r\n <ng-template nz-tab>\r\n <ng-container *ngIf=\"i==0\">\r\n <div class=\"basic-form\" [ngStyle]=\"{'height':height+'px'}\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <div class=\"deon-from\" [ngStyle]=\"{'height':height-68+'px'}\">\r\n <ng-container *ngIf=\"fields && fields.length>0;else emptyPage\">\r\n <formly-form [model]=\"model\" [fields]=\"fields\" [options]=\"options\" [form]=\"form\"> </formly-form>\r\n </ng-container>\r\n <ng-template #emptyPage>\r\n <nz-empty *ngIf=\"loading!==true\"></nz-empty>\r\n </ng-template>\r\n </div>\r\n <div class=\"deon-button\" *ngIf=\"pageConfig.type!='VIEW' && pageConfig.type!='PREVIEW'\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon\r\n nzType=\"reload\"></i>重置</button>\r\n <!-- <button nz-button nzType=\"primary\" id=\"DRAFT\" *ngIf=\"draft==true\"><i nz-icon\r\n nzType=\"hourglass\"></i>暂存</button> -->\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>保存</button>\r\n </div>\r\n </form>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"i>0\">\r\n <group-children [formInfo]=\"item.formInfo\" [height]=\"height\"\r\n [ngStyle]=\"{'height':height+'px'}\"></group-children>\r\n </ng-container>\r\n </ng-template>\r\n </nz-tab>\r\n </ng-container>\r\n </nz-tabset>\r\n </div>\r\n </div>\r\n</nz-spin>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { EmpFormGroupComponent } from './default/index';\r\nimport { GroupChildrenComponent } from './children/index';\r\n\r\nconst COMPONENTS: any[] = [EmpFormGroupComponent];\r\n\r\nconst COMPONENTS_NOROUNT: any = [GroupChildrenComponent];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...COMPONENTS, ...COMPONENTS_NOROUNT],\r\n exports: [...COMPONENTS],\r\n})\r\nexport class EmpFormGroupModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i7.GroupService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEa,YAAY,CAAA;AACvB;;AAEG;IACH,YAAY,GAAQ,IAAI;AAExB;AACU;IACV,YAAY,GAAQ,IAAI;IAExB,SAAS,GAAQ,IAAI;IAErB,SAAS,GAAQ,IAAI;wGAZV,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;4GAAZ,YAAY,EAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB;;;ACqCK,MAAO,sBAAuB,SAAQ,qBAAqB,CAAA;AAI7C,IAAA,IAAA;AACA,IAAA,WAAA;AACA,IAAA,eAAA;AACA,IAAA,SAAA;AACA,IAAA,GAAA;AACA,IAAA,UAAA;AACT,IAAA,QAAA;IATA,QAAQ,GAAQ,IAAI;IACpB,MAAM,GAAW,CAAC;AAC3B,IAAA,WAAA,CACkB,IAAiB,EACjB,WAAgC,EAChC,eAAkC,EAClC,SAA4B,EAC5B,GAAqB,EACrB,UAA0B,EACnC,QAAsB,EAAA;AAE7B,QAAA,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,CAAC;QARrD,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAe,CAAA,eAAA,GAAf,eAAe;QACf,IAA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,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAHnB,OAAA,EAAA,CAAA,YAAY,EAAK,UAAU,EAAK,kBAAkB,CAAA,EAAA,CAAA;;4FAGjD,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,UAAU,EAAE,GAAG,kBAAkB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i10 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i11 from 'ng-zorro-antd/spin';
|
|
6
|
+
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
7
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
8
|
+
import * as i12 from 'ng-zorro-antd/timeline';
|
|
9
|
+
import { NzTimelineModule } from 'ng-zorro-antd/timeline';
|
|
10
|
+
import * as i9 from '@ebuilding/base/shared.srv/commApi.service';
|
|
11
|
+
import { CommAPIService } from '@ebuilding/base/shared.srv/commApi.service';
|
|
12
|
+
import * as i13 from '@ebuilding/base/shared.pipe';
|
|
13
|
+
import { GramPipeModule } from '@ebuilding/base/shared.pipe';
|
|
14
|
+
import { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';
|
|
15
|
+
import * as i14 from '@ebuilding/abc/empty';
|
|
16
|
+
import { GramDeonEmptyModule } from '@ebuilding/abc/empty';
|
|
17
|
+
import { GramDeonAntdModule } from '@ebuilding/biz-comm/type';
|
|
18
|
+
import * as i1 from '@delon/theme';
|
|
19
|
+
import * as i2 from '@ebuilding/base/shared.srv/deon.util';
|
|
20
|
+
import * as i3 from '@ebuilding/base/shared.srv/deon2.util';
|
|
21
|
+
import * as i4 from '@kre-form/core';
|
|
22
|
+
import * as i5 from '@ebuilding/base/shared.srv/global.event';
|
|
23
|
+
import * as i6 from '@ebuilding/base/components/drawer';
|
|
24
|
+
import * as i7 from 'ng-zorro-antd/message';
|
|
25
|
+
import * as i8 from 'ng-zorro-antd/modal';
|
|
26
|
+
|
|
27
|
+
class FormHistoryComponent {
|
|
28
|
+
http;
|
|
29
|
+
utilService;
|
|
30
|
+
resetService;
|
|
31
|
+
deonFormBuilder;
|
|
32
|
+
globalSrv;
|
|
33
|
+
drawerRef;
|
|
34
|
+
msg;
|
|
35
|
+
modal;
|
|
36
|
+
changeDetector;
|
|
37
|
+
commAPISrv;
|
|
38
|
+
_config = null;
|
|
39
|
+
loading = true;
|
|
40
|
+
data = [];
|
|
41
|
+
set config(value) {
|
|
42
|
+
this._config = value;
|
|
43
|
+
this.getPageData();
|
|
44
|
+
}
|
|
45
|
+
get config() {
|
|
46
|
+
return this._config;
|
|
47
|
+
}
|
|
48
|
+
constructor(http, utilService, resetService, deonFormBuilder, globalSrv, drawerRef, msg, modal, changeDetector, commAPISrv) {
|
|
49
|
+
this.http = http;
|
|
50
|
+
this.utilService = utilService;
|
|
51
|
+
this.resetService = resetService;
|
|
52
|
+
this.deonFormBuilder = deonFormBuilder;
|
|
53
|
+
this.globalSrv = globalSrv;
|
|
54
|
+
this.drawerRef = drawerRef;
|
|
55
|
+
this.msg = msg;
|
|
56
|
+
this.modal = modal;
|
|
57
|
+
this.changeDetector = changeDetector;
|
|
58
|
+
this.commAPISrv = commAPISrv;
|
|
59
|
+
}
|
|
60
|
+
ngOnInit() {
|
|
61
|
+
this.loading = true;
|
|
62
|
+
}
|
|
63
|
+
ngAfterContentChecked() {
|
|
64
|
+
// this.changeDetector.detectChanges();
|
|
65
|
+
}
|
|
66
|
+
getPageData() {
|
|
67
|
+
this.loading = true;
|
|
68
|
+
let url = `${ModuleAPI.user}/user/form/history`;
|
|
69
|
+
if (this.config.api && this.config.api?.historyAPI) {
|
|
70
|
+
url = this.config.api.historyAPI;
|
|
71
|
+
}
|
|
72
|
+
this.http.post(url, {
|
|
73
|
+
pageId: this.config.pageId,
|
|
74
|
+
id: this.config.dataId
|
|
75
|
+
}).subscribe((res) => {
|
|
76
|
+
if (res.success && res.result) {
|
|
77
|
+
this.data = res.result;
|
|
78
|
+
}
|
|
79
|
+
this.loading = false;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormHistoryComponent, deps: [{ token: i1._HttpClient }, { token: i2.DeonFormUtilService }, { token: i3.DeonFormResetService }, { token: i4.FormlyFormBuilder }, { token: i5.GramGlobalService }, { token: i6.NzDrawerRef }, { token: i7.NzMessageService }, { token: i8.NzModalService }, { token: i0.ChangeDetectorRef }, { token: i9.CommAPIService }], target: i0.ɵɵFactoryTarget.Component });
|
|
83
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FormHistoryComponent, isStandalone: true, selector: "form-history", inputs: { config: "config" }, providers: [CommAPIService], ngImport: i0, template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n\r\n <nz-timeline>\r\n <ng-container *ngFor=\"let item of data\">\r\n <nz-timeline-item>\r\n <ul class=\"header\">\r\n <li><label>\u64CD\u4F5C\u65E5\u671F</label>{{item?.createDate | date:'YYYY/MM/dd HH:mm'}}</li>\r\n <li><label>\u64CD\u4F5C\u4EBA\u5458</label>{{item?.createEmp}}</li>\r\n </ul>\r\n <div class=\"body\">\r\n <div class=\"item-box\" *ngFor=\"let h of item.listHistory\">\r\n <ul class=\"item\">\r\n <li>\r\n <div class=\"label\">\u3010{{h.fieldLabel}}\u3011\u5B57\u6BB5\u53D8\u66F4\u524D</div>\r\n <div class=\"value\">\r\n <div [innerHtml]=\"h.beforeText | safeHtml\"></div>\r\n </div>\r\n </li>\r\n <li>\r\n <div class=\"label\">\u3010{{h.fieldLabel}}\u3011\u5B57\u6BB5\u53D8\u66F4\u540E</div>\r\n <div class=\"value\">\r\n <div [innerHtml]=\"h.afterText | safeHtml\"></div>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </nz-timeline-item>\r\n </ng-container>\r\n </nz-timeline>\r\n\r\n <ng-container *ngIf=\"loading==false && (data==null || data.length==0)\">\r\n <gram-empty></gram-empty>\r\n </ng-container>\r\n</nz-spin>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;padding:0 15px 20px}:host ::ng-deep nz-timeline{overflow-x:overlay;overflow-y:overlay;padding-top:20px}:host ::ng-deep nz-timeline::-webkit-scrollbar{width:8px}:host ::ng-deep nz-timeline::-webkit-scrollbar-thumb{background-color:#94949475;border-radius:7px}:host ::ng-deep nz-timeline::-webkit-scrollbar-track{background-color:#fff}:host ::ng-deep .header{display:flex;margin:0;padding:0;list-style:none}:host ::ng-deep .header li{padding:0 30px 0 0}:host ::ng-deep .header li label:after{padding:0 8px 0 5px;content:\":\"}:host ::ng-deep .body{display:flex;flex-direction:column;padding:10px 0 0}:host ::ng-deep .body .item-box{margin-bottom:10px}:host ::ng-deep .body .item{display:flex;margin:0;padding:0;list-style:none}:host ::ng-deep .body .item li{display:flex;flex:1;flex-direction:column;padding:0 20px 0 0}:host ::ng-deep .body .item .value{display:inline-block;flex:1;margin-top:5px;padding:8px 10px;font-size:12px;background:#edeff3;border-radius:6px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i10.DatePipe, name: "date" }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i11.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "ngmodule", type: NzTimelineModule }, { kind: "component", type: i12.NzTimelineItemComponent, selector: "nz-timeline-item, [nz-timeline-item]", inputs: ["nzPosition", "nzColor", "nzDot", "nzLabel"], exportAs: ["nzTimelineItem"] }, { kind: "component", type: i12.NzTimelineComponent, selector: "nz-timeline", inputs: ["nzMode", "nzPending", "nzPendingDot", "nzReverse"], exportAs: ["nzTimeline"] }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i13.SafeHtmlPipe, name: "safeHtml" }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i14.GramDeonEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }, { kind: "ngmodule", type: GramDeonAntdModule }] });
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormHistoryComponent, decorators: [{
|
|
86
|
+
type: Component,
|
|
87
|
+
args: [{ selector: 'form-history', providers: [CommAPIService], imports: [
|
|
88
|
+
CommonModule,
|
|
89
|
+
NzSpinModule,
|
|
90
|
+
NzIconModule,
|
|
91
|
+
NzTimelineModule,
|
|
92
|
+
GramPipeModule,
|
|
93
|
+
GramDeonEmptyModule,
|
|
94
|
+
GramDeonAntdModule
|
|
95
|
+
], template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n\r\n <nz-timeline>\r\n <ng-container *ngFor=\"let item of data\">\r\n <nz-timeline-item>\r\n <ul class=\"header\">\r\n <li><label>\u64CD\u4F5C\u65E5\u671F</label>{{item?.createDate | date:'YYYY/MM/dd HH:mm'}}</li>\r\n <li><label>\u64CD\u4F5C\u4EBA\u5458</label>{{item?.createEmp}}</li>\r\n </ul>\r\n <div class=\"body\">\r\n <div class=\"item-box\" *ngFor=\"let h of item.listHistory\">\r\n <ul class=\"item\">\r\n <li>\r\n <div class=\"label\">\u3010{{h.fieldLabel}}\u3011\u5B57\u6BB5\u53D8\u66F4\u524D</div>\r\n <div class=\"value\">\r\n <div [innerHtml]=\"h.beforeText | safeHtml\"></div>\r\n </div>\r\n </li>\r\n <li>\r\n <div class=\"label\">\u3010{{h.fieldLabel}}\u3011\u5B57\u6BB5\u53D8\u66F4\u540E</div>\r\n <div class=\"value\">\r\n <div [innerHtml]=\"h.afterText | safeHtml\"></div>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </nz-timeline-item>\r\n </ng-container>\r\n </nz-timeline>\r\n\r\n <ng-container *ngIf=\"loading==false && (data==null || data.length==0)\">\r\n <gram-empty></gram-empty>\r\n </ng-container>\r\n</nz-spin>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;padding:0 15px 20px}:host ::ng-deep nz-timeline{overflow-x:overlay;overflow-y:overlay;padding-top:20px}:host ::ng-deep nz-timeline::-webkit-scrollbar{width:8px}:host ::ng-deep nz-timeline::-webkit-scrollbar-thumb{background-color:#94949475;border-radius:7px}:host ::ng-deep nz-timeline::-webkit-scrollbar-track{background-color:#fff}:host ::ng-deep .header{display:flex;margin:0;padding:0;list-style:none}:host ::ng-deep .header li{padding:0 30px 0 0}:host ::ng-deep .header li label:after{padding:0 8px 0 5px;content:\":\"}:host ::ng-deep .body{display:flex;flex-direction:column;padding:10px 0 0}:host ::ng-deep .body .item-box{margin-bottom:10px}:host ::ng-deep .body .item{display:flex;margin:0;padding:0;list-style:none}:host ::ng-deep .body .item li{display:flex;flex:1;flex-direction:column;padding:0 20px 0 0}:host ::ng-deep .body .item .value{display:inline-block;flex:1;margin-top:5px;padding:8px 10px;font-size:12px;background:#edeff3;border-radius:6px}\n"] }]
|
|
96
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.DeonFormUtilService }, { type: i3.DeonFormResetService }, { type: i4.FormlyFormBuilder }, { type: i5.GramGlobalService }, { type: i6.NzDrawerRef }, { type: i7.NzMessageService }, { type: i8.NzModalService }, { type: i0.ChangeDetectorRef }, { type: i9.CommAPIService }], propDecorators: { config: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}] } });
|
|
99
|
+
|
|
100
|
+
const components = [FormHistoryComponent];
|
|
101
|
+
class FormHistoryModule {
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormHistoryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
103
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: FormHistoryModule, imports: [CommonModule, FormHistoryComponent], exports: [FormHistoryComponent] });
|
|
104
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormHistoryModule, imports: [CommonModule, components] });
|
|
105
|
+
}
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormHistoryModule, decorators: [{
|
|
107
|
+
type: NgModule,
|
|
108
|
+
args: [{
|
|
109
|
+
imports: [CommonModule, ...components],
|
|
110
|
+
exports: [...components],
|
|
111
|
+
}]
|
|
112
|
+
}] });
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Generated bundle index. Do not edit.
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
export { FormHistoryComponent, FormHistoryModule };
|
|
119
|
+
//# sourceMappingURL=history.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.mjs","sources":["../../../../packages/biz-form/history/src/default/index.ts","../../../../packages/biz-form/history/src/default/index.html","../../../../packages/biz-form/history/src/index.module.ts","../../../../packages/biz-form/history/history.ts"],"sourcesContent":["import { Component, OnInit, Input, ChangeDetectorRef, AfterContentChecked } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { _HttpClient } from '@delon/theme';\r\nimport { FormlyFormBuilder } from '@kre-form/core';\r\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzTimelineModule } from 'ng-zorro-antd/timeline';\r\nimport { NzMessageService } from 'ng-zorro-antd/message';\r\nimport { NzModalService } from 'ng-zorro-antd/modal';\r\n\r\nimport { DeonFormUtilService } from '@ebuilding/base/shared.srv/deon.util';\r\nimport { DeonFormResetService } from '@ebuilding/base/shared.srv/deon2.util';\r\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\r\nimport { CommAPIService } from '@ebuilding/base/shared.srv/commApi.service';\r\n\r\nimport { NzDrawerRef } from '@ebuilding/base/components/drawer';\r\nimport { GramPipeModule } from '@ebuilding/base/shared.pipe';\r\nimport { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';\r\nimport { GramDeonEmptyModule } from '@ebuilding/abc/empty';\r\nimport { GramDeonAntdModule } from '@ebuilding/biz-comm/type';\r\n\r\nimport _ from 'lodash';\r\n\r\n@Component({\r\n selector: 'form-history',\r\n styleUrls: ['./index.less'],\r\n templateUrl: './index.html',\r\n providers: [CommAPIService],\r\n imports: [\r\n CommonModule,\r\n NzSpinModule,\r\n NzIconModule,\r\n NzTimelineModule,\r\n GramPipeModule,\r\n GramDeonEmptyModule,\r\n GramDeonAntdModule\r\n ]\r\n})\r\nexport class FormHistoryComponent implements OnInit, AfterContentChecked {\r\n _config: any = null;\r\n\r\n loading: boolean = true;\r\n\r\n data: any[] = [];\r\n\r\n @Input()\r\n set config(value: any) {\r\n this._config = value;\r\n this.getPageData();\r\n }\r\n get config() {\r\n return this._config;\r\n }\r\n\r\n constructor(\r\n public http: _HttpClient,\r\n public utilService: DeonFormUtilService,\r\n public resetService: DeonFormResetService,\r\n public deonFormBuilder: FormlyFormBuilder,\r\n public globalSrv: GramGlobalService,\r\n public drawerRef: NzDrawerRef<any>,\r\n public msg: NzMessageService,\r\n public modal: NzModalService,\r\n private changeDetector: ChangeDetectorRef,\r\n public commAPISrv: CommAPIService,\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n this.loading = true;\r\n }\r\n\r\n ngAfterContentChecked(): void {\r\n // this.changeDetector.detectChanges();\r\n }\r\n\r\n getPageData() {\r\n this.loading = true;\r\n let url: any = `${ModuleAPI.user}/user/form/history`;\r\n if (this.config.api!! && this.config.api?.historyAPI!!) {\r\n url = this.config.api.historyAPI;\r\n }\r\n this.http.post(url, {\r\n pageId: this.config.pageId,\r\n id: this.config.dataId\r\n }).subscribe((res: any) => {\r\n if (res.success && res.result!!) {\r\n this.data = res.result;\r\n }\r\n this.loading = false;\r\n });\r\n }\r\n}\r\n","<nz-spin [nzSpinning]=\"loading\" nzTip=\"拼命加载中...\" class=\"deon-list-spin\">\r\n\r\n <nz-timeline>\r\n <ng-container *ngFor=\"let item of data\">\r\n <nz-timeline-item>\r\n <ul class=\"header\">\r\n <li><label>操作日期</label>{{item?.createDate | date:'YYYY/MM/dd HH:mm'}}</li>\r\n <li><label>操作人员</label>{{item?.createEmp}}</li>\r\n </ul>\r\n <div class=\"body\">\r\n <div class=\"item-box\" *ngFor=\"let h of item.listHistory\">\r\n <ul class=\"item\">\r\n <li>\r\n <div class=\"label\">【{{h.fieldLabel}}】字段变更前</div>\r\n <div class=\"value\">\r\n <div [innerHtml]=\"h.beforeText | safeHtml\"></div>\r\n </div>\r\n </li>\r\n <li>\r\n <div class=\"label\">【{{h.fieldLabel}}】字段变更后</div>\r\n <div class=\"value\">\r\n <div [innerHtml]=\"h.afterText | safeHtml\"></div>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </nz-timeline-item>\r\n </ng-container>\r\n </nz-timeline>\r\n\r\n <ng-container *ngIf=\"loading==false && (data==null || data.length==0)\">\r\n <gram-empty></gram-empty>\r\n </ng-container>\r\n</nz-spin>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { FormHistoryComponent } from './default/index';\r\n\r\nconst components: any[] = [FormHistoryComponent];\r\n@NgModule({\r\n imports: [CommonModule, ...components],\r\n exports: [...components],\r\n})\r\nexport class FormHistoryModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAsCa,oBAAoB,CAAA;AAiBtB,IAAA,IAAA;AACA,IAAA,WAAA;AACA,IAAA,YAAA;AACA,IAAA,eAAA;AACA,IAAA,SAAA;AACA,IAAA,SAAA;AACA,IAAA,GAAA;AACA,IAAA,KAAA;AACC,IAAA,cAAA;AACD,IAAA,UAAA;IAzBT,OAAO,GAAQ,IAAI;IAEnB,OAAO,GAAY,IAAI;IAEvB,IAAI,GAAU,EAAE;IAEhB,IACI,MAAM,CAAC,KAAU,EAAA;AACnB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;QACpB,IAAI,CAAC,WAAW,EAAE;;AAEpB,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;;AAGrB,IAAA,WAAA,CACS,IAAiB,EACjB,WAAgC,EAChC,YAAkC,EAClC,eAAkC,EAClC,SAA4B,EAC5B,SAA2B,EAC3B,GAAqB,EACrB,KAAqB,EACpB,cAAiC,EAClC,UAA0B,EAAA;QAT1B,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAY,CAAA,YAAA,GAAZ,YAAY;QACZ,IAAe,CAAA,eAAA,GAAf,eAAe;QACf,IAAS,CAAA,SAAA,GAAT,SAAS;QACT,IAAS,CAAA,SAAA,GAAT,SAAS;QACT,IAAG,CAAA,GAAA,GAAH,GAAG;QACH,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