From aed22e3c4bdacc48bb85a95e057cc11448ccaf8b Mon Sep 17 00:00:00 2001 From: MeterSphere Bot <78466014+metersphere-bot@users.noreply.github.com> Date: Fri, 1 Jul 2022 10:01:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E6=89=B9=E9=87=8F=E5=A4=8D?= =?UTF-8?q?=E5=88=B6modulePath=E7=BC=BA=E5=A4=B1=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=20(#15383)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wxg0103 <727495428@qq.com> --- .../api/automation/scenario/ApiScenarioList.vue | 14 +++++++++++--- .../api/definition/components/list/ApiList.vue | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index ba671c601c..910d7e103b 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -333,6 +333,7 @@ import MsTableAdvSearchBar from "@/business/components/common/components/search/ import ListItemDeleteConfirm from "@/business/components/common/components/ListItemDeleteConfirm"; import {Message} from "element-ui"; import MsSearch from "@/business/components/common/components/search/MsSearch"; +import {buildNodePath} from "@/business/components/api/definition/model/NodeTree"; const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/); const relationshipGraphDrawer = requireComponent.keys().length > 0 ? requireComponent("./graph/RelationshipGraphDrawer.vue") : {}; @@ -667,7 +668,14 @@ export default { }, editApiScenarioCaseOrder() { return editApiScenarioCaseOrder; - } + }, + moduleOptionsNew() { + let moduleOptions = []; + this.moduleOptions.forEach(node => { + buildNodePath(node, {path: ''}, moduleOptions); + }); + return moduleOptions; + }, }, methods: { generateGraph() { @@ -788,11 +796,11 @@ export default { }, handleBatchMove() { this.isMoveBatch = true; - this.$refs.testBatchMove.open(this.moduleTree, [], this.moduleOptions); + this.$refs.testBatchMove.open(this.moduleTree, [], this.moduleOptionsNew); }, handleBatchCopy() { this.isMoveBatch = false; - this.$refs.testBatchMove.open(this.moduleTree, this.$refs.scenarioTable.selectIds, this.moduleOptions); + this.$refs.testBatchMove.open(this.moduleTree, this.$refs.scenarioTable.selectIds, this.moduleOptionsNew); }, moveSave(param) { this.buildBatchParam(param); diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue index f75ccd7d1c..24d334ff37 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -255,6 +255,7 @@ import {getProtocolFilter} from "@/business/components/api/definition/api-defini import {getGraphByCondition} from "@/network/graph"; import ListItemDeleteConfirm from "@/business/components/common/components/ListItemDeleteConfirm"; import MsSearch from "@/business/components/common/components/search/MsSearch"; +import {buildNodePath} from "@/business/components/api/definition/model/NodeTree"; const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/); const relationshipGraphDrawer = requireComponent.keys().length > 0 ? requireComponent("./graph/RelationshipGraphDrawer.vue") : {}; @@ -492,7 +493,14 @@ export default { }, editApiDefinitionOrder() { return editApiDefinitionOrder; - } + }, + moduleOptionsNew() { + let moduleOptions = []; + this.moduleOptions.forEach(node => { + buildNodePath(node, {path: ''}, moduleOptions); + }); + return moduleOptions; + }, }, created: function () { if (!this.projectName || this.projectName === "") { @@ -575,11 +583,11 @@ export default { }, handleBatchMove() { this.isMoveBatch = true; - this.$refs.testCaseBatchMove.open(this.moduleTree, [], this.moduleOptions); + this.$refs.testCaseBatchMove.open(this.moduleTree, [], this.moduleOptionsNew); }, handleBatchCopy() { this.isMoveBatch = false; - this.$refs.testCaseBatchMove.open(this.moduleTree, this.$refs.table.selectIds, this.moduleOptions); + this.$refs.testCaseBatchMove.open(this.moduleTree, this.$refs.table.selectIds, this.moduleOptionsNew); }, closeCaseModel() { //关闭案例弹窗 @@ -814,6 +822,7 @@ export default { param.projectId = this.projectId; param.condition = this.condition; param.moduleId = param.nodeId; + param.modulePath = param.nodePath; let url = '/api/definition/batch/editByParams'; if (!this.isMoveBatch) url = '/api/definition/batch/copy';