fix: 测试计划的通过率前端值类型转换 (#1700)

* feat(测试跟踪): 测试用例下载模版增加标签列

* fix(接口定义): 扩大请求头键长度

* fix: schedule表对旧数据name字段兼容的补充

* feat(测试计划): 执行用例或定时任务结束后,自动更新测试计划的状态

* fix: 测试计划的通过率前端值类型转换

Co-authored-by: jianxing <41557596+AgAngle@users.noreply.github.com>
This commit is contained in:
Coooder-X 2021-03-24 19:54:14 +08:00 committed by GitHub
parent 137f727655
commit f115f25f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -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)
},