Commit 23ccfde9f06fec085db3d5f34870a61b4d566f79
1 parent
ab2cc5fb
fix: rule data flow selected datasource device carry params iincorrect
Showing
1 changed file
with
6 additions
and
3 deletions
| ... | ... | @@ -231,6 +231,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { |
| 231 | 231 | return { |
| 232 | 232 | labelField: 'name', |
| 233 | 233 | valueField: 'tbDeviceId', |
| 234 | + primaryKey: 'tbDeviceId', | |
| 234 | 235 | pendingTableProps: { |
| 235 | 236 | ...TransferTableProps, |
| 236 | 237 | api: devicePage, |
| ... | ... | @@ -239,7 +240,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { |
| 239 | 240 | const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); |
| 240 | 241 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); |
| 241 | 242 | if (convertConfigId) { |
| 242 | - Object.assign(params, { convertConfigId, selected: false }); | |
| 243 | + Object.assign(params, { convertConfigId, selected: true }); | |
| 243 | 244 | } |
| 244 | 245 | return { ...params, deviceProfileIds }; |
| 245 | 246 | }, |
| ... | ... | @@ -253,7 +254,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { |
| 253 | 254 | const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); |
| 254 | 255 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); |
| 255 | 256 | if (convertConfigId) { |
| 256 | - Object.assign(params, { convertConfigId, selected: true }); | |
| 257 | + Object.assign(params, { convertConfigId, selected: false }); | |
| 257 | 258 | } |
| 258 | 259 | return { ...params, deviceProfileIds }; |
| 259 | 260 | }, |
| ... | ... | @@ -261,13 +262,15 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { |
| 261 | 262 | initSelectedOptions: async ({ setSelectedTotal }) => { |
| 262 | 263 | const values = getFieldsValue(); |
| 263 | 264 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); |
| 265 | + const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); | |
| 264 | 266 | const devices = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_DEVICE); |
| 265 | 267 | if (convertConfigId && devices) { |
| 266 | 268 | const { items, total } = await devicePage({ |
| 267 | 269 | page: 1, |
| 268 | 270 | pageSize: 10, |
| 269 | 271 | convertConfigId: values[BasicInfoFormField.CONVERT_CONFIG_ID], |
| 270 | - selected: true, | |
| 272 | + deviceProfileIds, | |
| 273 | + selected: false, | |
| 271 | 274 | }); |
| 272 | 275 | setSelectedTotal(total); |
| 273 | 276 | return items; | ... | ... |