From 705f89c07e648f401455471eb7cb00910e269109 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Tue, 18 Jun 2024 20:25:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92bug&?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=85=B3=E8=81=94=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ms-add-attachment/index.vue | 1 + .../ms-associate-case/apiCaseTable.vue | 2 +- .../business/ms-associate-case/apiTable.vue | 2 +- .../business/ms-associate-case/caseTable.vue | 2 +- .../ms-associate-case/scenarioCaseTable.vue | 2 +- .../ms-link-file/associatedFileDrawer.vue | 10 ++++- .../business/ms-link-file/linkFileTable.vue | 4 +- .../components/bugDetailTab.vue | 6 +-- .../components/caseDetailDrawer.vue | 1 + .../components/tabContent/tabDetail.vue | 7 +--- .../detail/component/reportDetailTable.vue | 4 +- .../testPlan/components/planTable.vue | 38 ++++++++++++------- .../testPlan/createAndEditPlanDrawer.vue | 13 ++++--- 13 files changed, 56 insertions(+), 36 deletions(-) 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 @@