fix: 修复我的评审结果分布tip未显示的问题

This commit is contained in:
shiziyuan9527 2020-10-10 14:32:43 +08:00
parent ab6b566cb3
commit 3e3a43d113
1 changed files with 10 additions and 23 deletions

View File

@ -45,29 +45,13 @@
<el-table-column <el-table-column
:label="$t('test_track.review.result_distribution')"> :label="$t('test_track.review.result_distribution')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<yan-progress :total="scope.row.total" :done="scope.row.reviewed" :modify="scope.row.pass" :tip="tip"/> <el-tooltip :content="getResultTip(scope.row.total,scope.row.reviewed,scope.row.pass)"
placement="top" :enterable="false" class="item" effect="dark">
<yan-progress :total="scope.row.total" :done="scope.row.reviewed" :modify="scope.row.pass" :tip="tip"/>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- prop="projectName"-->
<!-- :label="$t('test_track.review.done')"-->
<!-- show-overflow-tooltip>-->
<!-- <template v-slot:default="scope">-->
<!-- {{scope.row.reviewed}}/{{scope.row.total}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="projectName"-->
<!-- :label="$t('test_track.home.review_progress')"-->
<!-- min-width="100"-->
<!-- show-overflow-tooltip>-->
<!-- <template v-slot:default="scope">-->
<!-- <el-progress :percentage="scope.row.testRate"></el-progress>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column <el-table-column
prop="projectName" prop="projectName"
:label="$t('test_track.plan.plan_project')" :label="$t('test_track.plan.plan_project')"
@ -95,9 +79,9 @@ export default {
tableData: [], tableData: [],
showMyCreator: false, showMyCreator: false,
tip: [ tip: [
{text: "总共X", fillStyle: '#D3D3D3'}, {text: "X", fillStyle: '#D3D3D3'},
{text: "评审了X", fillStyle: '#F08080'}, {text: "X", fillStyle: '#ee4545'},
{text: "通过X", fillStyle: '#90EE90'} {text: "X", fillStyle: '#4dcf4d'}
] ]
} }
}, },
@ -131,6 +115,9 @@ export default {
} else { } else {
this.initTableData("reviewer"); this.initTableData("reviewer");
} }
},
getResultTip(total, reviewed, pass) {
return '通过: ' + pass + '; ' + '未通过: ' + (reviewed - pass) + '; ' + '未评审: ' + (total - reviewed);
} }
} }
} }