diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index ed92c4c18..1f8b90948 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -129,11 +129,11 @@ const excelUploadError: UploadProps['onError'] = (): void => { } // 删除上传文件 const handleRemove = (file) => { - const findex = fileList.value.map((f) => f.name).indexOf(file.name) - if (findex > -1) { - fileList.value.splice(findex, 1) + // const findex = fileList.value.map((f) => f.name).indexOf(file.name) + // if (findex > -1) { + // fileList.value.splice(findex, 1) emit('update:modelValue', listToString(fileList.value)) - } + // } } const handlePreview: UploadProps['onPreview'] = (uploadFile) => { console.log(uploadFile) diff --git a/src/views/system/systemInstallPackage/index.vue b/src/views/system/systemInstallPackage/index.vue index f6b9543ac..e6475b35e 100644 --- a/src/views/system/systemInstallPackage/index.vue +++ b/src/views/system/systemInstallPackage/index.vue @@ -41,6 +41,13 @@ { /** 添加/修改操作 */ 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 { diff --git a/src/views/system/systemInstallPackage/systemInstallPackage.data.ts b/src/views/system/systemInstallPackage/systemInstallPackage.data.ts index 148027b7b..580aadb6d 100644 --- a/src/views/system/systemInstallPackage/systemInstallPackage.data.ts +++ b/src/views/system/systemInstallPackage/systemInstallPackage.data.ts @@ -25,6 +25,11 @@ export const SystemInstallPackage = useCrudSchemas(reactive([ label: '安装路径', field: 'installPackageUrl', sort: 'custom', + form: { + componentProps: { + disabled: true + }, + } }, { label: '是否强制更新', @@ -53,14 +58,34 @@ export const SystemInstallPackage = useCrudSchemas(reactive([ { label: '附件id', field: 'fileId', - isForm:false, sort: 'custom', + form: { + componentProps: { + disabled: true + }, + value:'', + } }, { label: '备注', field: 'remark', sort: 'custom', }, + { + label: '上传附件', + field: 'uploadFile', + sort: 'custom', + form: { + component: 'UploadFile', + componentProps: { + upData:{ + tableId: '', + tableName: '' + }, + limit:1 + } + }, + }, { label: '创建时间', field: 'createTime',