Commit c5681a9d5742f73bd0240753d547cd40c219c167
1 parent
4521c621
fix: DEFECT-1024 data flow select data source device thorw error
Showing
4 changed files
with
11 additions
and
7 deletions
@@ -307,6 +307,7 @@ | @@ -307,6 +307,7 @@ | ||
307 | if (keys === Active.PENDING) { | 307 | if (keys === Active.PENDING) { |
308 | reloadPending(); | 308 | reloadPending(); |
309 | } else { | 309 | } else { |
310 | + reloadSelected(); | ||
310 | setProps({ | 311 | setProps({ |
311 | dataSource: unref(selectedRows), | 312 | dataSource: unref(selectedRows), |
312 | }); | 313 | }); |
@@ -278,6 +278,7 @@ | @@ -278,6 +278,7 @@ | ||
278 | if (isApiHeaders && Object.values(isApiHeaders).includes('')) { | 278 | if (isApiHeaders && Object.values(isApiHeaders).includes('')) { |
279 | return createMessage.error('请填写属性'); | 279 | return createMessage.error('请填写属性'); |
280 | } | 280 | } |
281 | + Object.assign(allPostForm, { clientProperties: {} }); | ||
281 | const res = await postAddConvertApi(allPostForm); | 282 | const res = await postAddConvertApi(allPostForm); |
282 | if (res) { | 283 | if (res) { |
283 | closeModalAfterSuccess && closeModal(); | 284 | closeModalAfterSuccess && closeModal(); |
@@ -303,6 +304,7 @@ | @@ -303,6 +304,7 @@ | ||
303 | } | 304 | } |
304 | } | 305 | } |
305 | Object.assign(noEditObj, getTypeObj, { | 306 | Object.assign(noEditObj, getTypeObj, { |
307 | + clientProperties: {}, | ||
306 | datasourceType: allPostForm.datasourceType, | 308 | datasourceType: allPostForm.datasourceType, |
307 | datasourceContent: allPostForm.datasourceContent, | 309 | datasourceContent: allPostForm.datasourceContent, |
308 | }); | 310 | }); |
@@ -240,7 +240,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | @@ -240,7 +240,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | ||
240 | const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); | 240 | const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); |
241 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); | 241 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); |
242 | if (convertConfigId) { | 242 | if (convertConfigId) { |
243 | - Object.assign(params, { convertConfigId, selected: true }); | 243 | + Object.assign(params, { convertConfigId, selected: false }); |
244 | } | 244 | } |
245 | return { ...params, deviceProfileIds }; | 245 | return { ...params, deviceProfileIds }; |
246 | }, | 246 | }, |
@@ -254,7 +254,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | @@ -254,7 +254,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | ||
254 | const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); | 254 | const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); |
255 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); | 255 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); |
256 | if (convertConfigId) { | 256 | if (convertConfigId) { |
257 | - Object.assign(params, { convertConfigId, selected: false }); | 257 | + Object.assign(params, { convertConfigId, selected: true }); |
258 | } | 258 | } |
259 | return { ...params, deviceProfileIds }; | 259 | return { ...params, deviceProfileIds }; |
260 | }, | 260 | }, |
@@ -270,7 +270,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | @@ -270,7 +270,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | ||
270 | pageSize: 10, | 270 | pageSize: 10, |
271 | convertConfigId: values[BasicInfoFormField.CONVERT_CONFIG_ID], | 271 | convertConfigId: values[BasicInfoFormField.CONVERT_CONFIG_ID], |
272 | deviceProfileIds, | 272 | deviceProfileIds, |
273 | - selected: false, | 273 | + selected: true, |
274 | }); | 274 | }); |
275 | setSelectedTotal(total); | 275 | setSelectedTotal(total); |
276 | return items; | 276 | return items; |
@@ -69,10 +69,11 @@ | @@ -69,10 +69,11 @@ | ||
69 | ...record, | 69 | ...record, |
70 | [BasicInfoFormField.DATA_SOURCE_PRODUCT]: | 70 | [BasicInfoFormField.DATA_SOURCE_PRODUCT]: |
71 | record?.datasourceContent?.convertProducts || [], | 71 | record?.datasourceContent?.convertProducts || [], |
72 | - [BasicInfoFormField.DATA_SOURCE_DEVICE]: | ||
73 | - (record?.datasourceContent?.convertDevices || []).reduce((prev, next) => { | ||
74 | - return [...prev, ...(next?.devices || [])]; | ||
75 | - }, []) || [], | 72 | + [BasicInfoFormField.DATA_SOURCE_DEVICE]: record?.datasourceContent?.convertDevices, |
73 | + // [BasicInfoFormField.DATA_SOURCE_DEVICE]: | ||
74 | + // (record?.datasourceContent?.convertDevices || []).reduce((prev, next) => { | ||
75 | + // return [...prev, ...(next?.devices || [])]; | ||
76 | + // }, []) || [], | ||
76 | }; | 77 | }; |
77 | setFieldsValue(value); | 78 | setFieldsValue(value); |
78 | }; | 79 | }; |