From 1e026eebc0d6a34b2d67be70fd61c4a6c86b4007 Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Wed, 7 Feb 2024 11:38:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bug-management/components/bugDetailTab.vue | 9 +++++---- frontend/src/views/bug-management/edit.vue | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) 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) => {