repr@dev_v1.14@fix_首页-过去7天有更新的接口,点击ID和名称没有跳转
--bug=1007345 --user=王孝刚 【接口测试】首页-过去7天有更新的接口,点击ID和名称没有跳转 https://www.tapd.cn/55049933/s/1057698
This commit is contained in:
parent
51468d9bda
commit
dab88994ed
|
@ -27,4 +27,6 @@ public class ApiDefinitionResult extends ApiDefinitionWithBLOBs {
|
|||
private String caseType;
|
||||
|
||||
private String scenarioType;
|
||||
|
||||
private String apiType;
|
||||
}
|
||||
|
|
|
@ -152,6 +152,7 @@ public class ApiDefinitionService {
|
|||
List<ApiDefinitionResult> resList = extApiDefinitionMapper.weekList(request, startTime.getTime());
|
||||
calculateResult(resList, request.getProjectId());
|
||||
calculateResultSce(resList);
|
||||
resList.stream().forEach(item -> item.setApiType("api"));
|
||||
return resList;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -561,6 +561,7 @@ export default {
|
|||
if (currentProtocol) {
|
||||
this.condition.moduleIds = [];
|
||||
}
|
||||
|
||||
if (this.condition.projectId) {
|
||||
this.result = this.$post("/api/definition/list/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
||||
getProtocolFilter(this.condition.protocol);
|
||||
|
@ -768,6 +769,14 @@ export default {
|
|||
} else {
|
||||
this.selectDataRange = 'all';
|
||||
}
|
||||
if (this.selectDataRange != null) {
|
||||
let selectParamArr = this.selectDataRange.split(":");
|
||||
if (selectParamArr.length === 2) {
|
||||
if (selectParamArr[0] === "apiList") {
|
||||
this.condition.name = selectParamArr[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
changeSelectDataRangeAll() {
|
||||
this.$emit("changeSelectDataRangeAll", "api");
|
||||
|
|
|
@ -2,8 +2,19 @@
|
|||
<div class="table-card" v-loading="result.loading" body-style="padding:10px;">
|
||||
<el-table border :data="tableData" class="adjust-table table-content" height="300px">
|
||||
<el-table-column prop="num" :label="$t('api_test.home_page.new_case_list.table_coloum.index')" width="100"
|
||||
show-overflow-tooltip/>
|
||||
show-overflow-tooltip>
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="num" @click="redirect(row.apiType,row.num)">
|
||||
{{ row.num }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" :label="$t('api_test.home_page.new_case_list.table_coloum.api_name')" width="150">
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="name" @click="redirect(row.apiType,row.name)">
|
||||
{{ row.name }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="path" :label="$t('api_test.home_page.new_case_list.table_coloum.path')" width="150">
|
||||
|
||||
|
@ -184,11 +195,14 @@ export default {
|
|||
},
|
||||
redirect(pageType, param) {
|
||||
switch (pageType) {
|
||||
case "api":
|
||||
this.$emit('redirectPage', 'api', 'api', 'apiList:' + param);
|
||||
break;
|
||||
case "apiCase":
|
||||
this.$emit('redirectPage', 'api', 'apiTestCase', 'singleList:' + param);
|
||||
break;
|
||||
case "scenario":
|
||||
if(param) {
|
||||
if (param) {
|
||||
this.$emit('redirectPage', 'scenario', 'scenario', 'list:' + param);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue