Merge pull request 'fix(ProjectAttachment): 修复删除附件后未及时更新文件列表的问题- 在删除文件后添加了更新文件列表的逻辑' (#1014) from master into prod

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1014
This commit is contained in:
2025-05-22 14:57:02 +00:00

View File

@@ -65,7 +65,7 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {addTag, delTag, getTagList, getTags, updateTag} from "@/api/project-manage"; import {addTag, delTag, getTagList, updateTag} from "@/api/project-manage";
import {ElLoading, ElMessageBox, ElNotification} from "element-plus"; import {ElLoading, ElMessageBox, ElNotification} from "element-plus";
import {searchImplementationFileList, uploadFileList} from "@/api/project-manage/attachment"; import {searchImplementationFileList, uploadFileList} from "@/api/project-manage/attachment";
import {deleteFile, downloadFile} from "@/api/project-demand"; import {deleteFile, downloadFile} from "@/api/project-demand";
@@ -336,7 +336,6 @@ const handleSubmit = async () => {
message: res.msg, message: res.msg,
type: 'error' type: 'error'
}) })
fileList.value = []
} else { } else {
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -348,6 +347,7 @@ const handleSubmit = async () => {
// otherAttachmentList.value.push(item) // otherAttachmentList.value.push(item)
// }) // })
} }
fileList.value = []
// changeFileList('all',true) // changeFileList('all',true)
} }
} }
@@ -398,8 +398,7 @@ const changeFileList = (tag, flag) => {
} }
const getLocalList = () => { const getLocalList = () => {
if (localStorage.getItem(`implementAllFileList-${route.query.projectId}`) && JSON.parse(localStorage.getItem(`implementAllFileList-${route.query.projectId}`))) { if (localStorage.getItem(`implementAllFileList-${route.query.projectId}`) && JSON.parse(localStorage.getItem(`implementAllFileList-${route.query.projectId}`))) {
const list = JSON.parse(localStorage.getItem(`implementAllFileList-${route.query.projectId}`)) return JSON.parse(localStorage.getItem(`implementAllFileList-${route.query.projectId}`))
return list
} else { } else {
return [] return []
} }