Commit 752b0a1d52730ad3d1a7db4a04ef012b6565e8aa
Merge remote-tracking branch 'origin/fix/zfl' into perf/main_dev
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 | } | ... | ... |