fix:测试跟踪-测试用例下拉框-创建用例,会提示没项目

This commit is contained in:
wenyann 2021-03-19 16:51:07 +08:00
parent 937d33e955
commit 88c2073002
2 changed files with 19 additions and 3 deletions

View File

@ -260,9 +260,14 @@ export default {
this.$warning(this.$t('commons.check_project_tip'));
return;
}
/*
this.openRecentTestCaseEditDialog(caseId);
*/
if (caseId) {
this.$get('test/case/get/' + caseId, response => {
let testCase = response.data;
this.editTestCase(testCase)
});
} else {
this.addTab({name: 'add'});
}
this.$router.push('/track/case/all');
}
},

View File

@ -551,7 +551,11 @@ export default {
let tmp = {};
Object.assign(tmp, testCase);
tmp.steps = JSON.parse(testCase.steps);
if (tmp.steps == null) {
tmp.steps = []
}
Object.assign(this.form, tmp);
this.form.module = testCase.nodeId;
this.getFileMetaData(testCase);
},
@ -964,4 +968,11 @@ export default {
width: 100%;
}
/deep/ .el-button-group > .el-button:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
height: 32px;
width: 56px;
}
</style>