fix 测试用例点保存后状态更新不及时

This commit is contained in:
chenjianxing 2020-06-17 17:40:44 +08:00
parent a6ab2813ae
commit d0af80d3f0
1 changed files with 12 additions and 0 deletions

View File

@ -289,9 +289,21 @@
param.issues = JSON.stringify(this.testCase.issues);
this.$post('/test/plan/case/edit', param, () => {
this.$success(this.$t('commons.save_success'));
this.updateTestCases(param);
this.setPlanStatus(this.testCase.planId);
});
},
updateTestCases(param) {
for (let i = 0; i < this.testCases.length; i++) {
let testCase = this.testCases[i];
if (testCase.id === param.id) {
testCase.results = param.results;
testCase.issues = param.issues;
testCase.status = param.status;
return;
}
}
},
handleNext() {
this.index++;
this.getTestCase(this.index);