Showing
1 changed file
with
3 additions
and
2 deletions
| ... | ... | @@ -25,10 +25,11 @@ export const formSchemas = (componentKey?: string): FormSchema[] => { | 
| 25 | 25 | required: !!isTemplate, | 
| 26 | 26 | componentProps: ({ formModel }) => { | 
| 27 | 27 | return { | 
| 28 | - options: (unref(contentDataStore.getProductAndDevice) || []).map((item: ProductAndDevice) => ({ label: item.profileName || item.name, value: item.profileId })), | |
| 28 | + options: (unref(contentDataStore.getProductAndDevice) || []).map((item: ProductAndDevice) => ({ label: item.profileName || item.name, value: item.profileId, transportType: item?.transportType, deviceType: item?.deviceType })), | |
| 29 | 29 | placeholder: '请选择产品', | 
| 30 | - onSelect(value: string) { | |
| 30 | + onSelect(value: string, option: any) { | |
| 31 | 31 | formModel[ContentDataFieldsEnum.DEVICE_PROFILE_ID] = value | 
| 32 | + formModel[ContentDataFieldsEnum.DEVICE_INFO] = value && option ? { transportType: option.transportType, deviceType: option.deviceType } : null | |
| 32 | 33 | }, | 
| 33 | 34 | getPopupContainer: () => document.body, | 
| 34 | 35 | } | ... | ... |