fix: 测试计划进度统计有误

This commit is contained in:
chenjianxing 2021-05-13 11:31:11 +08:00 committed by jianxing
parent a8241727eb
commit 50094a6890
2 changed files with 5 additions and 7 deletions

View File

@ -841,8 +841,10 @@ public class TestPlanService {
for (IssuesDao i : issue) { for (IssuesDao i : issue) {
i.setModel(testCase.getNodePath()); i.setModel(testCase.getNodePath());
i.setProjectName(testCase.getProjectName()); i.setProjectName(testCase.getProjectName());
if (StringUtils.isNotBlank(i.getDescription())) {
String des = i.getDescription().replaceAll("<p>", "").replaceAll("</p>", ""); String des = i.getDescription().replaceAll("<p>", "").replaceAll("</p>", "");
i.setDescription(des); i.setDescription(des);
}
if (i.getLastmodify() == null || i.getLastmodify() == "") { if (i.getLastmodify() == null || i.getLastmodify() == "") {
if (i.getReporter() != null || i.getReporter() != "") { if (i.getReporter() != null || i.getReporter() != "") {
i.setLastmodify(i.getReporter()); i.setLastmodify(i.getReporter());

View File

@ -86,7 +86,7 @@
show-overflow-tooltip show-overflow-tooltip
:key="index"> :key="index">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-progress :percentage="calPassRate(scope)"></el-progress> <el-progress :percentage="scope.row.testRate"></el-progress>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -296,10 +296,6 @@ export default {
inite() { inite() {
this.initTableData() this.initTableData()
}, },
calPassRate(scope) {
let passRate = scope.row.passRate.substring(0, scope.row.passRate.length - 1);
return Number.parseInt(passRate, 10);
},
customHeader() { customHeader() {
this.$refs.headerCustom.open(this.tableLabel) this.$refs.headerCustom.open(this.tableLabel)
}, },