diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index 028023842b..a4b66c8a56 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -330,6 +330,7 @@ import MsTableSearchBar from "@/business/components/common/components/MsTableSea import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar"; import ListItemDeleteConfirm from "@/business/components/common/components/ListItemDeleteConfirm"; import {Message} from "element-ui"; +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") : {}; @@ -662,7 +663,14 @@ export default { }, editApiScenarioCaseOrder() { return editApiScenarioCaseOrder; - } + }, + moduleOptionsNew() { + let moduleOptions = []; + this.moduleOptions.forEach(node => { + buildNodePath(node, {path: ''}, moduleOptions); + }); + return moduleOptions; + }, }, methods: { generateGraph() { @@ -783,11 +791,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 fb1724b0ee..c162235c46 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -254,6 +254,7 @@ import {editApiDefinitionOrder} from "@/network/api"; import {getProtocolFilter} from "@/business/components/api/definition/api-definition"; import {getGraphByCondition} from "@/network/graph"; import ListItemDeleteConfirm from "@/business/components/common/components/ListItemDeleteConfirm"; +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") : {}; @@ -476,7 +477,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 === "") { @@ -563,11 +571,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() { //关闭案例弹窗