Commit 0ee29d46263e5330aab5f858a77eaf6d55036c4e
1 parent
6bcb7e00
fix: 修复数据流转RabbitMQ ClientProperties字段为空时,需要保存为空对象
Showing
2 changed files
with
10 additions
and
3 deletions
@@ -14,7 +14,7 @@ VITE_GLOB_PUBLIC_PATH = / | @@ -14,7 +14,7 @@ VITE_GLOB_PUBLIC_PATH = / | ||
14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] | 14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] |
15 | # 线上测试环境 | 15 | # 线上测试环境 |
16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
17 | -VITE_PROXY = [["/api","http://222.180.200.114:48080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 17 | +VITE_PROXY = [["/api","http://222.180.200.114:48080/api"],["/thingskit-drawio","http://localhost:3000/"],["/large-designer", "http://localhost:5555/large-designer/"]] |
18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
19 | # VITE_PROXY = [["/api","http://192.168.10.103:8080/api"],["/thingskit-drawio","http://192.168.10.136:8080/api"]] | 19 | # VITE_PROXY = [["/api","http://192.168.10.103:8080/api"],["/thingskit-drawio","http://192.168.10.136:8080/api"]] |
20 | 20 |
@@ -259,6 +259,12 @@ | @@ -259,6 +259,12 @@ | ||
259 | delete allPostForm.id; | 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 | const handleSubmit = async (closeModalAfterSuccess = true) => { | 268 | const handleSubmit = async (closeModalAfterSuccess = true) => { |
263 | try { | 269 | try { |
264 | closeModalAfterSuccess && setModalProps({ confirmLoading: true }); | 270 | closeModalAfterSuccess && setModalProps({ confirmLoading: true }); |
@@ -278,7 +284,7 @@ | @@ -278,7 +284,7 @@ | ||
278 | if (isApiHeaders && Object.values(isApiHeaders).includes('')) { | 284 | if (isApiHeaders && Object.values(isApiHeaders).includes('')) { |
279 | return createMessage.error('请填写属性'); | 285 | return createMessage.error('请填写属性'); |
280 | } | 286 | } |
281 | - Object.assign(allPostForm, { clientProperties: {} }); | 287 | + setClientProperties(allPostForm); |
282 | const res = await postAddConvertApi(allPostForm); | 288 | const res = await postAddConvertApi(allPostForm); |
283 | if (res) { | 289 | if (res) { |
284 | closeModalAfterSuccess && closeModal(); | 290 | closeModalAfterSuccess && closeModal(); |
@@ -304,10 +310,11 @@ | @@ -304,10 +310,11 @@ | ||
304 | } | 310 | } |
305 | } | 311 | } |
306 | Object.assign(noEditObj, getTypeObj, { | 312 | Object.assign(noEditObj, getTypeObj, { |
307 | - clientProperties: {}, | ||
308 | datasourceType: allPostForm.datasourceType, | 313 | datasourceType: allPostForm.datasourceType, |
309 | datasourceContent: allPostForm.datasourceContent, | 314 | datasourceContent: allPostForm.datasourceContent, |
310 | }); | 315 | }); |
316 | + setClientProperties(allPostForm); | ||
317 | + setClientProperties(noEditObj); | ||
311 | const res = await postAddConvertApi(isEdit.value ? noEditObj : allPostForm); | 318 | const res = await postAddConvertApi(isEdit.value ? noEditObj : allPostForm); |
312 | if (res) { | 319 | if (res) { |
313 | closeModalAfterSuccess && closeModal(); | 320 | closeModalAfterSuccess && closeModal(); |