fix : 项目立项页面细节优化

This commit is contained in:
2024-07-11 23:31:59 +08:00
parent 0b6e825bbd
commit 80cd6363ab
3 changed files with 45 additions and 52 deletions

View File

@@ -213,7 +213,7 @@ const singleTableConfig = reactive({
}
]
})
const fileUploadRef=ref()
const fileUploadRef = ref()
const rules = reactive({
attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}],
})
@@ -230,7 +230,7 @@ watch(() => props.showSingleTable, (newVal) => {
props.showSingleTable = newVal
}, {deep: true})
watch(() => props.formData.fileList, (newVal) => {
console.log('newVal-fileList', newVal)
// console.log('newVal-fileList', newVal)
if (props.preview) {
newVal?.forEach(item => {
allFileList.value.push(item)
@@ -239,19 +239,19 @@ watch(() => props.formData.fileList, (newVal) => {
}, {immediate: true})
// watch(() => props.otherFileList, (newVal) => {
// props.otherFileList=newVal
// if (props.preview) {
// console.log('newotherFileList', newVal,props.preview,props.formData.fileList)
// if (props.formData.fileList === null || props.formData.fileList?.length === 0) {
// allFileList.value = newVal
// } else {
// console.log('props.otherFileList',props.otherFileList)
// // props.otherFileList?.forEach(item => {
// // allFileList.value.push(item)
// // })
// }
// } else {
// allFileList.value = newVal
// }
// if (props.preview) {
// console.log('newotherFileList', newVal,props.preview,props.formData.fileList)
// if (props.formData.fileList === null || props.formData.fileList?.length === 0) {
// allFileList.value = newVal
// } else {
// console.log('props.otherFileList',props.otherFileList)
// // props.otherFileList?.forEach(item => {
// // allFileList.value.push(item)
// // })
// }
// } else {
// allFileList.value = newVal
// }
// }, {deep: true})
watch(() => props.showTable, (newVal) => {
props.showTable = newVal
@@ -263,6 +263,7 @@ watch(() => props.singleList, (newVal) => {
watch(() => props.formData.singleFile, (newVal) => {
// console.log('singleFile', newVal)
singleFile.value = newVal
props.formData.singleFile=newVal
}, {deep: true})
watch(() => isSingleFile.value, (newVal) => {
isSingleFile.value = newVal
@@ -303,12 +304,12 @@ const compositeParam = (item) => {
fileType: item.fileType,
url: item.url,
newFile: true,
tag:props.tag
tag: props.tag
}
}
const getOtherFile = (val) => {
if (props.preview) {
allFileList.value.push(compositeParam(val))
allFileList.value.push(compositeParam(val))
} else {
allFileList.value = props.otherFileList
}