Commit bba347a4ec302bdf5d22d5b912f1cc02194ba5bc

Authored by xp.Huang
2 parents 7d81e7a1 07a9bd39

Merge branch 'fix/DEFECT-1755' into 'main_dev'

fix: 修复模版组态无法显示设备名称

See merge request yunteng/thingskit-scada!189
... ... @@ -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) => {
... ...