fix(测试跟踪): 测试跟踪首页top10无数据

--bug=1017720 --user=陈建星 【测试跟踪】首页过去7天测试计划失败用例TOP10没有数据产生 https://www.tapd.cn/55049933/s/1258643
This commit is contained in:
chenjianxing 2022-10-11 17:18:45 +08:00 committed by jianxing
parent 9c283335fe
commit 2636d594ee
3 changed files with 17 additions and 7 deletions

View File

@ -19,7 +19,8 @@ import javax.servlet.http.HttpServletRequest;
"/api/automation/module",
"/api/project",
"/test/case/relevance/api",
"/test/case/relevance/scenario"
"/test/case/relevance/scenario",
"home"
})
public class TrackApiTestController {
@Resource

View File

@ -0,0 +1,7 @@
import {post, get} from "@/business/utils/sdk-utils";
const BASE_URL = '/home/';
export function homeTestPlanFailureCaseGet(projectId, selectFunctionCase, limitNumber) {
return get(BASE_URL + `failure/case/about/plan/${projectId}/${selectFunctionCase}/${limitNumber}`);
}

View File

@ -1,5 +1,5 @@
<template>
<el-card class="table-card" v-loading="result.loading" body-style="padding:10px;">
<el-card class="table-card" v-loading="loading" body-style="padding:10px;">
<template v-slot:header>
<span class="title">
{{ $t('api_test.home_page.failed_case_list.title') }}
@ -51,6 +51,7 @@
<script>
import MsTag from "metersphere-frontend/src/components/MsTag";
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
import {homeTestPlanFailureCaseGet} from "@/api/remote/api/api-home";
export default {
name: "MsFailureTestCaseList",
@ -61,7 +62,6 @@ export default {
data() {
return {
result: {},
tableData: [],
loading: false
}
@ -77,10 +77,12 @@ export default {
methods: {
search() {
if (this.projectId) {
// todo
// this.result = this.$get("/api/faliureCaseAboutTestPlan/" + this.projectId + "/" + this.selectFunctionCase + "/10", response => {
// this.tableData = response.data;
// });
this.loading = true;
homeTestPlanFailureCaseGet(this.projectId, this.selectFunctionCase, 10)
.then((r) => {
this.loading = false;
this.tableData = r.data;
});
}
},
redirect(pageType, param) {