diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 58f3c0b6c0..a0b27b18a2 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -29,6 +29,7 @@ @testCaseEdit="editTestCase" @testCaseCopy="copyTestCase" @testCaseDetail="showTestCaseDetail" + @batchMove="batchMove" @refresh="refresh" @moveToNode="moveToNode" ref="testCaseList"> @@ -46,6 +47,8 @@ + + @@ -62,12 +65,13 @@ import MsAsideContainer from "../../common/components/MsAsideContainer"; import MsMainContainer from "../../common/components/MsMainContainer"; import {checkoutTestManagerOrTestUser, hasRoles} from "../../../../common/js/utils"; + import BatchMove from "./components/BatchMove"; export default { name: "TestCase", components: { MsMainContainer, - MsAsideContainer, MsContainer, TestCaseMove, TestCaseList, NodeTree, TestCaseEdit, SelectMenu}, + MsAsideContainer, MsContainer, TestCaseMove, TestCaseList, NodeTree, TestCaseEdit, SelectMenu, BatchMove}, comments: {}, data() { return { @@ -236,6 +240,9 @@ } this.$refs.testCaseEditDialog.getModuleOptions(); this.$refs.testCaseMove.open(this.$refs.testCaseEditDialog.moduleOptions, selectIds); + }, + batchMove(selectIds) { + this.$refs.testBatchMove.open(this.treeNodes, selectIds,this.$refs.testCaseEditDialog.moduleOptions); } } } diff --git a/frontend/src/business/components/track/case/components/BatchMove.vue b/frontend/src/business/components/track/case/components/BatchMove.vue new file mode 100644 index 0000000000..b0eabe8e5c --- /dev/null +++ b/frontend/src/business/components/track/case/components/BatchMove.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/frontend/src/business/components/track/case/components/ShowMoreBtn.vue b/frontend/src/business/components/track/case/components/ShowMoreBtn.vue index 76d60f2211..f99cac8c8e 100644 --- a/frontend/src/business/components/track/case/components/ShowMoreBtn.vue +++ b/frontend/src/business/components/track/case/components/ShowMoreBtn.vue @@ -22,7 +22,7 @@ }, methods: { click() { - console.log("click"); + // console.log("click"); }, clickStop(btn) { if (btn.stop instanceof Function) { diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 759b21a22b..65b5873fe7 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -193,7 +193,7 @@ { name: '批量编辑用例', stop: this.handleClickStop }, { - name: '批量移动用例', stop: this.handleClickStop + name: '批量移动用例', stop: this.handleMove }, { name: '批量删除用例', stop: this.handleDeleteBatch } @@ -430,6 +430,9 @@ }, handleClickStop() { this.$refs.batchEdit.open(); + }, + handleMove() { + this.$emit("batchMove", Array.from(this.selectRows).map(row => row.id)); } } }