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

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

View File

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