cloud-web-corejs 1.0.54-dev.278 → 1.0.54-dev.279
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/components/table/vxeFilter/mixin.js +1 -295
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +632 -632
- package/src/layout/components/extractedCode/viewDialog.vue +1 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +234 -209
- package/src/views/bd/setting/table_model/edit.vue +12 -0
- package/src/views/bd/setting/table_model/mixins/edit.js +66 -14
@@ -25,6 +25,7 @@
|
|
25
25
|
:_viewType="1"
|
26
26
|
@reload="$reloadHandle"
|
27
27
|
@openDesignDialog="openDesingerDialogByChild"
|
28
|
+
:extractedObj="extractedObj"
|
28
29
|
></component>
|
29
30
|
<el-drawer :title="$t1('表单设计({formName})',{formName})" :visible.sync="showDesingerDialog" :modal="false"
|
30
31
|
:destroy-on-close="true"
|
@@ -1,209 +1,234 @@
|
|
1
|
-
import projectTagView from "@base/components/projectTag/view.vue";
|
2
|
-
import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
|
3
|
-
import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
|
4
|
-
import formOplogTable from "@base/components/formOplog/index.vue";
|
5
|
-
import {getBdFlag} from "@base/api/user";
|
6
|
-
import otherAuthDialog from "../otherAuthDialog.vue";
|
7
|
-
|
8
|
-
let modules = {};
|
9
|
-
modules = {
|
10
|
-
name: 'bd_form_templateEdit',
|
11
|
-
props: {
|
12
|
-
_dataId: [String, Number],
|
13
|
-
currentFormType: Object,
|
14
|
-
readonly: Boolean,
|
15
|
-
otherFlag:Boolean
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
this.
|
59
|
-
}
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
}
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
this.$
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
}
|
209
|
-
|
1
|
+
import projectTagView from "@base/components/projectTag/view.vue";
|
2
|
+
import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
|
3
|
+
import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
|
4
|
+
import formOplogTable from "@base/components/formOplog/index.vue";
|
5
|
+
import {getBdFlag} from "@base/api/user";
|
6
|
+
import otherAuthDialog from "../otherAuthDialog.vue";
|
7
|
+
|
8
|
+
let modules = {};
|
9
|
+
modules = {
|
10
|
+
name: 'bd_form_templateEdit',
|
11
|
+
props: {
|
12
|
+
_dataId: [String, Number],
|
13
|
+
currentFormType: Object,
|
14
|
+
readonly: Boolean,
|
15
|
+
otherFlag:Boolean,
|
16
|
+
extractedObj:{
|
17
|
+
type:Object,
|
18
|
+
default:()=> null
|
19
|
+
}
|
20
|
+
},
|
21
|
+
components: {
|
22
|
+
projectTagView,
|
23
|
+
MenuKindDialog,
|
24
|
+
preformDialog,
|
25
|
+
formOplogTable,
|
26
|
+
otherAuthDialog
|
27
|
+
},
|
28
|
+
data() {
|
29
|
+
return {
|
30
|
+
isEdit: false,
|
31
|
+
tabIndex: 'first',
|
32
|
+
dataId: '',
|
33
|
+
formTemplate: {
|
34
|
+
enabled: true,
|
35
|
+
history: false,
|
36
|
+
serviceId: 'user',
|
37
|
+
formTypeCode: null,
|
38
|
+
menuKindName: null,
|
39
|
+
menuKindCode: null,
|
40
|
+
serviceName: null,
|
41
|
+
formTemplateTagDTOs: [],
|
42
|
+
hasWf: false
|
43
|
+
},
|
44
|
+
isInited: false,
|
45
|
+
serviceIds: ['user'],
|
46
|
+
showMenuKindDialog: false,
|
47
|
+
isDev: true,
|
48
|
+
showPreformDialog: false,
|
49
|
+
menuKindAuth: {
|
50
|
+
editAuth: 0
|
51
|
+
},
|
52
|
+
sid: null,
|
53
|
+
showOtherAuthDialog:false
|
54
|
+
};
|
55
|
+
},
|
56
|
+
created() {
|
57
|
+
if(this.extractedObj?.objx?.id){
|
58
|
+
this.dataId = this.extractedObj.obj.id;
|
59
|
+
}else if (this._dataId) {
|
60
|
+
this.dataId = this._dataId;
|
61
|
+
} else {
|
62
|
+
this.formTemplate.menuKindName = this.currentFormType?.name || null;
|
63
|
+
this.formTemplate.menuKindCode = this.currentFormType?.menuKindCode || null;
|
64
|
+
this.formTemplate.serviceName = this.currentFormType?.serviceName || null;
|
65
|
+
}
|
66
|
+
},
|
67
|
+
mounted() {
|
68
|
+
this.getBdEnv();
|
69
|
+
this.getData();
|
70
|
+
},
|
71
|
+
methods: {
|
72
|
+
initData(formData){
|
73
|
+
this.isEdit = true;
|
74
|
+
this.formTemplate = formData || {};
|
75
|
+
this.getMenuKindAuth(this.formTemplate.menuKindCode);
|
76
|
+
this.$nextTick(() => {
|
77
|
+
this.isInited = true;
|
78
|
+
});
|
79
|
+
},
|
80
|
+
getData() {
|
81
|
+
if(this.extractedObj?.objx){
|
82
|
+
this.initData(this.extractedObj.objx)
|
83
|
+
}else if (this.dataId) {
|
84
|
+
this.$commonHttp({
|
85
|
+
aes: true,
|
86
|
+
url: USER_PREFIX + `/formTemplate/getByFormCode`,
|
87
|
+
method: `post`,
|
88
|
+
data: {
|
89
|
+
stringOne: this.dataId
|
90
|
+
},
|
91
|
+
isLoading: true,
|
92
|
+
modalStrictly: true,
|
93
|
+
success: res => {
|
94
|
+
this.initData(res.objx)
|
95
|
+
//获取操作日志数据
|
96
|
+
this.$refs['oplogTable'].initData({
|
97
|
+
param: () => {
|
98
|
+
return {
|
99
|
+
logType: "FormTemplate",
|
100
|
+
logObjCode: this.formTemplate.formCode
|
101
|
+
};
|
102
|
+
}
|
103
|
+
});
|
104
|
+
/* this.formTemplate = res.objx || {};
|
105
|
+
this.getMenuKindAuth(this.formTemplate.menuKindCode);
|
106
|
+
this.$nextTick(() => {
|
107
|
+
this.isInited = true;
|
108
|
+
});
|
109
|
+
//获取操作日志数据
|
110
|
+
this.$refs['oplogTable'].initData({
|
111
|
+
param: () => {
|
112
|
+
return {
|
113
|
+
logType: "FormTemplate",
|
114
|
+
logObjCode: this.formTemplate.formCode
|
115
|
+
};
|
116
|
+
}
|
117
|
+
}); */
|
118
|
+
}
|
119
|
+
});
|
120
|
+
} else {
|
121
|
+
this.getMenuKindAuth(this.formTemplate.menuKindCode);
|
122
|
+
this.isInited = true;
|
123
|
+
}
|
124
|
+
},
|
125
|
+
saveData() {
|
126
|
+
this.$refs.editForm.$baseValidate(valid => {
|
127
|
+
if (valid) {
|
128
|
+
this.openPreformDialog();
|
129
|
+
}
|
130
|
+
});
|
131
|
+
},
|
132
|
+
saveDataHandle(preformData) {
|
133
|
+
var url = USER_PREFIX + (this.isEdit ? `/formTemplate/update` : `/formTemplate/save`);
|
134
|
+
let formData = {
|
135
|
+
...this.formTemplate,
|
136
|
+
logContent: preformData.logContent
|
137
|
+
};
|
138
|
+
this.$http({
|
139
|
+
aes: true,
|
140
|
+
url: url,
|
141
|
+
method: `post`,
|
142
|
+
data: formData,
|
143
|
+
isLoading: true,
|
144
|
+
success: res => {
|
145
|
+
this.$message({
|
146
|
+
message: res.content,
|
147
|
+
type: 'success',
|
148
|
+
duration: 500,
|
149
|
+
onClose: t => {
|
150
|
+
if (this.isEdit) {
|
151
|
+
this.$baseReload();
|
152
|
+
} else {
|
153
|
+
this.$baseReload({
|
154
|
+
updateParam: {
|
155
|
+
_dataId: this.formTemplate.formCode
|
156
|
+
}
|
157
|
+
});
|
158
|
+
}
|
159
|
+
}
|
160
|
+
});
|
161
|
+
}
|
162
|
+
});
|
163
|
+
},
|
164
|
+
openPreformDialog() {
|
165
|
+
this.showPreformDialog = true;
|
166
|
+
},
|
167
|
+
confirmPreformDialog(preformData) {
|
168
|
+
this.saveDataHandle(preformData);
|
169
|
+
},
|
170
|
+
confirmInsertMenuKind(rows) {
|
171
|
+
if (rows.length > 0) {
|
172
|
+
let row = rows[0];
|
173
|
+
this.$set(this.formTemplate, 'menuKindCode', row.menuKindCode);
|
174
|
+
this.$set(this.formTemplate, 'menuKindName', row.name);
|
175
|
+
}
|
176
|
+
},
|
177
|
+
getBdEnv() {
|
178
|
+
getBdFlag({
|
179
|
+
success: res => {
|
180
|
+
this.isDev = res.objx == 1
|
181
|
+
}
|
182
|
+
});
|
183
|
+
},
|
184
|
+
openDesignDialog() {
|
185
|
+
let readonly = !this.menuKindAuth.editAuth
|
186
|
+
this.$emit('openDesignDialog', {
|
187
|
+
row: this.formTemplate,
|
188
|
+
readonly,
|
189
|
+
callback: () => {
|
190
|
+
this.$baseReload()
|
191
|
+
}
|
192
|
+
})
|
193
|
+
},
|
194
|
+
getMenuKindAuth(menuKindCode) {
|
195
|
+
if(this.otherFlag){
|
196
|
+
this.getOtherMenuKindAuth();
|
197
|
+
}else if (menuKindCode) {
|
198
|
+
this.$http({
|
199
|
+
// aes: true,
|
200
|
+
url: USER_PREFIX + '/menu_kind_auth/getAuth',
|
201
|
+
method: `post`,
|
202
|
+
data: {stringOne: menuKindCode},
|
203
|
+
isLoading: true,
|
204
|
+
success: res => {
|
205
|
+
this.menuKindAuth = res.objx || {}
|
206
|
+
}
|
207
|
+
});
|
208
|
+
}
|
209
|
+
},
|
210
|
+
|
211
|
+
getOtherMenuKindAuth() {
|
212
|
+
if (this.otherFlag && this.formTemplate.sid) {
|
213
|
+
this.$http({
|
214
|
+
aes: true,
|
215
|
+
url: USER_PREFIX + "/form_template_auth/getAuth",
|
216
|
+
method: `post`,
|
217
|
+
data: {stringOne: this.formTemplate.sid},
|
218
|
+
isLoading: true,
|
219
|
+
success: (res) => {
|
220
|
+
this.menuKindAuth = res.objx || {};
|
221
|
+
},
|
222
|
+
});
|
223
|
+
}
|
224
|
+
},
|
225
|
+
openOtherAuthDialog(){
|
226
|
+
this.sid = this.formTemplate.sid
|
227
|
+
this.showOtherAuthDialog = true
|
228
|
+
},
|
229
|
+
confirmOtherAuthDialog(){
|
230
|
+
this.$baseReload()
|
231
|
+
},
|
232
|
+
}
|
233
|
+
};
|
234
|
+
export default modules
|
@@ -348,6 +348,18 @@
|
|
348
348
|
></el-option>
|
349
349
|
</el-select>
|
350
350
|
</template>
|
351
|
+
<template #zdLength="{ row, rowIndex }">
|
352
|
+
<el-form-item
|
353
|
+
:prop="'szTaZdMbDTOs.' + rowIndex + '.zdLength'"
|
354
|
+
:rules="[{ required: false, trigger: ['blur', 'change'] }]"
|
355
|
+
>
|
356
|
+
<el-input
|
357
|
+
v-model="row.zdLength"
|
358
|
+
clearable
|
359
|
+
:disabled="!!row.systems || !!row.relationZd"
|
360
|
+
/>
|
361
|
+
</el-form-item>
|
362
|
+
</template>
|
351
363
|
<template #referenceZd="{ row, rowIndex, $table }">
|
352
364
|
<el-input
|
353
365
|
class="search-input"
|
@@ -311,6 +311,14 @@ modules = {
|
|
311
311
|
default: "zdType",
|
312
312
|
},
|
313
313
|
},
|
314
|
+
{
|
315
|
+
title: this.$t1("字段长度"),
|
316
|
+
field: "zdLength",
|
317
|
+
width: 150,
|
318
|
+
slots: {
|
319
|
+
default: "zdLength",
|
320
|
+
},
|
321
|
+
},
|
314
322
|
{
|
315
323
|
title: this.$t1("树标识"),
|
316
324
|
field: "treeFlag",
|
@@ -510,23 +518,30 @@ modules = {
|
|
510
518
|
// }
|
511
519
|
// this.customer.szTaZdMbDTOs.push({tacitly: tacitly});
|
512
520
|
let newIndex = this.getNewIndex();
|
513
|
-
let item = {
|
521
|
+
/* let item = {
|
514
522
|
zdEn: null,
|
515
523
|
zdCh: null,
|
524
|
+
taZdMc: null,
|
516
525
|
zdTypeValues: null,
|
517
526
|
required: false,
|
518
527
|
codeType: null,
|
519
528
|
referenceZd: null,
|
520
529
|
zdType: "Text",
|
530
|
+
zdLength: "255",
|
521
531
|
enabled: true,
|
522
532
|
orders: newIndex,
|
533
|
+
relationZd:null,
|
534
|
+
refServiceName:null,
|
535
|
+
|
523
536
|
generateCode: false,
|
524
537
|
fromTable: false,
|
525
538
|
toTaBmZd: null,
|
526
539
|
treeFlag: null,
|
527
540
|
atened: false,
|
528
541
|
updateIgnore: false
|
529
|
-
};
|
542
|
+
}; */
|
543
|
+
let item = this.createRow();
|
544
|
+
item.orders = newIndex,
|
530
545
|
this.szTaMb.szTaZdMbDTOs.splice(0, 0, item);
|
531
546
|
},
|
532
547
|
deleteItem(row, rowIndex) {
|
@@ -643,6 +658,14 @@ modules = {
|
|
643
658
|
this.showReferenceZdDialog = true;
|
644
659
|
},
|
645
660
|
changeZdType(row) {
|
661
|
+
let map = {
|
662
|
+
"Integer": "11",
|
663
|
+
"Long": "20",
|
664
|
+
"Decimal": "21,6",
|
665
|
+
"Money": "21,2",
|
666
|
+
"Text": "255"
|
667
|
+
}
|
668
|
+
row.zdLength = map[row.zdType] || null;
|
646
669
|
this.clearReferenceZd(row);
|
647
670
|
},
|
648
671
|
clearReferenceZd(row) {
|
@@ -739,22 +762,21 @@ modules = {
|
|
739
762
|
addReferenceShowRows.forEach((item, index) => {
|
740
763
|
let rIndex = addIndex + index;
|
741
764
|
let orders = (row.orders || 0) + index + 1;
|
742
|
-
|
765
|
+
|
766
|
+
let newItem = this.createRow();
|
767
|
+
Object.assign(newItem, {
|
743
768
|
zdEn: "ref_" + item.zdEn,
|
744
|
-
taZdMc: null,
|
745
769
|
zdCh: item.zdCh,
|
746
|
-
zdType: "Text",
|
747
|
-
referenceZd: referenceEntity + "." + item.taZdMc,
|
748
|
-
relationZd: referenceZd + "." + row.zdEn,
|
749
|
-
refServiceName,
|
750
|
-
zdTypeValues: null,
|
751
770
|
required: false,
|
771
|
+
referenceZd: referenceEntity + "." + item.taZdMc,
|
772
|
+
zdType: "Text",
|
773
|
+
zdLength: "255",
|
752
774
|
enabled: true,
|
753
|
-
requiredMsg: null,
|
754
|
-
regexp: null,
|
755
|
-
regexpMsg: null,
|
756
775
|
orders,
|
757
|
-
|
776
|
+
relationZd: referenceZd + "." + row.zdEn,
|
777
|
+
refServiceName,
|
778
|
+
})
|
779
|
+
|
758
780
|
this.szTaMb.szTaZdMbDTOs.splice(rIndex, 0, newItem);
|
759
781
|
});
|
760
782
|
row.referenceZd = referenceZd;
|
@@ -762,7 +784,37 @@ modules = {
|
|
762
784
|
this.handleReferenceOrders(row);
|
763
785
|
this.showReferenceZdDialog = false;
|
764
786
|
},
|
765
|
-
|
787
|
+
createRow(){
|
788
|
+
let row = {
|
789
|
+
"orders": null,
|
790
|
+
"taCode": null,
|
791
|
+
"zdCode": null,
|
792
|
+
"zdEn": null,
|
793
|
+
"zdCh": null,
|
794
|
+
"taZdMc": null,
|
795
|
+
"zdType": "Text",
|
796
|
+
"zdLength": "255",
|
797
|
+
"referenceZd": null,
|
798
|
+
"relationZd": null,
|
799
|
+
"refServiceName": null,
|
800
|
+
"zdTypeValues": null,
|
801
|
+
"required": false,
|
802
|
+
"requiredMsg": null,
|
803
|
+
"regexpVal": null,
|
804
|
+
"regexpMsg": null,
|
805
|
+
"enabled": true,
|
806
|
+
"systems": false,
|
807
|
+
"generateCode": false,
|
808
|
+
"codeType": null,
|
809
|
+
"toTaBmZd": null,
|
810
|
+
"fromTable": false,
|
811
|
+
"treeFlag": null,
|
812
|
+
"atened": false,
|
813
|
+
"updateIgnore": false,
|
814
|
+
"abc": null
|
815
|
+
}
|
816
|
+
return row;
|
817
|
+
},
|
766
818
|
changeOrders(row) {
|
767
819
|
this.handleReferenceOrders(row);
|
768
820
|
},
|