|
|
@ -41,6 +41,13 @@ |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="basicFormRef" |
|
|
|
:sumFormDataByForm ="(formRef,formModel)=>{ |
|
|
|
console.log(formModel) |
|
|
|
const {uploadFile} = formModel |
|
|
|
formRef.value.setValues({ |
|
|
|
installPackageUrl:uploadFile |
|
|
|
}) |
|
|
|
}" |
|
|
|
@success="formsSuccess" |
|
|
|
:rules="SystemInstallPackageRules" |
|
|
|
:formAllSchemas="SystemInstallPackage.allSchemas" |
|
|
@ -131,12 +138,20 @@ const buttonTableClick = async (val, row) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const basicFormRef = ref() |
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
if('create'==type){ |
|
|
|
const currentTime = new Date().getTime() |
|
|
|
const fileId = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='fileId') |
|
|
|
fileId['value'] = currentTime |
|
|
|
const uploadFile = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='uploadFile') |
|
|
|
uploadFile['componentProps']['upData']['tableId'] = currentTime |
|
|
|
} |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|
// form表单提交 |
|
|
|
const formsSuccess = async (formType,data) => { |
|
|
|
if (formType === 'create') { |
|
|
|
delete data['uploadFile'] |
|
|
|
await SystemInstallPackageApi.createSystemInstallPackage(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|