Showing
3 changed files
with
2 additions
and
9 deletions
| @@ -152,11 +152,7 @@ | @@ -152,11 +152,7 @@ | ||
| 152 | 152 | ||
| 153 | const handleTemplateChange = async (_, option) => { | 153 | const handleTemplateChange = async (_, option) => { | 
| 154 | const { productAndDevice } = option; | 154 | const { productAndDevice } = option; | 
| 155 | - // if (!productAndDevice) return; | ||
| 156 | - // selectOptions.value = productAndDevice?.map((item) => ({ | ||
| 157 | - // label: item.profileName || item.name, | ||
| 158 | - // value: item.profileId, | ||
| 159 | - // })); | 155 | + setFieldsValue({ platform: option?.platform }); | 
| 160 | await nextTick(); | 156 | await nextTick(); | 
| 161 | // 赋值 | 157 | // 赋值 | 
| 162 | selectDeviceProfileRef.value?.setFieldsValue( | 158 | selectDeviceProfileRef.value?.setFieldsValue( | 
| @@ -144,6 +144,7 @@ export const formSchema: FormSchema[] = [ | @@ -144,6 +144,7 @@ export const formSchema: FormSchema[] = [ | ||
| 144 | { label: '移动端', value: Platform.PHONE }, | 144 | { label: '移动端', value: Platform.PHONE }, | 
| 145 | ], | 145 | ], | 
| 146 | }, | 146 | }, | 
| 147 | + dynamicDisabled: ({ model }) => !!model?.enableTemplate, | ||
| 147 | }, | 148 | }, | 
| 148 | { | 149 | { | 
| 149 | field: 'enableTemplate', //前端控制 | 150 | field: 'enableTemplate', //前端控制 | 
| @@ -101,10 +101,6 @@ export const formSchema: FormSchema[] = [ | @@ -101,10 +101,6 @@ export const formSchema: FormSchema[] = [ | ||
| 101 | onPreview: (fileList: FileItem) => { | 101 | onPreview: (fileList: FileItem) => { | 
| 102 | createImgPreview({ imageList: [fileList.url!] }); | 102 | createImgPreview({ imageList: [fileList.url!] }); | 
| 103 | }, | 103 | }, | 
| 104 | - // showUploadList: { | ||
| 105 | - // showDownloadIcon: true, | ||
| 106 | - // showRemoveIcon: true, | ||
| 107 | - // }, | ||
| 108 | }; | 104 | }; | 
| 109 | }, | 105 | }, | 
| 110 | }, | 106 | }, |