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