diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index 6e2f068a7a..cb2990d687 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -11,9 +11,11 @@ import { AssociatedBugToScenarioCaseUrl, BatchAddBugToApiCaseUrl, BatchAddBugToFunctionalCaseUrl, + BatchAddBugToMinderCaseUrl, BatchAddBugToScenarioCaseUrl, batchArchivedPlanUrl, BatchAssociatedBugToCaseUrl, + BatchAssociatedBugToMinderCaseUrl, batchCopyPlanUrl, batchDeletePlanUrl, BatchDisassociateApiCaseUrl, @@ -504,3 +506,11 @@ export function batchLinkBugToApiCase(data: TableQueryParams) { export function batchLinkBugToScenarioCase(data: TableQueryParams) { return MSR.post({ url: BatchLinkBugToScenarioCaseUrl, data }); } +// 测试计划-详情-脑图批量关联缺陷 +export function batchAssociatedBugToMinderCase(data: TableQueryParams) { + return MSR.post({ url: BatchAssociatedBugToMinderCaseUrl, data }); +} +// 测试计划-详情-脑图批量新建缺陷 +export function batchAddBugToMinderCase(data: { request: BugEditFormObject; fileList: File[] }) { + return MSR.uploadFile({ url: BatchAddBugToMinderCaseUrl }, data, '', true); +} diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index 2bf71a417e..637612f69f 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -181,3 +181,8 @@ export const BatchAddBugToScenarioCaseUrl = '/test-plan/api/scenario/batch/add-b export const BatchLinkBugToApiCaseUrl = '/test-plan/api/case/batch/associate-bug'; // 测试计划-详情-场景用例列表-批量关联缺陷 export const BatchLinkBugToScenarioCaseUrl = '/test-plan/api/scenario/batch/associate-bug'; +export const BatchAddBugToCaseUrl = '/test-plan/functional/case/batch/add-bug'; +// 测试计划-详情-用例列表-脑图批量关联缺陷 +export const BatchAssociatedBugToMinderCaseUrl = '/test-plan/functional/case/minder/batch/associate-bug'; +// 测试计划-详情-用例列表-脑图批量新建缺陷 +export const BatchAddBugToMinderCaseUrl = '/test-plan/functional/case/minder/batch/add-bug'; diff --git a/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue index 18cc3c9227..b1c47d0fc9 100644 --- a/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue @@ -14,24 +14,24 @@ :can-show-more-menu-node-operation="false" :more-menu-other-operation-list="canShowFloatMenu && hasOperationPermission ? moreMenuOtherOperationList : []" disabled + @node-batch-select="handleNodeBatchSelect" @node-select="handleNodeSelect" @node-unselect="handleNodeUnselect" > diff --git a/frontend/src/components/pure/ms-minder-editor/menu/batchMenu.vue b/frontend/src/components/pure/ms-minder-editor/menu/batchMenu.vue index 7956355546..7e5b688765 100644 --- a/frontend/src/components/pure/ms-minder-editor/menu/batchMenu.vue +++ b/frontend/src/components/pure/ms-minder-editor/menu/batchMenu.vue @@ -52,7 +52,7 @@ class="ms-minder-dropdown" :popup-translate="[0, -4]" position="tl" - trigger="click" + trigger="hover" @select="(val) => handleMinderMenuSelect(val)" > diff --git a/frontend/src/components/pure/ms-minder-editor/minderEditor.vue b/frontend/src/components/pure/ms-minder-editor/minderEditor.vue index aecd4017de..295c38d621 100644 --- a/frontend/src/components/pure/ms-minder-editor/minderEditor.vue +++ b/frontend/src/components/pure/ms-minder-editor/minderEditor.vue @@ -11,6 +11,9 @@ +
diff --git a/frontend/src/views/case-management/components/addDefectDrawer/index.vue b/frontend/src/views/case-management/components/addDefectDrawer/index.vue index 48f1836bc3..a84def0393 100644 --- a/frontend/src/views/case-management/components/addDefectDrawer/index.vue +++ b/frontend/src/views/case-management/components/addDefectDrawer/index.vue @@ -54,6 +54,7 @@ import { batchAddBugToApiCase, batchAddBugToFunctionCase, + batchAddBugToMinderCase, batchAddBugToScenarioCase, } from '@/api/modules/test-plan/testPlan'; import { useI18n } from '@/hooks/useI18n'; @@ -80,6 +81,7 @@ detailId: string; // 功能用例为用例详情id, 注意:接口用例为最后执行报告id来获取执行详情展示断言,场景也为执行报告id查看报告详情 name: string; // 用例明细名称 }; + isMinderBatch?: boolean; }>(); const emit = defineEmits<{ @@ -139,6 +141,8 @@ props.extraParams && typeof props.extraParams === 'function' ? await props.extraParams() : props.extraParams; if (props.isBatch && props.caseType) { await batchAddApiMap[props.caseType]({ request: { ...request, ...extraParam }, fileList }); + } else if (props.isMinderBatch) { + await batchAddBugToMinderCase({ request: { ...request, ...props.extraParams }, fileList }); } else { await createOrUpdateBug({ request: { ...request, ...extraParam }, fileList }); } diff --git a/frontend/src/views/case-management/components/linkDefectDrawer.vue b/frontend/src/views/case-management/components/linkDefectDrawer.vue index 173f1141f7..2978aff439 100644 --- a/frontend/src/views/case-management/components/linkDefectDrawer.vue +++ b/frontend/src/views/case-management/components/linkDefectDrawer.vue @@ -230,7 +230,7 @@ keyword: keyword.value, searchMode: 'AND', combine: {}, - caseId: props.caseId, + caseId: props.caseId || '', condition: { keyword: keyword.value }, }; showDrawer.value = false; @@ -245,7 +245,7 @@ currentCaseTable.value.setLoadListParams({ keyword: keyword.value, projectId: currentProjectId.value, - sourceId: props.caseId, + sourceId: props.caseId || '', }); currentCaseTable.value.loadList(); }