@ebuilding/biz-comm 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/components/filter/index.d.ts +1 -0
- package/components/filter/src/compare-filter/index.d.ts +44 -0
- package/components/filter/src/default/index.d.ts +41 -0
- package/components/filter/src/index.module.d.ts +8 -0
- package/components/filter/src/public_api.d.ts +3 -0
- package/components/lookup/index.d.ts +1 -0
- package/components/lookup/src/default/index.d.ts +28 -0
- package/components/lookup/src/index.module.d.ts +8 -0
- package/components/lookup/src/public_api.d.ts +2 -0
- package/fesm2022/components.filter.mjs +411 -0
- package/fesm2022/components.filter.mjs.map +1 -0
- package/fesm2022/components.lookup.mjs +161 -0
- package/fesm2022/components.lookup.mjs.map +1 -0
- package/fesm2022/ebuilding-biz-comm.mjs +7 -0
- package/fesm2022/ebuilding-biz-comm.mjs.map +1 -0
- package/fesm2022/other.card.mjs +419 -0
- package/fesm2022/other.card.mjs.map +1 -0
- package/fesm2022/other.control.mjs +176 -0
- package/fesm2022/other.control.mjs.map +1 -0
- package/fesm2022/other.dict.mjs +1181 -0
- package/fesm2022/other.dict.mjs.map +1 -0
- package/fesm2022/other.formula.mjs +558 -0
- package/fesm2022/other.formula.mjs.map +1 -0
- package/fesm2022/other.rule.mjs +735 -0
- package/fesm2022/other.rule.mjs.map +1 -0
- package/fesm2022/other.source.args.mjs +290 -0
- package/fesm2022/other.source.args.mjs.map +1 -0
- package/fesm2022/other.source.field-map.mjs +245 -0
- package/fesm2022/other.source.field-map.mjs.map +1 -0
- package/fesm2022/other.source.filter.mjs +295 -0
- package/fesm2022/other.source.filter.mjs.map +1 -0
- package/fesm2022/other.source.group.mjs +219 -0
- package/fesm2022/other.source.group.mjs.map +1 -0
- package/fesm2022/other.source.mjs +1485 -0
- package/fesm2022/other.source.mjs.map +1 -0
- package/fesm2022/other.source.order.mjs +243 -0
- package/fesm2022/other.source.order.mjs.map +1 -0
- package/fesm2022/other.source.table.mjs +326 -0
- package/fesm2022/other.source.table.mjs.map +1 -0
- package/fesm2022/other.tree.mjs +441 -0
- package/fesm2022/other.tree.mjs.map +1 -0
- package/fesm2022/type.formula.mjs +133 -0
- package/fesm2022/type.formula.mjs.map +1 -0
- package/fesm2022/type.lookup.mjs +256 -0
- package/fesm2022/type.lookup.mjs.map +1 -0
- package/fesm2022/type.mjs +674 -0
- package/fesm2022/type.mjs.map +1 -0
- package/fesm2022/type.tree.mjs +225 -0
- package/fesm2022/type.tree.mjs.map +1 -0
- package/index.d.ts +2 -0
- package/other/card/index.d.ts +1 -0
- package/other/card/src/card-user/index.d.ts +31 -0
- package/other/card/src/card.service.d.ts +28 -0
- package/other/card/src/components/emp/index.d.ts +13 -0
- package/other/card/src/default/index.d.ts +48 -0
- package/other/card/src/index.module.d.ts +9 -0
- package/other/card/src/public_api.d.ts +3 -0
- package/other/control/index.d.ts +1 -0
- package/other/control/src/dict/index.d.ts +26 -0
- package/other/control/src/index.module.d.ts +7 -0
- package/other/control/src/public_api.d.ts +2 -0
- package/other/dict/index.d.ts +1 -0
- package/other/dict/src/field/index.d.ts +45 -0
- package/other/dict/src/field-info/index.d.ts +38 -0
- package/other/dict/src/field-read/index.d.ts +26 -0
- package/other/dict/src/index.module.d.ts +9 -0
- package/other/dict/src/public_api.d.ts +4 -0
- package/other/formula/index.d.ts +1 -0
- package/other/formula/src/default/index.d.ts +33 -0
- package/other/formula/src/form-item/index.d.ts +32 -0
- package/other/formula/src/form-setting/index.d.ts +32 -0
- package/other/formula/src/formula.service.d.ts +20 -0
- package/other/formula/src/index.module.d.ts +10 -0
- package/other/formula/src/public_api.d.ts +5 -0
- package/other/formula/src/rule-event/index.d.ts +23 -0
- package/other/rule/index.d.ts +1 -0
- package/other/rule/src/index.module.d.ts +16 -0
- package/other/rule/src/main/index.component.d.ts +34 -0
- package/other/rule/src/public_api.d.ts +2 -0
- package/other/rule/src/rule-change/index.component.d.ts +9 -0
- package/other/rule/src/rule-change-boolean/index.component.d.ts +13 -0
- package/other/rule/src/rule-change-date/index.component.d.ts +13 -0
- package/other/rule/src/rule-change-item/index.component.d.ts +13 -0
- package/other/rule/src/rule-change-number/index.component.d.ts +13 -0
- package/other/rule/src/rule-change-ref/index.component.d.ts +19 -0
- package/other/rule/src/rule-change-text/index.component.d.ts +13 -0
- package/other/rule/src/rule-change-upload/index.component.d.ts +11 -0
- package/other/rule/src/rule-fixed/index.component.d.ts +13 -0
- package/other/rule/src/service/config.service.d.ts +43 -0
- package/other/rule/src/service/rule.service.d.ts +11 -0
- package/other/source/args/index.d.ts +1 -0
- package/other/source/args/src/basic.d.ts +49 -0
- package/other/source/args/src/default/index.d.ts +24 -0
- package/other/source/args/src/index.module.d.ts +7 -0
- package/other/source/args/src/public_api.d.ts +2 -0
- package/other/source/field-map/index.d.ts +1 -0
- package/other/source/field-map/src/basic.d.ts +39 -0
- package/other/source/field-map/src/default/index.d.ts +26 -0
- package/other/source/field-map/src/index.module.d.ts +7 -0
- package/other/source/field-map/src/public_api.d.ts +2 -0
- package/other/source/filter/index.d.ts +1 -0
- package/other/source/filter/src/basic.d.ts +45 -0
- package/other/source/filter/src/default/index.d.ts +26 -0
- package/other/source/filter/src/index.module.d.ts +8 -0
- package/other/source/filter/src/public_api.d.ts +3 -0
- package/other/source/filter/src/second/index.d.ts +30 -0
- package/other/source/group/index.d.ts +1 -0
- package/other/source/group/src/basic.d.ts +32 -0
- package/other/source/group/src/default/index.d.ts +26 -0
- package/other/source/group/src/index.module.d.ts +7 -0
- package/other/source/group/src/public_api.d.ts +2 -0
- package/other/source/index.d.ts +6 -0
- package/other/source/order/index.d.ts +1 -0
- package/other/source/order/src/basic.d.ts +39 -0
- package/other/source/order/src/default/index.d.ts +26 -0
- package/other/source/order/src/index.module.d.ts +7 -0
- package/other/source/order/src/public_api.d.ts +2 -0
- package/other/source/table/index.d.ts +1 -0
- package/other/source/table/src/basic.d.ts +62 -0
- package/other/source/table/src/default/index.d.ts +26 -0
- package/other/source/table/src/index.module.d.ts +7 -0
- package/other/source/table/src/public_api.d.ts +2 -0
- package/other/tree/index.d.ts +1 -0
- package/other/tree/src/components/form/index.d.ts +17 -0
- package/other/tree/src/components/tree/index.d.ts +19 -0
- package/other/tree/src/default/index.d.ts +18 -0
- package/other/tree/src/index.module.d.ts +9 -0
- package/other/tree/src/public_api.d.ts +4 -0
- package/other/tree/src/treeService.d.ts +59 -0
- package/package.json +96 -0
- package/type/formula/index.d.ts +1 -0
- package/type/formula/src/default/index.d.ts +19 -0
- package/type/formula/src/index.module.d.ts +8 -0
- package/type/formula/src/public_api.d.ts +2 -0
- package/type/index.d.ts +1 -0
- package/type/index.module.d.ts +11 -0
- package/type/lookup/index.d.ts +1 -0
- package/type/lookup/src/default/index.d.ts +31 -0
- package/type/lookup/src/index.module.d.ts +8 -0
- package/type/lookup/src/public_api.d.ts +2 -0
- package/type/tree/index.d.ts +1 -0
- package/type/tree/src/default/index.d.ts +31 -0
- package/type/tree/src/index.module.d.ts +8 -0
- package/type/tree/src/public_api.d.ts +2 -0
|
@@ -0,0 +1,1485 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Input, Directive, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i5 from '@angular/forms';
|
|
6
|
+
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i6 from '@kre-form/core';
|
|
8
|
+
import { FormlyModule } from '@kre-form/core';
|
|
9
|
+
import * as i7 from 'ng-zorro-antd/spin';
|
|
10
|
+
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
11
|
+
import * as i8 from 'ng-zorro-antd/empty';
|
|
12
|
+
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
13
|
+
import * as i9 from 'ng-zorro-antd/button';
|
|
14
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
15
|
+
import { GlobalVariable, GlobalUseToPage, CompareConditions } from '@ebuilding/base/shared.util/static';
|
|
16
|
+
import { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';
|
|
17
|
+
import { zip } from 'rxjs';
|
|
18
|
+
import * as i1 from '@delon/theme';
|
|
19
|
+
import * as i2 from 'ng-zorro-antd/message';
|
|
20
|
+
import * as i3 from 'ng-zorro-antd/modal';
|
|
21
|
+
import * as i3$1 from '@ebuilding/base/components/drawer';
|
|
22
|
+
import * as i10 from 'ng-zorro-antd/core/transition-patch';
|
|
23
|
+
import * as i11 from 'ng-zorro-antd/core/wave';
|
|
24
|
+
import * as i8$1 from '@ebuilding/biz-comm/components/filter';
|
|
25
|
+
import { GramDeonFilterModule } from '@ebuilding/biz-comm/components/filter';
|
|
26
|
+
import _ from 'lodash';
|
|
27
|
+
import { GramDeonAntdModule } from '@ebuilding/biz-comm/type';
|
|
28
|
+
import * as i11$1 from 'ng-zorro-antd/checkbox';
|
|
29
|
+
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
30
|
+
import * as i12 from 'ng-zorro-antd/select';
|
|
31
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
32
|
+
import * as i13 from 'ng-zorro-antd/table';
|
|
33
|
+
import { NzTableModule } from 'ng-zorro-antd/table';
|
|
34
|
+
import * as i15 from '@ebuilding/abc/empty';
|
|
35
|
+
import { GramDeonEmptyModule } from '@ebuilding/abc/empty';
|
|
36
|
+
import * as i14 from '@ebuilding/biz-comm/components/lookup';
|
|
37
|
+
import { GramDeonLookUpModule } from '@ebuilding/biz-comm/components/lookup';
|
|
38
|
+
|
|
39
|
+
let BasicService$5 = class BasicService {
|
|
40
|
+
http;
|
|
41
|
+
msgSrv;
|
|
42
|
+
modal;
|
|
43
|
+
_config = null;
|
|
44
|
+
loading = true;
|
|
45
|
+
form = new FormGroup({});
|
|
46
|
+
model = {};
|
|
47
|
+
options = {};
|
|
48
|
+
fields = [];
|
|
49
|
+
tableFieldData = [];
|
|
50
|
+
/**
|
|
51
|
+
* Api Address
|
|
52
|
+
*/
|
|
53
|
+
getApi = null;
|
|
54
|
+
saveApi = null;
|
|
55
|
+
sourceApi = null;
|
|
56
|
+
set config(value) {
|
|
57
|
+
this._config = value;
|
|
58
|
+
this.initParameter();
|
|
59
|
+
this.getPageData();
|
|
60
|
+
}
|
|
61
|
+
get config() {
|
|
62
|
+
return this._config;
|
|
63
|
+
}
|
|
64
|
+
btnCloseEvent = new EventEmitter();
|
|
65
|
+
btnSaveEvent = new EventEmitter();
|
|
66
|
+
pageLoadAfter = new EventEmitter();
|
|
67
|
+
constructor(http, msgSrv, modal) {
|
|
68
|
+
this.http = http;
|
|
69
|
+
this.msgSrv = msgSrv;
|
|
70
|
+
this.modal = modal;
|
|
71
|
+
}
|
|
72
|
+
initParameter() {
|
|
73
|
+
this.getApi = `${ModuleAPI.paas}/apaas/args/listBySource`;
|
|
74
|
+
this.saveApi = `${ModuleAPI.paas}/apaas/args/saveData`;
|
|
75
|
+
this.sourceApi = `${ModuleAPI.paas}/apaas/table/field/listBySource`;
|
|
76
|
+
if (this.config?.getAPI) {
|
|
77
|
+
this.getApi = this.config.getAPI;
|
|
78
|
+
}
|
|
79
|
+
if (this.config?.saveAPI) {
|
|
80
|
+
this.saveApi = this.config.saveAPI;
|
|
81
|
+
}
|
|
82
|
+
if (this.config?.sourceAPI) {
|
|
83
|
+
this.sourceApi = this.config.sourceAPI;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 取消-关闭
|
|
88
|
+
*/
|
|
89
|
+
btnClose() {
|
|
90
|
+
this.btnCloseEvent.emit({
|
|
91
|
+
type: 'close',
|
|
92
|
+
data: null,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
btnSaveAfter() {
|
|
96
|
+
this.btnSaveEvent.emit({
|
|
97
|
+
type: 'save',
|
|
98
|
+
data: null,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* 获取页面数据
|
|
103
|
+
*/
|
|
104
|
+
getPageData() {
|
|
105
|
+
this.loading = true;
|
|
106
|
+
let argPostData = {
|
|
107
|
+
sourceId: this.config.sourceId,
|
|
108
|
+
sourceType: this.config.sourceType,
|
|
109
|
+
};
|
|
110
|
+
if (this.config?.argType) {
|
|
111
|
+
argPostData['argType'] = this.config.argType;
|
|
112
|
+
}
|
|
113
|
+
if (this.config?.secondType) {
|
|
114
|
+
argPostData['secondType'] = this.config.secondType;
|
|
115
|
+
}
|
|
116
|
+
let fieldPostData = {
|
|
117
|
+
sourceId: this.config.sourceTable.sourceId,
|
|
118
|
+
sourceType: this.config.sourceTable.sourceType,
|
|
119
|
+
};
|
|
120
|
+
new Promise((resolve) => {
|
|
121
|
+
zip(this.http.post(this.sourceApi, fieldPostData), this.http.post(this.getApi, argPostData)).subscribe(([a, b]) => {
|
|
122
|
+
if (a && a.success && a.result && Array.isArray(a.result)) {
|
|
123
|
+
this.tableFieldData = a.result.map((item) => {
|
|
124
|
+
return {
|
|
125
|
+
value: item.id,
|
|
126
|
+
label: item.tableName + ' - ' + item.name,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (b && b.success && b.result) {
|
|
131
|
+
this.model['listArg'] = b.result;
|
|
132
|
+
}
|
|
133
|
+
this.getFieldConfig();
|
|
134
|
+
this.pageLoadAfter.emit();
|
|
135
|
+
this.loading = false;
|
|
136
|
+
}, () => { }, () => {
|
|
137
|
+
resolve();
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* 保存
|
|
143
|
+
* @returns
|
|
144
|
+
*/
|
|
145
|
+
saveData() {
|
|
146
|
+
if (!this.form.valid) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.loading = true;
|
|
150
|
+
let argPostData = {
|
|
151
|
+
sourceId: this.config.sourceId,
|
|
152
|
+
sourceType: this.config.sourceType,
|
|
153
|
+
};
|
|
154
|
+
if (this.config?.argType) {
|
|
155
|
+
argPostData['argType'] = this.config.argType;
|
|
156
|
+
}
|
|
157
|
+
if (this.config?.secondType) {
|
|
158
|
+
argPostData['secondType'] = this.config.secondType;
|
|
159
|
+
}
|
|
160
|
+
argPostData['listField'] = this.model?.listArg ? this.model?.listArg : [];
|
|
161
|
+
this.http.post(this.saveApi, argPostData).subscribe((res) => {
|
|
162
|
+
if (res.success) {
|
|
163
|
+
this.msgSrv.success('保存成功!');
|
|
164
|
+
this.btnSaveAfter();
|
|
165
|
+
}
|
|
166
|
+
this.loading = false;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
getFieldConfig() {
|
|
170
|
+
let config = [
|
|
171
|
+
{
|
|
172
|
+
type: 'repeat',
|
|
173
|
+
key: 'listArg',
|
|
174
|
+
props: {},
|
|
175
|
+
fieldArray: {
|
|
176
|
+
fieldGroup: [
|
|
177
|
+
{
|
|
178
|
+
type: 'select',
|
|
179
|
+
key: 'argName',
|
|
180
|
+
props: {
|
|
181
|
+
label: '全局参数',
|
|
182
|
+
required: true,
|
|
183
|
+
options: GlobalVariable(),
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
type: 'select',
|
|
188
|
+
key: 'argUseTo',
|
|
189
|
+
props: {
|
|
190
|
+
required: true,
|
|
191
|
+
label: '参数使用场景',
|
|
192
|
+
options: GlobalUseToPage(),
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
type: 'select',
|
|
197
|
+
key: 'argConditions',
|
|
198
|
+
props: {
|
|
199
|
+
label: '条件规则',
|
|
200
|
+
options: CompareConditions(),
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
type: 'select',
|
|
205
|
+
key: 'argFieldId',
|
|
206
|
+
props: {
|
|
207
|
+
label: '匹配列表字段',
|
|
208
|
+
options: this.tableFieldData,
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
type: 'checkbox',
|
|
213
|
+
key: 'required',
|
|
214
|
+
props: {
|
|
215
|
+
label: '是否必须映射',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
];
|
|
222
|
+
this.fields = config;
|
|
223
|
+
}
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3.NzModalService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
225
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: BasicService, isStandalone: true, inputs: { config: "config" }, outputs: { btnCloseEvent: "btnCloseEvent", btnSaveEvent: "btnSaveEvent", pageLoadAfter: "pageLoadAfter" }, ngImport: i0 });
|
|
226
|
+
};
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService$5, decorators: [{
|
|
228
|
+
type: Directive
|
|
229
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3.NzModalService }], propDecorators: { config: [{
|
|
230
|
+
type: Input
|
|
231
|
+
}], btnCloseEvent: [{
|
|
232
|
+
type: Output
|
|
233
|
+
}], btnSaveEvent: [{
|
|
234
|
+
type: Output
|
|
235
|
+
}], pageLoadAfter: [{
|
|
236
|
+
type: Output
|
|
237
|
+
}] } });
|
|
238
|
+
|
|
239
|
+
class SourceArgsMainComponent extends BasicService$5 {
|
|
240
|
+
http;
|
|
241
|
+
drawerRef;
|
|
242
|
+
msgSrv;
|
|
243
|
+
modal;
|
|
244
|
+
constructor(http, drawerRef, msgSrv, modal) {
|
|
245
|
+
super(http, msgSrv, modal);
|
|
246
|
+
this.http = http;
|
|
247
|
+
this.drawerRef = drawerRef;
|
|
248
|
+
this.msgSrv = msgSrv;
|
|
249
|
+
this.modal = modal;
|
|
250
|
+
}
|
|
251
|
+
ngOnInit() { }
|
|
252
|
+
ngOnDestroy() { }
|
|
253
|
+
ngOnChanges(changes) { }
|
|
254
|
+
btnSaveAfter() {
|
|
255
|
+
this.drawerRef.close({
|
|
256
|
+
type: 'save',
|
|
257
|
+
data: null,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* 取消
|
|
262
|
+
*/
|
|
263
|
+
btnClose() {
|
|
264
|
+
this.drawerRef.close({
|
|
265
|
+
type: 'close',
|
|
266
|
+
data: null,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceArgsMainComponent, deps: [{ token: i1._HttpClient }, { token: i3$1.NzDrawerRef }, { token: i2.NzMessageService }, { token: i3.NzModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
270
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SourceArgsMainComponent, isStandalone: true, selector: "source-arg", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"saveData()\" #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}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i6.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i7.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i8.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i9.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i10.ɵ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: i11.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] });
|
|
271
|
+
}
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceArgsMainComponent, decorators: [{
|
|
273
|
+
type: Component,
|
|
274
|
+
args: [{ selector: 'source-arg', imports: [
|
|
275
|
+
CommonModule,
|
|
276
|
+
FormsModule,
|
|
277
|
+
ReactiveFormsModule,
|
|
278
|
+
FormlyModule,
|
|
279
|
+
NzSpinModule,
|
|
280
|
+
NzEmptyModule,
|
|
281
|
+
NzButtonModule
|
|
282
|
+
], template: "<form [formGroup]=\"form\" (ngSubmit)=\"saveData()\" #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}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"] }]
|
|
283
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i3$1.NzDrawerRef }, { type: i2.NzMessageService }, { type: i3.NzModalService }] });
|
|
284
|
+
|
|
285
|
+
const components$5 = [SourceArgsMainComponent];
|
|
286
|
+
class SourceArgsModule {
|
|
287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceArgsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
288
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: SourceArgsModule, imports: [SourceArgsMainComponent], exports: [SourceArgsMainComponent] });
|
|
289
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceArgsModule, imports: [components$5] });
|
|
290
|
+
}
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceArgsModule, decorators: [{
|
|
292
|
+
type: NgModule,
|
|
293
|
+
args: [{
|
|
294
|
+
imports: [...components$5],
|
|
295
|
+
exports: [...components$5]
|
|
296
|
+
}]
|
|
297
|
+
}] });
|
|
298
|
+
|
|
299
|
+
let BasicService$4 = class BasicService {
|
|
300
|
+
http;
|
|
301
|
+
msgSrv;
|
|
302
|
+
_config = null;
|
|
303
|
+
loading = false;
|
|
304
|
+
form = new FormGroup({});
|
|
305
|
+
model = {};
|
|
306
|
+
options = {};
|
|
307
|
+
fields = [];
|
|
308
|
+
tableFieldData = [];
|
|
309
|
+
/**
|
|
310
|
+
* Api Address
|
|
311
|
+
*/
|
|
312
|
+
getApi = null;
|
|
313
|
+
saveApi = null;
|
|
314
|
+
sourceApi = null;
|
|
315
|
+
set config(value) {
|
|
316
|
+
this._config = value;
|
|
317
|
+
this.initParameter();
|
|
318
|
+
this.getPageData();
|
|
319
|
+
}
|
|
320
|
+
get config() {
|
|
321
|
+
return this._config;
|
|
322
|
+
}
|
|
323
|
+
btnCloseEvent = new EventEmitter();
|
|
324
|
+
btnSaveEvent = new EventEmitter();
|
|
325
|
+
constructor(http, msgSrv) {
|
|
326
|
+
this.http = http;
|
|
327
|
+
this.msgSrv = msgSrv;
|
|
328
|
+
}
|
|
329
|
+
initParameter() {
|
|
330
|
+
this.getApi = `${ModuleAPI.paas}/apaas/source/fieldMap/getDataInfo`;
|
|
331
|
+
this.saveApi = `${ModuleAPI.paas}/apaas/source/fieldMap/saveData`;
|
|
332
|
+
this.sourceApi = `${ModuleAPI.paas}/apaas/table/field/listBySourceMaster`;
|
|
333
|
+
if (this.config?.getAPI) {
|
|
334
|
+
this.getApi = this.config.getAPI;
|
|
335
|
+
}
|
|
336
|
+
if (this.config?.saveAPI) {
|
|
337
|
+
this.saveApi = this.config.saveAPI;
|
|
338
|
+
}
|
|
339
|
+
if (this.config?.sourceAPI) {
|
|
340
|
+
this.sourceApi = this.config.sourceAPI;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
getPageData() {
|
|
344
|
+
new Promise((resolve) => {
|
|
345
|
+
zip(this.http.post(this.sourceApi, {
|
|
346
|
+
sourceId: this.config.sourceId,
|
|
347
|
+
sourceType: this.config.sourceType,
|
|
348
|
+
}), this.http.post(this.getApi, {
|
|
349
|
+
sourceId: this.config.sourceId,
|
|
350
|
+
sourceType: this.config.sourceType,
|
|
351
|
+
})).subscribe(([a, b]) => {
|
|
352
|
+
if (a.success && a.result && Array.isArray(a.result)) {
|
|
353
|
+
this.tableFieldData = a.result
|
|
354
|
+
.filter((item) => {
|
|
355
|
+
return item?.type == 'TEXT' || item?.type == 'REF';
|
|
356
|
+
})
|
|
357
|
+
.map((item) => {
|
|
358
|
+
return {
|
|
359
|
+
value: item.id,
|
|
360
|
+
label: item.tableName + ' - ' + item.name,
|
|
361
|
+
};
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
if (b.success && b.result) {
|
|
365
|
+
let arr = [];
|
|
366
|
+
b.result.forEach((item) => {
|
|
367
|
+
arr.push({ fieldId: item?.fieldId });
|
|
368
|
+
});
|
|
369
|
+
this.model['listEmpField'] = arr;
|
|
370
|
+
}
|
|
371
|
+
this.getFieldConfig();
|
|
372
|
+
this.loading = false;
|
|
373
|
+
}, () => { }, () => {
|
|
374
|
+
resolve();
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
getFieldConfig() {
|
|
379
|
+
let config = [
|
|
380
|
+
{
|
|
381
|
+
type: 'repeat',
|
|
382
|
+
key: 'listEmpField',
|
|
383
|
+
props: {},
|
|
384
|
+
fieldArray: {
|
|
385
|
+
fieldGroup: [
|
|
386
|
+
{
|
|
387
|
+
type: 'select',
|
|
388
|
+
key: 'fieldId',
|
|
389
|
+
props: {
|
|
390
|
+
label: '表字段',
|
|
391
|
+
options: this.tableFieldData,
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
],
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
];
|
|
398
|
+
this.fields = config;
|
|
399
|
+
}
|
|
400
|
+
btnSave() {
|
|
401
|
+
let arr = [];
|
|
402
|
+
if (this.model && this.model.listEmpField && Array.isArray(this.model.listEmpField)) {
|
|
403
|
+
this.model.listEmpField.forEach((item) => {
|
|
404
|
+
if (item?.fieldId) {
|
|
405
|
+
arr.push(item.fieldId);
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
this.loading = true;
|
|
410
|
+
this.http
|
|
411
|
+
.post(this.saveApi, {
|
|
412
|
+
sourceId: this.config.sourceId,
|
|
413
|
+
sourceType: this.config.sourceType,
|
|
414
|
+
listField: arr,
|
|
415
|
+
})
|
|
416
|
+
.subscribe((res) => {
|
|
417
|
+
if (res.success) {
|
|
418
|
+
this.msgSrv.success('保存成功!');
|
|
419
|
+
this.btnSaveAfter(this.model);
|
|
420
|
+
}
|
|
421
|
+
this.loading = false;
|
|
422
|
+
}, () => {
|
|
423
|
+
this.loading = false;
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* 取消-关闭
|
|
428
|
+
*/
|
|
429
|
+
btnClose() {
|
|
430
|
+
this.btnCloseEvent.emit({
|
|
431
|
+
type: 'close',
|
|
432
|
+
data: null,
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
btnSaveAfter(e) {
|
|
436
|
+
this.btnSaveEvent.emit({
|
|
437
|
+
type: 'save',
|
|
438
|
+
data: e,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
442
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: BasicService, isStandalone: true, inputs: { config: "config" }, outputs: { btnCloseEvent: "btnCloseEvent", btnSaveEvent: "btnSaveEvent" }, ngImport: i0 });
|
|
443
|
+
};
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService$4, decorators: [{
|
|
445
|
+
type: Directive
|
|
446
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }], propDecorators: { config: [{
|
|
447
|
+
type: Input
|
|
448
|
+
}], btnCloseEvent: [{
|
|
449
|
+
type: Output
|
|
450
|
+
}], btnSaveEvent: [{
|
|
451
|
+
type: Output
|
|
452
|
+
}] } });
|
|
453
|
+
|
|
454
|
+
class SourceFieldMapMainComponent extends BasicService$4 {
|
|
455
|
+
http;
|
|
456
|
+
msgSrv;
|
|
457
|
+
drawerRef;
|
|
458
|
+
constructor(http, msgSrv, drawerRef) {
|
|
459
|
+
super(http, msgSrv);
|
|
460
|
+
this.http = http;
|
|
461
|
+
this.msgSrv = msgSrv;
|
|
462
|
+
this.drawerRef = drawerRef;
|
|
463
|
+
}
|
|
464
|
+
ngOnInit() { }
|
|
465
|
+
ngOnDestroy() { }
|
|
466
|
+
ngOnChanges(changes) { }
|
|
467
|
+
/**
|
|
468
|
+
* 保存
|
|
469
|
+
* @param e
|
|
470
|
+
*/
|
|
471
|
+
btnSaveAfter(e) {
|
|
472
|
+
this.drawerRef.close({
|
|
473
|
+
type: 'save',
|
|
474
|
+
data: e,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* 取消
|
|
479
|
+
*/
|
|
480
|
+
btnClose() {
|
|
481
|
+
this.drawerRef.close({
|
|
482
|
+
type: 'close',
|
|
483
|
+
data: null,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFieldMapMainComponent, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3$1.NzDrawerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SourceFieldMapMainComponent, isStandalone: true, selector: "source-field-map", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"btnSave()\" #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%}:host ::ng-deep .deon-from{padding:5px 20px 15px!important}:host ::ng-deep form{flex:1;overflow:auto}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i6.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i7.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i8.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i9.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i10.ɵ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: i11.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] });
|
|
488
|
+
}
|
|
489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFieldMapMainComponent, decorators: [{
|
|
490
|
+
type: Component,
|
|
491
|
+
args: [{ selector: 'source-field-map', imports: [
|
|
492
|
+
CommonModule,
|
|
493
|
+
FormsModule,
|
|
494
|
+
ReactiveFormsModule,
|
|
495
|
+
FormlyModule,
|
|
496
|
+
NzSpinModule,
|
|
497
|
+
NzEmptyModule,
|
|
498
|
+
NzButtonModule
|
|
499
|
+
], template: "<form [formGroup]=\"form\" (ngSubmit)=\"btnSave()\" #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%}:host ::ng-deep .deon-from{padding:5px 20px 15px!important}:host ::ng-deep form{flex:1;overflow:auto}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"] }]
|
|
500
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3$1.NzDrawerRef }] });
|
|
501
|
+
|
|
502
|
+
const components$4 = [SourceFieldMapMainComponent];
|
|
503
|
+
class SourceFieldMapModule {
|
|
504
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFieldMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
505
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: SourceFieldMapModule, imports: [SourceFieldMapMainComponent], exports: [SourceFieldMapMainComponent] });
|
|
506
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFieldMapModule, imports: [components$4] });
|
|
507
|
+
}
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFieldMapModule, decorators: [{
|
|
509
|
+
type: NgModule,
|
|
510
|
+
args: [{
|
|
511
|
+
imports: [...components$4],
|
|
512
|
+
exports: [...components$4]
|
|
513
|
+
}]
|
|
514
|
+
}] });
|
|
515
|
+
|
|
516
|
+
let BasicService$3 = class BasicService {
|
|
517
|
+
http;
|
|
518
|
+
msgSrv;
|
|
519
|
+
_config = null;
|
|
520
|
+
loading = false;
|
|
521
|
+
tableData = [];
|
|
522
|
+
filterData = [];
|
|
523
|
+
filterConfig = {};
|
|
524
|
+
/**
|
|
525
|
+
* 参数
|
|
526
|
+
*/
|
|
527
|
+
paraGet = {};
|
|
528
|
+
paraSave = {};
|
|
529
|
+
/**
|
|
530
|
+
* Api Address
|
|
531
|
+
*/
|
|
532
|
+
getApi = null;
|
|
533
|
+
saveApi = null;
|
|
534
|
+
sourceApi = null;
|
|
535
|
+
set config(value) {
|
|
536
|
+
this._config = value;
|
|
537
|
+
this.initParameter();
|
|
538
|
+
this.getPageData();
|
|
539
|
+
}
|
|
540
|
+
get config() {
|
|
541
|
+
return this._config;
|
|
542
|
+
}
|
|
543
|
+
btnCloseEvent = new EventEmitter();
|
|
544
|
+
btnSaveEvent = new EventEmitter();
|
|
545
|
+
constructor(http, msgSrv) {
|
|
546
|
+
this.http = http;
|
|
547
|
+
this.msgSrv = msgSrv;
|
|
548
|
+
}
|
|
549
|
+
ngOnInit() { }
|
|
550
|
+
ngOnDestroy() { }
|
|
551
|
+
/**
|
|
552
|
+
* 参数
|
|
553
|
+
*/
|
|
554
|
+
initParameter() {
|
|
555
|
+
this.getApi = `${ModuleAPI.paas}/apaas/source/filter/getDataInfo`;
|
|
556
|
+
this.saveApi = `${ModuleAPI.paas}/apaas/source/filter/saveData`;
|
|
557
|
+
this.sourceApi = `${ModuleAPI.paas}/apaas/table/listBySource`;
|
|
558
|
+
this.paraGet = {
|
|
559
|
+
sourceId: this.config.sourceId,
|
|
560
|
+
sourceType: this.config.sourceType,
|
|
561
|
+
};
|
|
562
|
+
this.paraSave = {
|
|
563
|
+
sourceId: this.config.sourceId,
|
|
564
|
+
sourceType: this.config.sourceType,
|
|
565
|
+
listFilter: [],
|
|
566
|
+
};
|
|
567
|
+
if (this.config?.getAPI) {
|
|
568
|
+
this.getApi = this.config.getAPI;
|
|
569
|
+
}
|
|
570
|
+
if (this.config?.saveAPI) {
|
|
571
|
+
this.saveApi = this.config.saveAPI;
|
|
572
|
+
}
|
|
573
|
+
if (this.config?.sourceAPI) {
|
|
574
|
+
this.sourceApi = this.config.sourceAPI;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
btnSave() {
|
|
578
|
+
if (this.filterData && this.filterData.length > 0) {
|
|
579
|
+
let isOk = true;
|
|
580
|
+
this.filterData.forEach((item) => {
|
|
581
|
+
if (item.cellOperation == undefined || item.cellOperation == null) {
|
|
582
|
+
this.msgSrv.warning('视图配置有误,请仔细检查');
|
|
583
|
+
isOk = false;
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
if (!isOk) {
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
this.loading = true;
|
|
592
|
+
let postData = _.cloneDeep(this.paraSave);
|
|
593
|
+
postData.listFilter = this.filterData;
|
|
594
|
+
this.http.post(this.saveApi, postData).subscribe((res) => {
|
|
595
|
+
if (res.success) {
|
|
596
|
+
this.msgSrv.success('保存成功!');
|
|
597
|
+
this.btnSaveAfter(this.filterData);
|
|
598
|
+
}
|
|
599
|
+
this.loading = false;
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
filterChange(e) {
|
|
603
|
+
this.filterData = e;
|
|
604
|
+
}
|
|
605
|
+
getPageData() {
|
|
606
|
+
new Promise((resolve) => {
|
|
607
|
+
zip(this.http.post(this.sourceApi, {
|
|
608
|
+
sourceId: this.config.sourceId,
|
|
609
|
+
sourceType: this.config.sourceType,
|
|
610
|
+
}), this.http.post(this.getApi, this.paraGet)).subscribe(([a, b]) => {
|
|
611
|
+
if (a.success && a.result && Array.isArray(a.result)) {
|
|
612
|
+
this.tableData = a.result;
|
|
613
|
+
}
|
|
614
|
+
if (b.success && b.result) {
|
|
615
|
+
this.filterData = b.result;
|
|
616
|
+
}
|
|
617
|
+
this.filterConfig = {
|
|
618
|
+
tableData: this.tableData,
|
|
619
|
+
filterData: this.filterData,
|
|
620
|
+
};
|
|
621
|
+
this.loading = false;
|
|
622
|
+
}, () => { }, () => {
|
|
623
|
+
resolve();
|
|
624
|
+
});
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* 取消-关闭
|
|
629
|
+
*/
|
|
630
|
+
btnClose() {
|
|
631
|
+
this.btnCloseEvent.emit({
|
|
632
|
+
type: 'close',
|
|
633
|
+
data: null,
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
btnSaveAfter(e) {
|
|
637
|
+
this.btnSaveEvent.emit({
|
|
638
|
+
type: 'save',
|
|
639
|
+
data: e,
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
643
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: BasicService, isStandalone: true, inputs: { config: "config" }, outputs: { btnCloseEvent: "btnCloseEvent", btnSaveEvent: "btnSaveEvent" }, ngImport: i0 });
|
|
644
|
+
};
|
|
645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService$3, decorators: [{
|
|
646
|
+
type: Directive
|
|
647
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }], propDecorators: { config: [{
|
|
648
|
+
type: Input
|
|
649
|
+
}], btnCloseEvent: [{
|
|
650
|
+
type: Output
|
|
651
|
+
}], btnSaveEvent: [{
|
|
652
|
+
type: Output
|
|
653
|
+
}] } });
|
|
654
|
+
|
|
655
|
+
class SourceFilterMainComponent extends BasicService$3 {
|
|
656
|
+
http;
|
|
657
|
+
msgSrv;
|
|
658
|
+
drawerRef;
|
|
659
|
+
constructor(http, msgSrv, drawerRef) {
|
|
660
|
+
super(http, msgSrv);
|
|
661
|
+
this.http = http;
|
|
662
|
+
this.msgSrv = msgSrv;
|
|
663
|
+
this.drawerRef = drawerRef;
|
|
664
|
+
}
|
|
665
|
+
ngOnInit() { }
|
|
666
|
+
ngOnDestroy() { }
|
|
667
|
+
ngOnChanges(changes) { }
|
|
668
|
+
/**
|
|
669
|
+
* 保存
|
|
670
|
+
* @param e
|
|
671
|
+
*/
|
|
672
|
+
btnSaveAfter(e) {
|
|
673
|
+
this.drawerRef.close({
|
|
674
|
+
type: 'save',
|
|
675
|
+
data: e,
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* 取消
|
|
680
|
+
*/
|
|
681
|
+
btnClose() {
|
|
682
|
+
this.drawerRef.close({
|
|
683
|
+
type: 'close',
|
|
684
|
+
data: null,
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterMainComponent, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3$1.NzDrawerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
688
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SourceFilterMainComponent, isStandalone: true, selector: "source-filter", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\r\n <gram-filter title=\"\u6761\u4EF6\u914D\u7F6E\" [data]=\"filterConfig\" (dataChange)=\"filterChange($event)\"></gram-filter>\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\" type=\"button\" (click)=\"btnSave()\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n</nz-spin>\r\n", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .deon-from{padding:15px 20px!important}:host ::ng-deep .repeat-table table thead th:nth-child(1){width:70px}:host ::ng-deep .repeat-table table thead th:nth-child(2){width:100px}:host ::ng-deep .repeat-table table thead th:nth-child(3){width:360px!important}:host ::ng-deep .repeat-table table thead th:nth-child(4){width:150px!important}:host ::ng-deep .repeat-table table thead th:nth-child(6),:host ::ng-deep .repeat-table table thead th:nth-child(7){width:100px}:host ::ng-deep form{display:flex;flex:1;flex-direction:column;overflow:auto}:host ::ng-deep form deon-field-nz-text .ant-input{max-width:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i7.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i9.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i10.ɵ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: i11.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: GramDeonFilterModule }, { kind: "component", type: i8$1.GramDeonFilterComponent, selector: "gram-filter", inputs: ["title", "data"], outputs: ["dataChange"] }] });
|
|
689
|
+
}
|
|
690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterMainComponent, decorators: [{
|
|
691
|
+
type: Component,
|
|
692
|
+
args: [{ selector: 'source-filter', imports: [
|
|
693
|
+
CommonModule,
|
|
694
|
+
FormsModule,
|
|
695
|
+
ReactiveFormsModule,
|
|
696
|
+
FormlyModule,
|
|
697
|
+
NzSpinModule,
|
|
698
|
+
NzButtonModule,
|
|
699
|
+
GramDeonFilterModule
|
|
700
|
+
], template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\r\n <gram-filter title=\"\u6761\u4EF6\u914D\u7F6E\" [data]=\"filterConfig\" (dataChange)=\"filterChange($event)\"></gram-filter>\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\" type=\"button\" (click)=\"btnSave()\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n</nz-spin>\r\n", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .deon-from{padding:15px 20px!important}:host ::ng-deep .repeat-table table thead th:nth-child(1){width:70px}:host ::ng-deep .repeat-table table thead th:nth-child(2){width:100px}:host ::ng-deep .repeat-table table thead th:nth-child(3){width:360px!important}:host ::ng-deep .repeat-table table thead th:nth-child(4){width:150px!important}:host ::ng-deep .repeat-table table thead th:nth-child(6),:host ::ng-deep .repeat-table table thead th:nth-child(7){width:100px}:host ::ng-deep form{display:flex;flex:1;flex-direction:column;overflow:auto}:host ::ng-deep form deon-field-nz-text .ant-input{max-width:100%!important}\n"] }]
|
|
701
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3$1.NzDrawerRef }] });
|
|
702
|
+
|
|
703
|
+
class SourceFilterSecondComponent extends BasicService$3 {
|
|
704
|
+
http;
|
|
705
|
+
msgSrv;
|
|
706
|
+
drawerRef;
|
|
707
|
+
constructor(http, msgSrv, drawerRef) {
|
|
708
|
+
super(http, msgSrv);
|
|
709
|
+
this.http = http;
|
|
710
|
+
this.msgSrv = msgSrv;
|
|
711
|
+
this.drawerRef = drawerRef;
|
|
712
|
+
}
|
|
713
|
+
ngOnInit() { }
|
|
714
|
+
ngOnDestroy() { }
|
|
715
|
+
ngOnChanges(changes) { }
|
|
716
|
+
/**
|
|
717
|
+
* 参数
|
|
718
|
+
*/
|
|
719
|
+
initParameter() {
|
|
720
|
+
this.paraGet = {
|
|
721
|
+
sourceId: this.config.sourceId,
|
|
722
|
+
sourceType: this.config.sourceType,
|
|
723
|
+
secondId: this.config.secondId,
|
|
724
|
+
secondType: this.config.secondType
|
|
725
|
+
};
|
|
726
|
+
this.paraSave = {
|
|
727
|
+
sourceId: this.config.sourceId,
|
|
728
|
+
sourceType: this.config.sourceType,
|
|
729
|
+
secondId: this.config.secondId,
|
|
730
|
+
secondType: this.config.secondType,
|
|
731
|
+
listFilter: []
|
|
732
|
+
};
|
|
733
|
+
this.getApi = `${ModuleAPI.paas}/apaas/source/filter/getSecondData`;
|
|
734
|
+
this.saveApi = `${ModuleAPI.paas}/apaas/source/filter/saveSecondData`;
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* 保存
|
|
738
|
+
* @param e
|
|
739
|
+
*/
|
|
740
|
+
btnSaveAfter(e) {
|
|
741
|
+
this.drawerRef.close({
|
|
742
|
+
type: 'save',
|
|
743
|
+
data: e,
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* 取消
|
|
748
|
+
*/
|
|
749
|
+
btnClose() {
|
|
750
|
+
this.drawerRef.close({
|
|
751
|
+
type: 'close',
|
|
752
|
+
data: null,
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterSecondComponent, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3$1.NzDrawerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
756
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SourceFilterSecondComponent, isStandalone: true, selector: "source-filter-second", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\r\n <gram-filter title=\"\u6761\u4EF6\u914D\u7F6E\" [data]=\"filterConfig\" (dataChange)=\"filterChange($event)\"></gram-filter>\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\" type=\"button\" (click)=\"btnSave()\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n</nz-spin>\r\n", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .deon-from{padding:15px 20px!important}:host ::ng-deep .repeat-table table thead th:nth-child(1){width:70px}:host ::ng-deep .repeat-table table thead th:nth-child(2){width:100px}:host ::ng-deep .repeat-table table thead th:nth-child(3){width:360px!important}:host ::ng-deep .repeat-table table thead th:nth-child(4){width:150px!important}:host ::ng-deep .repeat-table table thead th:nth-child(6),:host ::ng-deep .repeat-table table thead th:nth-child(7){width:100px}:host ::ng-deep form{display:flex;flex:1;flex-direction:column;overflow:auto}:host ::ng-deep form deon-field-nz-text .ant-input{max-width:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i7.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i9.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i10.ɵ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: i11.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: GramDeonFilterModule }, { kind: "component", type: i8$1.GramDeonFilterComponent, selector: "gram-filter", inputs: ["title", "data"], outputs: ["dataChange"] }] });
|
|
757
|
+
}
|
|
758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterSecondComponent, decorators: [{
|
|
759
|
+
type: Component,
|
|
760
|
+
args: [{ selector: 'source-filter-second', imports: [
|
|
761
|
+
CommonModule,
|
|
762
|
+
FormsModule,
|
|
763
|
+
ReactiveFormsModule,
|
|
764
|
+
FormlyModule,
|
|
765
|
+
NzSpinModule,
|
|
766
|
+
NzButtonModule,
|
|
767
|
+
GramDeonFilterModule
|
|
768
|
+
], template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-from\">\r\n <gram-filter title=\"\u6761\u4EF6\u914D\u7F6E\" [data]=\"filterConfig\" (dataChange)=\"filterChange($event)\"></gram-filter>\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\" type=\"button\" (click)=\"btnSave()\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n</nz-spin>\r\n", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .deon-from{padding:15px 20px!important}:host ::ng-deep .repeat-table table thead th:nth-child(1){width:70px}:host ::ng-deep .repeat-table table thead th:nth-child(2){width:100px}:host ::ng-deep .repeat-table table thead th:nth-child(3){width:360px!important}:host ::ng-deep .repeat-table table thead th:nth-child(4){width:150px!important}:host ::ng-deep .repeat-table table thead th:nth-child(6),:host ::ng-deep .repeat-table table thead th:nth-child(7){width:100px}:host ::ng-deep form{display:flex;flex:1;flex-direction:column;overflow:auto}:host ::ng-deep form deon-field-nz-text .ant-input{max-width:100%!important}\n"] }]
|
|
769
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3$1.NzDrawerRef }] });
|
|
770
|
+
|
|
771
|
+
const components$3 = [SourceFilterMainComponent, SourceFilterSecondComponent];
|
|
772
|
+
class SourceFilterModule {
|
|
773
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
774
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterModule, imports: [SourceFilterMainComponent, SourceFilterSecondComponent], exports: [SourceFilterMainComponent, SourceFilterSecondComponent] });
|
|
775
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterModule, imports: [components$3] });
|
|
776
|
+
}
|
|
777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceFilterModule, decorators: [{
|
|
778
|
+
type: NgModule,
|
|
779
|
+
args: [{
|
|
780
|
+
imports: [...components$3],
|
|
781
|
+
exports: [...components$3]
|
|
782
|
+
}]
|
|
783
|
+
}] });
|
|
784
|
+
|
|
785
|
+
let BasicService$2 = class BasicService {
|
|
786
|
+
http;
|
|
787
|
+
msgSrv;
|
|
788
|
+
_config = null;
|
|
789
|
+
loading = false;
|
|
790
|
+
form = new FormGroup({});
|
|
791
|
+
model = {};
|
|
792
|
+
options = {};
|
|
793
|
+
fields = [];
|
|
794
|
+
tableFieldData = [];
|
|
795
|
+
set config(value) {
|
|
796
|
+
this._config = value;
|
|
797
|
+
this.getPageData();
|
|
798
|
+
}
|
|
799
|
+
get config() {
|
|
800
|
+
return this._config;
|
|
801
|
+
}
|
|
802
|
+
btnCloseEvent = new EventEmitter();
|
|
803
|
+
btnSaveEvent = new EventEmitter();
|
|
804
|
+
constructor(http, msgSrv) {
|
|
805
|
+
this.http = http;
|
|
806
|
+
this.msgSrv = msgSrv;
|
|
807
|
+
}
|
|
808
|
+
getPageData() {
|
|
809
|
+
new Promise((resolve) => {
|
|
810
|
+
zip(this.http.post(`${ModuleAPI.paas}/apaas/table/field/listBySource`, {
|
|
811
|
+
sourceId: this.config.sourceId,
|
|
812
|
+
sourceType: this.config.sourceType
|
|
813
|
+
}), this.http.post(`${ModuleAPI.paas}/apaas/source/group/getDataInfo`, {
|
|
814
|
+
sourceId: this.config.sourceId,
|
|
815
|
+
sourceType: this.config.sourceType
|
|
816
|
+
})).subscribe(([a, b]) => {
|
|
817
|
+
if (a.success && a.result && Array.isArray(a.result)) {
|
|
818
|
+
this.tableFieldData = a.result.map((item) => {
|
|
819
|
+
return {
|
|
820
|
+
value: item.id,
|
|
821
|
+
label: item.tableName + ' - ' + item.name,
|
|
822
|
+
};
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
if (b.success && b.result) {
|
|
826
|
+
let arr = [];
|
|
827
|
+
b.result.forEach((item) => {
|
|
828
|
+
arr.push({ fieldId: item?.fieldId });
|
|
829
|
+
});
|
|
830
|
+
this.model['listGroup'] = arr;
|
|
831
|
+
}
|
|
832
|
+
this.getFieldConfig();
|
|
833
|
+
this.loading = false;
|
|
834
|
+
}, () => { }, () => {
|
|
835
|
+
resolve();
|
|
836
|
+
});
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
getFieldConfig() {
|
|
840
|
+
let config = [
|
|
841
|
+
{
|
|
842
|
+
type: 'repeat',
|
|
843
|
+
key: 'listGroup',
|
|
844
|
+
props: {},
|
|
845
|
+
fieldArray: {
|
|
846
|
+
fieldGroup: [
|
|
847
|
+
{
|
|
848
|
+
type: 'select',
|
|
849
|
+
key: 'fieldId',
|
|
850
|
+
props: {
|
|
851
|
+
label: '表字段',
|
|
852
|
+
required: true,
|
|
853
|
+
options: this.tableFieldData,
|
|
854
|
+
},
|
|
855
|
+
},
|
|
856
|
+
],
|
|
857
|
+
},
|
|
858
|
+
},
|
|
859
|
+
];
|
|
860
|
+
this.fields = config;
|
|
861
|
+
}
|
|
862
|
+
btnSave() {
|
|
863
|
+
let arr = [];
|
|
864
|
+
if (this.model && this.model.listGroup && Array.isArray(this.model.listGroup)) {
|
|
865
|
+
this.model.listGroup.forEach((item) => {
|
|
866
|
+
if (item?.fieldId) {
|
|
867
|
+
arr.push(item.fieldId);
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
this.loading = true;
|
|
872
|
+
this.http.post(`${ModuleAPI.paas}/apaas/source/group/saveData`, {
|
|
873
|
+
sourceId: this.config.sourceId,
|
|
874
|
+
sourceType: this.config.sourceType,
|
|
875
|
+
listField: arr
|
|
876
|
+
}).subscribe((res) => {
|
|
877
|
+
if (res.success) {
|
|
878
|
+
this.msgSrv.success('保存成功!');
|
|
879
|
+
this.btnSaveAfter(this.model);
|
|
880
|
+
}
|
|
881
|
+
this.loading = false;
|
|
882
|
+
}, () => {
|
|
883
|
+
this.loading = false;
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* 取消-关闭
|
|
888
|
+
*/
|
|
889
|
+
btnClose() {
|
|
890
|
+
this.btnCloseEvent.emit({
|
|
891
|
+
type: "close",
|
|
892
|
+
data: null
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
btnSaveAfter(e) {
|
|
896
|
+
this.btnSaveEvent.emit({
|
|
897
|
+
type: "save",
|
|
898
|
+
data: e
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
902
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: BasicService, isStandalone: true, inputs: { config: "config" }, outputs: { btnCloseEvent: "btnCloseEvent", btnSaveEvent: "btnSaveEvent" }, ngImport: i0 });
|
|
903
|
+
};
|
|
904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService$2, decorators: [{
|
|
905
|
+
type: Directive
|
|
906
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }], propDecorators: { config: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], btnCloseEvent: [{
|
|
909
|
+
type: Output
|
|
910
|
+
}], btnSaveEvent: [{
|
|
911
|
+
type: Output
|
|
912
|
+
}] } });
|
|
913
|
+
|
|
914
|
+
class SourceGroupMainComponent extends BasicService$2 {
|
|
915
|
+
http;
|
|
916
|
+
msgSrv;
|
|
917
|
+
drawerRef;
|
|
918
|
+
constructor(http, msgSrv, drawerRef) {
|
|
919
|
+
super(http, msgSrv);
|
|
920
|
+
this.http = http;
|
|
921
|
+
this.msgSrv = msgSrv;
|
|
922
|
+
this.drawerRef = drawerRef;
|
|
923
|
+
}
|
|
924
|
+
ngOnInit() { }
|
|
925
|
+
ngOnDestroy() { }
|
|
926
|
+
ngOnChanges(changes) { }
|
|
927
|
+
/**
|
|
928
|
+
* 保存
|
|
929
|
+
* @param e
|
|
930
|
+
*/
|
|
931
|
+
btnSaveAfter(e) {
|
|
932
|
+
this.drawerRef.close({
|
|
933
|
+
type: 'save',
|
|
934
|
+
data: e,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* 取消
|
|
939
|
+
*/
|
|
940
|
+
btnClose() {
|
|
941
|
+
this.drawerRef.close({
|
|
942
|
+
type: 'close',
|
|
943
|
+
data: null,
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceGroupMainComponent, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3$1.NzDrawerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
947
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SourceGroupMainComponent, isStandalone: true, selector: "source-group", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"btnSave()\" #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%}:host ::ng-deep .deon-from{padding:5px 20px 15px!important}:host ::ng-deep form{flex:1;overflow:auto}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i6.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i7.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i8.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i9.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i10.ɵ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: i11.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] });
|
|
948
|
+
}
|
|
949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceGroupMainComponent, decorators: [{
|
|
950
|
+
type: Component,
|
|
951
|
+
args: [{ selector: 'source-group', imports: [
|
|
952
|
+
CommonModule,
|
|
953
|
+
FormsModule,
|
|
954
|
+
ReactiveFormsModule,
|
|
955
|
+
FormlyModule,
|
|
956
|
+
NzSpinModule,
|
|
957
|
+
NzEmptyModule,
|
|
958
|
+
NzButtonModule
|
|
959
|
+
], template: "<form [formGroup]=\"form\" (ngSubmit)=\"btnSave()\" #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%}:host ::ng-deep .deon-from{padding:5px 20px 15px!important}:host ::ng-deep form{flex:1;overflow:auto}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"] }]
|
|
960
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3$1.NzDrawerRef }] });
|
|
961
|
+
|
|
962
|
+
const components$2 = [SourceGroupMainComponent];
|
|
963
|
+
class SourceGroupModule {
|
|
964
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
965
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: SourceGroupModule, imports: [SourceGroupMainComponent], exports: [SourceGroupMainComponent] });
|
|
966
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceGroupModule, imports: [components$2] });
|
|
967
|
+
}
|
|
968
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceGroupModule, decorators: [{
|
|
969
|
+
type: NgModule,
|
|
970
|
+
args: [{
|
|
971
|
+
imports: [...components$2],
|
|
972
|
+
exports: [...components$2]
|
|
973
|
+
}]
|
|
974
|
+
}] });
|
|
975
|
+
|
|
976
|
+
let BasicService$1 = class BasicService {
|
|
977
|
+
http;
|
|
978
|
+
msgSrv;
|
|
979
|
+
_config = null;
|
|
980
|
+
loading = false;
|
|
981
|
+
form = new FormGroup({});
|
|
982
|
+
model = {};
|
|
983
|
+
options = {};
|
|
984
|
+
fields = [];
|
|
985
|
+
tableFieldData = [];
|
|
986
|
+
/**
|
|
987
|
+
* Api Address
|
|
988
|
+
*/
|
|
989
|
+
getApi = null;
|
|
990
|
+
saveApi = null;
|
|
991
|
+
sourceApi = null;
|
|
992
|
+
set config(value) {
|
|
993
|
+
this._config = value;
|
|
994
|
+
this.initParameter();
|
|
995
|
+
this.getPageData();
|
|
996
|
+
}
|
|
997
|
+
get config() {
|
|
998
|
+
return this._config;
|
|
999
|
+
}
|
|
1000
|
+
btnCloseEvent = new EventEmitter();
|
|
1001
|
+
btnSaveEvent = new EventEmitter();
|
|
1002
|
+
constructor(http, msgSrv) {
|
|
1003
|
+
this.http = http;
|
|
1004
|
+
this.msgSrv = msgSrv;
|
|
1005
|
+
}
|
|
1006
|
+
initParameter() {
|
|
1007
|
+
this.getApi = `${ModuleAPI.paas}/apaas/source/order/getDataInfo`;
|
|
1008
|
+
this.saveApi = `${ModuleAPI.paas}/apaas/source/order/saveData`;
|
|
1009
|
+
this.sourceApi = `${ModuleAPI.paas}/apaas/table/field/listBySource`;
|
|
1010
|
+
if (this.config?.getAPI) {
|
|
1011
|
+
this.getApi = this.config.getAPI;
|
|
1012
|
+
}
|
|
1013
|
+
if (this.config?.saveAPI) {
|
|
1014
|
+
this.saveApi = this.config.saveAPI;
|
|
1015
|
+
}
|
|
1016
|
+
if (this.config?.sourceAPI) {
|
|
1017
|
+
this.sourceApi = this.config.sourceAPI;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
getPageData() {
|
|
1021
|
+
new Promise((resolve) => {
|
|
1022
|
+
zip(this.http.post(this.sourceApi, {
|
|
1023
|
+
sourceId: this.config.sourceId,
|
|
1024
|
+
sourceType: this.config.sourceType,
|
|
1025
|
+
}), this.http.post(this.getApi, {
|
|
1026
|
+
sourceId: this.config.sourceId,
|
|
1027
|
+
sourceType: this.config.sourceType,
|
|
1028
|
+
})).subscribe(([a, b]) => {
|
|
1029
|
+
if (a.success && a.result && Array.isArray(a.result)) {
|
|
1030
|
+
this.tableFieldData = a.result.map((item) => {
|
|
1031
|
+
return {
|
|
1032
|
+
value: item.id,
|
|
1033
|
+
label: item.tableName + ' - ' + item.name,
|
|
1034
|
+
};
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
if (b.success && b.result) {
|
|
1038
|
+
this.model['listOrder'] = b.result;
|
|
1039
|
+
}
|
|
1040
|
+
this.getFieldConfig();
|
|
1041
|
+
this.loading = false;
|
|
1042
|
+
}, () => { }, () => {
|
|
1043
|
+
resolve();
|
|
1044
|
+
});
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
getFieldConfig() {
|
|
1048
|
+
let config = [
|
|
1049
|
+
{
|
|
1050
|
+
type: 'repeat',
|
|
1051
|
+
key: 'listOrder',
|
|
1052
|
+
props: {},
|
|
1053
|
+
fieldArray: {
|
|
1054
|
+
fieldGroup: [
|
|
1055
|
+
{
|
|
1056
|
+
type: 'select',
|
|
1057
|
+
key: 'fieldId',
|
|
1058
|
+
props: {
|
|
1059
|
+
label: '表字段',
|
|
1060
|
+
options: this.tableFieldData,
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
type: 'select',
|
|
1065
|
+
key: 'orderType',
|
|
1066
|
+
props: {
|
|
1067
|
+
label: '排序方式',
|
|
1068
|
+
required: true,
|
|
1069
|
+
options: [
|
|
1070
|
+
{ value: 'ASC', label: '正序' },
|
|
1071
|
+
{ value: 'DESC', label: '倒序' },
|
|
1072
|
+
],
|
|
1073
|
+
},
|
|
1074
|
+
},
|
|
1075
|
+
],
|
|
1076
|
+
},
|
|
1077
|
+
},
|
|
1078
|
+
];
|
|
1079
|
+
this.fields = config;
|
|
1080
|
+
}
|
|
1081
|
+
btnSave() {
|
|
1082
|
+
this.loading = true;
|
|
1083
|
+
this.http
|
|
1084
|
+
.post(this.saveApi, {
|
|
1085
|
+
sourceId: this.config.sourceId,
|
|
1086
|
+
sourceType: this.config.sourceType,
|
|
1087
|
+
listField: this.model?.listOrder ? this.model?.listOrder : [],
|
|
1088
|
+
})
|
|
1089
|
+
.subscribe((res) => {
|
|
1090
|
+
if (res.success) {
|
|
1091
|
+
this.msgSrv.success('保存成功!');
|
|
1092
|
+
this.btnSaveAfter(this.model);
|
|
1093
|
+
}
|
|
1094
|
+
this.loading = false;
|
|
1095
|
+
}, () => {
|
|
1096
|
+
this.loading = false;
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* 取消-关闭
|
|
1101
|
+
*/
|
|
1102
|
+
btnClose() {
|
|
1103
|
+
this.btnCloseEvent.emit({
|
|
1104
|
+
type: 'close',
|
|
1105
|
+
data: null,
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
btnSaveAfter(e) {
|
|
1109
|
+
this.btnSaveEvent.emit({
|
|
1110
|
+
type: 'save',
|
|
1111
|
+
data: e,
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1115
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: BasicService, isStandalone: true, inputs: { config: "config" }, outputs: { btnCloseEvent: "btnCloseEvent", btnSaveEvent: "btnSaveEvent" }, ngImport: i0 });
|
|
1116
|
+
};
|
|
1117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService$1, decorators: [{
|
|
1118
|
+
type: Directive
|
|
1119
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }], propDecorators: { config: [{
|
|
1120
|
+
type: Input
|
|
1121
|
+
}], btnCloseEvent: [{
|
|
1122
|
+
type: Output
|
|
1123
|
+
}], btnSaveEvent: [{
|
|
1124
|
+
type: Output
|
|
1125
|
+
}] } });
|
|
1126
|
+
|
|
1127
|
+
class SourceOrderMainComponent extends BasicService$1 {
|
|
1128
|
+
http;
|
|
1129
|
+
msgSrv;
|
|
1130
|
+
drawerRef;
|
|
1131
|
+
constructor(http, msgSrv, drawerRef) {
|
|
1132
|
+
super(http, msgSrv);
|
|
1133
|
+
this.http = http;
|
|
1134
|
+
this.msgSrv = msgSrv;
|
|
1135
|
+
this.drawerRef = drawerRef;
|
|
1136
|
+
}
|
|
1137
|
+
ngOnInit() { }
|
|
1138
|
+
ngOnDestroy() { }
|
|
1139
|
+
ngOnChanges(changes) { }
|
|
1140
|
+
/**
|
|
1141
|
+
* 保存
|
|
1142
|
+
* @param e
|
|
1143
|
+
*/
|
|
1144
|
+
btnSaveAfter(e) {
|
|
1145
|
+
this.drawerRef.close({
|
|
1146
|
+
type: 'save',
|
|
1147
|
+
data: e,
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* 取消
|
|
1152
|
+
*/
|
|
1153
|
+
btnClose() {
|
|
1154
|
+
this.drawerRef.close({
|
|
1155
|
+
type: 'close',
|
|
1156
|
+
data: null,
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceOrderMainComponent, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3$1.NzDrawerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SourceOrderMainComponent, isStandalone: true, selector: "source-order", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"btnSave()\" #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%}:host ::ng-deep .deon-from{padding:5px 20px 15px!important}:host ::ng-deep form{flex:1;overflow:auto}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i6.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i7.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i8.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i9.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i10.ɵ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: i11.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: GramDeonAntdModule }] });
|
|
1161
|
+
}
|
|
1162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceOrderMainComponent, decorators: [{
|
|
1163
|
+
type: Component,
|
|
1164
|
+
args: [{ selector: 'source-order', imports: [
|
|
1165
|
+
CommonModule,
|
|
1166
|
+
FormsModule,
|
|
1167
|
+
ReactiveFormsModule,
|
|
1168
|
+
FormlyModule,
|
|
1169
|
+
NzSpinModule,
|
|
1170
|
+
NzEmptyModule,
|
|
1171
|
+
NzButtonModule,
|
|
1172
|
+
GramDeonAntdModule
|
|
1173
|
+
], template: "<form [formGroup]=\"form\" (ngSubmit)=\"btnSave()\" #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%}:host ::ng-deep .deon-from{padding:5px 20px 15px!important}:host ::ng-deep form{flex:1;overflow:auto}:host ::ng-deep form .apiurl .ant-input{max-width:100%!important}:host ::ng-deep form .panel-group .ant-input{max-width:95%!important}:host ::ng-deep form .panel-group .ant-select{max-width:95%!important}\n"] }]
|
|
1174
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3$1.NzDrawerRef }] });
|
|
1175
|
+
|
|
1176
|
+
const components$1 = [SourceOrderMainComponent];
|
|
1177
|
+
class SourceOrderModule {
|
|
1178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceOrderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1179
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: SourceOrderModule, imports: [SourceOrderMainComponent], exports: [SourceOrderMainComponent] });
|
|
1180
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceOrderModule, imports: [components$1] });
|
|
1181
|
+
}
|
|
1182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceOrderModule, decorators: [{
|
|
1183
|
+
type: NgModule,
|
|
1184
|
+
args: [{
|
|
1185
|
+
imports: [...components$1],
|
|
1186
|
+
exports: [...components$1]
|
|
1187
|
+
}]
|
|
1188
|
+
}] });
|
|
1189
|
+
|
|
1190
|
+
class BasicService {
|
|
1191
|
+
http;
|
|
1192
|
+
msgSrv;
|
|
1193
|
+
modal;
|
|
1194
|
+
getApi = `${ModuleAPI.paas}/apaas/source/getDataInfo`;
|
|
1195
|
+
saveApi = `${ModuleAPI.paas}/apaas/source/saveData`;
|
|
1196
|
+
tableFieldAPI = `${ModuleAPI.paas}/apaas/table/field/listByTable`;
|
|
1197
|
+
loading = true;
|
|
1198
|
+
config = null;
|
|
1199
|
+
btnCloseEvent = new EventEmitter();
|
|
1200
|
+
btnSaveEvent = new EventEmitter();
|
|
1201
|
+
pageLoadAfter = new EventEmitter();
|
|
1202
|
+
tableData = [];
|
|
1203
|
+
tableConfig = {
|
|
1204
|
+
type: 'table',
|
|
1205
|
+
label: '数据字典',
|
|
1206
|
+
pageId: '1762302272222490626',
|
|
1207
|
+
selectType: 'single',
|
|
1208
|
+
isRowData: true,
|
|
1209
|
+
};
|
|
1210
|
+
constructor(http, msgSrv, modal) {
|
|
1211
|
+
this.http = http;
|
|
1212
|
+
this.msgSrv = msgSrv;
|
|
1213
|
+
this.modal = modal;
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* 获取页面数据
|
|
1217
|
+
*/
|
|
1218
|
+
getPageData() {
|
|
1219
|
+
if (this.config == null) {
|
|
1220
|
+
this.loading = false;
|
|
1221
|
+
}
|
|
1222
|
+
else {
|
|
1223
|
+
this.loading = true;
|
|
1224
|
+
if (this.config?.getAPI == undefined || this.config?.getAPI == null) {
|
|
1225
|
+
this.config['getAPI'] = this.getApi;
|
|
1226
|
+
}
|
|
1227
|
+
if (this.config?.type == 'add') {
|
|
1228
|
+
this.tableData = [];
|
|
1229
|
+
this.loading = false;
|
|
1230
|
+
this.pageLoadAfter.emit();
|
|
1231
|
+
}
|
|
1232
|
+
else {
|
|
1233
|
+
let parameter = {
|
|
1234
|
+
sourceId: this.config.sourceId,
|
|
1235
|
+
sourceType: this.config.sourceType,
|
|
1236
|
+
};
|
|
1237
|
+
this.http.post(this.config.getAPI, parameter).subscribe((res) => {
|
|
1238
|
+
if (res && res.success && res.result && Array.isArray(res.result)) {
|
|
1239
|
+
res.result.forEach((item) => {
|
|
1240
|
+
item['tableInfo'] = { id: item.tableId, name: item.tableName };
|
|
1241
|
+
});
|
|
1242
|
+
this.tableData = res.result;
|
|
1243
|
+
}
|
|
1244
|
+
this.loading = false;
|
|
1245
|
+
this.pageLoadAfter.emit();
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
addItem() {
|
|
1251
|
+
this.tableData = [...this.tableData, {}];
|
|
1252
|
+
}
|
|
1253
|
+
delItem(i) {
|
|
1254
|
+
this.tableData = this.tableData.filter((item, index, object) => {
|
|
1255
|
+
return i != index;
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
refChange(item) {
|
|
1259
|
+
item.izMaster = false;
|
|
1260
|
+
item.leftField = null;
|
|
1261
|
+
item.rightTable = null;
|
|
1262
|
+
item.rightField = null;
|
|
1263
|
+
}
|
|
1264
|
+
masterChange(item) {
|
|
1265
|
+
item.leftField = null;
|
|
1266
|
+
item.rightTable = null;
|
|
1267
|
+
item.rightField = null;
|
|
1268
|
+
}
|
|
1269
|
+
rightTableChange(item) {
|
|
1270
|
+
item.rightField = null;
|
|
1271
|
+
}
|
|
1272
|
+
fieldData(e) {
|
|
1273
|
+
let findTable = this.tableData.filter((item) => {
|
|
1274
|
+
return item.tableCode == e;
|
|
1275
|
+
});
|
|
1276
|
+
if (findTable && findTable.length > 0) {
|
|
1277
|
+
return findTable[0].listField;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* 表发生变化
|
|
1282
|
+
* @param e
|
|
1283
|
+
* @param item
|
|
1284
|
+
*/
|
|
1285
|
+
tableDataChange(e, item, index) {
|
|
1286
|
+
if (e && e.id) {
|
|
1287
|
+
item = {
|
|
1288
|
+
tableId: e.id,
|
|
1289
|
+
tableName: e.name,
|
|
1290
|
+
tableCode: e.rowData['f_1623143917420134401'],
|
|
1291
|
+
tableInfo: {
|
|
1292
|
+
id: e.id,
|
|
1293
|
+
name: e.name,
|
|
1294
|
+
},
|
|
1295
|
+
listField: [],
|
|
1296
|
+
};
|
|
1297
|
+
this.getFieldListData(item, index);
|
|
1298
|
+
}
|
|
1299
|
+
else {
|
|
1300
|
+
this.tableData[index] = {};
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* 获取字段集合
|
|
1305
|
+
* @param item
|
|
1306
|
+
*/
|
|
1307
|
+
getFieldListData(item, index) {
|
|
1308
|
+
this.loading = true;
|
|
1309
|
+
item['listField'] = [];
|
|
1310
|
+
if (item && item.tableId) {
|
|
1311
|
+
if (this.config?.tableFieldAPI == undefined || this.config?.tableFieldAPI == null) {
|
|
1312
|
+
this.config['tableFieldAPI'] = this.tableFieldAPI;
|
|
1313
|
+
}
|
|
1314
|
+
this.http.post(`${this.config.tableFieldAPI}/${item.tableId}`).subscribe((res) => {
|
|
1315
|
+
if (res.success == true && res.result && Array.isArray(res.result)) {
|
|
1316
|
+
item['listField'] = res.result;
|
|
1317
|
+
}
|
|
1318
|
+
this.tableData[index] = item;
|
|
1319
|
+
this.loading = false;
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
else {
|
|
1323
|
+
this.loading = false;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* 取消-关闭
|
|
1328
|
+
*/
|
|
1329
|
+
btnClose() {
|
|
1330
|
+
this.btnCloseEvent.emit({
|
|
1331
|
+
type: 'close',
|
|
1332
|
+
data: null,
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
btnSaveAfter(e) {
|
|
1336
|
+
this.btnSaveEvent.emit({
|
|
1337
|
+
type: 'save',
|
|
1338
|
+
data: e,
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* 保存-关闭
|
|
1343
|
+
* @param e
|
|
1344
|
+
*/
|
|
1345
|
+
btnSave(e) {
|
|
1346
|
+
if (this.tableData == null || this.tableData.length < 1) {
|
|
1347
|
+
this.msgSrv.warning('必须要有引用表!');
|
|
1348
|
+
return;
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* 主键
|
|
1352
|
+
*/
|
|
1353
|
+
let findTable = this.tableData.filter((item) => {
|
|
1354
|
+
return item.izMaster == true;
|
|
1355
|
+
});
|
|
1356
|
+
if (findTable == null || findTable.length != 1) {
|
|
1357
|
+
this.msgSrv.warning('主表有且只有一个!');
|
|
1358
|
+
return;
|
|
1359
|
+
}
|
|
1360
|
+
this.modal.confirm({
|
|
1361
|
+
nzTitle: '提示',
|
|
1362
|
+
nzContent: `当视图配置发生变化时会清理掉配置,您是否要继续?`,
|
|
1363
|
+
nzOnOk: () => {
|
|
1364
|
+
let listSource = this.tableData.map((item) => {
|
|
1365
|
+
return {
|
|
1366
|
+
tableCode: item.tableCode,
|
|
1367
|
+
joinType: item.joinType,
|
|
1368
|
+
leftField: item.leftField,
|
|
1369
|
+
rightTable: item.rightTable,
|
|
1370
|
+
rightField: item.rightField,
|
|
1371
|
+
izMaster: item.izMaster,
|
|
1372
|
+
};
|
|
1373
|
+
});
|
|
1374
|
+
this.loading = true;
|
|
1375
|
+
if (this.config?.saveAPI == undefined || this.config?.saveAPI == null) {
|
|
1376
|
+
this.config['saveAPI'] = this.saveApi;
|
|
1377
|
+
}
|
|
1378
|
+
this.http
|
|
1379
|
+
.post(this.config.saveAPI, {
|
|
1380
|
+
sourceId: this.config.sourceId,
|
|
1381
|
+
sourceType: this.config.sourceType,
|
|
1382
|
+
listTable: listSource,
|
|
1383
|
+
})
|
|
1384
|
+
.subscribe((res) => {
|
|
1385
|
+
if (res.success) {
|
|
1386
|
+
this.msgSrv.success('保存成功!');
|
|
1387
|
+
this.btnSaveAfter(e);
|
|
1388
|
+
}
|
|
1389
|
+
this.loading = false;
|
|
1390
|
+
}, () => {
|
|
1391
|
+
this.loading = false;
|
|
1392
|
+
});
|
|
1393
|
+
},
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3.NzModalService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1397
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: BasicService, isStandalone: true, inputs: { config: "config" }, outputs: { btnCloseEvent: "btnCloseEvent", btnSaveEvent: "btnSaveEvent", pageLoadAfter: "pageLoadAfter" }, ngImport: i0 });
|
|
1398
|
+
}
|
|
1399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, decorators: [{
|
|
1400
|
+
type: Directive
|
|
1401
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3.NzModalService }], propDecorators: { config: [{
|
|
1402
|
+
type: Input
|
|
1403
|
+
}], btnCloseEvent: [{
|
|
1404
|
+
type: Output
|
|
1405
|
+
}], btnSaveEvent: [{
|
|
1406
|
+
type: Output
|
|
1407
|
+
}], pageLoadAfter: [{
|
|
1408
|
+
type: Output
|
|
1409
|
+
}] } });
|
|
1410
|
+
|
|
1411
|
+
class SourceTableMainComponent extends BasicService {
|
|
1412
|
+
http;
|
|
1413
|
+
msgSrv;
|
|
1414
|
+
modal;
|
|
1415
|
+
drawerRef;
|
|
1416
|
+
constructor(http, msgSrv, modal, drawerRef) {
|
|
1417
|
+
super(http, msgSrv, modal);
|
|
1418
|
+
this.http = http;
|
|
1419
|
+
this.msgSrv = msgSrv;
|
|
1420
|
+
this.modal = modal;
|
|
1421
|
+
this.drawerRef = drawerRef;
|
|
1422
|
+
}
|
|
1423
|
+
ngOnInit() {
|
|
1424
|
+
this.getPageData();
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* 保存
|
|
1428
|
+
* @param e
|
|
1429
|
+
*/
|
|
1430
|
+
btnSaveAfter(e) {
|
|
1431
|
+
this.drawerRef.close({
|
|
1432
|
+
type: 'save',
|
|
1433
|
+
data: e,
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* 取消
|
|
1438
|
+
*/
|
|
1439
|
+
btnClose() {
|
|
1440
|
+
this.drawerRef.close({
|
|
1441
|
+
type: 'close',
|
|
1442
|
+
data: null,
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceTableMainComponent, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }, { token: i3.NzModalService }, { token: i3$1.NzDrawerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1446
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SourceTableMainComponent, isStandalone: true, selector: "source-table", usesInheritance: true, ngImport: i0, template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-body\">\r\n <nz-table #basicTable class=\"default-table\" [nzShowPagination]=\"false\" [nzData]=\"tableData\" [nzNoResult]=\"noResult\">\r\n <thead>\r\n <tr>\r\n <th nzWidth=\"200px\">\u8868\u540D</th>\r\n <th nzWidth=\"80px\">\u662F\u5426\u4E3B\u8868</th>\r\n <th nzWidth=\"100x\">\u8FDE\u63A5\u65B9\u5F0F</th>\r\n <th nzWidth=\"200px\">leftField</th>\r\n <th>RightTable</th>\r\n <th nzWidth=\"200px\">RightField</th>\r\n <th nzWidth=\"80px\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let item of tableData;let index=index\">\r\n <tr cdkDrag>\r\n <td>\r\n <gram-lookup [config]=\"tableConfig\" [data]=\"item.tableInfo\" (valueChange)=\"tableDataChange($event, item,index)\"></gram-lookup>\r\n </td>\r\n <td>\r\n <label nz-checkbox [(ngModel)]=\"item.izMaster\" (ngModelChange)=\"masterChange(item)\"></label>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true\">\r\n <nz-select [(ngModel)]=\"item.joinType\">\r\n <nz-option nzValue=\"INNER\" nzLabel=\"\u5185\u8FDE\u63A5\"></nz-option>\r\n <nz-option nzValue=\"LEFT\" nzLabel=\"\u5DE6\u8FDE\u63A5\"></nz-option>\r\n <nz-option nzValue=\"RIGHT\" nzLabel=\"\u53F3\u8FDE\u63A5\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true\">\r\n <nz-select [(ngModel)]=\"item.leftField\">\r\n <ng-container *ngFor=\"let field of item.listField\">\r\n <nz-option [nzValue]=\"field.code\" [nzLabel]=\"field.name\"></nz-option>\r\n </ng-container>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true\">\r\n <nz-select [(ngModel)]=\"item.rightTable\" (ngModelChange)=\"rightTableChange(item)\">\r\n <ng-container *ngFor=\"let t of tableData\">\r\n <nz-option [nzValue]=\"t.tableCode\" [nzLabel]=\"t.tableName\"></nz-option>\r\n </ng-container>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true && item.rightTable!!\">\r\n <nz-select [(ngModel)]=\"item.rightField\">\r\n <ng-container *ngFor=\"let t of fieldData(item.rightTable)\">\r\n <nz-option [nzValue]=\"t.code\" [nzLabel]=\"t.name\"></nz-option>\r\n </ng-container>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <a (click)=\"delItem(index)\">\u5220\u9664</a>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr *ngIf=\"tableData!! && tableData.length>0\">\r\n <td colspan=\"7\">\r\n <a (click)=\"addItem()\">\u65B0\u589E</a>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\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\" (click)=\"btnSave($event)\" type=\"button\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n</nz-spin>\r\n<ng-template #noResult>\r\n <div class=\"result-empty\">\r\n <gram-empty></gram-empty>\r\n </div>\r\n <div class=\"result-button\">\r\n <a nz-button nzType=\"link\" type=\"button\" (click)=\"addItem()\">+\u6DFB\u52A0</a>\r\n </div>\r\n</ng-template>\r\n", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .deon-body{display:flex;flex:1;padding:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i7.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i9.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i10.ɵ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: i11.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i11$1.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i12.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i12.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i13.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i13.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i13.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i13.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i13.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i13.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: GramDeonLookUpModule }, { kind: "component", type: i14.GramDeonLookUpComponent, selector: "gram-lookup", inputs: ["placeholder", "config", "data", "noSave"], outputs: ["valueChange"] }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i15.GramDeonEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }] });
|
|
1447
|
+
}
|
|
1448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceTableMainComponent, decorators: [{
|
|
1449
|
+
type: Component,
|
|
1450
|
+
args: [{ selector: 'source-table', imports: [
|
|
1451
|
+
CommonModule,
|
|
1452
|
+
FormsModule,
|
|
1453
|
+
ReactiveFormsModule,
|
|
1454
|
+
FormlyModule,
|
|
1455
|
+
NzSpinModule,
|
|
1456
|
+
NzEmptyModule,
|
|
1457
|
+
NzButtonModule,
|
|
1458
|
+
NzCheckboxModule,
|
|
1459
|
+
NzSelectModule,
|
|
1460
|
+
NzTableModule,
|
|
1461
|
+
GramDeonLookUpModule,
|
|
1462
|
+
GramDeonEmptyModule
|
|
1463
|
+
], template: "<nz-spin [nzSpinning]=\"loading\" nzTip=\"\u62FC\u547D\u52A0\u8F7D\u4E2D...\" class=\"deon-list-spin\">\r\n <div class=\"deon-body\">\r\n <nz-table #basicTable class=\"default-table\" [nzShowPagination]=\"false\" [nzData]=\"tableData\" [nzNoResult]=\"noResult\">\r\n <thead>\r\n <tr>\r\n <th nzWidth=\"200px\">\u8868\u540D</th>\r\n <th nzWidth=\"80px\">\u662F\u5426\u4E3B\u8868</th>\r\n <th nzWidth=\"100x\">\u8FDE\u63A5\u65B9\u5F0F</th>\r\n <th nzWidth=\"200px\">leftField</th>\r\n <th>RightTable</th>\r\n <th nzWidth=\"200px\">RightField</th>\r\n <th nzWidth=\"80px\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let item of tableData;let index=index\">\r\n <tr cdkDrag>\r\n <td>\r\n <gram-lookup [config]=\"tableConfig\" [data]=\"item.tableInfo\" (valueChange)=\"tableDataChange($event, item,index)\"></gram-lookup>\r\n </td>\r\n <td>\r\n <label nz-checkbox [(ngModel)]=\"item.izMaster\" (ngModelChange)=\"masterChange(item)\"></label>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true\">\r\n <nz-select [(ngModel)]=\"item.joinType\">\r\n <nz-option nzValue=\"INNER\" nzLabel=\"\u5185\u8FDE\u63A5\"></nz-option>\r\n <nz-option nzValue=\"LEFT\" nzLabel=\"\u5DE6\u8FDE\u63A5\"></nz-option>\r\n <nz-option nzValue=\"RIGHT\" nzLabel=\"\u53F3\u8FDE\u63A5\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true\">\r\n <nz-select [(ngModel)]=\"item.leftField\">\r\n <ng-container *ngFor=\"let field of item.listField\">\r\n <nz-option [nzValue]=\"field.code\" [nzLabel]=\"field.name\"></nz-option>\r\n </ng-container>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true\">\r\n <nz-select [(ngModel)]=\"item.rightTable\" (ngModelChange)=\"rightTableChange(item)\">\r\n <ng-container *ngFor=\"let t of tableData\">\r\n <nz-option [nzValue]=\"t.tableCode\" [nzLabel]=\"t.tableName\"></nz-option>\r\n </ng-container>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"item.izMaster != true && item.rightTable!!\">\r\n <nz-select [(ngModel)]=\"item.rightField\">\r\n <ng-container *ngFor=\"let t of fieldData(item.rightTable)\">\r\n <nz-option [nzValue]=\"t.code\" [nzLabel]=\"t.name\"></nz-option>\r\n </ng-container>\r\n </nz-select>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <a (click)=\"delItem(index)\">\u5220\u9664</a>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr *ngIf=\"tableData!! && tableData.length>0\">\r\n <td colspan=\"7\">\r\n <a (click)=\"addItem()\">\u65B0\u589E</a>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\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\" (click)=\"btnSave($event)\" type=\"button\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n </div>\r\n</nz-spin>\r\n<ng-template #noResult>\r\n <div class=\"result-empty\">\r\n <gram-empty></gram-empty>\r\n </div>\r\n <div class=\"result-button\">\r\n <a nz-button nzType=\"link\" type=\"button\" (click)=\"addItem()\">+\u6DFB\u52A0</a>\r\n </div>\r\n</ng-template>\r\n", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;height:100%}:host ::ng-deep .deon-body{display:flex;flex:1;padding:15px}\n"] }]
|
|
1464
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }, { type: i3.NzModalService }, { type: i3$1.NzDrawerRef }] });
|
|
1465
|
+
|
|
1466
|
+
const components = [SourceTableMainComponent];
|
|
1467
|
+
class SourceTableModule {
|
|
1468
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1469
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: SourceTableModule, imports: [SourceTableMainComponent], exports: [SourceTableMainComponent] });
|
|
1470
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceTableModule, imports: [components] });
|
|
1471
|
+
}
|
|
1472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SourceTableModule, decorators: [{
|
|
1473
|
+
type: NgModule,
|
|
1474
|
+
args: [{
|
|
1475
|
+
imports: [...components],
|
|
1476
|
+
exports: [...components]
|
|
1477
|
+
}]
|
|
1478
|
+
}] });
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* Generated bundle index. Do not edit.
|
|
1482
|
+
*/
|
|
1483
|
+
|
|
1484
|
+
export { SourceArgsMainComponent, SourceArgsModule, SourceFieldMapMainComponent, SourceFieldMapModule, SourceFilterMainComponent, SourceFilterModule, SourceFilterSecondComponent, SourceGroupMainComponent, SourceGroupModule, SourceOrderMainComponent, SourceOrderModule, SourceTableMainComponent, SourceTableModule };
|
|
1485
|
+
//# sourceMappingURL=other.source.mjs.map
|