From f08f30456f77e4102cc1eb01c320ade68fd65ee4 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 12 Jul 2022 13:56:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=8E=A5=E5=8F=A3=E5=92=8C=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E6=A8=A1=E5=9D=97=E6=A0=91=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1008184 --user=陈建星 测试计划优化 https://www.tapd.cn/55049933/s/1198664 --- .../api/automation/scenario/ApiScenarioModule.vue | 7 +++++++ .../api/definition/components/module/ApiModule.vue | 7 +++++++ .../track/case/components/TestCaseApiRelate.vue | 1 + .../track/case/components/TestCaseScenarioRelate.vue | 1 + .../src/business/components/track/common/NodeTree.vue | 10 ++++++++-- .../plan/view/comonents/api/TestCaseApiRelevance.vue | 1 + .../view/comonents/api/TestCaseScenarioRelevance.vue | 1 + 7 files changed, 26 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue index 1bee44ba4a..fd3483a6e7 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue @@ -13,6 +13,7 @@ :update-permission="['PROJECT_API_SCENARIO:READ+EDIT']" :default-label="$t('api_test.automation.unplanned_scenario')" local-suffix="api_scenario" + :show-case-num="showCaseNum" @add="add" @edit="edit" @drag="drag" @@ -75,6 +76,12 @@ export default { planId: String, pageSource: String, total: Number, + showCaseNum: { + type: Boolean, + default() { + return true; + } + } }, computed: { isPlanModel() { diff --git a/frontend/src/business/components/api/definition/components/module/ApiModule.vue b/frontend/src/business/components/api/definition/components/module/ApiModule.vue index 0c5672b917..4173b1ae43 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModule.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModule.vue @@ -16,6 +16,7 @@ @remove="remove" @refresh="list" @filter="filter" + :show-case-num="showCaseNum" :delete-permission="['PROJECT_API_DEFINITION:READ+DELETE_API']" :add-permission="['PROJECT_API_DEFINITION:READ+CREATE_API']" :update-permission="['PROJECT_API_DEFINITION:READ+EDIT_API']" @@ -83,6 +84,12 @@ export default { return false; } }, + showCaseNum: { + type: Boolean, + default() { + return true; + } + }, showOperator: Boolean, planId: String, currentVersion: String, diff --git a/frontend/src/business/components/track/case/components/TestCaseApiRelate.vue b/frontend/src/business/components/track/case/components/TestCaseApiRelate.vue index 53127c91f8..f9a93ac73e 100644 --- a/frontend/src/business/components/track/case/components/TestCaseApiRelate.vue +++ b/frontend/src/business/components/track/case/components/TestCaseApiRelate.vue @@ -12,6 +12,7 @@ @protocolChange="handleProtocolChange" @refreshTable="refresh" @setModuleOptions="setModuleOptions" + :show-case-num="false" :is-read-only="true" ref="nodeTree"/> diff --git a/frontend/src/business/components/track/case/components/TestCaseScenarioRelate.vue b/frontend/src/business/components/track/case/components/TestCaseScenarioRelate.vue index c349578f9b..b42969d168 100644 --- a/frontend/src/business/components/track/case/components/TestCaseScenarioRelate.vue +++ b/frontend/src/business/components/track/case/components/TestCaseScenarioRelate.vue @@ -13,6 +13,7 @@ @setModuleOptions="setModuleOptions" @enableTrash="false" :is-read-only="true" + :show-case-num="false" ref="nodeTree"/> diff --git a/frontend/src/business/components/track/common/NodeTree.vue b/frontend/src/business/components/track/common/NodeTree.vue index 23b2ba2825..8bef64c1ad 100644 --- a/frontend/src/business/components/track/common/NodeTree.vue +++ b/frontend/src/business/components/track/common/NodeTree.vue @@ -34,7 +34,7 @@ - + {{ data.caseNum }} @@ -151,6 +151,12 @@ export default { return true; } }, + showCaseNum: { + type: Boolean, + default() { + return true; + } + }, updatePermission: Array, addPermission: Array, deletePermission: Array, @@ -372,7 +378,7 @@ export default { this.getChildNodeId(node.data, nodeIds); this.$emit('remove', nodeIds, data); } - + }, handleDragEnd(draggingNode, dropNode, dropType, ev) { if (dropType === "none" || dropType === undefined) { diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue index 2cecafe938..dd9d954ed8 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue @@ -13,6 +13,7 @@ @protocolChange="handleProtocolChange" @refreshTable="refresh" @setModuleOptions="setModuleOptions" + :show-case-num="false" :is-read-only="true" ref="nodeTree"/> diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue index 3a6c6f2afb..4f012c7aed 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseScenarioRelevance.vue @@ -11,6 +11,7 @@ @nodeSelectEvent="nodeChange" @refreshTable="refresh" @setModuleOptions="setModuleOptions" + :show-case-num="false" :relevance-project-id="projectId" :is-read-only="true" ref="nodeTree"/>