fix: 提缺陷时生成缺陷描述

This commit is contained in:
shiziyuan9527 2020-08-25 18:18:50 +08:00
parent 3c482f4840
commit b82ffef3cf
1 changed files with 13 additions and 12 deletions

View File

@ -402,6 +402,7 @@
},
openTestCaseEdit(testCase) {
this.showDialog = true;
this.issuesSwitch = false;
this.activeTab = 'detail';
listenGoBack(this.handleClose);
this.initData(testCase);
@ -459,18 +460,18 @@
}
},
issuesChange() {
// if (this.testCase.issues.hasIssues) {
// let desc = this.addPLabel('[' + this.$t('test_track.plan_view.operate_step') + ']');
// let result = this.addPLabel('[' + this.$t('test_track.case.expected_results') + ']');
// let executeResult = this.addPLabel('[' + this.$t('test_track.plan_view.actual_result') + ']');
// this.testCase.steps.forEach(step => {
// let stepPrefix = this.$t('test_track.plan_view.step') + step.num + ':';
// desc += this.addPLabel(stepPrefix + (step.desc == undefined ? '' : step.desc));
// result += this.addPLabel(stepPrefix + (step.result == undefined ? '' : step.result));
// executeResult += this.addPLabel(stepPrefix + (step.executeResult == undefined ? '' : step.executeResult));
// });
// this.testCase.issues.content = desc + this.addPLabel('') + result + this.addPLabel('') + executeResult + this.addPLabel('');
// }
if (this.issuesSwitch) {
let desc = this.addPLabel('[' + this.$t('test_track.plan_view.operate_step') + ']');
let result = this.addPLabel('[' + this.$t('test_track.case.expected_results') + ']');
let executeResult = this.addPLabel('[' + this.$t('test_track.plan_view.actual_result') + ']');
this.testCase.steps.forEach(step => {
let stepPrefix = this.$t('test_track.plan_view.step') + step.num + ':';
desc += this.addPLabel(stepPrefix + (step.desc == undefined ? '' : step.desc));
result += this.addPLabel(stepPrefix + (step.result == undefined ? '' : step.result));
executeResult += this.addPLabel(stepPrefix + (step.executeResult == undefined ? '' : step.executeResult));
});
this.testCase.issues.content = desc + this.addPLabel('') + result + this.addPLabel('') + executeResult + this.addPLabel('');
}
},
addPLabel(str) {
return "<p>" + str + "</p>";