菜单栏创建测试计划

This commit is contained in:
chenjianxing 2020-04-08 16:27:24 +08:00
parent 54201699a4
commit b64fa89e0c
6 changed files with 22 additions and 7 deletions

View File

@ -214,7 +214,7 @@ const router = new VueRouter({
component: TestCase,
},
{
path: "plan/:projectId",
path: "plan/:type",
name: "testPlan",
component: TestPlan
},

View File

@ -88,6 +88,7 @@
}
if (path.indexOf("/track/case/edit") >= 0){
this.openRecentTestCaseEditDialog();
this.$router.push('/track/case/all');
}
}
},

View File

@ -31,9 +31,6 @@
<span style="padding-left: 5px;">{{$t('test_track.case_list')}}</span>
</el-menu-item>
<el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item>
<!--<el-menu-item :index="'/' + beaseUrl + '/case/create'">-->
<!--<el-button type="text">{{$t('test_track.create_case')}}</el-button>-->
<!--</el-menu-item>-->
</el-submenu>
<el-submenu v-if="isCurrentWorkspaceUser"

View File

@ -25,6 +25,20 @@
return {
}
},
mounted() {
if (this.$route.path.indexOf("/track/plan/create") >= 0){
this.openTestPlanEditDialog();
this.$router.push('/track/plan/all');
}
},
watch: {
'$route'(to, from) {
if (to.path.indexOf("/track/plan/create") >= 0){
this.openTestPlanEditDialog();
this.$router.push('/track/plan/all');
}
}
},
methods: {
openTestPlanEditDialog(data) {
this.$refs.testPlanEditDialog.openTestPlanEditDialog(data);

View File

@ -13,19 +13,20 @@
<test-case-plan-list
@openTestCaseRelevanceDialog="openTestCaseRelevanceDialog"
@editTestPlanTestCase="editTestPlanTestCase"
@refresh="refresh"
:plan-id="planId"
ref="testCasePlanList"></test-case-plan-list>
</el-main>
</el-container>
<test-case-relevance
@refresh="getPlanCases"
@refresh="refresh"
:plan-id="planId"
ref="testCaseRelevance"></test-case-relevance>
<test-plan-test-case-edit
ref="testPlanTestCaseEdit"
@refresh="getPlanCases">
@refresh="refresh">
</test-plan-test-case-edit>
@ -65,7 +66,8 @@
},
methods: {
refresh() {
this.getPlanCases();
this.getNodeTreeByPlanId();
},
getPlanCases(nodeIds) {
this.$refs.testCasePlanList.initTableData(nodeIds);

View File

@ -211,6 +211,7 @@
let testCaseId = testCase.id;
this.$post('/test/plan/case/delete/' + testCaseId, {}, () => {
this.initTableData();
this.$emit("refresh");
this.$message({
message: this.$t('commons.delete_success'),
type: 'success'