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,7 +297,7 @@ export const step1Schemas: FormSchema[] = [ | ||
297 | component: 'ApiSelect', | 297 | component: 'ApiSelect', |
298 | ifShow: ({ values }) => values.deviceType === 'SENSOR', | 298 | ifShow: ({ values }) => values.deviceType === 'SENSOR', |
299 | componentProps: ({ formModel, formActionType }) => { | 299 | componentProps: ({ formModel, formActionType }) => { |
300 | - const { transportType } = formModel; | 300 | + const { transportType, deviceType, gatewayId } = formModel; |
301 | const { setFieldsValue } = formActionType; | 301 | const { setFieldsValue } = formActionType; |
302 | if (!transportType) return {}; | 302 | if (!transportType) return {}; |
303 | return { | 303 | return { |
@@ -312,6 +312,7 @@ export const step1Schemas: FormSchema[] = [ | @@ -312,6 +312,7 @@ export const step1Schemas: FormSchema[] = [ | ||
312 | showSearch: true, | 312 | showSearch: true, |
313 | params: { | 313 | params: { |
314 | transportType, | 314 | transportType, |
315 | + gatewayId: deviceType === DeviceTypeEnum.SENSOR && gatewayId ? gatewayId : null, | ||
315 | }, | 316 | }, |
316 | placeholder: '请选择网关设备', | 317 | placeholder: '请选择网关设备', |
317 | valueField: 'tbDeviceId', | 318 | valueField: 'tbDeviceId', |