feat(缺陷管理): 关联文件

This commit is contained in:
RubyLiu 2024-02-07 11:38:47 +08:00 committed by Craftsman
parent 58d90c3739
commit 1e026eebc0
2 changed files with 8 additions and 6 deletions

View File

@ -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);
}

View File

@ -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) => {