cloud-web-corejs 1.0.54-dev.336 → 1.0.54-dev.338
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/xform/form-designer/form-widget/field-widget/fieldMixin.js +30 -5
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +13 -4
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +376 -366
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +37 -30
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +15 -10
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +5 -0
- package/src/components/xform/form-render/container-item/data-table-item.vue +11 -8
- package/src/components/xform/form-render/container-item/data-table-mixin.js +191 -57
- package/src/components/xform/mixins/scriptHttp.js +62 -61
- package/src/utils/request.js +43 -8
- package/src/utils/vab.js +1095 -1
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +295 -2
@@ -45,66 +45,66 @@ modules = {
|
|
45
45
|
return this.getFormRef ? this.getFormRef() : this;
|
46
46
|
},
|
47
47
|
formHttp(opts) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
return new Promise((resolve, reject) => {
|
49
|
+
let data = opts.data;
|
50
|
+
let scriptCode = opts.scriptCode ? opts.scriptCode.trim() : null;
|
51
|
+
let formCode = opts.formCode ? opts.formCode.trim() : null;
|
52
|
+
let isLoading = opts.isLoading ?? true;
|
53
|
+
let success = opts.success;
|
54
|
+
let fail = opts.fail;
|
55
|
+
let error = opts.error;
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
let that = this;
|
58
|
+
let reportTemplate = that.getFormRef ? that.getFormRef().reportTemplate : that.reportTemplate;
|
59
|
+
if (scriptCode && !formCode) {
|
60
|
+
let arr = scriptCode.split("/").filter(item => item)
|
61
|
+
if (arr.length > 1) {
|
62
|
+
formCode = arr[0];
|
63
|
+
scriptCode = arr[1];
|
64
|
+
}
|
65
|
+
}
|
66
|
+
if (!formCode) {
|
67
|
+
formCode = reportTemplate.formCode
|
63
68
|
}
|
64
|
-
}
|
65
|
-
if (!formCode) {
|
66
|
-
formCode = reportTemplate.formCode
|
67
|
-
}
|
68
69
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
delete opts.data
|
71
|
+
delete opts.scriptCode
|
72
|
+
delete opts.formCode
|
73
|
+
delete opts.isLoading
|
74
|
+
delete opts.success
|
75
|
+
delete opts.fail
|
76
|
+
delete opts.error
|
76
77
|
|
77
78
|
|
78
|
-
|
79
|
+
let getServiceName = (callback) => {
|
79
80
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
81
|
+
if (formCode && formCode !== reportTemplate.formCode) {
|
82
|
+
this.getHttpTarget().$http({
|
83
|
+
// aes: true,
|
84
|
+
url: USER_PREFIX + `/formScript/getServiceName`,
|
85
|
+
method: `post`,
|
86
|
+
data: {
|
87
|
+
formCode,
|
88
|
+
scriptCode
|
89
|
+
},
|
90
|
+
isLoading,
|
91
|
+
// loadingTarget: this.getLoadingTarget(),
|
92
|
+
// modalStrictly: true,
|
93
|
+
success: res => {
|
94
|
+
let serviceName = res.objx;
|
95
|
+
if (serviceName) {
|
96
|
+
callback(serviceName)
|
97
|
+
} else {
|
98
|
+
this.$baseAlert("服务名不存在")
|
99
|
+
}
|
98
100
|
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
|
103
|
-
}
|
101
|
+
});
|
102
|
+
} else {
|
103
|
+
callback(reportTemplate.serviceName)
|
104
|
+
}
|
104
105
|
|
105
|
-
|
106
|
-
|
107
|
-
return new Promise((resolve, reject) => {
|
106
|
+
}
|
107
|
+
let toDo = () => {
|
108
108
|
getServiceName(searviceName => {
|
109
109
|
let reqData;
|
110
110
|
reqData = data;
|
@@ -164,15 +164,16 @@ modules = {
|
|
164
164
|
}
|
165
165
|
});
|
166
166
|
})
|
167
|
-
}
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
}
|
173
|
-
|
174
|
-
|
175
|
-
}
|
167
|
+
}
|
168
|
+
if (opts.isConfirm) {
|
169
|
+
this.$baseConfirm(opts.confirmText).then(() => {
|
170
|
+
toDo();
|
171
|
+
});
|
172
|
+
} else {
|
173
|
+
toDo();
|
174
|
+
}
|
175
|
+
});
|
176
|
+
|
176
177
|
}
|
177
178
|
}
|
178
179
|
}
|
package/src/utils/request.js
CHANGED
@@ -182,14 +182,20 @@ function handleCreateInfo(config, res) {
|
|
182
182
|
let data = res.objx;
|
183
183
|
if (typeof res.objx === "object") {
|
184
184
|
if (Array.isArray(data)) {
|
185
|
-
|
185
|
+
for(let item of res.objx){
|
186
186
|
toDo(item);
|
187
|
-
}
|
187
|
+
}
|
188
|
+
/* res.objx.forEach(item => {
|
189
|
+
toDo(item);
|
190
|
+
}) */
|
188
191
|
} else if (data && res.objx.hasOwnProperty("records")) {
|
189
192
|
let records = res.objx.records || [];
|
190
|
-
|
193
|
+
for(let item of records){
|
194
|
+
toDo(item);
|
195
|
+
}
|
196
|
+
/* records.forEach(item => {
|
191
197
|
toDo(item);
|
192
|
-
})
|
198
|
+
}) */
|
193
199
|
} else {
|
194
200
|
toDo(res.objx);
|
195
201
|
}
|
@@ -231,7 +237,18 @@ async function handleNickName2(option) {
|
|
231
237
|
data = res.objx.records;
|
232
238
|
}
|
233
239
|
let requestData = [];
|
234
|
-
|
240
|
+
for(let item of data){
|
241
|
+
let createBy = getCreateBy(item);
|
242
|
+
let modifyBy = getModifyBy(item);
|
243
|
+
|
244
|
+
if (createBy && !requestData.includes(createBy)) {
|
245
|
+
requestData.push(createBy)
|
246
|
+
}
|
247
|
+
if (modifyBy && !requestData.includes(modifyBy)) {
|
248
|
+
requestData.push(modifyBy)
|
249
|
+
}
|
250
|
+
}
|
251
|
+
/* data.forEach(item => {
|
235
252
|
let createBy = getCreateBy(item);
|
236
253
|
let modifyBy = getModifyBy(item);
|
237
254
|
|
@@ -241,7 +258,7 @@ async function handleNickName2(option) {
|
|
241
258
|
if (modifyBy && !requestData.includes(modifyBy)) {
|
242
259
|
requestData.push(modifyBy)
|
243
260
|
}
|
244
|
-
})
|
261
|
+
}) */
|
245
262
|
if (!requestData.length) {
|
246
263
|
callback && callback(res)
|
247
264
|
return
|
@@ -259,7 +276,25 @@ async function handleNickName2(option) {
|
|
259
276
|
isLoading: isLoading,
|
260
277
|
success: res2 => {
|
261
278
|
let arr = res2.objx || [];
|
262
|
-
|
279
|
+
for(let item of data){
|
280
|
+
let createBy = getCreateBy(item);
|
281
|
+
let modifyBy = getModifyBy(item);
|
282
|
+
if (createBy) {
|
283
|
+
let obj = arr.find(item => item.loginAccount === createBy);
|
284
|
+
if (obj && obj.nickName) {
|
285
|
+
item._createNickName = obj.nickName;
|
286
|
+
item._createMobile = obj.mobile;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
if (modifyBy) {
|
290
|
+
let obj = arr.find(item => item.loginAccount === modifyBy);
|
291
|
+
if (obj && obj.nickName) {
|
292
|
+
item._modifyNickName = obj.nickName;
|
293
|
+
item._modifyMobile = obj.mobile;
|
294
|
+
}
|
295
|
+
}
|
296
|
+
}
|
297
|
+
/* data.forEach(item => {
|
263
298
|
let createBy = getCreateBy(item);
|
264
299
|
let modifyBy = getModifyBy(item);
|
265
300
|
if (createBy) {
|
@@ -276,7 +311,7 @@ async function handleNickName2(option) {
|
|
276
311
|
item._modifyMobile = obj.mobile;
|
277
312
|
}
|
278
313
|
}
|
279
|
-
})
|
314
|
+
}) */
|
280
315
|
}
|
281
316
|
});
|
282
317
|
}
|