Commit ccaadc2b724d31c658a392f0a0d70366b116cc3a
Merge branch 'fix/zfl' of http://git.yunteng.com/yunteng/thingskit-scada into fix/zfl
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 | } | ... | ... |