This commit is contained in:
fit2-zhao 2020-12-23 17:54:02 +08:00
commit 6625b77ad9
3 changed files with 16 additions and 23 deletions

View File

@ -122,13 +122,13 @@
<select id="list" resultType="io.metersphere.track.dto.TestPlanCaseDTO"> <select id="list" resultType="io.metersphere.track.dto.TestPlanCaseDTO">
select test_plan_test_case.id as id, test_case.id as caseId, test_case.name, test_case.priority, select test_plan_test_case.id as id, test_case.id as caseId, test_case.name, test_case.priority,
test_case.type,test_case.test_id as testId, test_case.type,test_case.test_id as testId,test_case.node_id,
test_case.node_path, test_case.method, test_case.num, test_plan_test_case.executor, test_plan_test_case.status, test_case.node_path, test_case.method, test_case.num, test_plan_test_case.executor, test_plan_test_case.status,
test_plan_test_case.update_time, test_case_node.name as model, project.name as projectName, test_plan_test_case.update_time, test_case_node.name as model, project.name as projectName,
test_plan_test_case.plan_id as planId test_plan_test_case.plan_id as planId
from test_plan_test_case from test_plan_test_case
inner join test_case on test_plan_test_case.case_id = test_case.id inner join test_case on test_plan_test_case.case_id = test_case.id
left join test_case_node on test_case_node.id=test_case.node_id left join test_case_node on test_case_node.id = test_case.node_id
inner join project on project.id = test_case.project_id inner join project on project.id = test_case.project_id
<where> <where>
<if test="request.combine != null"> <if test="request.combine != null">

View File

@ -1,9 +1,18 @@
<template> <template>
<el-card class="card-content" v-if="isShow"> <el-card class="card-content" v-if="isShow">
<el-button-group v-if="isShowChangeButton"> <el-button-group v-if="isShowChangeButton">
<el-tooltip class="item" effect="dark" content="接口列表" placement="left">
<el-button plain size="small" icon="el-icon-tickets" :class="{active: isApiListEnable}" @click="apiChange('api')"></el-button> <el-button plain size="small" icon="el-icon-tickets" :class="{active: isApiListEnable}" @click="apiChange('api')"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="用例列表" placement="right">
<el-button plain class="case-button" size="small" icon="el-icon-paperclip" :class="{active: !isApiListEnable}" @click="caseChange('case')"></el-button> <el-button plain class="case-button" size="small" icon="el-icon-paperclip" :class="{active: !isApiListEnable}" @click="caseChange('case')"></el-button>
</el-tooltip>
</el-button-group> </el-button-group>
<template v-slot:header> <template v-slot:header>
<slot name="header"></slot> <slot name="header"></slot>
</template> </template>

View File

@ -2,8 +2,7 @@
<common-component :title="$t('test_track.plan_view.result_statistics')"> <common-component :title="$t('test_track.plan_view.result_statistics')">
<div :class="{'show-one': isShowOne}"> <div class="char-component">
<div class="char-item" v-if="showFunctional"> <div class="char-item" v-if="showFunctional">
<ms-pie-chart v-if="isShow" :text="'功能测试用例'" <ms-pie-chart v-if="isShow" :text="'功能测试用例'"
:name="$t('test_track.plan_view.test_result')" :data="functionalCharData"/> :name="$t('test_track.plan_view.test_result')" :data="functionalCharData"/>
@ -18,8 +17,6 @@
<ms-pie-chart v-if="isShow" :text="'场景测试用例'" <ms-pie-chart v-if="isShow" :text="'场景测试用例'"
:name="$t('test_track.plan_view.test_result')" :data="scenarioCharData"/> :name="$t('test_track.plan_view.test_result')" :data="scenarioCharData"/>
</div> </div>
</div> </div>
</common-component> </common-component>
@ -85,19 +82,6 @@
}, },
showScenario() { showScenario() {
return this.executeResult.scenarioResult.length > 0; return this.executeResult.scenarioResult.length > 0;
},
isShowOne() {
let count = 0;
if (this.showFunctional) {
count++;
}
if (this.showApi) {
count++;
}
if (this.showScenario) {
count++;
}
return count === 1;
} }
}, },
watch: { watch: {
@ -165,8 +149,8 @@
display: inline-block; display: inline-block;
} }
.show-one .char-item { .char-component {
display: block; text-align: center;
} }
</style> </style>