refactor(测试计划): 统计报告优化

This commit is contained in:
shiziyuan9527 2021-01-13 11:19:22 +08:00
parent 4654e5fff2
commit 6811a5c9a2
2 changed files with 13 additions and 29 deletions

View File

@ -79,11 +79,11 @@
], ],
loadTestCases: [ loadTestCases: [
{ {
caseName: 'testCase4', caseName: 'testCase5',
projectName: 'P3', projectName: '测试项目',
userName: '/module1/module2', userName: 'Tom',
createTime: new Date(), createTime: new Date(),
status: 'error', caseStatus: 'error',
} }
] ]
} }

View File

@ -33,43 +33,27 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="status" prop="caseStatus"
column-key="status" :label="$t('test_track.plan.load_case.execution_status')">
:filters="statusFilters"
:label="$t('commons.status')">
<template v-slot:default="{row}"> <template v-slot:default="{row}">
<ms-performance-test-status :row="row"/> <el-tag size="mini" type="danger" v-if="row.caseStatus === 'error'">
{{ row.caseStatus }}
</el-tag>
<el-tag size="mini" type="success" v-else-if="row.caseStatus === 'success'">
{{ row.caseStatus }}
</el-tag>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- prop="caseStatus"-->
<!-- :label="$t('test_track.plan.load_case.execution_status')">-->
<!-- <template v-slot:default="{row}">-->
<!-- <el-tag size="mini" type="danger" v-if="row.caseStatus === 'error'">-->
<!-- {{ row.caseStatus }}-->
<!-- </el-tag>-->
<!-- <el-tag size="mini" type="success" v-else-if="row.caseStatus === 'success'">-->
<!-- {{ row.caseStatus }}-->
<!-- </el-tag>-->
<!-- <span v-else>-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
</div> </div>
</template> </template>
<script> <script>
import MsTag from "@/business/components/common/components/MsTag";
import PriorityTableItem from "@/business/components/track/common/tableItems/planview/PriorityTableItem";
import TypeTableItem from "@/business/components/track/common/tableItems/planview/TypeTableItem";
import MethodTableItem from "@/business/components/track/common/tableItems/planview/MethodTableItem";
import StatusTableItem from "@/business/components/track/common/tableItems/planview/StatusTableItem";
import MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
export default { export default {
name: "LoadFailureCasesList", name: "LoadFailureCasesList",
components: {MsTag, PriorityTableItem, TypeTableItem, MethodTableItem, StatusTableItem, MsPerformanceTestStatus},
props: ['loadTestCases'], props: ['loadTestCases'],
data() { data() {
return { return {