fix (#1646)
* fix(接口测试):修复只读用户权限过高能对数据进行操作 * fix(测试计划):修复关联用例时样式不统一的问题 Co-authored-by: 黎龙鑫 <lilongxinya@163.com>
This commit is contained in:
parent
e7d78334f1
commit
f5ec3169ea
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
|
||||
public interface ExtTestPlanLoadCaseMapper {
|
||||
|
||||
List<String> selectIdsNotInPlan(@Param("projectId") String projectId, @Param("planId") String planId);
|
||||
List<String> selectIdsNotInPlan(@Param("request") LoadCaseRequest request);
|
||||
List<TestPlanLoadCaseDTO> selectTestPlanLoadCaseList(@Param("request") LoadCaseRequest request);
|
||||
void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status);
|
||||
List<String> getStatusByTestPlanId(@Param("planId") String planId);
|
||||
|
|
|
@ -10,9 +10,12 @@
|
|||
<select id="selectIdsNotInPlan" resultType="java.lang.String">
|
||||
select load_test.id
|
||||
from load_test
|
||||
where load_test.project_id = #{projectId}
|
||||
where load_test.project_id = #{request.projectId}
|
||||
<if test="request.name != null and request.name != ''">
|
||||
and load_test.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
and load_test.id not in (
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{planId}
|
||||
select tplc.load_case_id from test_plan_load_case tplc where tplc.test_plan_id = #{request.testPlanId}
|
||||
)
|
||||
</select>
|
||||
<select id="selectTestPlanLoadCaseList" resultType="io.metersphere.track.dto.TestPlanLoadCaseDTO">
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TestPlanLoadCaseService {
|
|||
private LoadTestMapper loadTestMapper;
|
||||
|
||||
public List<LoadTest> relevanceList(LoadCaseRequest request) {
|
||||
List<String> ids = extTestPlanLoadCaseMapper.selectIdsNotInPlan(request.getProjectId(), request.getTestPlanId());
|
||||
List<String> ids = extTestPlanLoadCaseMapper.selectIdsNotInPlan(request);
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
|
|
@ -2,8 +2,17 @@
|
|||
<div>
|
||||
<el-card class="table-card" v-loading="result.loading">
|
||||
|
||||
<env-popover :env-map="projectEnvMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap"
|
||||
:project-list="projectList" ref="envPopover" class="env-popover"/>
|
||||
<template v-slot:header>
|
||||
<el-row>
|
||||
<el-col :span="8" :offset="11">
|
||||
<el-input :placeholder="$t('api_test.definition.request.select_case')" @blur="search"
|
||||
@keyup.enter.native="search" class="search-input" size="small" v-model="condition.name"/>
|
||||
</el-col>
|
||||
|
||||
<env-popover :env-map="projectEnvMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap"
|
||||
:project-list="projectList" ref="envPopover" class="env-popover"/>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table ref="scenarioTable" border :data="tableData" class="adjust-table" @select-all="handleSelectAll" @select="handleSelect">
|
||||
<el-table-column type="selection"/>
|
||||
|
|
|
@ -13,48 +13,59 @@
|
|||
ref="nodeTree"/>
|
||||
</template>
|
||||
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<el-row>
|
||||
<el-col :span="8" :offset="16">
|
||||
<el-input :placeholder="$t('api_test.definition.request.select_case')" @blur="getTestCases"
|
||||
@keyup.enter.native="getTestCases" class="search-input" size="small" v-model="condition.name"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table
|
||||
v-loading="result.loading"
|
||||
:data="testCases"
|
||||
row-key="id"
|
||||
@select-all="handleSelectAll"
|
||||
@select="handleSelectionChange"
|
||||
height="50vh"
|
||||
ref="table">
|
||||
<el-table-column
|
||||
type="selection"/>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
column-key="status"
|
||||
:filters="statusFilters"
|
||||
:label="$t('commons.status')">
|
||||
<template v-slot:default="{row}">
|
||||
<ms-performance-test-status :row="row"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
sortable
|
||||
prop="createTime"
|
||||
:label="$t('commons.create_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
sortable
|
||||
prop="updateTime"
|
||||
:label="$t('commons.update_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="result.loading"
|
||||
:data="testCases"
|
||||
row-key="id"
|
||||
@select-all="handleSelectAll"
|
||||
@select="handleSelectionChange"
|
||||
height="50vh"
|
||||
ref="table">
|
||||
<el-table-column
|
||||
type="selection"/>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
column-key="status"
|
||||
:filters="statusFilters"
|
||||
:label="$t('commons.status')">
|
||||
<template v-slot:default="{row}">
|
||||
<ms-performance-test-status :row="row"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
sortable
|
||||
prop="createTime"
|
||||
:label="$t('commons.create_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
sortable
|
||||
prop="updateTime"
|
||||
:label="$t('commons.update_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
<ms-table-pagination :change="getTestCases" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
</test-case-relevance-base>
|
||||
|
|
Loading…
Reference in New Issue