Commit db94d5f6d93663e44da9d9a5967746948267caef
1 parent
606e5aa5
fix: 修复设备创建地址码只存在于设备为网关子设备并且传输协议为TCP协议
Showing
2 changed files
with
5 additions
and
1 deletions
... | ... | @@ -4,6 +4,7 @@ import { deviceProfile, getGatewayDevice } from '/@/api/device/deviceManager'; |
4 | 4 | import { TransportTypeEnum } from '../../profiles/components/TransportDescript/const'; |
5 | 5 | import { JSONEditorValidator } from '/@/components/CodeEditor/src/JSONEditor'; |
6 | 6 | import { JSONEditor } from '/@/components/CodeEditor'; |
7 | +import { DeviceTypeEnum } from '/@/api/device/model/deviceModel'; | |
7 | 8 | useComponentRegister('JSONEditor', JSONEditor); |
8 | 9 | |
9 | 10 | export enum TypeEnum { |
... | ... | @@ -113,7 +114,9 @@ export const step1Schemas: FormSchema[] = [ |
113 | 114 | maxLength: 255, |
114 | 115 | placeholder: '请输入设备标识', |
115 | 116 | }, |
116 | - ifShow: ({ values }) => values?.transportType === TransportTypeEnum.TCP, | |
117 | + ifShow: ({ values }) => | |
118 | + values?.transportType === TransportTypeEnum.TCP && | |
119 | + values.deviceType === DeviceTypeEnum.SENSOR, | |
117 | 120 | }, |
118 | 121 | { |
119 | 122 | field: 'brand', | ... | ... |