From fa0daf63d3828eeac217f356a0c18909072c66c2 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 17 Apr 2024 15:01:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=85=B3=E8=81=94=E6=8A=BD=E5=B1=89=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=85=A8=E9=80=89=E6=89=80=E6=9C=89=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1039557 --user=宋昌昌 【缺陷管理】缺陷详情-附件关联文件-全选所有页-只关联了最后一页数据 https://www.tapd.cn/55049933/s/1499765 --- .../io/metersphere/bug/mapper/ExtBugRelateCaseMapper.java | 3 +-- .../io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml | 3 +-- .../bug/service/BugRelateCaseCommonService.java | 4 ++-- .../src/components/business/ms-link-file/linkFileTable.vue | 2 +- .../views/bug-management/components/bug-detail-drawer.vue | 7 +++++-- frontend/src/views/bug-management/edit.vue | 4 ++++ 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.java index e80e10679d..04598646d6 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.java @@ -21,10 +21,9 @@ public interface ExtBugRelateCaseMapper { /** * 获取缺陷关联的用例模块树 * @param request 请求参数 - * @param deleted 是否删除状态 * @return 模块树集合 */ - List getRelateCaseModule(@Param("request") AssociateCaseModuleRequest request, @Param("deleted") boolean deleted); + List getRelateCaseModule(@Param("request") AssociateCaseModuleRequest request); /** * 获取缺陷关联的用例模块树数量 diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml index e51bb44f57..aaa4beb8c9 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml @@ -9,8 +9,7 @@ fcm.pos, fcm.project_id from functional_case_module fcm left join functional_case fc on fc.module_id = fcm.id - where fc.deleted = #{deleted} - and fc.project_id = #{request.projectId} + where fcm.project_id = #{request.projectId} and fc.id not in ( select brc.case_id from bug_relation_case brc where brc.bug_id = #{request.sourceId} and brc.case_type = #{request.sourceType} diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugRelateCaseCommonService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugRelateCaseCommonService.java index 6144ec80a9..56b0b9f7f0 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugRelateCaseCommonService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugRelateCaseCommonService.java @@ -68,7 +68,7 @@ public class BugRelateCaseCommonService extends ModuleTreeService { */ public List getRelateCaseTree(AssociateCaseModuleRequest request) { // 目前只保留功能用例的左侧模块树方法调用, 后续其他用例根据RelateCaseType扩展 - List relateCaseModules = extBugRelateCaseMapper.getRelateCaseModule(request, false); + List relateCaseModules = extBugRelateCaseMapper.getRelateCaseModule(request); // 构建模块树层级数量为通用逻辑 return super.buildTreeAndCountResource(relateCaseModules, true, Translator.get("api_unplanned_request")); } @@ -85,7 +85,7 @@ public class BugRelateCaseCommonService extends ModuleTreeService { List moduleCounts = extBugRelateCaseMapper.countRelateCaseModuleTree(request, false); AssociateCaseModuleRequest moduleRequest = new AssociateCaseModuleRequest(); BeanUtils.copyBean(moduleRequest, request); - List relateCaseModules = extBugRelateCaseMapper.getRelateCaseModule(moduleRequest, false); + List relateCaseModules = extBugRelateCaseMapper.getRelateCaseModule(moduleRequest); List relateCaseModuleWithCount = buildTreeAndCountResource(relateCaseModules, moduleCounts, true, Translator.get("api_unplanned_request")); Map moduleCountMap = getIdCountMapByBreadth(relateCaseModuleWithCount); long total = getAllCount(moduleCounts); diff --git a/frontend/src/components/business/ms-link-file/linkFileTable.vue b/frontend/src/components/business/ms-link-file/linkFileTable.vue index 933fc45d08..d2fd1ad53c 100644 --- a/frontend/src/components/business/ms-link-file/linkFileTable.vue +++ b/frontend/src/components/business/ms-link-file/linkFileTable.vue @@ -180,7 +180,7 @@ tableKey: TableKeyEnum.FILE_MANAGEMENT_FILE, showSetting: false, selectable: true, - showSelectAll: true, + showSelectorAll: false, heightUsed: 300, selectorType: props.selectorType || 'checkbox', }, diff --git a/frontend/src/views/bug-management/components/bug-detail-drawer.vue b/frontend/src/views/bug-management/components/bug-detail-drawer.vue index 662a80c4ec..e36fb6715d 100644 --- a/frontend/src/views/bug-management/components/bug-detail-drawer.vue +++ b/frontend/src/views/bug-management/components/bug-detail-drawer.vue @@ -127,7 +127,7 @@ :is-platform-default-template="isPlatformDefaultTemplate" :platform-system-fields="platformSystemFields" :current-platform="props.currentPlatform" - @update-success="updateSuccess" + @update-success="detailDrawerRef?.initDetail()" /> (false); function updateSuccess() { - rightLoading.value = false; emit('submit'); } @@ -785,4 +784,8 @@ // width: 100%; // word-wrap: break-word; //} + + :deep(.arco-form-item-content) { + overflow-wrap: anywhere; + } diff --git a/frontend/src/views/bug-management/edit.vue b/frontend/src/views/bug-management/edit.vue index 067dc004b4..794327e06b 100644 --- a/frontend/src/views/bug-management/edit.vue +++ b/frontend/src/views/bug-management/edit.vue @@ -828,4 +828,8 @@ font-size: 14px; color: var(--color-text-4); } + + :deep(.arco-form-item-content) { + overflow-wrap: anywhere; + }