fix : 修复需求上报功能

This commit is contained in:
2024-05-19 12:29:59 +08:00
parent 62620b1dc5
commit 10bc019866
2 changed files with 272 additions and 225 deletions

View File

@@ -72,8 +72,9 @@ const tableConfig = reactive({
]
})
const rules = reactive({
attachment: [{required: true, message: '请上传附件', trigger: 'blur'}],
attachment: [{required: true, message: '请上传附件', trigger: ['blur','change']}],
})
const applyForm=ref()
const props = defineProps({
showFileList: {
type: Boolean,
@@ -117,7 +118,7 @@ const deleteOtherFile = (row) => {
deleteFile(row.fileId).then(res => {
if (res.code === 1000) {
ElMessage.success("删除成功");
otherFileList.value.splice(otherFileList.value.findIndex((item) => item.id === row.fileId), 1);
props.otherFileList.splice(props.otherFileList.findIndex((item) => item.id === row.fileId), 1);
}
});
}).catch(() => {
@@ -133,6 +134,14 @@ const handleDownload = (row) => {
a.click()
})
}
defineExpose({
validate(){
return applyForm.value.validate()
},
clearValidate(){
return applyForm.value.clearValidate()
}
})
</script>
<style scoped>