fix(测试跟踪): 功能用例复制报错

This commit is contained in:
wxg0103 2022-01-17 13:56:45 +08:00 committed by zhangdahai112
parent 835aea45fa
commit ff5189e428
1 changed files with 6 additions and 2 deletions

View File

@ -961,9 +961,13 @@ export default {
}, },
getVersionHistory(param) { getVersionHistory(param) {
this.$get('/test/case/versions/' + this.currentTestCaseInfo.id, response => { this.$get('/test/case/versions/' + this.currentTestCaseInfo.id, response => {
for (let i = 0; i < response.data.length; i++) { if (response.data.length > 0) {
this.currentProjectId = response.data[i].projectId; for (let i = 0; i < response.data.length; i++) {
this.currentProjectId = response.data[i].projectId;
} }
} else {
this.currentProjectId = getCurrentProjectID();
}
this.versionData = response.data; this.versionData = response.data;
this.$refs.versionHistory.cancelOtherInfo(); this.$refs.versionHistory.cancelOtherInfo();
this.$refs.versionHistory.loading = false; this.$refs.versionHistory.loading = false;