diff --git a/frontend/src/business/components/track/plan/view/TestPlanView.vue b/frontend/src/business/components/track/plan/view/TestPlanView.vue
index 8f8aaa439a..0928018ee2 100644
--- a/frontend/src/business/components/track/plan/view/TestPlanView.vue
+++ b/frontend/src/business/components/track/plan/view/TestPlanView.vue
@@ -1,39 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -46,20 +32,23 @@
import MsContainer from "../../../common/components/MsContainer";
import MsAsideContainer from "../../../common/components/MsAsideContainer";
import MsMainContainer from "../../../common/components/MsMainContainer";
+ import MsTestPlanHeaderBar from "./comonents/head/TestPlanHeaderBar";
+ import TestPlanFunctional from "./comonents/functional/TestPlanFunctional";
+ import TestPlanApi from "./comonents/api/TestPlanApi";
export default {
name: "TestPlanView",
components: {
+ TestPlanApi,
+ TestPlanFunctional,
+ MsTestPlanHeaderBar,
MsMainContainer,
MsAsideContainer, MsContainer, NodeTree, TestPlanTestCaseList, TestCaseRelevance, SelectMenu},
data() {
return {
- result: {},
testPlans: [],
currentPlan: {},
- selectNodeIds: [],
- selectParentNodes: [],
- treeNodes: []
+ activeIndex: "functional"
}
},
computed: {
@@ -68,33 +57,11 @@
}
},
mounted() {
- this.initData();
- this.openTestCaseEdit(this.$route.path);
- },
- watch: {
- '$route'(to, from) {
- this.openTestCaseEdit(to.path);
- },
- planId() {
- this.initData();
- }
+ this.getTestPlans();
},
methods: {
- refresh() {
- this.selectNodeIds = [];
- this.selectParentNodes = [];
- this.$refs.testCaseRelevance.search();
- this.getNodeTreeByPlanId();
- },
- initData() {
- this.getTestPlans();
- this.getNodeTreeByPlanId();
- },
- openTestCaseRelevanceDialog() {
- this.$refs.testCaseRelevance.openTestCaseRelevanceDialog();
- },
getTestPlans() {
- this.result = this.$post('/test/plan/list/all', {}, response => {
+ this.$post('/test/plan/list/all', {}, response => {
this.testPlans = response.data;
this.testPlans.forEach(plan => {
if (this.planId && plan.id === this.planId) {
@@ -103,39 +70,36 @@
});
});
},
- nodeChange(nodeIds, pNodes) {
- this.selectNodeIds = nodeIds;
- this.selectParentNodes = pNodes;
- // 切换node后,重置分页数
- this.$refs.testPlanTestCaseList.currentPage = 1;
- this.$refs.testPlanTestCaseList.pageSize = 10;
- },
changePlan(plan) {
this.currentPlan = plan;
this.$router.push('/track/plan/view/' + plan.id);
},
- getNodeTreeByPlanId() {
- if(this.planId){
- this.result = this.$get("/case/node/list/plan/" + this.planId, response => {
- this.treeNodes = response.data;
- });
- }
- },
- openTestCaseEdit(path) {
- if (path.indexOf("/plan/view/edit") >= 0){
- let caseId = this.$route.params.caseId;
- this.$get('/test/plan/case/get/' + caseId, response => {
- let testCase = response.data;
- if (testCase) {
- this.$refs.testPlanTestCaseList.handleEdit(testCase);
- this.$router.push('/track/plan/view/' + testCase.planId);
- }
- });
- }
+ handleSelect(key) {
+ this.activeIndex = key;
}
}
}
diff --git a/frontend/src/business/components/track/plan/view/comonents/TestPlanCommonComponent.vue b/frontend/src/business/components/track/plan/view/comonents/TestPlanCommonComponent.vue
new file mode 100644
index 0000000000..4ca9b25873
--- /dev/null
+++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanCommonComponent.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApi.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApi.vue
new file mode 100644
index 0000000000..3a40507adc
--- /dev/null
+++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApi.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctional.vue b/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctional.vue
new file mode 100644
index 0000000000..ad3244fff9
--- /dev/null
+++ b/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctional.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/track/plan/view/comonents/head/TestPlanHeaderBar.vue b/frontend/src/business/components/track/plan/view/comonents/head/TestPlanHeaderBar.vue
new file mode 100644
index 0000000000..fa6a6249b1
--- /dev/null
+++ b/frontend/src/business/components/track/plan/view/comonents/head/TestPlanHeaderBar.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+