This commit is contained in:
fit2-zhao 2021-02-04 17:54:14 +08:00
commit bd12a36af5
5 changed files with 104 additions and 96 deletions

View File

@ -11,6 +11,7 @@
@edit="edit" @edit="edit"
@drag="drag" @drag="drag"
@remove="remove" @remove="remove"
@refresh="list"
@nodeSelectEvent="nodeChange" @nodeSelectEvent="nodeChange"
ref="nodeTree"> ref="nodeTree">
@ -34,14 +35,14 @@
</template> </template>
<script> <script>
import SelectMenu from "../../../track/common/SelectMenu"; import SelectMenu from "../../../track/common/SelectMenu";
import MsAddBasisScenario from "@/business/components/api/automation/scenario/AddBasisScenario"; import MsAddBasisScenario from "@/business/components/api/automation/scenario/AddBasisScenario";
import {getCurrentProjectID} from "@/common/js/utils"; import {getCurrentProjectID} from "@/common/js/utils";
import MsNodeTree from "../../../track/common/NodeTree"; import MsNodeTree from "../../../track/common/NodeTree";
import {buildNodePath} from "../../definition/model/NodeTree"; import {buildNodePath} from "../../definition/model/NodeTree";
import ModuleTrashButton from "../../definition/components/module/ModuleTrashButton"; import ModuleTrashButton from "../../definition/components/module/ModuleTrashButton";
export default { export default {
name: 'MsApiScenarioModule', name: 'MsApiScenarioModule',
components: { components: {
ModuleTrashButton, ModuleTrashButton,

View File

@ -11,6 +11,7 @@
@edit="edit" @edit="edit"
@drag="drag" @drag="drag"
@remove="remove" @remove="remove"
@refresh="list"
@nodeSelectEvent="nodeChange" @nodeSelectEvent="nodeChange"
ref="nodeTree"> ref="nodeTree">
@ -33,16 +34,16 @@
</template> </template>
<script> <script>
import MsAddBasisApi from "../basis/AddBasisApi"; import MsAddBasisApi from "../basis/AddBasisApi";
import SelectMenu from "../../../../track/common/SelectMenu"; import SelectMenu from "../../../../track/common/SelectMenu";
import {OPTIONS} from "../../model/JsonData"; import {OPTIONS} from "../../model/JsonData";
import ApiImport from "../import/ApiImport"; import ApiImport from "../import/ApiImport";
import {getCurrentProjectID} from "@/common/js/utils"; import {getCurrentProjectID} from "@/common/js/utils";
import MsNodeTree from "../../../../track/common/NodeTree"; import MsNodeTree from "../../../../track/common/NodeTree";
import ApiModuleHeader from "./ApiModuleHeader"; import ApiModuleHeader from "./ApiModuleHeader";
import {buildNodePath} from "../../model/NodeTree"; import {buildNodePath} from "../../model/NodeTree";
export default { export default {
name: 'MsApiModule', name: 'MsApiModule',
components: { components: {
ApiModuleHeader, ApiModuleHeader,

View File

@ -469,11 +469,12 @@ export default {
}, },
}, },
watch: { watch: {
'report.testId': { report: {
handler() { handler() {
this.getJmxContent(); this.getJmxContent();
}, },
} deep: true
},
} }
} }
</script> </script>

View File

@ -220,6 +220,10 @@ export default {
if (dropType === "none" || dropType === undefined) { if (dropType === "none" || dropType === undefined) {
return; return;
} }
if (dropNode.data.id === 'root' && dropType === 'before') {
this.$emit('refresh');
return false;
}
let param = this.buildParam(draggingNode, dropNode, dropType); let param = this.buildParam(draggingNode, dropNode, dropType);
let list = []; let list = [];
this.getNodeTree(this.treeNodes, draggingNode.data.id, list); this.getNodeTree(this.treeNodes, draggingNode.data.id, list);

View File

@ -8,17 +8,18 @@
@drag="drag" @drag="drag"
@remove="remove" @remove="remove"
@nodeSelectEvent="nodeChange" @nodeSelectEvent="nodeChange"
@refresh="list"
ref="nodeTree"/> ref="nodeTree"/>
</template> </template>
<script> <script>
import NodeEdit from "./NodeEdit"; import NodeEdit from "./NodeEdit";
import {getCurrentProjectID} from "../../../../common/js/utils"; import {getCurrentProjectID} from "../../../../common/js/utils";
import MsNodeTree from "./NodeTree"; import MsNodeTree from "./NodeTree";
export default { export default {
name: "TestCaseNodeTree", name: "TestCaseNodeTree",
components: {MsNodeTree, NodeEdit }, components: {MsNodeTree, NodeEdit},
data() { data() {
return { return {
defaultProps: { defaultProps: {