feat(缺陷管理): 关联文件
This commit is contained in:
parent
58d90c3739
commit
1e026eebc0
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue