fix(接口定义): 修复场景批量复制modulePath缺失的缺陷

This commit is contained in:
wxg0103 2022-07-04 11:57:37 +08:00 committed by f2c-ci-robot[bot]
parent 1947f0b3e2
commit 49dd572727
2 changed files with 22 additions and 6 deletions

View File

@ -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);

View File

@ -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() {
//