|
...
|
...
|
@@ -259,6 +259,12 @@ |
|
259
|
259
|
delete allPostForm.id;
|
|
260
|
260
|
}
|
|
261
|
261
|
};
|
|
|
262
|
+ const setClientProperties = (record: Recordable) => {
|
|
|
263
|
+ const configuration = Reflect.get(record, 'configuration');
|
|
|
264
|
+ const clientProperties = Reflect.get(configuration, 'clientProperties');
|
|
|
265
|
+ !clientProperties && record.configuration && (record.configuration.clientProperties = {});
|
|
|
266
|
+ };
|
|
|
267
|
+
|
|
262
|
268
|
const handleSubmit = async (closeModalAfterSuccess = true) => {
|
|
263
|
269
|
try {
|
|
264
|
270
|
closeModalAfterSuccess && setModalProps({ confirmLoading: true });
|
|
...
|
...
|
@@ -278,7 +284,7 @@ |
|
278
|
284
|
if (isApiHeaders && Object.values(isApiHeaders).includes('')) {
|
|
279
|
285
|
return createMessage.error('请填写属性');
|
|
280
|
286
|
}
|
|
281
|
|
- Object.assign(allPostForm, { clientProperties: {} });
|
|
|
287
|
+ setClientProperties(allPostForm);
|
|
282
|
288
|
const res = await postAddConvertApi(allPostForm);
|
|
283
|
289
|
if (res) {
|
|
284
|
290
|
closeModalAfterSuccess && closeModal();
|
|
...
|
...
|
@@ -304,10 +310,11 @@ |
|
304
|
310
|
}
|
|
305
|
311
|
}
|
|
306
|
312
|
Object.assign(noEditObj, getTypeObj, {
|
|
307
|
|
- clientProperties: {},
|
|
308
|
313
|
datasourceType: allPostForm.datasourceType,
|
|
309
|
314
|
datasourceContent: allPostForm.datasourceContent,
|
|
310
|
315
|
});
|
|
|
316
|
+ setClientProperties(allPostForm);
|
|
|
317
|
+ setClientProperties(noEditObj);
|
|
311
|
318
|
const res = await postAddConvertApi(isEdit.value ? noEditObj : allPostForm);
|
|
312
|
319
|
if (res) {
|
|
313
|
320
|
closeModalAfterSuccess && closeModal();
|
...
|
...
|
|