fix : 修复页面

This commit is contained in:
2024-05-19 18:00:48 +08:00
parent 1fc0ae6ac0
commit 08a609e2a8
7 changed files with 291 additions and 156 deletions

View File

@@ -27,8 +27,8 @@ const showTable = ref(true)
const otherFileList = ref([])
const compositeParam = (item) => {
let tag=''
if(!formData.value.collectType&&router.currentRoute.value.name==='Implementation/check'){
tag='项目实施'
if(router.currentRoute.value.name==='Implementation/check'){
tag='项目验收'
}
return {
fileId: item.id,
@@ -42,25 +42,59 @@ const compositeParam = (item) => {
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
let fileObj = compositeParam(val)
// fileList.value.push(fileObj)
let fileObj = compositeParam(val, 1)
fileList.value.push(fileObj)
}
const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val)
showTable.value = false
let fileObj = compositeParam(val)
let fileObj = compositeParam(val, 2)
otherFileList.value.push(fileObj)
nextTick(() => {
showTable.value = true
})
}
const getFileParam = (item) => {
return {
fileId: item.fileId,
type: item.type
}
}
const handleSubmit = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
if(fileList.value.length===0){
applyForm.value.validate()
}else {
applyForm.value.clearValidate()
}
if (!valid) return
let files = []
fileList.value.forEach(item => {
files.push(getFileParam(item))
})
otherFileList.value.forEach(item => {
files.push(getFileParam(item))
})
let params = {
// deploymentId: deploymentId.value,
files: files
}
console.log('params',params)
// let res = await requirementReported(params)
// ElNotification({
// title: '提示',
// message: res.msg,
// type: res.code === 1000 ? 'success' : 'error'
// })
// if (res.code === 1000) {
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
// await router.push({
// name: 'Summary'
// })
// }
})
}
</script>