cloud-web-corejs 1.0.250 → 1.0.251
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/package.json +1 -1
- package/src/views/bd/setting/formVersion/button.vue +55 -0
- package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
- package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
- package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
- package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
- package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
- package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
- package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
- package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
- package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +491 -0
- package/src/views/bd/setting/formVersion/link.vue +58 -0
- package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
- package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
- package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
- package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
- package/src/views/bd/setting/formVersion/textDiff.js +102 -0
- package/src/views/bd/setting/form_import_log/edit.vue +6 -3
- package/src/views/bd/setting/form_import_log/list.vue +5 -0
- package/src/views/bd/setting/form_script/edit.vue +196 -83
- package/src/views/bd/setting/form_script/edit1.vue +410 -220
- package/src/views/bd/setting/form_script/form_list.vue +19 -0
- package/src/views/bd/setting/form_script/list.vue +95 -21
- package/src/views/bd/setting/form_script/list1.vue +24 -0
- package/src/views/bd/setting/form_script/mixins/dialog.js +2 -2
- package/src/views/bd/setting/form_script/mixins/edit.js +265 -207
- package/src/views/bd/setting/form_script/mixins/edit1.js +259 -201
- package/src/views/bd/setting/form_script/mixins/form_list.js +322 -296
- package/src/views/bd/setting/form_script/mixins/list.js +163 -95
- package/src/views/bd/setting/form_script/mixins/list1.js +244 -155
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +1 -1
- package/src/views/bd/setting/form_template/edit.vue +355 -205
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
- package/src/views/bd/setting/form_template/list.vue +49 -74
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +3 -3
- package/src/views/bd/setting/form_template/mixins/edit.js +51 -8
- package/src/views/bd/setting/form_template/mixins/itemList.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +114 -82
- package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -7
- package/src/views/bd/setting/form_template/wf_list.vue +161 -127
- package/src/views/bd/setting/request_setting/list.vue +15 -25
- package/src/views/bd/setting/table_model/edit.vue +702 -498
- package/src/views/bd/setting/table_model/list.vue +28 -0
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +228 -121
- package/src/views/bd/setting/table_model/mixins/list.js +55 -20
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +50 -46
- package/src/views/bd/setting/utils/index.js +15 -0
- package/src/views/user/form/vform/designer.vue +303 -287
- package/src/views/user/form/vform/formFieldMapping.js +2 -3
- package/src/views/user/form/vform/render.vue +8 -0
|
@@ -84,6 +84,11 @@
|
|
|
84
84
|
:option="deleteProjectTagOption"
|
|
85
85
|
v-if="isDev && (currentFormType.editAuth === 1 || otherFlag)"
|
|
86
86
|
></projectTagDeleteButton>
|
|
87
|
+
<base-table-export
|
|
88
|
+
v-if="userFlag === 6"
|
|
89
|
+
:option="{ title: $t1('数据表导出'), targetRef: 'table-m1' }"
|
|
90
|
+
:parent-target="_self"
|
|
91
|
+
/>
|
|
87
92
|
</template>
|
|
88
93
|
<template #buttonRight>
|
|
89
94
|
<vxe-button
|
|
@@ -139,6 +144,29 @@
|
|
|
139
144
|
:readonly="true"
|
|
140
145
|
></projectTagView>
|
|
141
146
|
</template>
|
|
147
|
+
<template #operation="{ row }">
|
|
148
|
+
<formVersionButton
|
|
149
|
+
objType="SzTaMb"
|
|
150
|
+
:objCode="row.taCode"
|
|
151
|
+
@reverCallback="searchEvent"
|
|
152
|
+
></formVersionButton>
|
|
153
|
+
<a
|
|
154
|
+
v-if="exportArchiveEnabled"
|
|
155
|
+
href="javascript:void(0);"
|
|
156
|
+
class="a-link"
|
|
157
|
+
@click="jsonExportArchive(row)"
|
|
158
|
+
>
|
|
159
|
+
<el-tooltip
|
|
160
|
+
:enterable="false"
|
|
161
|
+
effect="dark"
|
|
162
|
+
:content="$t1('导出归档')"
|
|
163
|
+
placement="top"
|
|
164
|
+
popper-class="tooltip-skin"
|
|
165
|
+
>
|
|
166
|
+
<i class="el-icon-upload2" />
|
|
167
|
+
</el-tooltip>
|
|
168
|
+
</a>
|
|
169
|
+
</template>
|
|
142
170
|
</vxe-grid>
|
|
143
171
|
</div>
|
|
144
172
|
</div>
|
|
@@ -7,7 +7,7 @@ import zdDialog from "@base/views/bd/setting/table_model/zdDialog.vue";
|
|
|
7
7
|
import {getBdFlag} from "@base/api/user";
|
|
8
8
|
import {getJsxBtn} from "@base/views/bd/setting/utils/index";
|
|
9
9
|
import otherAuthDialog from "../otherAuthDialog.vue";
|
|
10
|
-
|
|
10
|
+
import { mapGetters } from "vuex";
|
|
11
11
|
|
|
12
12
|
let modules = {};
|
|
13
13
|
modules = {
|
|
@@ -15,8 +15,11 @@ modules = {
|
|
|
15
15
|
props: {
|
|
16
16
|
_dataId: [String, Number],
|
|
17
17
|
currentFormType: Object,
|
|
18
|
-
readonly: Boolean,
|
|
19
|
-
otherFlag:Boolean
|
|
18
|
+
// readonly: Boolean,
|
|
19
|
+
otherFlag:Boolean,
|
|
20
|
+
hData: Object,
|
|
21
|
+
compareHData: Object,
|
|
22
|
+
extractedObj: Object,
|
|
20
23
|
},
|
|
21
24
|
components: {
|
|
22
25
|
formOplogTable,
|
|
@@ -49,6 +52,23 @@ modules = {
|
|
|
49
52
|
taBm: null,
|
|
50
53
|
sszstBm: null,
|
|
51
54
|
},
|
|
55
|
+
oldSzTaMb: {
|
|
56
|
+
enabled: true,
|
|
57
|
+
taType: 0,
|
|
58
|
+
szTaZdMbDTOs: [],
|
|
59
|
+
menuKindName: null,
|
|
60
|
+
menuKindCode: null,
|
|
61
|
+
serviceName: null,
|
|
62
|
+
taRule: 0,
|
|
63
|
+
dataRange: 0,
|
|
64
|
+
szTaMbTagDTOs: [],
|
|
65
|
+
fromTable: false,
|
|
66
|
+
taCh: null,
|
|
67
|
+
sszstEn: null,
|
|
68
|
+
taEn: null,
|
|
69
|
+
taBm: null,
|
|
70
|
+
sszstBm: null,
|
|
71
|
+
},
|
|
52
72
|
treeDefaultZds: [],
|
|
53
73
|
productOption: {},
|
|
54
74
|
showSzTaMbDialog: false,
|
|
@@ -90,10 +110,46 @@ modules = {
|
|
|
90
110
|
preValue: null, // 上一次的值(变更前的值)
|
|
91
111
|
|
|
92
112
|
sid: null,
|
|
93
|
-
showOtherAuthDialog:false
|
|
113
|
+
showOtherAuthDialog:false,
|
|
114
|
+
|
|
115
|
+
zdTypeMap: {
|
|
116
|
+
Boolean: "布尔",
|
|
117
|
+
Integer: "整数",
|
|
118
|
+
Long: "长整数",
|
|
119
|
+
Decimal: "精度小数",
|
|
120
|
+
Money: "金额",
|
|
121
|
+
Text: "文本",
|
|
122
|
+
TextArea: "长文本",
|
|
123
|
+
DateTime: "日期时间",
|
|
124
|
+
Reference: "关联表(文本)",
|
|
125
|
+
ReferenceLong: "关联表(长整型)",
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
treeFlagMap:{
|
|
129
|
+
name: "名称",
|
|
130
|
+
wbs: "WBS码",
|
|
131
|
+
parent: "上级ID",
|
|
132
|
+
treePath: "树ID路径",
|
|
133
|
+
treePathName: "树名称路径",
|
|
134
|
+
hasChild: "是否有下级",
|
|
135
|
+
grade: "层级",
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
readonly: false,
|
|
139
|
+
isCompare: false,
|
|
94
140
|
};
|
|
95
141
|
},
|
|
142
|
+
computed: {
|
|
143
|
+
...mapGetters([
|
|
144
|
+
"userFlag",
|
|
145
|
+
]),
|
|
146
|
+
},
|
|
96
147
|
created() {
|
|
148
|
+
if(this.hData){
|
|
149
|
+
this.readonly = true;
|
|
150
|
+
}else{
|
|
151
|
+
this.readonly = this.$attrs.readonly || false;
|
|
152
|
+
}
|
|
97
153
|
if (this._dataId && !isNaN(this._dataId)) {
|
|
98
154
|
this.dataId = this._dataId;
|
|
99
155
|
} else {
|
|
@@ -109,8 +165,26 @@ modules = {
|
|
|
109
165
|
this.getData();
|
|
110
166
|
},
|
|
111
167
|
methods: {
|
|
168
|
+
initData(formData){
|
|
169
|
+
if(!!formData?.id)this.isEdit = true;
|
|
170
|
+
this.szTaMb = formData;
|
|
171
|
+
this.getMenuKindAuth(formData.menuKindCode);
|
|
172
|
+
if(!!formData?.id)this.getCreatedTableColumns();
|
|
173
|
+
},
|
|
112
174
|
getData(callback) {
|
|
113
|
-
if
|
|
175
|
+
if(this.extractedObj){
|
|
176
|
+
this.dataId = this.extractedObj.id;
|
|
177
|
+
this.initData(this.extractedObj)
|
|
178
|
+
//获取操作日志数据
|
|
179
|
+
this.$refs["oplogTable"].initData({
|
|
180
|
+
param: () => {
|
|
181
|
+
return {
|
|
182
|
+
logType: "SzTaMb",
|
|
183
|
+
logObjCode: this.szTaMb.taCode,
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
}else if (this.dataId && !isNaN(this.dataId)) {
|
|
114
188
|
this.isEdit = true;
|
|
115
189
|
this.$http({
|
|
116
190
|
aes: true,
|
|
@@ -127,10 +201,11 @@ modules = {
|
|
|
127
201
|
szTaMb.szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs;
|
|
128
202
|
szTaMb.attachmentDTOs = this.szTaMb.attachmentDTOs;
|
|
129
203
|
szTaMb.oplogDTOs = this.szTaMb.oplogDTOs;
|
|
130
|
-
this.szTaMb = szTaMb;
|
|
131
204
|
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
205
|
+
// this.szTaMb = szTaMb;
|
|
206
|
+
// this.getCreatedTableColumns();
|
|
207
|
+
// this.getMenuKindAuth(this.szTaMb.menuKindCode);
|
|
208
|
+
this.initData(szTaMb);
|
|
134
209
|
} else {
|
|
135
210
|
callback(res);
|
|
136
211
|
}
|
|
@@ -145,6 +220,22 @@ modules = {
|
|
|
145
220
|
});
|
|
146
221
|
},
|
|
147
222
|
});
|
|
223
|
+
} else if (this.hData){
|
|
224
|
+
this.dataId = this.hData.id
|
|
225
|
+
/* this.isEdit = true;
|
|
226
|
+
this.szTaMb = this.$baseLodash.cloneDeep(this.hData);
|
|
227
|
+
this.getMenuKindAuth(this.szTaMb.menuKindCode);
|
|
228
|
+
this.getCreatedTableColumns(); */
|
|
229
|
+
this.initData(this.$baseLodash.cloneDeep(this.hData));
|
|
230
|
+
if (this.compareHData && this.$attrs.isCompare) {
|
|
231
|
+
this.oldSzTaMb = this.$baseLodash.cloneDeep(this.compareHData);
|
|
232
|
+
let oldSzTaZdMbDTOs = this.$baseLodash.cloneDeep(this.compareHData.szTaZdMbDTOs) || [];
|
|
233
|
+
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
234
|
+
let oldItem = oldSzTaZdMbDTOs.find((pItem) => pItem.zdEn === item.zdEn);
|
|
235
|
+
item.hData = oldItem || {};
|
|
236
|
+
})
|
|
237
|
+
this.isCompare = true;
|
|
238
|
+
}
|
|
148
239
|
} else {
|
|
149
240
|
this.getMenuKindAuth(this.szTaMb.menuKindCode);
|
|
150
241
|
}
|
|
@@ -249,22 +340,6 @@ modules = {
|
|
|
249
340
|
fixed: "left",
|
|
250
341
|
slots: {
|
|
251
342
|
default: "zdEn",
|
|
252
|
-
/*default: ({row, rowIndex, $table}) => {
|
|
253
|
-
let disabled = !!row.systems || !!row.relationZd;
|
|
254
|
-
if (!disabled) {
|
|
255
|
-
return [
|
|
256
|
-
<el-form-item prop={'szTaZdMbDTOs.' + rowIndex + '.zdEn'}
|
|
257
|
-
rules={[{required: true, trigger: ['blur', 'change']}]}>
|
|
258
|
-
<el-input v-model={row.zdEn} clearable/>
|
|
259
|
-
</el-form-item>
|
|
260
|
-
];
|
|
261
|
-
} else {
|
|
262
|
-
let style = !!row.relationZd ? "margin-left:20px" : "";
|
|
263
|
-
return [
|
|
264
|
-
<div style={style}>{row.zdEn}</div>
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
}*/
|
|
268
343
|
},
|
|
269
344
|
},
|
|
270
345
|
{
|
|
@@ -281,9 +356,23 @@ modules = {
|
|
|
281
356
|
default: ({row, rowIndex, $table}) => {
|
|
282
357
|
let taZdMc = row.taZdMc;
|
|
283
358
|
let createdTableColumnArray = this.createdTableColumnArray;
|
|
284
|
-
|
|
359
|
+
let oldResult = createdTableColumnArray.includes(row?.hData?.taZdMc)
|
|
360
|
+
? "是"
|
|
361
|
+
: "_";
|
|
362
|
+
let result = taZdMc && createdTableColumnArray.includes(taZdMc)
|
|
285
363
|
? "是"
|
|
286
364
|
: "_";
|
|
365
|
+
return [
|
|
366
|
+
<el-form-item>
|
|
367
|
+
<fieldCompare
|
|
368
|
+
isCompare={this.isCompare}
|
|
369
|
+
oldVal={oldResult}
|
|
370
|
+
newVal={result}
|
|
371
|
+
>
|
|
372
|
+
{result}
|
|
373
|
+
</fieldCompare>
|
|
374
|
+
</el-form-item>
|
|
375
|
+
]
|
|
287
376
|
},
|
|
288
377
|
},
|
|
289
378
|
},
|
|
@@ -293,14 +382,6 @@ modules = {
|
|
|
293
382
|
width: 150,
|
|
294
383
|
slots: {
|
|
295
384
|
default: "zdCh",
|
|
296
|
-
/*default: ({row, rowIndex, $table}) => {
|
|
297
|
-
return [
|
|
298
|
-
<el-form-item prop={'szTaZdMbDTOs.' + rowIndex + '.zdCh'}
|
|
299
|
-
rules={[{required: true, trigger: ['blur', 'change']}]}>
|
|
300
|
-
<el-input v-model={row.zdCh} clearable disabled={!!row.systems}/>
|
|
301
|
-
</el-form-item>
|
|
302
|
-
];
|
|
303
|
-
}*/
|
|
304
385
|
},
|
|
305
386
|
},
|
|
306
387
|
{
|
|
@@ -359,43 +440,32 @@ modules = {
|
|
|
359
440
|
width: 200,
|
|
360
441
|
slots: {
|
|
361
442
|
default: "zdTypeValues",
|
|
362
|
-
/*default: ({row, rowIndex, $table}) => {
|
|
363
|
-
let disabled = !!row.systems || !!row.relationZd;
|
|
364
|
-
return [
|
|
365
|
-
<el-form-item prop={'szTaZdMbDTOs.' + rowIndex + '.zdTypeValues'}
|
|
366
|
-
rules={[{required: false, trigger: ['blur', 'change']}]}>
|
|
367
|
-
<el-input v-model={row.zdTypeValues} clearable disabled={disabled}/>
|
|
368
|
-
</el-form-item>
|
|
369
|
-
];
|
|
370
|
-
}*/
|
|
371
443
|
},
|
|
372
444
|
},
|
|
373
445
|
{
|
|
374
446
|
title: this.$t1("是否必填项"),
|
|
375
447
|
field: "required",
|
|
376
448
|
width: 140,
|
|
449
|
+
params: {
|
|
450
|
+
exportVal:({row,column})=>{
|
|
451
|
+
return this.$t1(row[column.field]? "是": "否")
|
|
452
|
+
}
|
|
453
|
+
},
|
|
377
454
|
slots: {
|
|
378
455
|
default: "required",
|
|
379
|
-
/*default: ({row, $table, rowIndex}) => {
|
|
380
|
-
let disabled = !!row.systems || !!row.relationZd;
|
|
381
|
-
return [
|
|
382
|
-
<el-checkbox v-model={row.required} disabled={disabled}/>
|
|
383
|
-
];
|
|
384
|
-
}*/
|
|
385
456
|
},
|
|
386
457
|
},
|
|
387
458
|
{
|
|
388
459
|
title: this.$t1("是否启用"),
|
|
389
460
|
field: "enabled",
|
|
390
461
|
width: 120,
|
|
462
|
+
params: {
|
|
463
|
+
exportVal:({row,column})=>{
|
|
464
|
+
return this.$t1(row[column.field]? "是": "否")
|
|
465
|
+
}
|
|
466
|
+
},
|
|
391
467
|
slots: {
|
|
392
468
|
default: "enabled",
|
|
393
|
-
/*default: ({row, $table, rowIndex}) => {
|
|
394
|
-
let disabled = !!row.systems || !!row.relationZd;
|
|
395
|
-
return [
|
|
396
|
-
<el-checkbox v-model={row.enabled} disabled={disabled}/>
|
|
397
|
-
];
|
|
398
|
-
}*/
|
|
399
469
|
},
|
|
400
470
|
},
|
|
401
471
|
|
|
@@ -403,20 +473,24 @@ modules = {
|
|
|
403
473
|
title: this.$t1("是否自动生成编码"),
|
|
404
474
|
field: "generateCode",
|
|
405
475
|
width: 180,
|
|
476
|
+
params: {
|
|
477
|
+
exportVal:({row,column})=>{
|
|
478
|
+
return this.$t1(row[column.field]? "是": "否")
|
|
479
|
+
}
|
|
480
|
+
},
|
|
406
481
|
slots: {
|
|
407
482
|
default: "generateCode",
|
|
408
|
-
/*default: ({row, $table, rowIndex}) => {
|
|
409
|
-
let disabled = !!row.systems || !!row.relationZd;
|
|
410
|
-
return [
|
|
411
|
-
<el-checkbox v-model={row.generateCode} disabled={disabled}/>
|
|
412
|
-
];
|
|
413
|
-
}*/
|
|
414
483
|
},
|
|
415
484
|
},
|
|
416
485
|
{
|
|
417
486
|
title: this.$t1('数据库字段加密'),
|
|
418
487
|
field: 'atened',
|
|
419
488
|
width: 180,
|
|
489
|
+
params: {
|
|
490
|
+
exportVal:({row,column})=>{
|
|
491
|
+
return this.$t1(row[column.field]? "是": "否")
|
|
492
|
+
}
|
|
493
|
+
},
|
|
420
494
|
slots: {
|
|
421
495
|
default: "atened"
|
|
422
496
|
}
|
|
@@ -425,6 +499,11 @@ modules = {
|
|
|
425
499
|
title: this.$t1('是否更新忽略字段'),
|
|
426
500
|
field: 'updateIgnore',
|
|
427
501
|
width: 180,
|
|
502
|
+
params: {
|
|
503
|
+
exportVal:({row,column})=>{
|
|
504
|
+
return this.$t1(row[column.field]? "是": "否")
|
|
505
|
+
}
|
|
506
|
+
},
|
|
428
507
|
slots: {
|
|
429
508
|
default: "updateIgnore"
|
|
430
509
|
}
|
|
@@ -435,15 +514,6 @@ modules = {
|
|
|
435
514
|
width: 150,
|
|
436
515
|
slots: {
|
|
437
516
|
default: "codeType",
|
|
438
|
-
/*default: ({row, rowIndex, $table}) => {
|
|
439
|
-
let disabled = !!row.systems || !!row.relationZd;
|
|
440
|
-
return [
|
|
441
|
-
<el-form-item prop={'szTaZdMbDTOs.' + rowIndex + '.codeType'}
|
|
442
|
-
rules={[{required: false, trigger: ['blur', 'change']}]}>
|
|
443
|
-
<el-input v-model={row.codeType} clearable disabled={disabled}/>
|
|
444
|
-
</el-form-item>
|
|
445
|
-
];
|
|
446
|
-
}*/
|
|
447
517
|
},
|
|
448
518
|
},
|
|
449
519
|
{
|
|
@@ -452,16 +522,6 @@ modules = {
|
|
|
452
522
|
width: 150,
|
|
453
523
|
slots: {
|
|
454
524
|
default: "orders",
|
|
455
|
-
/*default: ({row, rowIndex, $table}) => {
|
|
456
|
-
return [
|
|
457
|
-
<el-form-item prop={'szTaZdMbDTOs.' + rowIndex + '.orders'}
|
|
458
|
-
rules={[{required: false, trigger: ['blur', 'change']}]}>
|
|
459
|
-
<base-input-number v-model={row.orders} disabled={!!row.systems} onchange={() => {
|
|
460
|
-
this.changeOrders(row);
|
|
461
|
-
}}/>
|
|
462
|
-
</el-form-item>
|
|
463
|
-
];
|
|
464
|
-
}*/
|
|
465
525
|
},
|
|
466
526
|
},
|
|
467
527
|
{
|
|
@@ -477,7 +537,7 @@ modules = {
|
|
|
477
537
|
let hasCreated =
|
|
478
538
|
!!taZdMc && createdTableColumnArray.includes(taZdMc);
|
|
479
539
|
// let style = !row.relationZd ? "margin-left:20px" : "";
|
|
480
|
-
if (!row.systems && !hasCreated) {
|
|
540
|
+
if (!row.systems && !hasCreated && !this.readonly) {
|
|
481
541
|
//非内置,未创建字段,非关联表带出来的字段
|
|
482
542
|
return getJsxBtn({
|
|
483
543
|
iconName: "el-icon-delete",
|
|
@@ -491,6 +551,11 @@ modules = {
|
|
|
491
551
|
},
|
|
492
552
|
},
|
|
493
553
|
],
|
|
554
|
+
config:{
|
|
555
|
+
// rowConfig:{
|
|
556
|
+
// height: 60,
|
|
557
|
+
// }
|
|
558
|
+
}
|
|
494
559
|
};
|
|
495
560
|
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
496
561
|
this.productOption = opts;
|
|
@@ -616,6 +681,9 @@ modules = {
|
|
|
616
681
|
});
|
|
617
682
|
});
|
|
618
683
|
},
|
|
684
|
+
isReferenceZdType(zdType) {
|
|
685
|
+
return zdType === "Reference" || zdType === "ReferenceLong";
|
|
686
|
+
},
|
|
619
687
|
openReferenceZdDialog(row, rowIndex, $table) {
|
|
620
688
|
let referenceZd = row.referenceZd;
|
|
621
689
|
let referenceZd2 = row.referenceZd + "." + row.zdEn;
|
|
@@ -629,16 +697,13 @@ modules = {
|
|
|
629
697
|
referenceKey = referenceZd.substr(index + 1);
|
|
630
698
|
referenceShowFields = this.szTaMb.szTaZdMbDTOs
|
|
631
699
|
.filter((item) => {
|
|
632
|
-
// return referenceZd == item.relationZd;
|
|
633
700
|
let flag = false;
|
|
634
701
|
if (item.relationZd === referenceZd || item.relationZd === referenceZd2) {
|
|
635
702
|
flag = true
|
|
636
703
|
}
|
|
637
704
|
return flag;
|
|
638
|
-
// return referenceZd == item.relationZd ;
|
|
639
705
|
})
|
|
640
706
|
.map((item) => {
|
|
641
|
-
// return item.referenceZd.split(".")[1]
|
|
642
707
|
return item.referenceZd.substr(index + 1);
|
|
643
708
|
});
|
|
644
709
|
}
|
|
@@ -661,42 +726,66 @@ modules = {
|
|
|
661
726
|
let map = {
|
|
662
727
|
"Integer": "11",
|
|
663
728
|
"Long": "20",
|
|
729
|
+
"ReferenceLong": "20",
|
|
664
730
|
"Decimal": "21,6",
|
|
665
731
|
"Money": "21,2",
|
|
666
732
|
"Text": "255"
|
|
667
733
|
}
|
|
668
734
|
row.zdLength = map[row.zdType] || null;
|
|
669
|
-
this.
|
|
735
|
+
if (!this.isReferenceZdType(row.zdType)) {
|
|
736
|
+
this.clearReferenceZd(row);
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
getReferenceChildRows(row) {
|
|
740
|
+
let referenceZd = row.referenceZd;
|
|
741
|
+
if (!referenceZd && !row.zdEn) {
|
|
742
|
+
return [];
|
|
743
|
+
}
|
|
744
|
+
let referenceZd2 = referenceZd ? referenceZd + "." + row.zdEn : null;
|
|
745
|
+
let relationZdSuffix = row.zdEn ? "." + row.zdEn : null;
|
|
746
|
+
return this.szTaMb.szTaZdMbDTOs.filter((item) => {
|
|
747
|
+
if (referenceZd && (referenceZd === item.relationZd || referenceZd2 === item.relationZd)) {
|
|
748
|
+
return true;
|
|
749
|
+
}
|
|
750
|
+
if (relationZdSuffix && item.relationZd && item.relationZd.endsWith(relationZdSuffix)) {
|
|
751
|
+
return true;
|
|
752
|
+
}
|
|
753
|
+
return false;
|
|
754
|
+
});
|
|
755
|
+
},
|
|
756
|
+
confirmClearReferenceZd(row) {
|
|
757
|
+
if (!row.referenceZd) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
if (this.hasFieldCreated(row)) {
|
|
761
|
+
this.$baseAlert(this.$t1("该字段已在数据库中创建,不能清空关联配置"));
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
let childRows = this.getReferenceChildRows(row);
|
|
765
|
+
if (childRows.some((item) => this.hasFieldCreated(item))) {
|
|
766
|
+
this.$baseAlert(this.$t1("关联显示字段已在数据库中创建,不能清空关联配置"));
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
let text = this.$t1("清空关联配置将同时删除关联显示字段,您确定要继续吗?");
|
|
770
|
+
this.$baseConfirm(text).then(() => {
|
|
771
|
+
this.clearReferenceZd(row);
|
|
772
|
+
});
|
|
670
773
|
},
|
|
671
774
|
clearReferenceZd(row) {
|
|
672
775
|
let referenceZd = row.referenceZd;
|
|
673
776
|
if (referenceZd) {
|
|
674
|
-
let referenceZd2 =
|
|
777
|
+
let referenceZd2 = referenceZd + "." + row.zdEn;
|
|
675
778
|
this.szTaMb.szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs.filter((item) => {
|
|
676
779
|
return referenceZd !== item.relationZd && referenceZd2 !== item.relationZd;
|
|
677
780
|
});
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
/*let oldReferenceZd = row.referenceZd;
|
|
683
|
-
if (oldReferenceZd) {
|
|
684
|
-
let oldReferenceZd2 = row.referenceZd + "." + row.zdEn;
|
|
685
|
-
let index0 = oldReferenceZd.indexOf(".");
|
|
686
|
-
let oldReferenceEntity = oldReferenceZd.substring(0, index0);
|
|
687
|
-
let delIndex = [];
|
|
688
|
-
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
689
|
-
if (item.relationZd && (oldReferenceZd == item.relationZd || oldReferenceZd2 == item.relationZd)) {
|
|
690
|
-
delIndex.push(index);
|
|
691
|
-
}
|
|
781
|
+
} else if (row.zdEn) {
|
|
782
|
+
let relationZdSuffix = "." + row.zdEn;
|
|
783
|
+
this.szTaMb.szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs.filter((item) => {
|
|
784
|
+
return !(item.relationZd && item.relationZd.endsWith(relationZdSuffix));
|
|
692
785
|
});
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
row.referenceZd = null;
|
|
699
|
-
}*/
|
|
786
|
+
}
|
|
787
|
+
row.referenceZd = null;
|
|
788
|
+
row.refServiceName = null;
|
|
700
789
|
},
|
|
701
790
|
confirmReferenceZdDialog() {
|
|
702
791
|
let row = this.szTaMb.szTaZdMbDTOs[this.currentIndex];
|
|
@@ -717,15 +806,15 @@ modules = {
|
|
|
717
806
|
let index0 = oldReferenceZd.indexOf(".");
|
|
718
807
|
let oldReferenceEntity = oldReferenceZd.substring(0, index0);
|
|
719
808
|
let delIndex = [];
|
|
720
|
-
if (referenceEntity
|
|
809
|
+
if (referenceEntity !== oldReferenceEntity) {
|
|
721
810
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
722
|
-
if (item.relationZd && (oldReferenceZd
|
|
811
|
+
if (item.relationZd && (oldReferenceZd === item.relationZd || oldReferenceZd2 === item.relationZd)) {
|
|
723
812
|
delIndex.push(index);
|
|
724
813
|
}
|
|
725
814
|
});
|
|
726
815
|
} else {
|
|
727
816
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
728
|
-
if (oldReferenceZd
|
|
817
|
+
if (oldReferenceZd === item.relationZd || oldReferenceZd2 === item.relationZd) {
|
|
729
818
|
if (!keys.includes(item.referenceZd)) {
|
|
730
819
|
delIndex.push(index);
|
|
731
820
|
} else {
|
|
@@ -742,7 +831,7 @@ modules = {
|
|
|
742
831
|
}
|
|
743
832
|
|
|
744
833
|
let oldKeys = this.szTaMb.szTaZdMbDTOs
|
|
745
|
-
.filter((item) => (referenceZd
|
|
834
|
+
.filter((item) => (referenceZd === item.relationZd || (referenceZd + "." + item.zdEn) === item.relationZd))
|
|
746
835
|
.map((item) => item.referenceZd);
|
|
747
836
|
let addReferenceShowFields = referenceShowFields.filter((item, index) => {
|
|
748
837
|
return !oldKeys.includes(referenceEntity + "." + item);
|
|
@@ -750,7 +839,7 @@ modules = {
|
|
|
750
839
|
|
|
751
840
|
let addIndex = -1;
|
|
752
841
|
let lastIndex = this.szTaMb.szTaZdMbDTOs.findLastIndex((item) => {
|
|
753
|
-
return referenceZd
|
|
842
|
+
return referenceZd === item.relationZd || (referenceZd + "." + item.zdEn) === item.relationZd;
|
|
754
843
|
});
|
|
755
844
|
addIndex = lastIndex >= 0 ? lastIndex + 1 : this.currentIndex + 1;
|
|
756
845
|
|
|
@@ -834,7 +923,7 @@ modules = {
|
|
|
834
923
|
confirmEntityDialog(rows) {
|
|
835
924
|
if (rows.length) {
|
|
836
925
|
let row = rows[0];
|
|
837
|
-
if (this.referenceEntity
|
|
926
|
+
if (this.referenceEntity !== row.taBm) {
|
|
838
927
|
this.referenceKey = null;
|
|
839
928
|
this.referenceShowFields = [];
|
|
840
929
|
}
|
|
@@ -915,7 +1004,7 @@ modules = {
|
|
|
915
1004
|
changeTaRule(val) {
|
|
916
1005
|
let treeDefaultZds = this.$baseLodash.cloneDeep(this.treeDefaultZds);
|
|
917
1006
|
let szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs;
|
|
918
|
-
if (val
|
|
1007
|
+
if (val === 1) {
|
|
919
1008
|
let zdEns = szTaZdMbDTOs
|
|
920
1009
|
.filter((item) => !!item.zdEn)
|
|
921
1010
|
.map((item) => item.zdEn);
|
|
@@ -956,7 +1045,7 @@ modules = {
|
|
|
956
1045
|
let szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs;
|
|
957
1046
|
let value = 0;
|
|
958
1047
|
let allOrders = szTaZdMbDTOs
|
|
959
|
-
.filter((item) => item.orders
|
|
1048
|
+
.filter((item) => item.orders !== null && item.orders !== undefined)
|
|
960
1049
|
.map((item) => item.orders);
|
|
961
1050
|
szTaZdMbDTOs.forEach((item) => {
|
|
962
1051
|
let orders = item.orders;
|
|
@@ -970,7 +1059,7 @@ modules = {
|
|
|
970
1059
|
getBdEnv() {
|
|
971
1060
|
getBdFlag({
|
|
972
1061
|
success: (res) => {
|
|
973
|
-
this.isDev = res.objx
|
|
1062
|
+
this.isDev = res.objx === 1;
|
|
974
1063
|
},
|
|
975
1064
|
});
|
|
976
1065
|
},
|
|
@@ -1096,14 +1185,14 @@ modules = {
|
|
|
1096
1185
|
let toTaBmZdField = null;
|
|
1097
1186
|
if (toTaBmZd) {
|
|
1098
1187
|
toTaBmZd.split(".").forEach((item, index) => {
|
|
1099
|
-
if (index
|
|
1188
|
+
if (index === 0) {
|
|
1100
1189
|
toTaBmZdEntity = item;
|
|
1101
|
-
} else if (index
|
|
1190
|
+
} else if (index === 1) {
|
|
1102
1191
|
toTaBmZdField = item;
|
|
1103
1192
|
}
|
|
1104
1193
|
});
|
|
1105
1194
|
} else {
|
|
1106
|
-
if (this.szTaMb.taType
|
|
1195
|
+
if (this.szTaMb.taType === 1 && this.szTaMb.sszstBm) {
|
|
1107
1196
|
toTaBmZdEntity = this.szTaMb.sszstBm;
|
|
1108
1197
|
}
|
|
1109
1198
|
}
|
|
@@ -1133,7 +1222,7 @@ modules = {
|
|
|
1133
1222
|
confirmEntityDialog3(rows) {
|
|
1134
1223
|
if (rows.length) {
|
|
1135
1224
|
let row = rows[0];
|
|
1136
|
-
if (this.toTaBmZdEntity
|
|
1225
|
+
if (this.toTaBmZdEntity !== row.taBm) {
|
|
1137
1226
|
this.toTaBmZdEntity = row.taBm;
|
|
1138
1227
|
this.toTaBmZdField = null;
|
|
1139
1228
|
}
|
|
@@ -1161,13 +1250,13 @@ modules = {
|
|
|
1161
1250
|
if(!this.fkey)return
|
|
1162
1251
|
let oldVal = this.preValue;
|
|
1163
1252
|
let newVal = val
|
|
1164
|
-
if (row.zdType
|
|
1253
|
+
if (this.isReferenceZdType(row.zdType)) {
|
|
1165
1254
|
let referenceZd = row.referenceZd;
|
|
1166
1255
|
if (referenceZd) {
|
|
1167
1256
|
let referenceZd2 = row.referenceZd + "." + oldVal
|
|
1168
1257
|
let relationZd = row.referenceZd + "." + newVal
|
|
1169
1258
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
|
1170
|
-
if (referenceZd
|
|
1259
|
+
if (referenceZd === item.relationZd || referenceZd2 === item.relationZd) {
|
|
1171
1260
|
item.relationZd = relationZd;
|
|
1172
1261
|
}
|
|
1173
1262
|
});
|
|
@@ -1197,6 +1286,24 @@ modules = {
|
|
|
1197
1286
|
confirmOtherAuthDialog(){
|
|
1198
1287
|
this.$baseReload()
|
|
1199
1288
|
},
|
|
1289
|
+
excelExport(){
|
|
1290
|
+
this.$excelExport({title: '数据表字段明细导出', targetRef: 'table-szTaZdMb', prefix: USER_PREFIX, type: 'selected'})
|
|
1291
|
+
},
|
|
1292
|
+
getHValue(row, column) {
|
|
1293
|
+
if (row.hData && row.hData.id) {
|
|
1294
|
+
let result = row.hData[column.property];
|
|
1295
|
+
if(column.property === 'zdType'){
|
|
1296
|
+
result = this.zdTypeMap[result]
|
|
1297
|
+
}else if(column.property === 'treeFlag'){
|
|
1298
|
+
result = this.treeFlagMap[result]
|
|
1299
|
+
}
|
|
1300
|
+
return result
|
|
1301
|
+
}/* else if (!row?.hData?.id) {
|
|
1302
|
+
return "HAS_NO_HDATA";
|
|
1303
|
+
} */ else {
|
|
1304
|
+
return null;
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1200
1307
|
},
|
|
1201
1308
|
};
|
|
1202
1309
|
export default modules;
|