Commit 1f06b72a72c0a32601edba1d5101f0bad828dc67
1 parent
899a3783
fix: 设备编辑时网关子设备gateway接口添加gatewayId参数
Showing
1 changed file
with
2 additions
and
1 deletions
... | ... | @@ -297,7 +297,7 @@ export const step1Schemas: FormSchema[] = [ |
297 | 297 | component: 'ApiSelect', |
298 | 298 | ifShow: ({ values }) => values.deviceType === 'SENSOR', |
299 | 299 | componentProps: ({ formModel, formActionType }) => { |
300 | - const { transportType } = formModel; | |
300 | + const { transportType, deviceType, gatewayId } = formModel; | |
301 | 301 | const { setFieldsValue } = formActionType; |
302 | 302 | if (!transportType) return {}; |
303 | 303 | return { |
... | ... | @@ -312,6 +312,7 @@ export const step1Schemas: FormSchema[] = [ |
312 | 312 | showSearch: true, |
313 | 313 | params: { |
314 | 314 | transportType, |
315 | + gatewayId: deviceType === DeviceTypeEnum.SENSOR && gatewayId ? gatewayId : null, | |
315 | 316 | }, |
316 | 317 | placeholder: '请选择网关设备', |
317 | 318 | valueField: 'tbDeviceId', | ... | ... |