@ebuilding/biz-form 2.0.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/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,200 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Input, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i6 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i7 from '@angular/forms';
|
|
6
|
+
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i3 from '@kre-form/core';
|
|
8
|
+
import { FormlyModule } from '@kre-form/core';
|
|
9
|
+
import * as i8 from 'ng-zorro-antd/spin';
|
|
10
|
+
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
11
|
+
import * as i9 from 'ng-zorro-antd/empty';
|
|
12
|
+
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
13
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
14
|
+
import { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';
|
|
15
|
+
import { GramDeonAntdModule } from '@ebuilding/biz-comm/type';
|
|
16
|
+
import { of, forkJoin } from 'rxjs';
|
|
17
|
+
import * as i1 from '@delon/theme';
|
|
18
|
+
import * as i2 from '@ebuilding/base/shared.srv/deon.util';
|
|
19
|
+
import * as i4 from '@ebuilding/base/shared.srv/global.event';
|
|
20
|
+
import * as i5 from 'ng-zorro-antd/message';
|
|
21
|
+
|
|
22
|
+
class FormPageComponent {
|
|
23
|
+
http;
|
|
24
|
+
utilService;
|
|
25
|
+
deonFormBuilder;
|
|
26
|
+
globalSrv;
|
|
27
|
+
msg;
|
|
28
|
+
loading = true;
|
|
29
|
+
form = new FormGroup({});
|
|
30
|
+
model = {};
|
|
31
|
+
options = {};
|
|
32
|
+
fields = [];
|
|
33
|
+
formData = null;
|
|
34
|
+
config = null;
|
|
35
|
+
buttonEvent = new EventEmitter();
|
|
36
|
+
constructor(http, utilService, deonFormBuilder, globalSrv, msg) {
|
|
37
|
+
this.http = http;
|
|
38
|
+
this.utilService = utilService;
|
|
39
|
+
this.deonFormBuilder = deonFormBuilder;
|
|
40
|
+
this.globalSrv = globalSrv;
|
|
41
|
+
this.msg = msg;
|
|
42
|
+
}
|
|
43
|
+
ngOnInit() { }
|
|
44
|
+
ngOnChanges(changes) {
|
|
45
|
+
if (changes['config'] && this.config) {
|
|
46
|
+
this.getFieldConfig();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
btnClose() {
|
|
50
|
+
this.getFieldConfig();
|
|
51
|
+
}
|
|
52
|
+
save() {
|
|
53
|
+
if (!this.form.valid) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
let postData = { formId: this.config?.formId };
|
|
57
|
+
this.loading = true;
|
|
58
|
+
let apiName = '';
|
|
59
|
+
if (this.config?.type == 'add' && this.config?.api?.addAPI) {
|
|
60
|
+
apiName = this.config?.api.addAPI;
|
|
61
|
+
}
|
|
62
|
+
else if (this.config?.type == 'edit' && this.config?.api.editAPI) {
|
|
63
|
+
apiName = this.config?.api.editAPI;
|
|
64
|
+
postData['id'] = this.config?.id;
|
|
65
|
+
}
|
|
66
|
+
if (this.model) {
|
|
67
|
+
postData['modelJson'] = this.model;
|
|
68
|
+
}
|
|
69
|
+
this.http.post(`${apiName}`, postData).subscribe((res) => {
|
|
70
|
+
if (res && res.success == true) {
|
|
71
|
+
this.msg.success('保存成功!');
|
|
72
|
+
this.buttonEvent.emit({
|
|
73
|
+
type: 'save',
|
|
74
|
+
data: res.result,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
this.loading = false;
|
|
78
|
+
}, () => {
|
|
79
|
+
this.loading = false;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/*
|
|
83
|
+
获取配置-下拉选项
|
|
84
|
+
*/
|
|
85
|
+
getFromOptions() {
|
|
86
|
+
if (this.config?.formId) {
|
|
87
|
+
let apiName = `${ModuleAPI.user}/user/sys/item/list/${this.config?.formId}`;
|
|
88
|
+
return this.http.post(`${apiName}`);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return of(null);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/*
|
|
95
|
+
获取配置-默认值
|
|
96
|
+
*/
|
|
97
|
+
getFromModel() {
|
|
98
|
+
let apiName = this.config?.api?.modelAPI;
|
|
99
|
+
if (this.config?.type != 'add' && apiName && this.config.formId && this.config.id) {
|
|
100
|
+
return this.http.post(`${apiName}`, {
|
|
101
|
+
formId: this.config.formId,
|
|
102
|
+
id: this.config.id,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
return of(null);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/*
|
|
110
|
+
获取配置-默认字段
|
|
111
|
+
*/
|
|
112
|
+
getFormDefaultField() {
|
|
113
|
+
let apiName = `${ModuleAPI.user}/user/form/design/${this?.config?.formId}`;
|
|
114
|
+
return this.http.post(`${apiName}`);
|
|
115
|
+
}
|
|
116
|
+
/*
|
|
117
|
+
获取配置-角色
|
|
118
|
+
*/
|
|
119
|
+
getFormDefaultRole() {
|
|
120
|
+
let params = {
|
|
121
|
+
formId: this.config.formId,
|
|
122
|
+
type: this.config.type,
|
|
123
|
+
};
|
|
124
|
+
let apiName = `${ModuleAPI.user}/user/form/role`;
|
|
125
|
+
return this.http.post(`${apiName}`, params);
|
|
126
|
+
}
|
|
127
|
+
getFieldConfig() {
|
|
128
|
+
this.loading = true;
|
|
129
|
+
forkJoin([this.getFormDefaultField(), this.getFormDefaultRole(), this.getFromModel(), this.getFromOptions()]).subscribe((res) => {
|
|
130
|
+
// this.model = {};
|
|
131
|
+
// let fieldConfigs:FormlyFieldConfig[] = JSON.parse(res[0].result.json);
|
|
132
|
+
// let fieldRole: any = {};
|
|
133
|
+
// let fieldOptions: any = {};
|
|
134
|
+
// //传入的值
|
|
135
|
+
// if (this.config?.model != null && Object.keys(this.config?.model).length > 0) {
|
|
136
|
+
// this.model = Object.assign(this.model, this.config?.model);
|
|
137
|
+
// }
|
|
138
|
+
// //字段权限
|
|
139
|
+
// if (res[1] && !!res[1].result && !!res[1].result) {
|
|
140
|
+
// fieldRole = res[1].result;
|
|
141
|
+
// }
|
|
142
|
+
// //获取的表单值
|
|
143
|
+
// if (res[2] && !!res[2].result) {
|
|
144
|
+
// this.model = Object.assign(this.model, res[2].result);
|
|
145
|
+
// }
|
|
146
|
+
// //字段Options
|
|
147
|
+
// if (res[3] && !!res[3].result) {
|
|
148
|
+
// fieldOptions = res[3].result;
|
|
149
|
+
// }
|
|
150
|
+
// this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => {});
|
|
151
|
+
// this.fields = fieldConfigs;
|
|
152
|
+
// setTimeout(() => {
|
|
153
|
+
// if (this.options != undefined && this.options != null && this.options?.resetModel) {
|
|
154
|
+
// this.options?.resetModel();
|
|
155
|
+
// }
|
|
156
|
+
// }, 0);
|
|
157
|
+
this.loading = false;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPageComponent, deps: [{ token: i1._HttpClient }, { token: i2.DeonFormUtilService }, { token: i3.FormlyFormBuilder }, { token: i4.GramGlobalService }, { token: i5.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FormPageComponent, isStandalone: true, selector: "form-page", inputs: { config: "config" }, outputs: { buttonEvent: "buttonEvent" }, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-button\" *ngIf=\"config.type!='view'\">\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 <div class=\"deon-from\">\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 </nz-spin>\r\n</form>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;padding:0 5px}:host ::ng-deep .deon-button{height:auto;margin-bottom:15px;padding:0;border:0}:host ::ng-deep .formly-form{padding:00 0 0}:host ::ng-deep form{flex:1;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i8.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i9.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: GramDeonAntdModule }] });
|
|
162
|
+
}
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPageComponent, decorators: [{
|
|
164
|
+
type: Component,
|
|
165
|
+
args: [{ selector: 'form-page', imports: [
|
|
166
|
+
CommonModule,
|
|
167
|
+
FormsModule,
|
|
168
|
+
ReactiveFormsModule,
|
|
169
|
+
NzSpinModule,
|
|
170
|
+
NzEmptyModule,
|
|
171
|
+
NzFormModule,
|
|
172
|
+
FormlyModule,
|
|
173
|
+
GramDeonAntdModule
|
|
174
|
+
], template: "<form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-button\" *ngIf=\"config.type!='view'\">\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 <div class=\"deon-from\">\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 </nz-spin>\r\n</form>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%;padding:0 5px}:host ::ng-deep .deon-button{height:auto;margin-bottom:15px;padding:0;border:0}:host ::ng-deep .formly-form{padding:00 0 0}:host ::ng-deep form{flex:1;overflow:auto}\n"] }]
|
|
175
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.DeonFormUtilService }, { type: i3.FormlyFormBuilder }, { type: i4.GramGlobalService }, { type: i5.NzMessageService }], propDecorators: { config: [{
|
|
176
|
+
type: Input
|
|
177
|
+
}], buttonEvent: [{
|
|
178
|
+
type: Output
|
|
179
|
+
}] } });
|
|
180
|
+
|
|
181
|
+
const components = [FormPageComponent];
|
|
182
|
+
class FormPageModule {
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
184
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: FormPageModule, imports: [CommonModule, FormPageComponent], exports: [FormPageComponent] });
|
|
185
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPageModule, imports: [CommonModule, components] });
|
|
186
|
+
}
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPageModule, decorators: [{
|
|
188
|
+
type: NgModule,
|
|
189
|
+
args: [{
|
|
190
|
+
imports: [CommonModule, ...components],
|
|
191
|
+
exports: [...components],
|
|
192
|
+
}]
|
|
193
|
+
}] });
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Generated bundle index. Do not edit.
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
export { FormPageComponent, FormPageModule };
|
|
200
|
+
//# sourceMappingURL=page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.mjs","sources":["../../../../packages/biz-form/page/src/default/index.ts","../../../../packages/biz-form/page/src/default/index.html","../../../../packages/biz-form/page/src/index.module.ts","../../../../packages/biz-form/page/page.ts"],"sourcesContent":["import { Component, OnInit, OnChanges, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { _HttpClient } from '@delon/theme';\r\nimport { FormlyModule, FormlyFormOptions, FormlyFieldConfig, FormlyFormBuilder } 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 { NzFormModule } from 'ng-zorro-antd/form';\r\n\r\nimport { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant'; \r\nimport { DeonFormUtilService } from '@ebuilding/base/shared.srv/deon.util';\r\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\r\nimport { GramDeonAntdModule } from '@ebuilding/biz-comm/type';\r\n\r\nimport _ from 'lodash';\r\nimport { forkJoin, of } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'form-page',\r\n styleUrls: ['./index.less'],\r\n templateUrl: './index.html',\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n NzSpinModule,\r\n NzEmptyModule,\r\n NzFormModule,\r\n FormlyModule,\r\n GramDeonAntdModule\r\n ]\r\n})\r\nexport class FormPageComponent implements OnInit, OnChanges {\r\n loading: boolean = true;\r\n form = new FormGroup({});\r\n model: any = {};\r\n options: FormlyFormOptions = {};\r\n fields: FormlyFieldConfig[] = [];\r\n\r\n formData: any = null;\r\n\r\n @Input() config = null;\r\n\r\n @Output() buttonEvent: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor(\r\n public http: _HttpClient,\r\n public utilService: DeonFormUtilService,\r\n public deonFormBuilder: FormlyFormBuilder,\r\n public globalSrv: GramGlobalService,\r\n public msg: NzMessageService,\r\n ) { }\r\n\r\n ngOnInit() { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config'] && this.config) {\r\n this.getFieldConfig();\r\n }\r\n }\r\n\r\n btnClose() {\r\n this.getFieldConfig();\r\n }\r\n\r\n save() {\r\n if (!this.form.valid) {\r\n return;\r\n }\r\n let postData: any = { formId: (this.config as any)?.formId };\r\n this.loading = true;\r\n let apiName = '';\r\n if ((this.config as any)?.type == 'add' && (this.config as any)?.api?.addAPI) {\r\n apiName = (this.config as any)?.api.addAPI;\r\n } else if ((this.config as any)?.type == 'edit' && (this.config as any)?.api.editAPI) {\r\n apiName = (this.config as any)?.api.editAPI;\r\n postData['id'] = (this.config as any)?.id;\r\n }\r\n\r\n if (this.model) {\r\n postData['modelJson'] = this.model;\r\n }\r\n this.http.post(`${apiName}`, postData).subscribe(\r\n (res: any) => {\r\n if (res && res.success == true) {\r\n this.msg.success('保存成功!');\r\n this.buttonEvent.emit({\r\n type: 'save',\r\n data: res.result,\r\n });\r\n }\r\n this.loading = false;\r\n },\r\n () => {\r\n this.loading = false;\r\n },\r\n );\r\n }\r\n\r\n /*\r\n 获取配置-下拉选项\r\n */\r\n getFromOptions() {\r\n if ((this.config as any)?.formId) {\r\n let apiName = `${ModuleAPI.user}/user/sys/item/list/${(this.config as any)?.formId}`;\r\n return this.http.post(`${apiName}`);\r\n } else {\r\n return of(null);\r\n }\r\n }\r\n\r\n /*\r\n 获取配置-默认值\r\n */\r\n getFromModel() {\r\n let apiName = this.config?.api?.modelAPI;\r\n if (this.config?.type != 'add' && apiName!! && this.config.formId!! && this.config.id!!) {\r\n return this.http.post(`${apiName}`, {\r\n formId: this.config.formId,\r\n id: this.config.id,\r\n });\r\n } else {\r\n return of(null);\r\n }\r\n }\r\n\r\n /*\r\n 获取配置-默认字段\r\n */\r\n getFormDefaultField() {\r\n let apiName = `${ModuleAPI.user}/user/form/design/${this?.config?.formId}`;\r\n return this.http.post(`${apiName}`);\r\n }\r\n\r\n /*\r\n 获取配置-角色\r\n */\r\n getFormDefaultRole() {\r\n let params: any = {\r\n formId: this.config.formId,\r\n type: this.config.type,\r\n };\r\n let apiName = `${ModuleAPI.user}/user/form/role`;\r\n return this.http.post(`${apiName}`, params);\r\n }\r\n\r\n getFieldConfig() {\r\n this.loading = true;\r\n forkJoin([this.getFormDefaultField(), this.getFormDefaultRole(), this.getFromModel(), this.getFromOptions()]).subscribe((res: any) => {\r\n // this.model = {};\r\n\r\n // let fieldConfigs:FormlyFieldConfig[] = JSON.parse(res[0].result.json);\r\n // let fieldRole: any = {};\r\n // let fieldOptions: any = {};\r\n // //传入的值\r\n // if (this.config?.model != null && Object.keys(this.config?.model).length > 0) {\r\n // this.model = Object.assign(this.model, this.config?.model);\r\n // }\r\n // //字段权限\r\n // if (res[1] && !!res[1].result && !!res[1].result) {\r\n // fieldRole = res[1].result;\r\n // }\r\n // //获取的表单值\r\n // if (res[2] && !!res[2].result) {\r\n // this.model = Object.assign(this.model, res[2].result);\r\n // }\r\n // //字段Options\r\n // if (res[3] && !!res[3].result) {\r\n // fieldOptions = res[3].result;\r\n // }\r\n // this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => {});\r\n\r\n // this.fields = fieldConfigs;\r\n // setTimeout(() => {\r\n // if (this.options != undefined && this.options != null && this.options?.resetModel) {\r\n // this.options?.resetModel();\r\n // }\r\n // }, 0);\r\n this.loading = false;\r\n });\r\n }\r\n}\r\n","<form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"拼命加载中...\" class=\"deon-list-spin\">\r\n <div class=\"deon-button\" *ngIf=\"config.type!='view'\">\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 <div class=\"deon-from\">\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 </nz-spin>\r\n</form>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormPageComponent } from './default/index';\r\n\r\nconst components: any[] = [FormPageComponent];\r\n@NgModule({\r\n imports: [CommonModule, ...components],\r\n exports: [...components],\r\n})\r\nexport class FormPageModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MAiCa,iBAAiB,CAAA;AAcnB,IAAA,IAAA;AACA,IAAA,WAAA;AACA,IAAA,eAAA;AACA,IAAA,SAAA;AACA,IAAA,GAAA;IAjBT,OAAO,GAAY,IAAI;AACvB,IAAA,IAAI,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC;IACxB,KAAK,GAAQ,EAAE;IACf,OAAO,GAAsB,EAAE;I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AAA,EAAA,CAHf,YAAY,EAAK,UAAU,CAAA,EAAA,CAAA;;4FAG1B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,UAAU,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACzB,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
|
+
import * as i7 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i8 from '@angular/forms';
|
|
6
|
+
import { FormGroup, 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/radio';
|
|
10
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
11
|
+
import * as i10 from 'ng-zorro-antd/spin';
|
|
12
|
+
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
13
|
+
import * as i11 from 'ng-zorro-antd/empty';
|
|
14
|
+
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
15
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
16
|
+
import { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';
|
|
17
|
+
import { GramDeonAntdModule } from '@ebuilding/biz-comm/type';
|
|
18
|
+
import { of, zip } from 'rxjs';
|
|
19
|
+
import * as i1 from '@delon/theme';
|
|
20
|
+
import * as i2 from '@ebuilding/base/shared.srv/deon.util';
|
|
21
|
+
import * as i4 from '@ebuilding/base/shared.srv/global.event';
|
|
22
|
+
import * as i5 from '@ebuilding/base/components/drawer';
|
|
23
|
+
import * as i6 from 'ng-zorro-antd/message';
|
|
24
|
+
|
|
25
|
+
class FormPreviewComponent {
|
|
26
|
+
http;
|
|
27
|
+
utilService;
|
|
28
|
+
deonFormBuilder;
|
|
29
|
+
globalSrv;
|
|
30
|
+
drawerRef;
|
|
31
|
+
msg;
|
|
32
|
+
changeDetector;
|
|
33
|
+
id;
|
|
34
|
+
code;
|
|
35
|
+
loading = true;
|
|
36
|
+
form = new FormGroup({});
|
|
37
|
+
model = {};
|
|
38
|
+
options = {};
|
|
39
|
+
fields = [];
|
|
40
|
+
formData = null;
|
|
41
|
+
radioValue = 'add';
|
|
42
|
+
constructor(http, utilService, deonFormBuilder, globalSrv, drawerRef, msg, changeDetector) {
|
|
43
|
+
this.http = http;
|
|
44
|
+
this.utilService = utilService;
|
|
45
|
+
this.deonFormBuilder = deonFormBuilder;
|
|
46
|
+
this.globalSrv = globalSrv;
|
|
47
|
+
this.drawerRef = drawerRef;
|
|
48
|
+
this.msg = msg;
|
|
49
|
+
this.changeDetector = changeDetector;
|
|
50
|
+
}
|
|
51
|
+
ngOnInit() {
|
|
52
|
+
this.getFieldConfig();
|
|
53
|
+
}
|
|
54
|
+
ngAfterContentChecked() { }
|
|
55
|
+
radioChange(e) {
|
|
56
|
+
this.getFieldConfig();
|
|
57
|
+
}
|
|
58
|
+
getFormField() {
|
|
59
|
+
let apiName = `${ModuleAPI.paas}/apaas/form/getById/${this.id}`;
|
|
60
|
+
return this.http.post(`${apiName}`);
|
|
61
|
+
}
|
|
62
|
+
getFormRole() {
|
|
63
|
+
let apiName = `${ModuleAPI.paas}/apaas/form/role/info`;
|
|
64
|
+
let paras = {
|
|
65
|
+
formCode: this.code,
|
|
66
|
+
type: this.radioValue,
|
|
67
|
+
};
|
|
68
|
+
return this.http.post(`${apiName}`, paras);
|
|
69
|
+
}
|
|
70
|
+
getFromOptions() {
|
|
71
|
+
if (this.id) {
|
|
72
|
+
let apiName = `${ModuleAPI.paas}/apaas/item/listByForm/${this.id}`;
|
|
73
|
+
return this.http.post(`${apiName}`);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return of(null);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
getFieldConfig() {
|
|
80
|
+
this.loading = true;
|
|
81
|
+
new Promise((resolve) => {
|
|
82
|
+
zip(this.getFormField(), this.getFormRole(), this.getFromOptions()).subscribe(([fields, roles, options]) => {
|
|
83
|
+
this.model = {};
|
|
84
|
+
let fieldRole = {};
|
|
85
|
+
let fieldOptions = {};
|
|
86
|
+
let fieldConfigs = [];
|
|
87
|
+
if (fields.result && fields.result.json) {
|
|
88
|
+
fieldConfigs = JSON.parse(fields.result.json);
|
|
89
|
+
}
|
|
90
|
+
//字段权限
|
|
91
|
+
if (roles && roles.result) {
|
|
92
|
+
fieldRole = roles.result;
|
|
93
|
+
}
|
|
94
|
+
//字段Options
|
|
95
|
+
if (options && !!options.result) {
|
|
96
|
+
fieldOptions = options.result;
|
|
97
|
+
}
|
|
98
|
+
//this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => { });
|
|
99
|
+
this.fields = fieldConfigs;
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
if (this.options != undefined && this.options != null && this.options?.resetModel) {
|
|
102
|
+
this.options?.resetModel();
|
|
103
|
+
}
|
|
104
|
+
}, 0);
|
|
105
|
+
this.loading = false;
|
|
106
|
+
}, () => { }, () => {
|
|
107
|
+
resolve();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
// forkJoin([this.getFormField(), this.getFormRole(), this.getFromOptions()]).subscribe((res: any) => {
|
|
111
|
+
// this.model = {};
|
|
112
|
+
// //传入的值
|
|
113
|
+
// if (this.formModel != null && Object.keys(this.formModel).length > 0) {
|
|
114
|
+
// this.model = Object.assign(this.model, this.formModel);
|
|
115
|
+
// }
|
|
116
|
+
// let fieldConfigs:FormlyFieldConfig[] = res[0];
|
|
117
|
+
// let fieldRole: any = {};
|
|
118
|
+
// let fieldOptions: any = {};
|
|
119
|
+
// //传入的值
|
|
120
|
+
// if (this.config?.model != null && Object.keys(this.config?.model).length > 0) {
|
|
121
|
+
// this.model = Object.assign(this.model, this.config?.model);
|
|
122
|
+
// }
|
|
123
|
+
// //字段权限
|
|
124
|
+
// if (res[1] && !!res[1].result && !!res[1].result) {
|
|
125
|
+
// fieldRole = res[1].result;
|
|
126
|
+
// }
|
|
127
|
+
// //字段默认值
|
|
128
|
+
// if (res[2] && !!res[2].result && !!res[2].result.json) {
|
|
129
|
+
// let fieldModel: any = JSON.parse(res[2].result.json);
|
|
130
|
+
// if (fieldModel != null && Object.keys(fieldModel).length > 0) {
|
|
131
|
+
// this.model = Object.assign(this.model, fieldModel);
|
|
132
|
+
// }
|
|
133
|
+
// }
|
|
134
|
+
// //获取的表单值
|
|
135
|
+
// if (res[3] && !!res[3].result) {
|
|
136
|
+
// this.model = Object.assign(this.model, res[3].result);
|
|
137
|
+
// }
|
|
138
|
+
// //字段Options
|
|
139
|
+
// if (res[4] && !!res[4].result) {
|
|
140
|
+
// fieldOptions = res[4].result;
|
|
141
|
+
// }
|
|
142
|
+
// this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => {});
|
|
143
|
+
// this.fields = fieldConfigs;
|
|
144
|
+
// setTimeout(() => {
|
|
145
|
+
// if (this.options != undefined && this.options != null && this.options?.resetModel) {
|
|
146
|
+
// this.options?.resetModel();
|
|
147
|
+
// }
|
|
148
|
+
// }, 0);
|
|
149
|
+
// this.loading = false;
|
|
150
|
+
// });
|
|
151
|
+
}
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewComponent, deps: [{ token: i1._HttpClient }, { token: i2.DeonFormUtilService }, { token: i3.FormlyFormBuilder }, { token: i4.GramGlobalService }, { token: i5.NzDrawerRef }, { token: i6.NzMessageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
153
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FormPreviewComponent, isStandalone: true, selector: "form-preview", inputs: { id: "id", code: "code" }, ngImport: i0, template: "<div class=\"preview-type\">\r\n <nz-radio-group [(ngModel)]=\"radioValue\" nzButtonStyle=\"solid\" (ngModelChange)=\"radioChange($event)\">\r\n <label nz-radio-button nzValue=\"add\">\u65B0\u589E\u8868\u5355</label>\r\n <label nz-radio-button nzValue=\"edit\">\u7F16\u8F91\u8868\u5355</label>\r\n <label nz-radio-button nzValue=\"view\">\u67E5\u770B\u67E5\u770B</label>\r\n </nz-radio-group>\r\n</div>\r\n<form [formGroup]=\"form\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\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 </nz-spin>\r\n</form>", 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}:host ::ng-deep .preview-type{padding:12px 15px;border-bottom:1px solid #eaeaea}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i9.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i9.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i10.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i11.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: GramDeonAntdModule }] });
|
|
154
|
+
}
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewComponent, decorators: [{
|
|
156
|
+
type: Component,
|
|
157
|
+
args: [{ selector: 'form-preview', imports: [
|
|
158
|
+
CommonModule,
|
|
159
|
+
FormsModule,
|
|
160
|
+
ReactiveFormsModule,
|
|
161
|
+
NzRadioModule,
|
|
162
|
+
NzSpinModule,
|
|
163
|
+
NzEmptyModule,
|
|
164
|
+
NzFormModule,
|
|
165
|
+
FormlyModule,
|
|
166
|
+
GramDeonAntdModule
|
|
167
|
+
], template: "<div class=\"preview-type\">\r\n <nz-radio-group [(ngModel)]=\"radioValue\" nzButtonStyle=\"solid\" (ngModelChange)=\"radioChange($event)\">\r\n <label nz-radio-button nzValue=\"add\">\u65B0\u589E\u8868\u5355</label>\r\n <label nz-radio-button nzValue=\"edit\">\u7F16\u8F91\u8868\u5355</label>\r\n <label nz-radio-button nzValue=\"view\">\u67E5\u770B\u67E5\u770B</label>\r\n </nz-radio-group>\r\n</div>\r\n<form [formGroup]=\"form\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\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 </nz-spin>\r\n</form>", 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}:host ::ng-deep .preview-type{padding:12px 15px;border-bottom:1px solid #eaeaea}\n"] }]
|
|
168
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.DeonFormUtilService }, { type: i3.FormlyFormBuilder }, { type: i4.GramGlobalService }, { type: i5.NzDrawerRef }, { type: i6.NzMessageService }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], code: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}] } });
|
|
173
|
+
|
|
174
|
+
class FormPreviewMainComponent {
|
|
175
|
+
http;
|
|
176
|
+
utilService;
|
|
177
|
+
deonFormBuilder;
|
|
178
|
+
globalSrv;
|
|
179
|
+
msg;
|
|
180
|
+
drawerRef;
|
|
181
|
+
loading = true;
|
|
182
|
+
form = new FormGroup({});
|
|
183
|
+
model = {};
|
|
184
|
+
options = {};
|
|
185
|
+
fields = [];
|
|
186
|
+
formData = null;
|
|
187
|
+
_config = null;
|
|
188
|
+
set config(value) {
|
|
189
|
+
this._config = value;
|
|
190
|
+
this.getFieldConfig();
|
|
191
|
+
}
|
|
192
|
+
get config() {
|
|
193
|
+
return this._config;
|
|
194
|
+
}
|
|
195
|
+
buttonEvent = new EventEmitter();
|
|
196
|
+
constructor(http, utilService, deonFormBuilder, globalSrv, msg, drawerRef) {
|
|
197
|
+
this.http = http;
|
|
198
|
+
this.utilService = utilService;
|
|
199
|
+
this.deonFormBuilder = deonFormBuilder;
|
|
200
|
+
this.globalSrv = globalSrv;
|
|
201
|
+
this.msg = msg;
|
|
202
|
+
this.drawerRef = drawerRef;
|
|
203
|
+
}
|
|
204
|
+
ngOnInit() { }
|
|
205
|
+
ngOnChanges(changes) { }
|
|
206
|
+
btnClose() {
|
|
207
|
+
this.drawerRef.close({
|
|
208
|
+
type: 'close',
|
|
209
|
+
data: null,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
save() {
|
|
213
|
+
if (!this.form.valid) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/*
|
|
218
|
+
获取配置-下拉选项
|
|
219
|
+
*/
|
|
220
|
+
getFromOptions() {
|
|
221
|
+
if (this.config.formId) {
|
|
222
|
+
let apiName = `${ModuleAPI.user}/user/sys/item/list/${this.config.formId}`;
|
|
223
|
+
return this.http.post(`${apiName}`);
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
return of(null);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/*
|
|
230
|
+
获取配置-默认字段
|
|
231
|
+
*/
|
|
232
|
+
getFormDefaultField() {
|
|
233
|
+
let apiName = `${ModuleAPI.user}/user/form/design/${this.config.formId}`;
|
|
234
|
+
return this.http.post(`${apiName}`);
|
|
235
|
+
}
|
|
236
|
+
/*
|
|
237
|
+
获取配置-角色
|
|
238
|
+
*/
|
|
239
|
+
getFormDefaultRole() {
|
|
240
|
+
let params = {
|
|
241
|
+
formId: this.config.formId,
|
|
242
|
+
type: this.config.type,
|
|
243
|
+
};
|
|
244
|
+
let apiName = `${ModuleAPI.user}/user/form/role`;
|
|
245
|
+
return this.http.post(`${apiName}`, params);
|
|
246
|
+
}
|
|
247
|
+
getFieldConfig() {
|
|
248
|
+
this.loading = true;
|
|
249
|
+
new Promise((resolve) => {
|
|
250
|
+
zip(this.getFormDefaultField(), this.getFormDefaultRole(), this.getFromOptions()).subscribe(([f, r, o]) => {
|
|
251
|
+
this.model = {};
|
|
252
|
+
let fieldConfigs = JSON.parse(f.result?.basic?.json);
|
|
253
|
+
let fieldRole = {};
|
|
254
|
+
let fieldOptions = {};
|
|
255
|
+
//传入的值
|
|
256
|
+
if (this.config?.model != null && Object.keys(this.config?.model).length > 0) {
|
|
257
|
+
this.model = Object.assign(this.model, this.config?.model);
|
|
258
|
+
}
|
|
259
|
+
//字段Options
|
|
260
|
+
if (o && o.result) {
|
|
261
|
+
fieldOptions = o.result;
|
|
262
|
+
}
|
|
263
|
+
//this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => { });
|
|
264
|
+
this.fields = fieldConfigs;
|
|
265
|
+
setTimeout(() => {
|
|
266
|
+
if (this.options != undefined && this.options != null && this.options?.resetModel) {
|
|
267
|
+
this.options?.resetModel();
|
|
268
|
+
}
|
|
269
|
+
}, 0);
|
|
270
|
+
this.loading = false;
|
|
271
|
+
}, () => { }, () => {
|
|
272
|
+
resolve();
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewMainComponent, deps: [{ token: i1._HttpClient }, { token: i2.DeonFormUtilService }, { token: i3.FormlyFormBuilder }, { token: i4.GramGlobalService }, { token: i6.NzMessageService }, { token: i5.NzDrawerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
277
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FormPreviewMainComponent, isStandalone: true, selector: "form-preview-main", inputs: { config: "config" }, outputs: { buttonEvent: "buttonEvent" }, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\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\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"close\"></i>\u53D6\u6D88</button>\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n </nz-spin>\r\n</form>", 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: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i10.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i11.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: GramDeonAntdModule }] });
|
|
278
|
+
}
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewMainComponent, decorators: [{
|
|
280
|
+
type: Component,
|
|
281
|
+
args: [{ selector: 'form-preview-main', imports: [
|
|
282
|
+
CommonModule,
|
|
283
|
+
FormsModule,
|
|
284
|
+
ReactiveFormsModule,
|
|
285
|
+
NzRadioModule,
|
|
286
|
+
NzSpinModule,
|
|
287
|
+
NzEmptyModule,
|
|
288
|
+
NzFormModule,
|
|
289
|
+
FormlyModule,
|
|
290
|
+
GramDeonAntdModule
|
|
291
|
+
], template: "<form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\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\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"close\"></i>\u53D6\u6D88</button>\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n </nz-spin>\r\n</form>", 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"] }]
|
|
292
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.DeonFormUtilService }, { type: i3.FormlyFormBuilder }, { type: i4.GramGlobalService }, { type: i6.NzMessageService }, { type: i5.NzDrawerRef }], propDecorators: { config: [{
|
|
293
|
+
type: Input
|
|
294
|
+
}], buttonEvent: [{
|
|
295
|
+
type: Output
|
|
296
|
+
}] } });
|
|
297
|
+
|
|
298
|
+
const components = [FormPreviewComponent, FormPreviewMainComponent];
|
|
299
|
+
class FormPreviewModule {
|
|
300
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
301
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewModule, imports: [CommonModule, FormPreviewComponent, FormPreviewMainComponent], exports: [FormPreviewComponent, FormPreviewMainComponent] });
|
|
302
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewModule, imports: [CommonModule, components] });
|
|
303
|
+
}
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FormPreviewModule, decorators: [{
|
|
305
|
+
type: NgModule,
|
|
306
|
+
args: [{
|
|
307
|
+
imports: [CommonModule, ...components],
|
|
308
|
+
exports: [...components],
|
|
309
|
+
}]
|
|
310
|
+
}] });
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Generated bundle index. Do not edit.
|
|
314
|
+
*/
|
|
315
|
+
|
|
316
|
+
export { FormPreviewComponent, FormPreviewMainComponent, FormPreviewModule };
|
|
317
|
+
//# sourceMappingURL=preview.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.mjs","sources":["../../../../packages/biz-form/preview/src/default/index.ts","../../../../packages/biz-form/preview/src/default/index.html","../../../../packages/biz-form/preview/src/main/index.ts","../../../../packages/biz-form/preview/src/main/index.html","../../../../packages/biz-form/preview/src/index.module.ts","../../../../packages/biz-form/preview/preview.ts"],"sourcesContent":["import { Component, OnInit, ChangeDetectorRef, AfterContentChecked, Input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { _HttpClient } from '@delon/theme';\r\nimport { FormlyModule, FormlyFormOptions, FormlyFieldConfig, FormlyFormBuilder } from '@kre-form/core';\r\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\r\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\r\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\r\nimport { NzFormModule } from 'ng-zorro-antd/form';\r\nimport { NzMessageService } from 'ng-zorro-antd/message';\r\n\r\nimport { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';\r\nimport { DeonFormUtilService } from '@ebuilding/base/shared.srv/deon.util';\r\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\r\nimport { NzDrawerRef } from '@ebuilding/base/components/drawer';\r\nimport { GramDeonAntdModule } from '@ebuilding/biz-comm/type';\r\n\r\nimport _ from 'lodash';\r\nimport { of, zip } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'form-preview',\r\n styleUrls: ['./index.less'],\r\n templateUrl: './index.html',\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n NzRadioModule,\r\n NzSpinModule,\r\n NzEmptyModule,\r\n NzFormModule,\r\n FormlyModule,\r\n GramDeonAntdModule\r\n ]\r\n})\r\nexport class FormPreviewComponent implements OnInit, AfterContentChecked {\r\n @Input() id: any;\r\n @Input() code: any;\r\n\r\n loading: boolean = true;\r\n form = new FormGroup({});\r\n model: any = {};\r\n options: FormlyFormOptions = {};\r\n fields: FormlyFieldConfig[] = [];\r\n\r\n formData: any = null;\r\n radioValue: any = 'add';\r\n constructor(\r\n public http: _HttpClient,\r\n public utilService: DeonFormUtilService,\r\n public deonFormBuilder: FormlyFormBuilder,\r\n public globalSrv: GramGlobalService,\r\n public drawerRef: NzDrawerRef<any>,\r\n public msg: NzMessageService,\r\n private changeDetector: ChangeDetectorRef,\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.getFieldConfig();\r\n }\r\n\r\n ngAfterContentChecked(): void { }\r\n\r\n radioChange(e: any) {\r\n this.getFieldConfig();\r\n }\r\n\r\n getFormField() {\r\n let apiName = `${ModuleAPI.paas}/apaas/form/getById/${this.id}`;\r\n return this.http.post(`${apiName}`);\r\n }\r\n getFormRole() {\r\n let apiName = `${ModuleAPI.paas}/apaas/form/role/info`;\r\n let paras: any = {\r\n formCode: this.code,\r\n type: this.radioValue,\r\n };\r\n return this.http.post(`${apiName}`, paras);\r\n }\r\n getFromOptions() {\r\n if (this.id!!) {\r\n let apiName = `${ModuleAPI.paas}/apaas/item/listByForm/${this.id}`;\r\n return this.http.post(`${apiName}`);\r\n } else {\r\n return of(null);\r\n }\r\n }\r\n\r\n getFieldConfig() {\r\n this.loading = true;\r\n new Promise((resolve: any) => {\r\n zip(this.getFormField(), this.getFormRole(), this.getFromOptions()).subscribe(\r\n ([fields, roles, options]) => {\r\n this.model = {};\r\n let fieldRole: any = {};\r\n let fieldOptions: any = {};\r\n\r\n let fieldConfigs: FormlyFieldConfig[] = [];\r\n if (fields.result!! && fields.result.json!!) {\r\n fieldConfigs = JSON.parse(fields.result.json);\r\n }\r\n //字段权限\r\n if (roles!! && roles.result) {\r\n fieldRole = roles.result;\r\n }\r\n //字段Options\r\n if (options!!! && !!options.result) {\r\n fieldOptions = options.result;\r\n }\r\n\r\n //this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => { });\r\n\r\n this.fields = fieldConfigs;\r\n setTimeout(() => {\r\n if (this.options != undefined && this.options != null && this.options?.resetModel) {\r\n this.options?.resetModel();\r\n }\r\n }, 0);\r\n this.loading = false;\r\n },\r\n () => { },\r\n () => {\r\n resolve();\r\n },\r\n );\r\n });\r\n\r\n // forkJoin([this.getFormField(), this.getFormRole(), this.getFromOptions()]).subscribe((res: any) => {\r\n // this.model = {};\r\n // //传入的值\r\n // if (this.formModel != null && Object.keys(this.formModel).length > 0) {\r\n // this.model = Object.assign(this.model, this.formModel);\r\n // }\r\n // let fieldConfigs:FormlyFieldConfig[] = res[0];\r\n // let fieldRole: any = {};\r\n // let fieldOptions: any = {};\r\n // //传入的值\r\n // if (this.config?.model != null && Object.keys(this.config?.model).length > 0) {\r\n // this.model = Object.assign(this.model, this.config?.model);\r\n // }\r\n // //字段权限\r\n // if (res[1] && !!res[1].result && !!res[1].result) {\r\n // fieldRole = res[1].result;\r\n // }\r\n // //字段默认值\r\n // if (res[2] && !!res[2].result && !!res[2].result.json) {\r\n // let fieldModel: any = JSON.parse(res[2].result.json);\r\n // if (fieldModel != null && Object.keys(fieldModel).length > 0) {\r\n // this.model = Object.assign(this.model, fieldModel);\r\n // }\r\n // }\r\n // //获取的表单值\r\n // if (res[3] && !!res[3].result) {\r\n // this.model = Object.assign(this.model, res[3].result);\r\n // }\r\n // //字段Options\r\n // if (res[4] && !!res[4].result) {\r\n // fieldOptions = res[4].result;\r\n // }\r\n\r\n // this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => {});\r\n\r\n // this.fields = fieldConfigs;\r\n // setTimeout(() => {\r\n // if (this.options != undefined && this.options != null && this.options?.resetModel) {\r\n // this.options?.resetModel();\r\n // }\r\n // }, 0);\r\n // this.loading = false;\r\n // });\r\n }\r\n}\r\n","<div class=\"preview-type\">\r\n <nz-radio-group [(ngModel)]=\"radioValue\" nzButtonStyle=\"solid\" (ngModelChange)=\"radioChange($event)\">\r\n <label nz-radio-button nzValue=\"add\">新增表单</label>\r\n <label nz-radio-button nzValue=\"edit\">编辑表单</label>\r\n <label nz-radio-button nzValue=\"view\">查看查看</label>\r\n </nz-radio-group>\r\n</div>\r\n<form [formGroup]=\"form\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"拼命加载中...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\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 </nz-spin>\r\n</form>","import { Component, OnInit, OnChanges, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { _HttpClient } from '@delon/theme';\r\nimport { FormlyModule, FormlyFormOptions, FormlyFieldConfig, FormlyFormBuilder } from '@kre-form/core';\r\n\r\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\r\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\r\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\r\nimport { NzFormModule } from 'ng-zorro-antd/form';\r\nimport { NzMessageService } from 'ng-zorro-antd/message';\r\n\r\nimport { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';\r\nimport { DeonFormUtilService } from '@ebuilding/base/shared.srv/deon.util';\r\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\r\nimport { NzDrawerRef } from '@ebuilding/base/components/drawer';\r\nimport { GramDeonAntdModule } from '@ebuilding/biz-comm/type';\r\n\r\nimport _ from 'lodash';\r\nimport { of, zip } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'form-preview-main',\r\n styleUrls: ['./index.less'],\r\n templateUrl: './index.html',\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n NzRadioModule,\r\n NzSpinModule,\r\n NzEmptyModule,\r\n NzFormModule,\r\n FormlyModule,\r\n GramDeonAntdModule\r\n ]\r\n})\r\nexport class FormPreviewMainComponent implements OnInit, OnChanges {\r\n loading: boolean = true;\r\n form = new FormGroup({});\r\n model: any = {};\r\n options: FormlyFormOptions = {};\r\n fields: FormlyFieldConfig[] = [];\r\n\r\n formData: any = null;\r\n _config: any = null;\r\n\r\n @Input()\r\n set config(value: any) {\r\n this._config = value;\r\n this.getFieldConfig();\r\n }\r\n\r\n get config() {\r\n return this._config;\r\n }\r\n\r\n @Output() buttonEvent: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor(\r\n public http: _HttpClient,\r\n public utilService: DeonFormUtilService,\r\n public deonFormBuilder: FormlyFormBuilder,\r\n public globalSrv: GramGlobalService,\r\n public msg: NzMessageService,\r\n public drawerRef: NzDrawerRef<any>,\r\n ) { }\r\n\r\n ngOnInit() { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void { }\r\n\r\n btnClose() {\r\n this.drawerRef.close({\r\n type: 'close',\r\n data: null,\r\n });\r\n }\r\n\r\n save() {\r\n if (!this.form.valid) {\r\n return;\r\n }\r\n }\r\n\r\n /*\r\n 获取配置-下拉选项\r\n */\r\n getFromOptions() {\r\n if (this.config.formId!!) {\r\n let apiName = `${ModuleAPI.user}/user/sys/item/list/${this.config.formId}`;\r\n return this.http.post(`${apiName}`);\r\n } else {\r\n return of(null);\r\n }\r\n }\r\n\r\n /*\r\n 获取配置-默认字段\r\n */\r\n getFormDefaultField() {\r\n let apiName = `${ModuleAPI.user}/user/form/design/${this.config.formId}`;\r\n return this.http.post(`${apiName}`);\r\n }\r\n\r\n /*\r\n 获取配置-角色\r\n */\r\n getFormDefaultRole() {\r\n let params: any = {\r\n formId: this.config.formId,\r\n type: this.config.type,\r\n };\r\n let apiName = `${ModuleAPI.user}/user/form/role`;\r\n return this.http.post(`${apiName}`, params);\r\n }\r\n\r\n getFieldConfig() {\r\n this.loading = true;\r\n new Promise((resolve: any) => {\r\n zip(this.getFormDefaultField(), this.getFormDefaultRole(), this.getFromOptions()).subscribe(\r\n ([f, r, o]) => {\r\n this.model = {};\r\n\r\n let fieldConfigs: FormlyFieldConfig[] = JSON.parse(f.result?.basic?.json);\r\n let fieldRole: any = {};\r\n let fieldOptions: any = {};\r\n //传入的值\r\n if (this.config?.model != null && Object.keys(this.config?.model).length > 0) {\r\n this.model = Object.assign(this.model, this.config?.model);\r\n }\r\n\r\n //字段Options\r\n if (o!! && o.result!!) {\r\n fieldOptions = o.result;\r\n }\r\n //this.utilService.initFormFieldConfig(fieldConfigs, fieldRole, fieldOptions, this.model, this, (e: any, field: any) => { });\r\n\r\n this.fields = fieldConfigs;\r\n setTimeout(() => {\r\n if (this.options != undefined && this.options != null && this.options?.resetModel) {\r\n this.options?.resetModel();\r\n }\r\n }, 0);\r\n this.loading = false;\r\n },\r\n () => { },\r\n () => {\r\n resolve();\r\n },\r\n );\r\n });\r\n }\r\n}\r\n","<form [formGroup]=\"form\" (ngSubmit)=\"save()\" #defaultForm>\r\n <nz-spin [nzSpinning]=\"loading\" nzTip=\"拼命加载中...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\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\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"close\"></i>取消</button>\r\n <button nz-button nzType=\"primary\" id=\"SAVE\"><i nz-icon nzType=\"save\"></i>保存</button>\r\n </div>\r\n </nz-spin>\r\n</form>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormPreviewComponent } from './default/index';\r\nimport { FormPreviewMainComponent } from './main/index';\r\n\r\nconst components: any[] = [FormPreviewComponent, FormPreviewMainComponent];\r\n@NgModule({\r\n imports: [CommonModule, ...components],\r\n exports: [...components],\r\n})\r\nexport class FormPreviewModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i5","i6","i10"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAoCa,oBAAoB,CAAA;AAatB,IAAA,IAAA;AACA,IAAA,WAAA;AACA,IAAA,eAAA;AACA,IAAA,SAAA;AACA,IAAA,SAAA;AACA,IAAA,GAAA;AACC,IAAA,cAAA;AAlBD,IAAA,EAAE;AACF,IAAA,IAAI;IAEb,OAAO,GAAY,IAAI;AACvB,IAAA,IAAI,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC;IACxB,KAAK,GAAQ,EAAE;IACf,OAAO,GAAsB,EAAE;IAC/B,MAAM,GAAwB,EAAE;IAEhC,QAAQ,GAAQ,IAAI;IACpB,UAAU,GAAQ,KAAK;AACvB,IAAA,WAAA,CACS,IAAiB,EACjB,WAAgC,EAChC,eAAkC,EAClC,SAA4B,EAC5B,SAA2B,EAC3B,GAAqB,EACpB,cAAiC,EAAA;QANlC,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAe,CAAA,eAAA,GAAf,eAAe;QACf,IAAS,CAAA,SAAA,GAAT,SAAS;QACT,IAAS,CAAA,SAAA,GA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