diff --git a/frontend/src/components/business/ms-add-attachment/index.vue b/frontend/src/components/business/ms-add-attachment/index.vue index 24da337a85..8d073e333d 100644 --- a/frontend/src/components/business/ms-add-attachment/index.vue +++ b/frontend/src/components/business/ms-add-attachment/index.vue @@ -358,6 +358,7 @@ // 处理关联文件 function saveSelectAssociatedFile(fileData: AssociatedList[]) { + // TODO : 这里需要优化选择跨页的数据 const fileResultList = fileData.map((fileInfo) => convertToFile(fileInfo)); if (props.mode === 'button') { fileList.value.push(...fileResultList); diff --git a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue index b5d8297528..9d5351db08 100644 --- a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue +++ b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue @@ -194,7 +194,7 @@ selectable: true, showSelectAll: true, heightUsed: 310, - showSelectorAll: true, + showSelectorAll: false, }, (record) => { return { diff --git a/frontend/src/components/business/ms-associate-case/apiTable.vue b/frontend/src/components/business/ms-associate-case/apiTable.vue index 0787bcaab0..e746b65dd1 100644 --- a/frontend/src/components/business/ms-associate-case/apiTable.vue +++ b/frontend/src/components/business/ms-associate-case/apiTable.vue @@ -166,7 +166,7 @@ selectable: true, showSelectAll: true, heightUsed: 310, - showSelectorAll: true, + showSelectorAll: false, }); async function getTableParams() { diff --git a/frontend/src/components/business/ms-associate-case/caseTable.vue b/frontend/src/components/business/ms-associate-case/caseTable.vue index bbbddcf9a2..24c354b7f0 100644 --- a/frontend/src/components/business/ms-associate-case/caseTable.vue +++ b/frontend/src/components/business/ms-associate-case/caseTable.vue @@ -202,7 +202,7 @@ selectable: true, showSelectAll: true, heightUsed: 310, - showSelectorAll: true, + showSelectorAll: false, }, (record) => { return { diff --git a/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue b/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue index e19f2677f9..e6872efcd9 100644 --- a/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue +++ b/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue @@ -186,7 +186,7 @@ selectable: true, showSelectAll: true, heightUsed: 310, - showSelectorAll: true, + showSelectorAll: false, }); async function getTableParams() { diff --git a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue index 66043a39b2..e9669e78c1 100644 --- a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue +++ b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue @@ -85,6 +85,7 @@ :file-all-count-by-storage="fileAllCountByStorage" :filetype="props.filetype" @init="handleModuleTableInit" + @update-file-ids="updateFiles" /> @@ -121,7 +122,7 @@ }>(); const emit = defineEmits<{ - (e: 'save', val: AssociatedList[]): void; + (e: 'save', val: AssociatedList[], selectIds?: string[]): void; (e: 'update:visible', val: boolean): void; }>(); const showDrawer = computed({ @@ -244,9 +245,14 @@ } const selectFile = ref([]); + const selectIds = ref([]); + + function updateFiles(fileIds: string[]) { + selectIds.value = fileIds; + } function handleDrawerConfirm() { - emit('save', selectFile.value); + emit('save', selectFile.value, selectIds.value); showDrawer.value = false; } diff --git a/frontend/src/components/business/ms-link-file/linkFileTable.vue b/frontend/src/components/business/ms-link-file/linkFileTable.vue index eec76a3ad3..a3d1c8a2ca 100644 --- a/frontend/src/components/business/ms-link-file/linkFileTable.vue +++ b/frontend/src/components/business/ms-link-file/linkFileTable.vue @@ -112,6 +112,7 @@ const emit = defineEmits<{ (e: 'init', params: FileListQueryParams): void; (e: 'update:selectFile', val: AssociatedList[]): void; + (e: 'updateFileIds', val: string[]): void; }>(); const tableFileTypeOptions = ref([]); @@ -342,11 +343,12 @@ watch( () => selectedIds.value, - () => { + (val) => { emit( 'update:selectFile', propsRes.value.data.filter((item: any) => selectedIds.value.indexOf(item.id) > -1) ); + emit('updateFileIds', val); } ); diff --git a/frontend/src/views/bug-management/components/bugDetailTab.vue b/frontend/src/views/bug-management/components/bugDetailTab.vue index 895b45afc3..c4b7119df8 100644 --- a/frontend/src/views/bug-management/components/bugDetailTab.vue +++ b/frontend/src/views/bug-management/components/bugDetailTab.vue @@ -511,14 +511,12 @@ } // 关联文件 - async function saveSelectAssociatedFile(fileData: AssociatedList[]) { - const fileResultList = fileData.map(convertToFileByDetail); - fileList.value.push(...fileResultList); + async function saveSelectAssociatedFile(fileData: AssociatedList[], selectFileIds?: string[]) { const params = { request: { bugId: bugId.value as string, projectId: currentProjectId.value, - selectIds: fileResultList.map((item: any) => item.uid), + selectIds: selectFileIds || [], }, }; await uploadOrAssociationFile(params); diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue index 44e7e50f6b..fcc7c5c6f3 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue @@ -139,6 +139,7 @@ convertToFile(fileInfo)); - fileList.value.push(...fileResultList); - const fileIds = fileResultList.map((item: any) => item.uid); - startUpload(fileIds); + function saveSelectAssociatedFile(fileData: AssociatedList[], selectIds?: string[]) { + startUpload(selectIds || []); } // 更新文件 diff --git a/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue b/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue index 75460959b8..39b18aa701 100644 --- a/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue +++ b/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue @@ -18,7 +18,9 @@ diff --git a/frontend/src/views/test-plan/testPlan/components/planTable.vue b/frontend/src/views/test-plan/testPlan/components/planTable.vue index de19dacc1b..3080007da8 100644 --- a/frontend/src/views/test-plan/testPlan/components/planTable.vue +++ b/frontend/src/views/test-plan/testPlan/components/planTable.vue @@ -249,14 +249,14 @@