Showing
1 changed file
with
2 additions
and
2 deletions
@@ -30,7 +30,7 @@ export const formSchemas = (componentKey?: string): FormSchema[] => { | @@ -30,7 +30,7 @@ export const formSchemas = (componentKey?: string): FormSchema[] => { | ||
30 | placeholder: '请选择产品', | 30 | placeholder: '请选择产品', |
31 | onSelect(value: string, option: any) { | 31 | onSelect(value: string, option: any) { |
32 | formModel[ContentDataFieldsEnum.DEVICE_PROFILE_ID] = value | 32 | formModel[ContentDataFieldsEnum.DEVICE_PROFILE_ID] = value |
33 | - formModel[ContentDataFieldsEnum.DEVICE_INFO] = value && option ? { transportType: option.transportType, deviceType: option.deviceType, codeType: option?.codeType } : null | 33 | + formModel[ContentDataFieldsEnum.DEVICE_INFO] = value && option ? { transportType: option.transportType, deviceType: option.deviceType, codeType: option?.codeType, deviceName: null } : null |
34 | }, | 34 | }, |
35 | getPopupContainer: () => document.body, | 35 | getPopupContainer: () => document.body, |
36 | } | 36 | } |
@@ -56,7 +56,7 @@ export const formSchemas = (componentKey?: string): FormSchema[] => { | @@ -56,7 +56,7 @@ export const formSchemas = (componentKey?: string): FormSchema[] => { | ||
56 | fieldNames: { label: 'name', value: 'tbDeviceId' }, | 56 | fieldNames: { label: 'name', value: 'tbDeviceId' }, |
57 | onSelect(value: string, option: DeviceItemType) { | 57 | onSelect(value: string, option: DeviceItemType) { |
58 | formModel[ContentDataFieldsEnum.DEVICE_PROFILE_ID] = value ? option.deviceProfileId : null | 58 | formModel[ContentDataFieldsEnum.DEVICE_PROFILE_ID] = value ? option.deviceProfileId : null |
59 | - formModel[ContentDataFieldsEnum.DEVICE_INFO] = value && option ? { code: option.code, transportType: option.transportType, deviceType: option.deviceType, deviceProfileId: option.deviceProfileId, deviceName: option.alias || option.name, codeType: option?.codeType } : null | 59 | + formModel[ContentDataFieldsEnum.DEVICE_INFO] = value && option ? { code: option.code, transportType: option.transportType, deviceType: option.deviceType, deviceProfileId: option.deviceProfileId, deviceName: option.alias || option.name || null, codeType: option?.codeType } : null |
60 | formModel[ContentDataFieldsEnum.ATTR] = null | 60 | formModel[ContentDataFieldsEnum.ATTR] = null |
61 | }, | 61 | }, |
62 | filterOption: (inputValue: string, option: DeviceItemType) => { | 62 | filterOption: (inputValue: string, option: DeviceItemType) => { |