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 {
|
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);
|
List<TestPlanLoadCaseDTO> selectTestPlanLoadCaseList(@Param("request") LoadCaseRequest request);
|
||||||
void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status);
|
void updateCaseStatus(@Param("reportId") String reportId, @Param("status") String status);
|
||||||
List<String> getStatusByTestPlanId(@Param("planId") String planId);
|
List<String> getStatusByTestPlanId(@Param("planId") String planId);
|
||||||
|
|
|
@ -10,9 +10,12 @@
|
||||||
<select id="selectIdsNotInPlan" resultType="java.lang.String">
|
<select id="selectIdsNotInPlan" resultType="java.lang.String">
|
||||||
select load_test.id
|
select load_test.id
|
||||||
from load_test
|
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 (
|
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>
|
||||||
<select id="selectTestPlanLoadCaseList" resultType="io.metersphere.track.dto.TestPlanLoadCaseDTO">
|
<select id="selectTestPlanLoadCaseList" resultType="io.metersphere.track.dto.TestPlanLoadCaseDTO">
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class TestPlanLoadCaseService {
|
||||||
private LoadTestMapper loadTestMapper;
|
private LoadTestMapper loadTestMapper;
|
||||||
|
|
||||||
public List<LoadTest> relevanceList(LoadCaseRequest request) {
|
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)) {
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,17 @@
|
||||||
<div>
|
<div>
|
||||||
<el-card class="table-card" v-loading="result.loading">
|
<el-card class="table-card" v-loading="result.loading">
|
||||||
|
|
||||||
<env-popover :env-map="projectEnvMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap"
|
<template v-slot:header>
|
||||||
:project-list="projectList" ref="envPopover" class="env-popover"/>
|
<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 ref="scenarioTable" border :data="tableData" class="adjust-table" @select-all="handleSelectAll" @select="handleSelect">
|
||||||
<el-table-column type="selection"/>
|
<el-table-column type="selection"/>
|
||||||
|
|
|
@ -13,48 +13,59 @@
|
||||||
ref="nodeTree"/>
|
ref="nodeTree"/>
|
||||||
</template>
|
</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
|
<el-table
|
||||||
v-loading="result.loading"
|
v-loading="result.loading"
|
||||||
:data="testCases"
|
:data="testCases"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@select-all="handleSelectAll"
|
@select-all="handleSelectAll"
|
||||||
@select="handleSelectionChange"
|
@select="handleSelectionChange"
|
||||||
height="50vh"
|
height="50vh"
|
||||||
ref="table">
|
ref="table">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"/>
|
type="selection"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
:label="$t('commons.name')"
|
:label="$t('commons.name')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="status"
|
prop="status"
|
||||||
column-key="status"
|
column-key="status"
|
||||||
:filters="statusFilters"
|
:filters="statusFilters"
|
||||||
:label="$t('commons.status')">
|
:label="$t('commons.status')">
|
||||||
<template v-slot:default="{row}">
|
<template v-slot:default="{row}">
|
||||||
<ms-performance-test-status :row="row"/>
|
<ms-performance-test-status :row="row"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
sortable
|
sortable
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
:label="$t('commons.create_time')">
|
:label="$t('commons.create_time')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
sortable
|
sortable
|
||||||
prop="updateTime"
|
prop="updateTime"
|
||||||
:label="$t('commons.update_time')">
|
:label="$t('commons.update_time')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
<ms-table-pagination :change="getTestCases" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
<ms-table-pagination :change="getTestCases" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||||
:total="total"/>
|
:total="total"/>
|
||||||
</test-case-relevance-base>
|
</test-case-relevance-base>
|
||||||
|
|
Loading…
Reference in New Issue