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,6 +4,7 @@ import { deviceProfile, getGatewayDevice } from '/@/api/device/deviceManager'; | ||
4 | import { TransportTypeEnum } from '../../profiles/components/TransportDescript/const'; | 4 | import { TransportTypeEnum } from '../../profiles/components/TransportDescript/const'; |
5 | import { JSONEditorValidator } from '/@/components/CodeEditor/src/JSONEditor'; | 5 | import { JSONEditorValidator } from '/@/components/CodeEditor/src/JSONEditor'; |
6 | import { JSONEditor } from '/@/components/CodeEditor'; | 6 | import { JSONEditor } from '/@/components/CodeEditor'; |
7 | +import { DeviceTypeEnum } from '/@/api/device/model/deviceModel'; | ||
7 | useComponentRegister('JSONEditor', JSONEditor); | 8 | useComponentRegister('JSONEditor', JSONEditor); |
8 | 9 | ||
9 | export enum TypeEnum { | 10 | export enum TypeEnum { |
@@ -113,7 +114,9 @@ export const step1Schemas: FormSchema[] = [ | @@ -113,7 +114,9 @@ export const step1Schemas: FormSchema[] = [ | ||
113 | maxLength: 255, | 114 | maxLength: 255, |
114 | placeholder: '请输入设备标识', | 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 | field: 'brand', | 122 | field: 'brand', |
@@ -258,6 +258,7 @@ export const step2Schemas: FormSchema[] = [ | @@ -258,6 +258,7 @@ export const step2Schemas: FormSchema[] = [ | ||
258 | { label: 'LWM2M', value: 'LWM2M' }, | 258 | { label: 'LWM2M', value: 'LWM2M' }, |
259 | { label: 'SNMP', value: 'SNMP' }, | 259 | { label: 'SNMP', value: 'SNMP' }, |
260 | ], | 260 | ], |
261 | + getPopupContainer: () => document.body, | ||
261 | }; | 262 | }; |
262 | }, | 263 | }, |
263 | colProps: { span: 10 }, | 264 | colProps: { span: 10 }, |