diff --git a/frontend/src/views/bug-management/components/bugDetailTab.vue b/frontend/src/views/bug-management/components/bugDetailTab.vue index e80fb360b7..32e09cb649 100644 --- a/frontend/src/views/bug-management/components/bugDetailTab.vue +++ b/frontend/src/views/bug-management/components/bugDetailTab.vue @@ -192,6 +192,7 @@ import { TableQueryParams } from '@/models/common'; import { convertToFileByBug } from '@/views/bug-management/utils'; + import { convertToFile } from '@/views/case-management/caseManagementFeature/components/utils'; const { t } = useI18n(); @@ -268,9 +269,9 @@ async function deleteFileHandler(item: MsFileItem) { try { const params = { - id: item.uid, - local: item.local, - bugId, + refId: item.uid, + associated: !item.local, + bugId: bugId.value, projectId: currentProjectId.value, }; await deleteFileOrCancelAssociation(params); @@ -337,7 +338,7 @@ // 处理关联文件 function saveSelectAssociatedFile(fileData: AssociatedList[]) { - const fileResultList = fileData.map((fileInfo) => convertToFileByBug(fileInfo)); + const fileResultList = fileData.map((fileInfo) => convertToFile(fileInfo)); fileList.value.push(...fileResultList); } diff --git a/frontend/src/views/bug-management/edit.vue b/frontend/src/views/bug-management/edit.vue index 22db2a09df..1fcb85e8b9 100644 --- a/frontend/src/views/bug-management/edit.vue +++ b/frontend/src/views/bug-management/edit.vue @@ -230,6 +230,7 @@ import { SelectValue } from '@/models/projectManagement/menuManagement'; import { BugManagementRouteEnum } from '@/enums/routeEnum'; + import { convertToFile } from '../case-management/caseManagementFeature/components/utils'; import { convertToFileByBug } from './utils'; defineOptions({ name: 'BugEditPage' }); @@ -488,7 +489,7 @@ // 处理关联文件 function saveSelectAssociatedFile(fileData: AssociatedList[]) { - const fileResultList = fileData.map((fileInfo) => convertToFileByBug(fileInfo)); + const fileResultList = fileData.map((fileInfo) => convertToFile(fileInfo)); fileList.value.push(...fileResultList); } @@ -588,7 +589,7 @@ return { ...fileInfo, name: fileInfo.fileName, - isUpdateFlag: checkUpdateFileIds.includes(fileInfo.id), + isUpdateFlag: checkUpdateFileIds.includes(fileInfo.fileId), }; }) .map((fileInfo: any) => {