fix(接口定义): 修复场景报告跳转失败的缺陷
This commit is contained in:
parent
a45c06d15b
commit
2b78ec74a4
|
@ -55,7 +55,7 @@ public class ExtProjectController {
|
|||
extProjectApplicationService.updateCurrentUserByResourceId(resourceId);
|
||||
}
|
||||
|
||||
@PostMapping("/list/related")
|
||||
@PostMapping("/api/project/list/related")
|
||||
public List<ProjectDTO> getUserProject(@RequestBody ApiProjectRequest request) {
|
||||
return extProjectApplicationService.getUserProject(request);
|
||||
}
|
||||
|
|
|
@ -49,3 +49,7 @@ export function getUserWorkspace() {
|
|||
export function projectRelated(params) {
|
||||
return post('/project/list/related', params);
|
||||
}
|
||||
|
||||
export function apiProjectRelated(params) {
|
||||
return post('/api/project/list/related', params);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<el-form :model="httpForm" label-position="right" label-width="80px" size="small" :rules="rule" ref="httpForm"
|
||||
v-if="!loading">
|
||||
<el-form-item :label="$t('api_definition.case_name')" prop="name">
|
||||
<el-input v-model="httpForm.name" autocomplete="off" :placeholder="$t('api_definition.case_name')"/>
|
||||
<el-input v-model="httpForm.name" autocomplete="off" :placeholder="$t('api_definition.case_name')"
|
||||
show-word-limit maxlength="100"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template v-slot:footer>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<ms-table-column
|
||||
prop="projectName"
|
||||
:label="$t('group.belong_project')"
|
||||
:filters="projectFilters"
|
||||
:filters="projectPlanFilters"
|
||||
column-key="projectId"
|
||||
width="200"
|
||||
>
|
||||
|
@ -99,7 +99,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
||||
import {getOwnerProjectIds, getProject, getUserWorkspace, projectRelated} from "@/api/project";
|
||||
import {apiProjectRelated, getOwnerProjectIds, getProject, getUserWorkspace, projectRelated} from "@/api/project";
|
||||
import {getCurrentProjectID, getCurrentUserId, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||
import {getUUID} from "metersphere-frontend/src/utils";
|
||||
import {getDefinitionReference, getPlanReference} from "@/api/definition";
|
||||
|
@ -124,7 +124,8 @@ export default {
|
|||
projectList: [],
|
||||
screenHeight: 'calc(100vh - 400px)',
|
||||
condition: {},
|
||||
type: ''
|
||||
type: '',
|
||||
projectPlanFilters: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
@ -149,10 +150,7 @@ export default {
|
|||
userId: getCurrentUserId(),
|
||||
workspaceId: getCurrentWorkspaceId(),
|
||||
}).then(res => {
|
||||
let data = res.data ? res.data : [];
|
||||
this.projectList = data.map((e) => {
|
||||
return {text: e.name, value: e.id};
|
||||
});
|
||||
this.projectList = res.data ? res.data : [];
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -202,7 +200,7 @@ export default {
|
|||
this.workspaceFilters.map(item => {
|
||||
workspaceIds.push(item.value);
|
||||
})
|
||||
projectRelated({
|
||||
apiProjectRelated({
|
||||
userId: getCurrentUserId(),
|
||||
workspaceIds: workspaceIds,
|
||||
}).then(res => {
|
||||
|
@ -220,7 +218,7 @@ export default {
|
|||
getPlanReference(this.currentPage, this.pageSize, this.condition).then(res => {
|
||||
let data = res.data || [];
|
||||
this.total = data.itemCount || 0;
|
||||
this.projectFilters = this.projectList.filter(project => {
|
||||
this.projectPlanFilters = this.projectList.filter(project => {
|
||||
return data.listObject.find(i => i.projectId === project.id)
|
||||
}).map((e) => {
|
||||
return {text: e.name, value: e.id};
|
||||
|
|
|
@ -16,16 +16,16 @@ export default {
|
|||
name: "ApiReportList",
|
||||
component: () => import('@/business/automation/report/ApiReportList'),
|
||||
},
|
||||
{
|
||||
path: "automation/report/:redirectID?/:dataType?/:dataSelectRange",
|
||||
name: "ApiReportListWithQuery",
|
||||
component: () => import('@/business/automation/report/ApiReportList'),
|
||||
},
|
||||
{
|
||||
path: "automation/report/view/:reportId",
|
||||
name: "ApiScenarioReportView",
|
||||
component: () => import('@/business/automation/report/ApiReportView'),
|
||||
},
|
||||
{
|
||||
path: "automation/report/:redirectID?/:dataType?/:dataSelectRange",
|
||||
name: "ApiReportListWithQuery",
|
||||
component: () => import('@/business/automation/report/ApiReportList'),
|
||||
},
|
||||
{
|
||||
path: "definition/report/view/:reportId",
|
||||
name: "ApiReportView",
|
||||
|
|
Loading…
Reference in New Issue