fix: 测试计划的通过率前端值类型转换 (#1700)
* feat(测试跟踪): 测试用例下载模版增加标签列 * fix(接口定义): 扩大请求头键长度 * fix: schedule表对旧数据name字段兼容的补充 * feat(测试计划): 执行用例或定时任务结束后,自动更新测试计划的状态 * fix: 测试计划的通过率前端值类型转换 Co-authored-by: jianxing <41557596+AgAngle@users.noreply.github.com>
This commit is contained in:
parent
137f727655
commit
f115f25f87
|
@ -5,6 +5,7 @@ import io.metersphere.api.service.*;
|
|||
import io.metersphere.base.domain.ApiDefinitionExecResult;
|
||||
import io.metersphere.base.domain.ApiScenarioReport;
|
||||
import io.metersphere.base.domain.ApiTestReport;
|
||||
import io.metersphere.base.domain.TestPlanReport;
|
||||
import io.metersphere.commons.constants.*;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
|
@ -14,6 +15,7 @@ import io.metersphere.notice.sender.NoticeModel;
|
|||
import io.metersphere.notice.service.NoticeSendService;
|
||||
import io.metersphere.service.SystemParameterService;
|
||||
import io.metersphere.track.service.TestPlanReportService;
|
||||
import io.metersphere.track.service.TestPlanService;
|
||||
import io.metersphere.track.service.TestPlanTestCaseService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
show-overflow-tooltip
|
||||
:key="index">
|
||||
<template v-slot:default="scope">
|
||||
<el-progress :percentage="scope.row.passRate.substring(0, scope.row.passRate.length-1)"></el-progress>
|
||||
<el-progress :percentage="calPassRate(scope)"></el-progress>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -293,6 +293,10 @@ export default {
|
|||
this.initTableData();
|
||||
},
|
||||
methods: {
|
||||
calPassRate(scope) {
|
||||
let passRate = scope.row.passRate.substring(0, scope.row.passRate.length-1);
|
||||
return Number.parseInt(passRate, 10);
|
||||
},
|
||||
customHeader() {
|
||||
this.$refs.headerCustom.open(this.tableLabel)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue