@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,1181 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Input, Component, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i4$1 from '@angular/forms';
|
|
6
|
+
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i5$1 from '@angular/cdk/drag-drop';
|
|
8
|
+
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
9
|
+
import * as i6$1 from 'ng-zorro-antd/table';
|
|
10
|
+
import { NzTableModule } from 'ng-zorro-antd/table';
|
|
11
|
+
import * as i8$1 from '@ebuilding/base/shared.pipe';
|
|
12
|
+
import { GramPipeModule } from '@ebuilding/base/shared.pipe';
|
|
13
|
+
import { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';
|
|
14
|
+
import * as i7$1 from '@ebuilding/abc/empty';
|
|
15
|
+
import { GramDeonEmptyModule } from '@ebuilding/abc/empty';
|
|
16
|
+
import * as i5 from '@kre-form/core';
|
|
17
|
+
import { FormlyModule } from '@kre-form/core';
|
|
18
|
+
import * as i6 from 'ng-zorro-antd/spin';
|
|
19
|
+
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
20
|
+
import * as i7 from 'ng-zorro-antd/icon';
|
|
21
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
22
|
+
import * as i8 from 'ng-zorro-antd/button';
|
|
23
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
24
|
+
import * as i11 from 'ng-zorro-antd/empty';
|
|
25
|
+
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
26
|
+
import { FieldType } from '@ebuilding/base/shared.util/static';
|
|
27
|
+
import _ from 'lodash';
|
|
28
|
+
import { zip, of } from 'rxjs';
|
|
29
|
+
import { startWith, tap } from 'rxjs/operators';
|
|
30
|
+
import * as i1 from '@delon/theme';
|
|
31
|
+
import * as i2 from 'ng-zorro-antd/message';
|
|
32
|
+
import * as i9 from 'ng-zorro-antd/core/transition-patch';
|
|
33
|
+
import * as i10 from 'ng-zorro-antd/core/wave';
|
|
34
|
+
import * as i2$1 from 'ng-zorro-antd/modal';
|
|
35
|
+
|
|
36
|
+
class FieldInfoComponent {
|
|
37
|
+
http;
|
|
38
|
+
msg;
|
|
39
|
+
_data = null;
|
|
40
|
+
loading = true;
|
|
41
|
+
form = new FormGroup({});
|
|
42
|
+
model = {};
|
|
43
|
+
options = {};
|
|
44
|
+
fields = [];
|
|
45
|
+
view = false;
|
|
46
|
+
set data(value) {
|
|
47
|
+
if (value && value.refId) {
|
|
48
|
+
value['refInfo'] = {
|
|
49
|
+
id: value.refId,
|
|
50
|
+
name: value.refName,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (value && value.refFieldId) {
|
|
54
|
+
value.refFieldInfo = {
|
|
55
|
+
id: value.refFieldId,
|
|
56
|
+
name: value.refFieldName,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
this._data = value;
|
|
60
|
+
}
|
|
61
|
+
get data() {
|
|
62
|
+
return this._data;
|
|
63
|
+
}
|
|
64
|
+
tableId = null;
|
|
65
|
+
codeRule = [];
|
|
66
|
+
saveData = new EventEmitter();
|
|
67
|
+
clearData = new EventEmitter();
|
|
68
|
+
formatData = [
|
|
69
|
+
{
|
|
70
|
+
value: 'YYYY',
|
|
71
|
+
label: '年',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: 'YYYYMM',
|
|
75
|
+
label: '年月',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: 'YYYYMMDD',
|
|
79
|
+
label: '年月日',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: 'YYYYMMDDHH',
|
|
83
|
+
label: '年月日时',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: 'YYYYMMDDHHMM',
|
|
87
|
+
label: '年月日时分',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: 'YYYYMMDDHHMMSS',
|
|
91
|
+
label: '年月日时分秒',
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
storageData = [
|
|
95
|
+
{
|
|
96
|
+
value: 'TIME1',
|
|
97
|
+
label: '默认',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
value: 'TIME2',
|
|
101
|
+
label: '年月日 00:00:00',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
value: 'TIME3',
|
|
105
|
+
label: '年月日 23:59:59',
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
get editor() {
|
|
109
|
+
return this.data ? false : true;
|
|
110
|
+
}
|
|
111
|
+
constructor(http, msg) {
|
|
112
|
+
this.http = http;
|
|
113
|
+
this.msg = msg;
|
|
114
|
+
}
|
|
115
|
+
ngOnInit() { }
|
|
116
|
+
ngOnChanges(changes) {
|
|
117
|
+
if (changes['data']) {
|
|
118
|
+
this.getPage();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
ngOnDestroy() { }
|
|
122
|
+
save() {
|
|
123
|
+
if (!this.form.valid) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
this.loading = true;
|
|
127
|
+
let apiName = '';
|
|
128
|
+
if (this.data) {
|
|
129
|
+
apiName = `${ModuleAPI.paas}/apaas/table/field/update`;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
apiName = `${ModuleAPI.paas}/apaas/table/field/add`;
|
|
133
|
+
}
|
|
134
|
+
let postData = _.cloneDeep(this.model);
|
|
135
|
+
postData['tableId'] = this.tableId;
|
|
136
|
+
this.http.post(`${apiName}`, postData).subscribe((res) => {
|
|
137
|
+
this.loading = false;
|
|
138
|
+
if (res && res.success == true) {
|
|
139
|
+
this.msg.success('保存成功!');
|
|
140
|
+
this.options?.resetModel();
|
|
141
|
+
this.model = { type: 'SINGLE', master: true };
|
|
142
|
+
this.form = new FormGroup({});
|
|
143
|
+
this.options = {};
|
|
144
|
+
this.fields = [];
|
|
145
|
+
this.data = null;
|
|
146
|
+
this.getPage();
|
|
147
|
+
this.saveData.emit();
|
|
148
|
+
}
|
|
149
|
+
}, () => {
|
|
150
|
+
this.loading = false;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
btnClose() {
|
|
154
|
+
this.options?.resetModel();
|
|
155
|
+
this.model = { type: 'SINGLE', master: true };
|
|
156
|
+
this.form = new FormGroup({});
|
|
157
|
+
this.options = {};
|
|
158
|
+
this.fields = [];
|
|
159
|
+
this.data = null;
|
|
160
|
+
this.getPage();
|
|
161
|
+
this.clearData.emit();
|
|
162
|
+
}
|
|
163
|
+
getPage() {
|
|
164
|
+
this.loading = true;
|
|
165
|
+
new Promise((resolve) => {
|
|
166
|
+
zip(this.getPageConfig()).subscribe(([config]) => {
|
|
167
|
+
if (this.data) {
|
|
168
|
+
this.model = this.data;
|
|
169
|
+
}
|
|
170
|
+
this.fields = _.cloneDeep(config);
|
|
171
|
+
this.loading = false;
|
|
172
|
+
}, () => { }, () => {
|
|
173
|
+
resolve();
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
getPageConfig() {
|
|
178
|
+
let config = [
|
|
179
|
+
{
|
|
180
|
+
type: 'text',
|
|
181
|
+
key: 'code',
|
|
182
|
+
props: {
|
|
183
|
+
prefix: 'x_',
|
|
184
|
+
label: '字段编码',
|
|
185
|
+
required: true,
|
|
186
|
+
maxLength: 50,
|
|
187
|
+
placeholder: '请输入字段编码',
|
|
188
|
+
layout: 'upDown',
|
|
189
|
+
},
|
|
190
|
+
expressionProperties: {
|
|
191
|
+
'props.required': (model) => {
|
|
192
|
+
return this.editor;
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
editor: this.editor,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: 'text',
|
|
199
|
+
key: 'name',
|
|
200
|
+
props: { label: '字段名称', required: true, maxLength: 50, placeholder: '请输入字段名称', layout: 'upDown' },
|
|
201
|
+
editor: this.view == false,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
type: 'text',
|
|
205
|
+
key: 'unit',
|
|
206
|
+
props: { label: '单位', maxLength: 50, placeholder: '请输入单位', layout: 'upDown' },
|
|
207
|
+
editor: this.view == false,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
type: 'select',
|
|
211
|
+
key: 'type',
|
|
212
|
+
props: { label: '字段类型', required: true, options: FieldType(), layout: 'upDown' },
|
|
213
|
+
expressionProperties: {
|
|
214
|
+
'props.required': (model) => {
|
|
215
|
+
return this.editor;
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
hooks: {
|
|
219
|
+
onInit: (field) => {
|
|
220
|
+
return field.formControl.valueChanges.pipe(startWith(field.formControl.value), tap((value) => {
|
|
221
|
+
if (this.editor) {
|
|
222
|
+
this.model['refInfo'] = null;
|
|
223
|
+
if (this.form.get('refInfo')) {
|
|
224
|
+
this.form.get('refInfo')?.setValidators(null);
|
|
225
|
+
this.form.get('refInfo')?.setAsyncValidators(null);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}));
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
editor: this.editor,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
type: 'checkbox',
|
|
235
|
+
key: 'izCodeRule',
|
|
236
|
+
props: { label: '是否启用编码规则', hideLabel: true, labelPosition: 'right' },
|
|
237
|
+
defaultValue: false,
|
|
238
|
+
editor: this.editor,
|
|
239
|
+
hideExpression: (model) => {
|
|
240
|
+
let result = true;
|
|
241
|
+
if (model && model.type == 'TEXT') {
|
|
242
|
+
result = false;
|
|
243
|
+
}
|
|
244
|
+
return result;
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
type: 'select',
|
|
249
|
+
key: 'codeRuleId',
|
|
250
|
+
props: { label: '编码规则', required: true, options: this.codeRule, layout: 'upDown' },
|
|
251
|
+
hideExpression: (model) => {
|
|
252
|
+
let result = true;
|
|
253
|
+
if (model && model.izCodeRule) {
|
|
254
|
+
result = false;
|
|
255
|
+
}
|
|
256
|
+
return result;
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
type: 'checkbox',
|
|
261
|
+
key: 'multiple',
|
|
262
|
+
props: { label: '是否多选', hideLabel: true, labelPosition: 'right' },
|
|
263
|
+
defaultValue: false,
|
|
264
|
+
editor: this.editor,
|
|
265
|
+
hideExpression: (model) => {
|
|
266
|
+
let result = true;
|
|
267
|
+
if (model && (model.type == 'ITEM' || model.type == 'TREE' || model.type == 'REF')) {
|
|
268
|
+
result = false;
|
|
269
|
+
}
|
|
270
|
+
return result;
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
type: 'lookup',
|
|
275
|
+
key: 'refInfo',
|
|
276
|
+
props: {
|
|
277
|
+
required: true,
|
|
278
|
+
selectType: 'single',
|
|
279
|
+
layout: 'upDown',
|
|
280
|
+
defaultParameter: {
|
|
281
|
+
master: true,
|
|
282
|
+
tableId: this.tableId,
|
|
283
|
+
type: null,
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
editor: this.editor,
|
|
287
|
+
hideExpression: (model) => {
|
|
288
|
+
let result = true;
|
|
289
|
+
if (model && (model.type == 'ITEM' || model.type == 'TREE' || model.type == 'REF' || model.type == 'ONETOMANY')) {
|
|
290
|
+
result = false;
|
|
291
|
+
}
|
|
292
|
+
return result;
|
|
293
|
+
},
|
|
294
|
+
expressionProperties: {
|
|
295
|
+
'props.required': (model) => {
|
|
296
|
+
return this.editor;
|
|
297
|
+
},
|
|
298
|
+
'props.label': (model) => {
|
|
299
|
+
let result = '关联表';
|
|
300
|
+
if (model && model.type == 'ITEM') {
|
|
301
|
+
result = '选项参数';
|
|
302
|
+
}
|
|
303
|
+
else if (model && model.type == 'TREE') {
|
|
304
|
+
result = '树形参数';
|
|
305
|
+
}
|
|
306
|
+
return result;
|
|
307
|
+
},
|
|
308
|
+
'props.pageCode': (model) => {
|
|
309
|
+
let result = null;
|
|
310
|
+
if (model && model.type == 'ITEM') {
|
|
311
|
+
result = 'Dialog_Admin_System.item';
|
|
312
|
+
}
|
|
313
|
+
else if (model && model.type == 'TREE') {
|
|
314
|
+
result = 'Dialog_Admin_System.tree';
|
|
315
|
+
}
|
|
316
|
+
else if (model && model.type == 'REF') {
|
|
317
|
+
result = 'Dialog_Paas_Module.table_ref';
|
|
318
|
+
}
|
|
319
|
+
else if (model && model.type == 'ONETOMANY') {
|
|
320
|
+
result = 'Dialog_Paas_Module.table_ref';
|
|
321
|
+
}
|
|
322
|
+
return result;
|
|
323
|
+
},
|
|
324
|
+
'props.defaultParameter.master': (model) => {
|
|
325
|
+
let result = true;
|
|
326
|
+
if (model && model.type == 'ONETOMANY') {
|
|
327
|
+
result = false;
|
|
328
|
+
}
|
|
329
|
+
return result;
|
|
330
|
+
},
|
|
331
|
+
'props.defaultParameter.type': (model) => {
|
|
332
|
+
let result = 'SINGLE';
|
|
333
|
+
if (model && model.type == 'ONETOMANY') {
|
|
334
|
+
result = 'MULTIPLE';
|
|
335
|
+
}
|
|
336
|
+
return result;
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
type: 'lookup',
|
|
342
|
+
key: 'refFieldIdInfo',
|
|
343
|
+
props: {
|
|
344
|
+
label: '关联表-Value',
|
|
345
|
+
required: true,
|
|
346
|
+
selectType: 'single',
|
|
347
|
+
layout: 'upDown',
|
|
348
|
+
pageCode: 'Dialog_Paas_Module.table_field',
|
|
349
|
+
},
|
|
350
|
+
editor: this.editor,
|
|
351
|
+
hideExpression: (model) => {
|
|
352
|
+
let result = true;
|
|
353
|
+
if (model && (model.type == 'REF' || model.type == 'ONETOMANY') && model.refInfo) {
|
|
354
|
+
result = false;
|
|
355
|
+
}
|
|
356
|
+
return result;
|
|
357
|
+
},
|
|
358
|
+
expressionProperties: {
|
|
359
|
+
'props.required': (model) => {
|
|
360
|
+
return this.editor;
|
|
361
|
+
},
|
|
362
|
+
'props.parameter': (model) => {
|
|
363
|
+
return { tableId: 'refInfo.id' };
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
type: 'lookup',
|
|
369
|
+
key: 'refFieldNameInfo',
|
|
370
|
+
props: {
|
|
371
|
+
label: '关联表-Label',
|
|
372
|
+
required: true,
|
|
373
|
+
selectType: 'single',
|
|
374
|
+
layout: 'upDown',
|
|
375
|
+
pageCode: 'Dialog_Paas_Module.table_field',
|
|
376
|
+
},
|
|
377
|
+
editor: this.editor,
|
|
378
|
+
hideExpression: (model) => {
|
|
379
|
+
let result = true;
|
|
380
|
+
if (model && (model.type == 'REF' || model.type == 'ONETOMANY') && model.refInfo) {
|
|
381
|
+
result = false;
|
|
382
|
+
}
|
|
383
|
+
return result;
|
|
384
|
+
},
|
|
385
|
+
expressionProperties: {
|
|
386
|
+
'props.parameter': (model) => {
|
|
387
|
+
return { tableId: 'refInfo.id' };
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
type: 'lookup',
|
|
393
|
+
key: 'refFieldNames',
|
|
394
|
+
props: {
|
|
395
|
+
label: '关联表-复合Label',
|
|
396
|
+
selectType: 'multiple',
|
|
397
|
+
layout: 'upDown',
|
|
398
|
+
pageCode: 'Dialog_Paas_Module.table_field',
|
|
399
|
+
},
|
|
400
|
+
editor: this.editor,
|
|
401
|
+
hideExpression: (model) => {
|
|
402
|
+
let result = true;
|
|
403
|
+
if (model && (model.type == 'REF' || model.type == 'ONETOMANY') && model.refInfo) {
|
|
404
|
+
result = false;
|
|
405
|
+
}
|
|
406
|
+
return result;
|
|
407
|
+
},
|
|
408
|
+
expressionProperties: {
|
|
409
|
+
'props.parameter': (model) => {
|
|
410
|
+
return { tableId: 'refInfo.id' };
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
type: 'group',
|
|
416
|
+
fieldGroup: [
|
|
417
|
+
{
|
|
418
|
+
type: 'number',
|
|
419
|
+
key: 'minLength',
|
|
420
|
+
props: { label: '最小长度', minLength: 0, placeholder: '请输入最小长度', layout: 'upDown' },
|
|
421
|
+
defaultValue: 0,
|
|
422
|
+
editor: this.editor,
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
type: 'number',
|
|
426
|
+
key: 'maxLength',
|
|
427
|
+
props: { label: '最大长度', minLength: 0, placeholder: '请输入最大长度', layout: 'upDown' },
|
|
428
|
+
defaultValue: 50,
|
|
429
|
+
editor: this.editor,
|
|
430
|
+
},
|
|
431
|
+
],
|
|
432
|
+
hideExpression: (model) => {
|
|
433
|
+
let result = true;
|
|
434
|
+
if (model && model.type && (model.type == 'TEXT' || model.type == 'TEXTAREA')) {
|
|
435
|
+
result = false;
|
|
436
|
+
}
|
|
437
|
+
return result;
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
type: 'number',
|
|
442
|
+
key: 'precision',
|
|
443
|
+
props: { label: '默认精度', min: 0, max: 8, placeholder: '请输入精度', layout: 'upDown' },
|
|
444
|
+
defaultValue: 0,
|
|
445
|
+
editor: this.editor,
|
|
446
|
+
hideExpression: (model) => {
|
|
447
|
+
let result = true;
|
|
448
|
+
if (model && model.type && model.type == 'FLOAT') {
|
|
449
|
+
result = false;
|
|
450
|
+
}
|
|
451
|
+
return result;
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
type: 'group',
|
|
456
|
+
fieldGroup: [
|
|
457
|
+
{
|
|
458
|
+
type: 'number',
|
|
459
|
+
key: 'min',
|
|
460
|
+
props: { label: '最小值', min: -99999, placeholder: '请输入最小值', layout: 'upDown' },
|
|
461
|
+
defaultValue: 0,
|
|
462
|
+
editor: this.editor,
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
type: 'number',
|
|
466
|
+
key: 'max',
|
|
467
|
+
props: { label: '最大值', min: 0, placeholder: '请输入最大值', layout: 'upDown' },
|
|
468
|
+
defaultValue: 999999,
|
|
469
|
+
editor: this.editor,
|
|
470
|
+
},
|
|
471
|
+
],
|
|
472
|
+
hideExpression: (model) => {
|
|
473
|
+
let result = true;
|
|
474
|
+
if (model && model.type && (model.type == 'INT' || model.type == 'FLOAT')) {
|
|
475
|
+
result = false;
|
|
476
|
+
}
|
|
477
|
+
return result;
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
type: 'select',
|
|
482
|
+
key: 'formatValue',
|
|
483
|
+
defaultValue: 'YYYYMMDD',
|
|
484
|
+
props: { label: '默认格式', required: true, options: this.formatData, layout: 'upDown' },
|
|
485
|
+
hideExpression: (model) => {
|
|
486
|
+
let result = true;
|
|
487
|
+
if (model && model.type && model.type == 'DATETIME') {
|
|
488
|
+
result = false;
|
|
489
|
+
}
|
|
490
|
+
return result;
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
type: 'select',
|
|
495
|
+
key: 'formatStorage',
|
|
496
|
+
defaultValue: 'DEFAULT',
|
|
497
|
+
props: { label: '存储格式', required: true, options: this.storageData, layout: 'upDown' },
|
|
498
|
+
hideExpression: (model) => {
|
|
499
|
+
let result = true;
|
|
500
|
+
if (model && model.type && model.type == 'DATETIME') {
|
|
501
|
+
result = false;
|
|
502
|
+
}
|
|
503
|
+
return result;
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
type: 'checkbox',
|
|
508
|
+
key: 'izUnique',
|
|
509
|
+
props: {
|
|
510
|
+
label: '是否唯一',
|
|
511
|
+
hideLabel: true,
|
|
512
|
+
labelPosition: 'right',
|
|
513
|
+
},
|
|
514
|
+
defaultValue: false,
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
type: 'checkbox',
|
|
518
|
+
key: 'izEmp',
|
|
519
|
+
props: {
|
|
520
|
+
label: '是否系统人员',
|
|
521
|
+
hideLabel: true,
|
|
522
|
+
labelPosition: 'right',
|
|
523
|
+
},
|
|
524
|
+
defaultValue: false,
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
type: 'checkbox',
|
|
528
|
+
key: 'izApplyEmp',
|
|
529
|
+
props: {
|
|
530
|
+
label: '是否流程申请人',
|
|
531
|
+
hideLabel: true,
|
|
532
|
+
labelPosition: 'right',
|
|
533
|
+
},
|
|
534
|
+
defaultValue: false,
|
|
535
|
+
},
|
|
536
|
+
// {
|
|
537
|
+
// type: 'checkbox',
|
|
538
|
+
// key: 'multipleField',
|
|
539
|
+
// props: {
|
|
540
|
+
// label: '是否存储多字段',
|
|
541
|
+
// hideLabel: true,
|
|
542
|
+
// labelPosition: 'right',
|
|
543
|
+
// },
|
|
544
|
+
// hideExpression: (model: any) => {
|
|
545
|
+
// let result: boolean = true;
|
|
546
|
+
// if (model!! && model.type!! && model.type == 'TEXT') {
|
|
547
|
+
// result = false;
|
|
548
|
+
// }
|
|
549
|
+
// return result;
|
|
550
|
+
// },
|
|
551
|
+
// defaultValue: false,
|
|
552
|
+
// },
|
|
553
|
+
{
|
|
554
|
+
type: 'text',
|
|
555
|
+
key: 'defaultValue',
|
|
556
|
+
props: { label: '字段默认值', maxLength: 500, placeholder: '请输入字段默认值', layout: 'upDown' },
|
|
557
|
+
hideExpression: (model) => {
|
|
558
|
+
let result = true;
|
|
559
|
+
if (model &&
|
|
560
|
+
model.type &&
|
|
561
|
+
(model.type == 'TEXT' || model.type == 'INT' || model.type == 'FLOAT' || model.type == 'BOOLEAN')) {
|
|
562
|
+
result = false;
|
|
563
|
+
}
|
|
564
|
+
return result;
|
|
565
|
+
},
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
type: 'textarea',
|
|
569
|
+
key: 'description',
|
|
570
|
+
props: { label: '字段描述', maxLength: 500, rows: 4, placeholder: '请输入字段描述', layout: 'upDown' },
|
|
571
|
+
editor: this.view == false,
|
|
572
|
+
},
|
|
573
|
+
];
|
|
574
|
+
if (this.data) {
|
|
575
|
+
config = [
|
|
576
|
+
{
|
|
577
|
+
type: 'text',
|
|
578
|
+
key: 'code',
|
|
579
|
+
props: {
|
|
580
|
+
prefix: 'x_',
|
|
581
|
+
label: '字段编码',
|
|
582
|
+
maxLength: 50,
|
|
583
|
+
placeholder: '请输入字段编码',
|
|
584
|
+
layout: 'upDown',
|
|
585
|
+
},
|
|
586
|
+
editor: false,
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
type: 'text',
|
|
590
|
+
key: 'name',
|
|
591
|
+
props: { label: '字段名称', maxLength: 50, placeholder: '请输入字段名称', layout: 'upDown' },
|
|
592
|
+
editor: true,
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
type: 'select',
|
|
596
|
+
key: 'type',
|
|
597
|
+
props: { label: '字段类型', options: FieldType(), layout: 'upDown' },
|
|
598
|
+
editor: false,
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
type: 'checkbox',
|
|
602
|
+
key: 'izCodeRule',
|
|
603
|
+
props: { label: '是否启用编码规则', hideLabel: true, labelPosition: 'right' },
|
|
604
|
+
defaultValue: false,
|
|
605
|
+
hideExpression: (model) => {
|
|
606
|
+
let result = true;
|
|
607
|
+
if (model && model.type == 'TEXT') {
|
|
608
|
+
result = false;
|
|
609
|
+
}
|
|
610
|
+
return result;
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
type: 'select',
|
|
615
|
+
key: 'codeRuleId',
|
|
616
|
+
props: { label: '编码规则', required: true, options: this.codeRule, layout: 'upDown' },
|
|
617
|
+
hideExpression: (model) => {
|
|
618
|
+
let result = true;
|
|
619
|
+
if (model && model.izCodeRule) {
|
|
620
|
+
result = false;
|
|
621
|
+
}
|
|
622
|
+
return result;
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
type: 'text',
|
|
627
|
+
key: 'unit',
|
|
628
|
+
props: { label: '单位', maxLength: 50, placeholder: '请输入单位', layout: 'upDown' },
|
|
629
|
+
editor: this.view == false,
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
type: 'lookup',
|
|
633
|
+
key: 'refInfo',
|
|
634
|
+
props: {
|
|
635
|
+
selectType: 'single',
|
|
636
|
+
layout: 'upDown',
|
|
637
|
+
defaultParameter: {
|
|
638
|
+
master: true,
|
|
639
|
+
tableId: this.tableId,
|
|
640
|
+
type: null,
|
|
641
|
+
},
|
|
642
|
+
},
|
|
643
|
+
editor: this.editor,
|
|
644
|
+
hideExpression: (model) => {
|
|
645
|
+
let result = true;
|
|
646
|
+
if (model && (model.type == 'ITEM' || model.type == 'TREE' || model.type == 'REF' || model.type == 'ONETOMANY')) {
|
|
647
|
+
result = false;
|
|
648
|
+
}
|
|
649
|
+
return result;
|
|
650
|
+
},
|
|
651
|
+
expressionProperties: {
|
|
652
|
+
'props.label': (model) => {
|
|
653
|
+
let result = '关联表';
|
|
654
|
+
if (model && model.type == 'ITEM') {
|
|
655
|
+
result = '选项参数';
|
|
656
|
+
}
|
|
657
|
+
else if (model && model.type == 'TREE') {
|
|
658
|
+
result = '树形参数';
|
|
659
|
+
}
|
|
660
|
+
return result;
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
type: 'text',
|
|
666
|
+
key: 'refFieldIdLabel',
|
|
667
|
+
props: {
|
|
668
|
+
label: '关联表-Value',
|
|
669
|
+
layout: 'upDown',
|
|
670
|
+
},
|
|
671
|
+
editor: this.editor,
|
|
672
|
+
hideExpression: (model) => {
|
|
673
|
+
let result = true;
|
|
674
|
+
if (model && (model.type == 'REF' || model.type == 'ONETOMANY') && model.refInfo) {
|
|
675
|
+
result = false;
|
|
676
|
+
}
|
|
677
|
+
return result;
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
type: 'text',
|
|
682
|
+
key: 'refFieldNameLabel',
|
|
683
|
+
props: {
|
|
684
|
+
label: '关联表-Label',
|
|
685
|
+
layout: 'upDown',
|
|
686
|
+
},
|
|
687
|
+
editor: this.editor,
|
|
688
|
+
hideExpression: (model) => {
|
|
689
|
+
let result = true;
|
|
690
|
+
if (model && (model.type == 'REF' || model.type == 'ONETOMANY') && model.refInfo) {
|
|
691
|
+
result = false;
|
|
692
|
+
}
|
|
693
|
+
return result;
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
type: 'text',
|
|
698
|
+
key: 'refFieldNamesLabel',
|
|
699
|
+
props: {
|
|
700
|
+
label: '关联表-复合Label',
|
|
701
|
+
layout: 'upDown',
|
|
702
|
+
},
|
|
703
|
+
editor: this.editor,
|
|
704
|
+
hideExpression: (model) => {
|
|
705
|
+
let result = true;
|
|
706
|
+
if (model && (model.type == 'REF' || model.type == 'ONETOMANY') && model.refInfo) {
|
|
707
|
+
result = false;
|
|
708
|
+
}
|
|
709
|
+
return result;
|
|
710
|
+
},
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
type: 'group',
|
|
714
|
+
fieldGroup: [
|
|
715
|
+
{
|
|
716
|
+
type: 'number',
|
|
717
|
+
key: 'minLength',
|
|
718
|
+
props: { label: '最小长度', minLength: 0, placeholder: '请输入最小长度', layout: 'upDown' },
|
|
719
|
+
defaultValue: 0,
|
|
720
|
+
editor: false,
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
type: 'number',
|
|
724
|
+
key: 'maxLength',
|
|
725
|
+
props: { label: '最大长度', minLength: 0, placeholder: '请输入最大长度', layout: 'upDown' },
|
|
726
|
+
defaultValue: 50,
|
|
727
|
+
editor: false,
|
|
728
|
+
},
|
|
729
|
+
],
|
|
730
|
+
hideExpression: (model) => {
|
|
731
|
+
let result = true;
|
|
732
|
+
if (model && model.type && (model.type == 'TEXT' || model.type == 'TEXTAREA')) {
|
|
733
|
+
result = false;
|
|
734
|
+
}
|
|
735
|
+
return result;
|
|
736
|
+
},
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
type: 'number',
|
|
740
|
+
key: 'precision',
|
|
741
|
+
props: { label: '默认精度', min: 0, max: 8, placeholder: '请输入精度', layout: 'upDown' },
|
|
742
|
+
defaultValue: 0,
|
|
743
|
+
hideExpression: (model) => {
|
|
744
|
+
let result = true;
|
|
745
|
+
if (model && model.type && model.type == 'FLOAT') {
|
|
746
|
+
result = false;
|
|
747
|
+
}
|
|
748
|
+
return result;
|
|
749
|
+
},
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
type: 'group',
|
|
753
|
+
fieldGroup: [
|
|
754
|
+
{
|
|
755
|
+
type: 'number',
|
|
756
|
+
key: 'min',
|
|
757
|
+
props: { label: '最小值', min: 0, placeholder: '请输入最小值', layout: 'upDown' },
|
|
758
|
+
defaultValue: 0,
|
|
759
|
+
editor: false,
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
type: 'number',
|
|
763
|
+
key: 'max',
|
|
764
|
+
props: { label: '最大值', min: 0, placeholder: '请输入最大值', layout: 'upDown' },
|
|
765
|
+
defaultValue: 999999,
|
|
766
|
+
editor: false,
|
|
767
|
+
},
|
|
768
|
+
],
|
|
769
|
+
hideExpression: (model) => {
|
|
770
|
+
let result = true;
|
|
771
|
+
if (model && model.type && (model.type == 'INT' || model.type == 'FLOAT')) {
|
|
772
|
+
result = false;
|
|
773
|
+
}
|
|
774
|
+
return result;
|
|
775
|
+
},
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
type: 'select',
|
|
779
|
+
key: 'formatValue',
|
|
780
|
+
defaultValue: 'YYYYMMDD',
|
|
781
|
+
props: { label: '默认格式', required: true, options: this.formatData, layout: 'upDown' },
|
|
782
|
+
hideExpression: (model) => {
|
|
783
|
+
let result = true;
|
|
784
|
+
if (model && model.type && model.type == 'DATETIME') {
|
|
785
|
+
result = false;
|
|
786
|
+
}
|
|
787
|
+
return result;
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
type: 'select',
|
|
792
|
+
key: 'formatStorage',
|
|
793
|
+
defaultValue: 'DEFAULT',
|
|
794
|
+
props: { label: '存储格式', required: true, options: this.storageData, layout: 'upDown' },
|
|
795
|
+
hideExpression: (model) => {
|
|
796
|
+
let result = true;
|
|
797
|
+
if (model && model.type && model.type == 'DATETIME') {
|
|
798
|
+
result = false;
|
|
799
|
+
}
|
|
800
|
+
return result;
|
|
801
|
+
},
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
type: 'checkbox',
|
|
805
|
+
key: 'izUnique',
|
|
806
|
+
props: {
|
|
807
|
+
label: '是否唯一',
|
|
808
|
+
hideLabel: true,
|
|
809
|
+
labelPosition: 'right',
|
|
810
|
+
},
|
|
811
|
+
defaultValue: false,
|
|
812
|
+
editor: this.data.sysType == null || this.data.sysType == '',
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
type: 'checkbox',
|
|
816
|
+
key: 'izEmp',
|
|
817
|
+
props: {
|
|
818
|
+
label: '是否系统人员',
|
|
819
|
+
hideLabel: true,
|
|
820
|
+
labelPosition: 'right',
|
|
821
|
+
},
|
|
822
|
+
defaultValue: false,
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
type: 'checkbox',
|
|
826
|
+
key: 'izApplyEmp',
|
|
827
|
+
props: {
|
|
828
|
+
label: '是否流程申请人',
|
|
829
|
+
hideLabel: true,
|
|
830
|
+
labelPosition: 'right',
|
|
831
|
+
},
|
|
832
|
+
defaultValue: false,
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
type: 'text',
|
|
836
|
+
key: 'defaultValue',
|
|
837
|
+
props: { label: '字段默认值', maxLength: 500, placeholder: '请输入字段默认值', layout: 'upDown' },
|
|
838
|
+
hideExpression: (model) => {
|
|
839
|
+
let result = true;
|
|
840
|
+
if (model &&
|
|
841
|
+
model.type &&
|
|
842
|
+
(model.type == 'TEXT' || model.type == 'INT' || model.type == 'FLOAT' || model.type == 'BOOLEAN')) {
|
|
843
|
+
result = false;
|
|
844
|
+
}
|
|
845
|
+
return result;
|
|
846
|
+
},
|
|
847
|
+
editor: this.data && (this.data.sysType == null || this.data.sysType == ''),
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
type: 'textarea',
|
|
851
|
+
key: 'description',
|
|
852
|
+
props: { label: '字段描述', maxLength: 500, rows: 4, placeholder: '请输入字段描述', layout: 'upDown' },
|
|
853
|
+
},
|
|
854
|
+
];
|
|
855
|
+
}
|
|
856
|
+
return of(_.cloneDeep(config));
|
|
857
|
+
}
|
|
858
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FieldInfoComponent, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
859
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FieldInfoComponent, isStandalone: true, selector: "field-info", inputs: { view: "view", data: "data", tableId: "tableId", codeRule: "codeRule" }, outputs: { saveData: "saveData", clearData: "clearData" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"view==false || data!!;else tmpAdd\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\">\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\" *ngIf=\"view==false\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"close\"></i>\u6E05\u7A7A</button>\r\n <!-- <ng-container *ngIf=\"data == null || data?.sysType == null\"> -->\r\n <button nz-button nzType=\"primary\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n <!-- </ng-container> -->\r\n </div>\r\n </nz-spin>\r\n </form>\r\n</ng-container>\r\n<ng-template #tmpAdd>\r\n <div class=\"add-box\">\u8BE5\u6A21\u578B\u4E3A\u5F15\u7528\u7C7B\u578B\uFF0C\u6545\u4E0D\u80FD\u65B0\u589E\u5B57\u6BB5</div>\r\n</ng-template>", 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 .fieldbox-checkbox .ant-form-item-label{width:auto}:host ::ng-deep form .fieldbox-checkbox .ant-form-item{margin-bottom:12px}:host ::ng-deep form deon-nz-field-lookup nz-input-group{width:100%}:host ::ng-deep form .sysType{padding:10px 0 0;color:red}:host ::ng-deep .deon-button{height:60px;padding:0 10px}:host ::ng-deep .add-box{margin:auto 0;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i5.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i6.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i8.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i9.ɵ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: i10.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i11.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: GramPipeModule }] });
|
|
860
|
+
}
|
|
861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FieldInfoComponent, decorators: [{
|
|
862
|
+
type: Component,
|
|
863
|
+
args: [{ selector: 'field-info', imports: [
|
|
864
|
+
CommonModule,
|
|
865
|
+
FormsModule, ReactiveFormsModule,
|
|
866
|
+
FormlyModule,
|
|
867
|
+
NzSpinModule,
|
|
868
|
+
NzIconModule,
|
|
869
|
+
NzButtonModule,
|
|
870
|
+
NzEmptyModule,
|
|
871
|
+
GramPipeModule
|
|
872
|
+
], template: "<ng-container *ngIf=\"view==false || data!!;else tmpAdd\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\">\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\" *ngIf=\"view==false\">\r\n <button nz-button nzType=\"default\" (click)=\"btnClose()\" type=\"button\"><i nz-icon nzType=\"close\"></i>\u6E05\u7A7A</button>\r\n <!-- <ng-container *ngIf=\"data == null || data?.sysType == null\"> -->\r\n <button nz-button nzType=\"primary\"><i nz-icon nzType=\"save\"></i>\u4FDD\u5B58</button>\r\n <!-- </ng-container> -->\r\n </div>\r\n </nz-spin>\r\n </form>\r\n</ng-container>\r\n<ng-template #tmpAdd>\r\n <div class=\"add-box\">\u8BE5\u6A21\u578B\u4E3A\u5F15\u7528\u7C7B\u578B\uFF0C\u6545\u4E0D\u80FD\u65B0\u589E\u5B57\u6BB5</div>\r\n</ng-template>", 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 .fieldbox-checkbox .ant-form-item-label{width:auto}:host ::ng-deep form .fieldbox-checkbox .ant-form-item{margin-bottom:12px}:host ::ng-deep form deon-nz-field-lookup nz-input-group{width:100%}:host ::ng-deep form .sysType{padding:10px 0 0;color:red}:host ::ng-deep .deon-button{height:60px;padding:0 10px}:host ::ng-deep .add-box{margin:auto 0;text-align:center}\n"] }]
|
|
873
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }], propDecorators: { view: [{
|
|
874
|
+
type: Input
|
|
875
|
+
}], data: [{
|
|
876
|
+
type: Input
|
|
877
|
+
}], tableId: [{
|
|
878
|
+
type: Input
|
|
879
|
+
}], codeRule: [{
|
|
880
|
+
type: Input
|
|
881
|
+
}], saveData: [{
|
|
882
|
+
type: Output
|
|
883
|
+
}], clearData: [{
|
|
884
|
+
type: Output
|
|
885
|
+
}] } });
|
|
886
|
+
|
|
887
|
+
class FieldBoxComponent {
|
|
888
|
+
http;
|
|
889
|
+
elementRef;
|
|
890
|
+
renderer;
|
|
891
|
+
modal;
|
|
892
|
+
msgSrv;
|
|
893
|
+
loading = false;
|
|
894
|
+
tableData = null;
|
|
895
|
+
fieldData = [];
|
|
896
|
+
fieldSel = null;
|
|
897
|
+
codeRuleData = [];
|
|
898
|
+
_data = null;
|
|
899
|
+
/**
|
|
900
|
+
* 只能查看
|
|
901
|
+
*/
|
|
902
|
+
view = false;
|
|
903
|
+
viewInfo = true;
|
|
904
|
+
set data(value) {
|
|
905
|
+
this._data = value;
|
|
906
|
+
this.getPageData();
|
|
907
|
+
}
|
|
908
|
+
get data() {
|
|
909
|
+
return this._data;
|
|
910
|
+
}
|
|
911
|
+
constructor(http, elementRef, renderer, modal, msgSrv) {
|
|
912
|
+
this.http = http;
|
|
913
|
+
this.elementRef = elementRef;
|
|
914
|
+
this.renderer = renderer;
|
|
915
|
+
this.modal = modal;
|
|
916
|
+
this.msgSrv = msgSrv;
|
|
917
|
+
}
|
|
918
|
+
ngOnInit() { }
|
|
919
|
+
ngOnDestroy() { }
|
|
920
|
+
btnBack() {
|
|
921
|
+
window.history.go(-1);
|
|
922
|
+
}
|
|
923
|
+
dropField(event) {
|
|
924
|
+
if (this.viewInfo) {
|
|
925
|
+
if (event.previousContainer === event.container) {
|
|
926
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
927
|
+
this.saveFieldSn();
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
trClick(e) {
|
|
932
|
+
if (this.viewInfo) {
|
|
933
|
+
this.fieldSel = _.cloneDeep(e);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
clearSelect() {
|
|
937
|
+
this.fieldSel = null;
|
|
938
|
+
}
|
|
939
|
+
reloadData() {
|
|
940
|
+
this.fieldSel = null;
|
|
941
|
+
this.getPageData();
|
|
942
|
+
}
|
|
943
|
+
reloadField() {
|
|
944
|
+
if (this.fieldData && this.fieldData.length > 0 && this.fieldSel) {
|
|
945
|
+
this.fieldData.forEach((item) => {
|
|
946
|
+
if (item.id == this.fieldSel.id) {
|
|
947
|
+
this.fieldSel = _.cloneDeep(item);
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
saveFieldSn() {
|
|
953
|
+
let idList = this.fieldData.map((v) => {
|
|
954
|
+
return v.id;
|
|
955
|
+
});
|
|
956
|
+
this.loading = true;
|
|
957
|
+
this.http.post(`${ModuleAPI.paas}/apaas/table/field/sn`, { id: this.data, idList: idList }).subscribe((res) => {
|
|
958
|
+
this.loading = false;
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
getPageData() {
|
|
962
|
+
if (this.data) {
|
|
963
|
+
this.loading = true;
|
|
964
|
+
new Promise((resolve) => {
|
|
965
|
+
zip(this.http.post(`${ModuleAPI.paas}/apaas/table/getById/${this.data}`), this.http.post(`${ModuleAPI.paas}/apaas/table/field/listByTable/${this.data}`), this.http.post(`${ModuleAPI.paas}/apaas/codeRule/listAll`)).subscribe(([table, feild, codeRule]) => {
|
|
966
|
+
if (table && table.success) {
|
|
967
|
+
this.tableData = table.result;
|
|
968
|
+
}
|
|
969
|
+
if (feild && feild.success) {
|
|
970
|
+
this.fieldData = feild.result;
|
|
971
|
+
}
|
|
972
|
+
if (codeRule && codeRule.success && codeRule.result.length > 0) {
|
|
973
|
+
this.codeRuleData = codeRule.result.map((item) => {
|
|
974
|
+
return { value: item.id, label: item.name };
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
this.resizeTable();
|
|
978
|
+
this.loading = false;
|
|
979
|
+
}, () => {
|
|
980
|
+
this.loading = false;
|
|
981
|
+
}, () => {
|
|
982
|
+
this.loading = false;
|
|
983
|
+
resolve();
|
|
984
|
+
});
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
deleteField(item, index, event) {
|
|
989
|
+
event.stopPropagation();
|
|
990
|
+
this.modal.confirm({
|
|
991
|
+
nzTitle: '提示',
|
|
992
|
+
nzContent: '您确定需要删除该项吗?',
|
|
993
|
+
nzOnOk: () => {
|
|
994
|
+
this.loading = true;
|
|
995
|
+
this.http
|
|
996
|
+
.post(`${ModuleAPI.paas}/apaas/table/field/deleteById`, {
|
|
997
|
+
pageId: 'table_field',
|
|
998
|
+
id: item.id,
|
|
999
|
+
})
|
|
1000
|
+
.subscribe((res) => {
|
|
1001
|
+
if (res.success) {
|
|
1002
|
+
this.msgSrv.success('删除成功!');
|
|
1003
|
+
this.getPageData();
|
|
1004
|
+
}
|
|
1005
|
+
this.loading = false;
|
|
1006
|
+
});
|
|
1007
|
+
},
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
disFlagField(item, index, event) {
|
|
1011
|
+
event.stopPropagation();
|
|
1012
|
+
this.modal.confirm({
|
|
1013
|
+
nzTitle: '提示',
|
|
1014
|
+
nzContent: '您确定需要禁用该项吗?',
|
|
1015
|
+
nzOnOk: () => {
|
|
1016
|
+
this.loading = true;
|
|
1017
|
+
this.http
|
|
1018
|
+
.post(`${ModuleAPI.paas}/apaas/table/field/disableById`, {
|
|
1019
|
+
pageId: 'table_field',
|
|
1020
|
+
id: item.id,
|
|
1021
|
+
})
|
|
1022
|
+
.subscribe((res) => {
|
|
1023
|
+
if (res.success) {
|
|
1024
|
+
this.msgSrv.success('禁用成功!');
|
|
1025
|
+
this.getPageData();
|
|
1026
|
+
}
|
|
1027
|
+
this.loading = false;
|
|
1028
|
+
});
|
|
1029
|
+
},
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
disFlagField2(item, index, event) {
|
|
1033
|
+
event.stopPropagation();
|
|
1034
|
+
this.modal.confirm({
|
|
1035
|
+
nzTitle: '提示',
|
|
1036
|
+
nzContent: '您确定需要启用该项吗?',
|
|
1037
|
+
nzOnOk: () => {
|
|
1038
|
+
this.loading = true;
|
|
1039
|
+
this.http
|
|
1040
|
+
.post(`${ModuleAPI.paas}/apaas/table/field/enableById`, {
|
|
1041
|
+
pageId: 'table_field',
|
|
1042
|
+
id: item.id,
|
|
1043
|
+
})
|
|
1044
|
+
.subscribe((res) => {
|
|
1045
|
+
if (res.success) {
|
|
1046
|
+
this.msgSrv.success('启用成功!');
|
|
1047
|
+
this.getPageData();
|
|
1048
|
+
}
|
|
1049
|
+
this.loading = false;
|
|
1050
|
+
});
|
|
1051
|
+
},
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
deonTableContentHG = null;
|
|
1055
|
+
resize() {
|
|
1056
|
+
this.resizeTable();
|
|
1057
|
+
}
|
|
1058
|
+
resizeTable() {
|
|
1059
|
+
let totalHeight = this.elementRef.nativeElement.clientHeight;
|
|
1060
|
+
let totalWidth = this.elementRef.nativeElement.clientWidth;
|
|
1061
|
+
this.deonTableContentHG = {
|
|
1062
|
+
y: totalHeight - 50 + 'px',
|
|
1063
|
+
x: totalWidth - 350 + 'px',
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FieldBoxComponent, deps: [{ token: i1._HttpClient }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2$1.NzModalService }, { token: i2.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1067
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FieldBoxComponent, isStandalone: true, selector: "field-box", inputs: { view: "view", viewInfo: "viewInfo", data: "data" }, host: { listeners: { "window:resize": "resize($event)" } }, ngImport: i0, template: "<div class=\"box-list\">\r\n <nz-table\r\n #basicTable\r\n class=\"default-table\"\r\n [nzShowPagination]=\"false\"\r\n [nzData]=\"fieldData\"\r\n [nzScroll]=\"deonTableContentHG\"\r\n [nzNoResult]=\"noResult\"\r\n >\r\n <thead>\r\n <tr>\r\n <th nzWidth=\"80px\">\u5E8F\u53F7</th>\r\n <th nzWidth=\"200px\">\u5B57\u6BB5\u7F16\u7801</th>\r\n <th style=\"min-width: 120px\">\u5B57\u6BB5\u540D\u79F0</th>\r\n <th nzWidth=\"120px\">\u5B57\u6BB5\u7C7B\u578B</th>\r\n <th nzWidth=\"100px\">\u662F\u5426\u5185\u7F6E</th>\r\n <th nzWidth=\"120px\">\u662F\u5426\u6A21\u7248\u5B57\u6BB5</th>\r\n <th nzWidth=\"100px\">\u662F\u5426\u7981\u7528</th>\r\n <th nzWidth=\"80px\" *ngIf=\"view==false\">\u64CD\u4F5C</th>\r\n </tr>\r\n </thead>\r\n <tbody cdkDropList [cdkDropListData]=\"fieldData\" (cdkDropListDropped)=\"dropField($event)\">\r\n <ng-container *ngIf=\"fieldData!! && fieldData.length > 0\">\r\n <ng-container *ngFor=\"let item of fieldData; let index = index\">\r\n <tr (click)=\"trClick(item)\" [ngClass]=\"{ 'tr-sel': fieldSel!! && item.id == fieldSel.id }\" cdkDrag [cdkDragDisabled]=\"!viewInfo\">\r\n <td>{{ index + 1 }}</td>\r\n <td>{{ item.code }}</td>\r\n <td>{{ item.name }}</td>\r\n <td>{{ item.type | dateType }}</td>\r\n <td>{{ item.builtin | builtin }}</td>\r\n <td>{{ item.izTemplate==true?'\u662F':'\u5426' }}</td>\r\n <td>\r\n <label *ngIf=\"item.disFlag==true\" style=\"color: red\">\u662F</label>\r\n <label *ngIf=\"item.disFlag!=true\">\u5426</label>\r\n </td>\r\n <td *ngIf=\"view==false\">\r\n <ng-container *ngIf=\"item.builtin != true && view==false\">\r\n <ng-container *ngIf=\"item.disFlag==false\">\r\n <a (click)=\"disFlagField(item, index, $event)\">\u7981\u7528</a>\r\n </ng-container>\r\n <ng-container *ngIf=\"item.disFlag==true\">\r\n <a (click)=\"disFlagField2(item, index, $event)\">\u542F\u7528</a>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </tbody>\r\n </nz-table>\r\n</div>\r\n<div class=\"box-field\" *ngIf=\"viewInfo\">\r\n <div class=\"field-title\">\r\n <a>\r\n <span nz-icon nzType=\"book\"></span>\r\n <ng-container *ngIf=\"fieldSel!!; else tmpAdd\">\u7F16\u8F91\u5B57\u6BB5</ng-container>\r\n <ng-template #tmpAdd>\u65B0\u589E\u5B57\u6BB5</ng-template>\r\n <ng-container *ngIf=\"fieldSel!!\"> - {{ fieldSel?.name }} </ng-container>\r\n </a>\r\n </div>\r\n <div class=\"field-content\">\r\n <ng-container *ngIf=\"tableData!! && !tableData.fixed\">\r\n <field-info\r\n [view]=\"view\"\r\n [tableId]=\"data\"\r\n [codeRule]=\"codeRuleData\"\r\n [data]=\"fieldSel\"\r\n (clearData)=\"clearSelect()\"\r\n (saveData)=\"reloadData()\"\r\n ></field-info>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-template #noResult>\r\n <div class=\"result-empty\">\r\n <gram-empty></gram-empty>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #tmpSysField>\r\n <div>\u7CFB\u7EDF\u9ED8\u8BA4\u5B57\u6BB5\u4E0D\u5141\u8BB8\u4FEE\u6539</div>\r\n</ng-template>\r\n", styles: [":host ::ng-deep{flex:1;flex-direction:column;width:100%;height:100%;display:flex;flex-direction:row;overflow:hidden}:host ::ng-deep .box-list{flex:1;padding:0 0 0 15px}:host ::ng-deep .box-list .tr-sel td,:host ::ng-deep .box-list .tr-sel :hover td{color:#fff!important;background:#1177fb!important}:host ::ng-deep .box-list .tr-sel td a,:host ::ng-deep .box-list .tr-sel :hover td a{color:#fff!important}:host ::ng-deep .box-list tr:hover{cursor:move}:host ::ng-deep .box-field{display:flex;flex-direction:column;width:350px;border-top:1px solid #f5f7fa}:host ::ng-deep .box-field .field-title{display:flex;width:100%;padding:8px 0 0 15px;font-size:12px}:host ::ng-deep .box-field .field-title a{position:relative}:host ::ng-deep .box-field .field-title a span{margin-right:5px}:host ::ng-deep .box-field .field-title a:after{position:absolute;bottom:-5px;left:0;width:100%;border-bottom:1px solid #1177fb;content:\"\"}:host ::ng-deep .box-field .field-content{flex:1;overflow:hidden}:host ::ng-deep .box-field .field-content .deon-from{padding:25px 10px 15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6$1.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: i6$1.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6$1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6$1.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: GramDeonEmptyModule }, { kind: "component", type: i7$1.GramDeonEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }, { kind: "component", type: FieldInfoComponent, selector: "field-info", inputs: ["view", "data", "tableId", "codeRule"], outputs: ["saveData", "clearData"] }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i8$1.BuiltinPipe, name: "builtin" }, { kind: "pipe", type: i8$1.DataTypePipe, name: "dateType" }] });
|
|
1068
|
+
}
|
|
1069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FieldBoxComponent, decorators: [{
|
|
1070
|
+
type: Component,
|
|
1071
|
+
args: [{ selector: 'field-box', imports: [
|
|
1072
|
+
CommonModule,
|
|
1073
|
+
FormsModule, ReactiveFormsModule,
|
|
1074
|
+
DragDropModule,
|
|
1075
|
+
NzTableModule,
|
|
1076
|
+
GramDeonEmptyModule,
|
|
1077
|
+
FieldInfoComponent,
|
|
1078
|
+
GramPipeModule
|
|
1079
|
+
], template: "<div class=\"box-list\">\r\n <nz-table\r\n #basicTable\r\n class=\"default-table\"\r\n [nzShowPagination]=\"false\"\r\n [nzData]=\"fieldData\"\r\n [nzScroll]=\"deonTableContentHG\"\r\n [nzNoResult]=\"noResult\"\r\n >\r\n <thead>\r\n <tr>\r\n <th nzWidth=\"80px\">\u5E8F\u53F7</th>\r\n <th nzWidth=\"200px\">\u5B57\u6BB5\u7F16\u7801</th>\r\n <th style=\"min-width: 120px\">\u5B57\u6BB5\u540D\u79F0</th>\r\n <th nzWidth=\"120px\">\u5B57\u6BB5\u7C7B\u578B</th>\r\n <th nzWidth=\"100px\">\u662F\u5426\u5185\u7F6E</th>\r\n <th nzWidth=\"120px\">\u662F\u5426\u6A21\u7248\u5B57\u6BB5</th>\r\n <th nzWidth=\"100px\">\u662F\u5426\u7981\u7528</th>\r\n <th nzWidth=\"80px\" *ngIf=\"view==false\">\u64CD\u4F5C</th>\r\n </tr>\r\n </thead>\r\n <tbody cdkDropList [cdkDropListData]=\"fieldData\" (cdkDropListDropped)=\"dropField($event)\">\r\n <ng-container *ngIf=\"fieldData!! && fieldData.length > 0\">\r\n <ng-container *ngFor=\"let item of fieldData; let index = index\">\r\n <tr (click)=\"trClick(item)\" [ngClass]=\"{ 'tr-sel': fieldSel!! && item.id == fieldSel.id }\" cdkDrag [cdkDragDisabled]=\"!viewInfo\">\r\n <td>{{ index + 1 }}</td>\r\n <td>{{ item.code }}</td>\r\n <td>{{ item.name }}</td>\r\n <td>{{ item.type | dateType }}</td>\r\n <td>{{ item.builtin | builtin }}</td>\r\n <td>{{ item.izTemplate==true?'\u662F':'\u5426' }}</td>\r\n <td>\r\n <label *ngIf=\"item.disFlag==true\" style=\"color: red\">\u662F</label>\r\n <label *ngIf=\"item.disFlag!=true\">\u5426</label>\r\n </td>\r\n <td *ngIf=\"view==false\">\r\n <ng-container *ngIf=\"item.builtin != true && view==false\">\r\n <ng-container *ngIf=\"item.disFlag==false\">\r\n <a (click)=\"disFlagField(item, index, $event)\">\u7981\u7528</a>\r\n </ng-container>\r\n <ng-container *ngIf=\"item.disFlag==true\">\r\n <a (click)=\"disFlagField2(item, index, $event)\">\u542F\u7528</a>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </tbody>\r\n </nz-table>\r\n</div>\r\n<div class=\"box-field\" *ngIf=\"viewInfo\">\r\n <div class=\"field-title\">\r\n <a>\r\n <span nz-icon nzType=\"book\"></span>\r\n <ng-container *ngIf=\"fieldSel!!; else tmpAdd\">\u7F16\u8F91\u5B57\u6BB5</ng-container>\r\n <ng-template #tmpAdd>\u65B0\u589E\u5B57\u6BB5</ng-template>\r\n <ng-container *ngIf=\"fieldSel!!\"> - {{ fieldSel?.name }} </ng-container>\r\n </a>\r\n </div>\r\n <div class=\"field-content\">\r\n <ng-container *ngIf=\"tableData!! && !tableData.fixed\">\r\n <field-info\r\n [view]=\"view\"\r\n [tableId]=\"data\"\r\n [codeRule]=\"codeRuleData\"\r\n [data]=\"fieldSel\"\r\n (clearData)=\"clearSelect()\"\r\n (saveData)=\"reloadData()\"\r\n ></field-info>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-template #noResult>\r\n <div class=\"result-empty\">\r\n <gram-empty></gram-empty>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #tmpSysField>\r\n <div>\u7CFB\u7EDF\u9ED8\u8BA4\u5B57\u6BB5\u4E0D\u5141\u8BB8\u4FEE\u6539</div>\r\n</ng-template>\r\n", styles: [":host ::ng-deep{flex:1;flex-direction:column;width:100%;height:100%;display:flex;flex-direction:row;overflow:hidden}:host ::ng-deep .box-list{flex:1;padding:0 0 0 15px}:host ::ng-deep .box-list .tr-sel td,:host ::ng-deep .box-list .tr-sel :hover td{color:#fff!important;background:#1177fb!important}:host ::ng-deep .box-list .tr-sel td a,:host ::ng-deep .box-list .tr-sel :hover td a{color:#fff!important}:host ::ng-deep .box-list tr:hover{cursor:move}:host ::ng-deep .box-field{display:flex;flex-direction:column;width:350px;border-top:1px solid #f5f7fa}:host ::ng-deep .box-field .field-title{display:flex;width:100%;padding:8px 0 0 15px;font-size:12px}:host ::ng-deep .box-field .field-title a{position:relative}:host ::ng-deep .box-field .field-title a span{margin-right:5px}:host ::ng-deep .box-field .field-title a:after{position:absolute;bottom:-5px;left:0;width:100%;border-bottom:1px solid #1177fb;content:\"\"}:host ::ng-deep .box-field .field-content{flex:1;overflow:hidden}:host ::ng-deep .box-field .field-content .deon-from{padding:25px 10px 15px}\n"] }]
|
|
1080
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2$1.NzModalService }, { type: i2.NzMessageService }], propDecorators: { view: [{
|
|
1081
|
+
type: Input
|
|
1082
|
+
}], viewInfo: [{
|
|
1083
|
+
type: Input
|
|
1084
|
+
}], data: [{
|
|
1085
|
+
type: Input
|
|
1086
|
+
}], resize: [{
|
|
1087
|
+
type: HostListener,
|
|
1088
|
+
args: ['window:resize', ['$event']]
|
|
1089
|
+
}] } });
|
|
1090
|
+
|
|
1091
|
+
class FieldReadComponent {
|
|
1092
|
+
http;
|
|
1093
|
+
elementRef;
|
|
1094
|
+
renderer;
|
|
1095
|
+
modal;
|
|
1096
|
+
_fieldApi = null;
|
|
1097
|
+
loading = false;
|
|
1098
|
+
fieldData = [];
|
|
1099
|
+
tableId = null;
|
|
1100
|
+
set fieldApi(value) {
|
|
1101
|
+
this._fieldApi = value;
|
|
1102
|
+
this.getPageData();
|
|
1103
|
+
}
|
|
1104
|
+
get fieldApi() {
|
|
1105
|
+
return this._fieldApi;
|
|
1106
|
+
}
|
|
1107
|
+
constructor(http, elementRef, renderer, modal) {
|
|
1108
|
+
this.http = http;
|
|
1109
|
+
this.elementRef = elementRef;
|
|
1110
|
+
this.renderer = renderer;
|
|
1111
|
+
this.modal = modal;
|
|
1112
|
+
}
|
|
1113
|
+
ngOnInit() { }
|
|
1114
|
+
ngOnDestroy() { }
|
|
1115
|
+
btnBack() {
|
|
1116
|
+
window.history.go(-1);
|
|
1117
|
+
}
|
|
1118
|
+
getPageData() {
|
|
1119
|
+
if (this.tableId && this.fieldApi) {
|
|
1120
|
+
this.loading = true;
|
|
1121
|
+
this.http.post(`${this.fieldApi.listApi}/${this.tableId}`).subscribe((res) => {
|
|
1122
|
+
if (res && res.success) {
|
|
1123
|
+
this.fieldData = res.result;
|
|
1124
|
+
}
|
|
1125
|
+
this.resizeTable();
|
|
1126
|
+
this.loading = false;
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
deonTableContentHG = null;
|
|
1131
|
+
resize() {
|
|
1132
|
+
this.resizeTable();
|
|
1133
|
+
}
|
|
1134
|
+
resizeTable() {
|
|
1135
|
+
let totalHeight = this.elementRef.nativeElement.clientHeight;
|
|
1136
|
+
let totalWidth = this.elementRef.nativeElement.clientWidth;
|
|
1137
|
+
this.deonTableContentHG = {
|
|
1138
|
+
y: totalHeight - 50 + 'px',
|
|
1139
|
+
x: totalWidth - 350 + 'px',
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FieldReadComponent, deps: [{ token: i1._HttpClient }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2$1.NzModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FieldReadComponent, isStandalone: true, selector: "field-read", inputs: { tableId: "tableId", fieldApi: "fieldApi" }, host: { listeners: { "window:resize": "resize($event)" } }, ngImport: i0, template: "<div class=\"box-list\">\r\n <nz-table #basicTable class=\"default-table\" [nzShowPagination]=\"false\" [nzData]=\"fieldData\"\r\n [nzScroll]=\"deonTableContentHG\">\r\n <thead>\r\n <tr>\r\n <th nzWidth=\"80px\">\u5E8F\u53F7</th>\r\n <th nzWidth=\"200px\">\u5B57\u6BB5\u7F16\u7801</th>\r\n <th>\u5B57\u6BB5\u540D\u79F0</th>\r\n <th nzWidth=\"120px\">\u5B57\u6BB5\u7C7B\u578B</th>\r\n <th nzWidth=\"100px\">\u662F\u5426\u5185\u7F6E</th>\r\n <th nzWidth=\"120px\">\u662F\u5426\u6A21\u7248\u5B57\u6BB5</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngIf=\"fieldData!! && fieldData.length > 0\">\r\n <tr *ngFor=\"let item of fieldData; let index = index\">\r\n <td>{{ index + 1 }}</td>\r\n <td>{{ item.code }}</td>\r\n <td>{{ item.name }}</td>\r\n <td>{{ item.type | dateType }}</td>\r\n <td>{{ item.builtin | builtin }}</td>\r\n <td>{{ item.izTemplate==true?'\u662F':'\u5426' }}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </nz-table>\r\n</div>", styles: [":host ::ng-deep{flex:1;flex-direction:column;width:100%;height:100%;display:flex;flex-direction:row;overflow:hidden}:host ::ng-deep .box-list{flex:1;padding:0 0 0 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: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6$1.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: i6$1.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6$1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6$1.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: GramPipeModule }, { kind: "pipe", type: i8$1.BuiltinPipe, name: "builtin" }, { kind: "pipe", type: i8$1.DataTypePipe, name: "dateType" }] });
|
|
1144
|
+
}
|
|
1145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FieldReadComponent, decorators: [{
|
|
1146
|
+
type: Component,
|
|
1147
|
+
args: [{ selector: 'field-read', imports: [
|
|
1148
|
+
CommonModule,
|
|
1149
|
+
FormsModule, ReactiveFormsModule,
|
|
1150
|
+
NzTableModule,
|
|
1151
|
+
GramPipeModule
|
|
1152
|
+
], template: "<div class=\"box-list\">\r\n <nz-table #basicTable class=\"default-table\" [nzShowPagination]=\"false\" [nzData]=\"fieldData\"\r\n [nzScroll]=\"deonTableContentHG\">\r\n <thead>\r\n <tr>\r\n <th nzWidth=\"80px\">\u5E8F\u53F7</th>\r\n <th nzWidth=\"200px\">\u5B57\u6BB5\u7F16\u7801</th>\r\n <th>\u5B57\u6BB5\u540D\u79F0</th>\r\n <th nzWidth=\"120px\">\u5B57\u6BB5\u7C7B\u578B</th>\r\n <th nzWidth=\"100px\">\u662F\u5426\u5185\u7F6E</th>\r\n <th nzWidth=\"120px\">\u662F\u5426\u6A21\u7248\u5B57\u6BB5</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngIf=\"fieldData!! && fieldData.length > 0\">\r\n <tr *ngFor=\"let item of fieldData; let index = index\">\r\n <td>{{ index + 1 }}</td>\r\n <td>{{ item.code }}</td>\r\n <td>{{ item.name }}</td>\r\n <td>{{ item.type | dateType }}</td>\r\n <td>{{ item.builtin | builtin }}</td>\r\n <td>{{ item.izTemplate==true?'\u662F':'\u5426' }}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </nz-table>\r\n</div>", styles: [":host ::ng-deep{flex:1;flex-direction:column;width:100%;height:100%;display:flex;flex-direction:row;overflow:hidden}:host ::ng-deep .box-list{flex:1;padding:0 0 0 15px}\n"] }]
|
|
1153
|
+
}], ctorParameters: () => [{ type: i1._HttpClient }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2$1.NzModalService }], propDecorators: { tableId: [{
|
|
1154
|
+
type: Input
|
|
1155
|
+
}], fieldApi: [{
|
|
1156
|
+
type: Input
|
|
1157
|
+
}], resize: [{
|
|
1158
|
+
type: HostListener,
|
|
1159
|
+
args: ['window:resize', ['$event']]
|
|
1160
|
+
}] } });
|
|
1161
|
+
|
|
1162
|
+
const components = [FieldBoxComponent, FieldInfoComponent, FieldReadComponent];
|
|
1163
|
+
class DictInfoModule {
|
|
1164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DictInfoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1165
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DictInfoModule, imports: [FieldBoxComponent, FieldInfoComponent, FieldReadComponent], exports: [FieldBoxComponent, FieldInfoComponent, FieldReadComponent] });
|
|
1166
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DictInfoModule, imports: [components] });
|
|
1167
|
+
}
|
|
1168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DictInfoModule, decorators: [{
|
|
1169
|
+
type: NgModule,
|
|
1170
|
+
args: [{
|
|
1171
|
+
imports: [...components],
|
|
1172
|
+
exports: [...components],
|
|
1173
|
+
}]
|
|
1174
|
+
}] });
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Generated bundle index. Do not edit.
|
|
1178
|
+
*/
|
|
1179
|
+
|
|
1180
|
+
export { DictInfoModule, FieldBoxComponent, FieldInfoComponent, FieldReadComponent };
|
|
1181
|
+
//# sourceMappingURL=other.dict.mjs.map
|