diff --git a/backend/src/main/java/io/metersphere/api/controller/APIReportController.java b/backend/src/main/java/io/metersphere/api/controller/APIReportController.java index 0704e95119..b72904a68b 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APIReportController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APIReportController.java @@ -49,7 +49,6 @@ public class APIReportController { @PostMapping("/list/{goPage}/{pageSize}") public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryAPIReportRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, apiReportService.list(request)); } diff --git a/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java b/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java index 86424a1540..b16be0677e 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java @@ -36,7 +36,6 @@ public class APIScenarioReportController { @PostMapping("/list/{goPage}/{pageSize}") public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryAPIReportRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, apiReportService.list(request)); } diff --git a/backend/src/main/java/io/metersphere/api/controller/APITestController.java b/backend/src/main/java/io/metersphere/api/controller/APITestController.java index 9dcd164686..3bd6bccc19 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APITestController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APITestController.java @@ -82,8 +82,6 @@ public class APITestController { @PostMapping("/list/{goPage}/{pageSize}") public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryAPITestRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); - request.setProjectId(SessionUtils.getCurrentProjectId()); return PageUtils.setPageInfo(page, apiTestService.list(request)); } diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java index 91d7a55fec..968ddef8bb 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java @@ -53,7 +53,7 @@ public class ApiAutomationController { }}); } Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + return PageUtils.setPageInfo(page, apiAutomationService.list(request)); } @@ -80,7 +80,6 @@ public class ApiAutomationController { @RequiresPermissions("PROJECT_API_SCENARIO:READ") public List list(@PathVariable String projectId) { ApiScenarioRequest request = new ApiScenarioRequest(); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); request.setProjectId(projectId); return apiAutomationService.list(request); } diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java b/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java index 56de590a6d..71fbdea759 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java @@ -60,21 +60,18 @@ public class ApiDefinitionController { @RequiresPermissions("PROJECT_API_DEFINITION:READ") public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiDefinitionRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, apiDefinitionService.list(request)); } @PostMapping("/list/relevance/{goPage}/{pageSize}") public Pager> listRelevance(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiDefinitionRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, apiDefinitionService.listRelevance(request)); } @PostMapping("/list/relevance/review/{goPage}/{pageSize}") public Pager> listRelevanceReview(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiDefinitionRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, apiDefinitionService.listRelevanceReview(request)); } diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java b/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java index e6551dcab3..88cd68ff68 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiTestCaseController.java @@ -8,15 +8,11 @@ import io.metersphere.api.service.ApiTestCaseService; import io.metersphere.base.domain.ApiTestCase; import io.metersphere.base.domain.ApiTestCaseWithBLOBs; import io.metersphere.commons.constants.OperLogConstants; -import io.metersphere.commons.constants.RoleConstants; import io.metersphere.commons.utils.PageUtils; import io.metersphere.commons.utils.Pager; -import io.metersphere.commons.utils.SessionUtils; import io.metersphere.log.annotation.MsAuditLog; import io.metersphere.track.request.testcase.ApiCaseRelevanceRequest; import io.metersphere.track.service.TestPlanApiCaseService; -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresRoles; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -35,14 +31,12 @@ public class ApiTestCaseController { @PostMapping("/list") public List list(@RequestBody ApiTestCaseRequest request) { - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return apiTestCaseService.list(request); } @GetMapping("/findById/{id}") public ApiTestCaseResult single(@PathVariable String id) { ApiTestCaseRequest request = new ApiTestCaseRequest(); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); request.setId(id); List list = apiTestCaseService.list(request); if (!list.isEmpty()) { @@ -62,28 +56,24 @@ public class ApiTestCaseController { @PostMapping("/list/{goPage}/{pageSize}") public Pager> listSimple(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiTestCaseRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, apiTestCaseService.listSimple(request)); } @GetMapping("/list/{projectId}") public List list(@PathVariable String projectId) { ApiTestCaseRequest request = new ApiTestCaseRequest(); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); request.setProjectId(projectId); return apiTestCaseService.listSimple(request); } @PostMapping("/get/request") public Map listSimple(@RequestBody ApiTestCaseRequest request) { - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return apiTestCaseService.getRequest(request); } @PostMapping("/get/caseBLOBs/request") public List getCaseBLOBs(@RequestBody ApiTestCaseRequest request) { - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); List returnList = apiTestCaseService.findApiTestCaseBLOBs(request); return returnList; } diff --git a/backend/src/main/java/io/metersphere/api/service/APIReportService.java b/backend/src/main/java/io/metersphere/api/service/APIReportService.java index cd709a8d2b..6415c3e9ed 100644 --- a/backend/src/main/java/io/metersphere/api/service/APIReportService.java +++ b/backend/src/main/java/io/metersphere/api/service/APIReportService.java @@ -49,13 +49,11 @@ public class APIReportService { public List list(QueryAPIReportRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - request.setProjectId(SessionUtils.getCurrentProjectId()); return extApiTestReportMapper.list(request); } public List recentTest(QueryAPIReportRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - request.setProjectId(SessionUtils.getCurrentProjectId()); return extApiTestReportMapper.list(request); } diff --git a/backend/src/main/java/io/metersphere/api/service/APITestService.java b/backend/src/main/java/io/metersphere/api/service/APITestService.java index 1d2ccce209..667771d09e 100644 --- a/backend/src/main/java/io/metersphere/api/service/APITestService.java +++ b/backend/src/main/java/io/metersphere/api/service/APITestService.java @@ -77,7 +77,6 @@ public class APITestService { public List recentTest(QueryAPITestRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - request.setProjectId(SessionUtils.getCurrentProjectId()); return extApiTestMapper.list(request); } @@ -412,8 +411,8 @@ public class APITestService { ApiTestExample example = new ApiTestExample(); ApiTestExample.Criteria criteria = example.createCriteria(); criteria.andIdIn(resourceIds); - if (StringUtils.isNotBlank(SessionUtils.getCurrentProjectId())) { - criteria.andProjectIdEqualTo(SessionUtils.getCurrentProjectId()); + if (StringUtils.isNotBlank(request.getProjectId())) { + criteria.andProjectIdEqualTo(request.getProjectId()); } List apiTests = apiTestMapper.selectByExample(example); Map apiTestMap = apiTests.stream().collect(Collectors.toMap(ApiTest::getId, ApiTest::getName)); diff --git a/backend/src/main/java/io/metersphere/controller/ProjectController.java b/backend/src/main/java/io/metersphere/controller/ProjectController.java index fa25f25be4..13ba4113d9 100644 --- a/backend/src/main/java/io/metersphere/controller/ProjectController.java +++ b/backend/src/main/java/io/metersphere/controller/ProjectController.java @@ -87,7 +87,6 @@ public class ProjectController { @PostMapping("/list/{goPage}/{pageSize}") public Pager> getProjectList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ProjectRequest request) { - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); if (StringUtils.isBlank(request.getProjectId())) { List sourceIds = SessionUtils.getUser().getUserGroups().stream().map(UserGroup::getSourceId).collect(Collectors.toList()); request.setFilters(new HashMap>() {{ @@ -106,7 +105,6 @@ public class ProjectController { */ @PostMapping("/list/related") public List getUserProject(@RequestBody ProjectRequest request) { - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return projectService.getUserProject(request); } diff --git a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java index de3cc147cf..41ee06d3c6 100644 --- a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java +++ b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java @@ -32,8 +32,7 @@ public class WorkspaceController { @PostMapping("add") @MsAuditLog(module = "system_workspace", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class) public Workspace addWorkspace(@RequestBody Workspace workspace) { - String currentOrganizationId = SessionUtils.getCurrentOrganizationId(); - organizationService.checkOrgOwner(currentOrganizationId); + organizationService.checkOrgOwner(workspace.getOrganizationId()); return workspaceService.saveWorkspace(workspace); } @@ -78,7 +77,6 @@ public class WorkspaceController { @PostMapping("list/{goPage}/{pageSize}") public Pager> getWorkspaceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody WorkspaceRequest request) { - request.setOrganizationId(SessionUtils.getCurrentOrganizationId()); Page page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, workspaceService.getWorkspaceList(request)); } diff --git a/backend/src/main/java/io/metersphere/log/controller/OperatingLogController.java b/backend/src/main/java/io/metersphere/log/controller/OperatingLogController.java index 1b3a404ada..8035af5918 100644 --- a/backend/src/main/java/io/metersphere/log/controller/OperatingLogController.java +++ b/backend/src/main/java/io/metersphere/log/controller/OperatingLogController.java @@ -25,7 +25,6 @@ public class OperatingLogController { @PostMapping("/list/{goPage}/{pageSize}") public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody OperatingLogRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, operatingLogService.list(request)); } diff --git a/backend/src/main/java/io/metersphere/service/WorkspaceService.java b/backend/src/main/java/io/metersphere/service/WorkspaceService.java index d6317c3847..f6b91e8bfc 100644 --- a/backend/src/main/java/io/metersphere/service/WorkspaceService.java +++ b/backend/src/main/java/io/metersphere/service/WorkspaceService.java @@ -61,8 +61,10 @@ public class WorkspaceService { MSException.throwException(Translator.get("workspace_name_is_null")); } // set organization id - String currentOrgId = SessionUtils.getCurrentOrganizationId(); - workspace.setOrganizationId(currentOrgId); + if (StringUtils.isBlank(workspace.getOrganizationId())) { + String currentOrgId = SessionUtils.getCurrentOrganizationId(); + workspace.setOrganizationId(currentOrgId); + } long currentTime = System.currentTimeMillis(); diff --git a/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewApiCaseController.java b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewApiCaseController.java index 0d11289bc1..2efdde9f77 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewApiCaseController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewApiCaseController.java @@ -34,7 +34,6 @@ public class TestCaseReviewApiCaseController { @RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_RELEVANCE_OR_CANCEL) public Pager> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiTestCaseRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, testCaseReviewApiCaseService.relevanceList(request)); } diff --git a/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewScenarioCaseController.java b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewScenarioCaseController.java index 94c48a14ea..f314ae3a7c 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewScenarioCaseController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewScenarioCaseController.java @@ -33,7 +33,6 @@ public class TestCaseReviewScenarioCaseController { @PostMapping("/relevance/list/{goPage}/{pageSize}") public Pager> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiScenarioRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, testCaseReviewScenarioCaseService.relevanceList(request)); } diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java index c07fc33a1c..be95796302 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java @@ -49,8 +49,6 @@ public class TestPlanController { @PostMapping("/list/{goPage}/{pageSize}") @RequiresPermissions("PROJECT_TRACK_PLAN:READ") public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryTestPlanRequest request) { - String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId(); - request.setWorkspaceId(currentWorkspaceId); Page page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, testPlanService.listTestPlan(request)); } diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanReportController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanReportController.java index b0888e6b93..a7e81995c2 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanReportController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanReportController.java @@ -32,8 +32,6 @@ public class TestPlanReportController { private TestPlanReportService testPlanReportService; @PostMapping("/list/{goPage}/{pageSize}") public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryTestPlanReportRequest request) { - String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId(); - request.setWorkspaceId(currentWorkspaceId); Page page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, testPlanReportService.list(request)); } diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanScenarioCaseController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanScenarioCaseController.java index 97bbb7cc04..4131c49ca1 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanScenarioCaseController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanScenarioCaseController.java @@ -41,7 +41,6 @@ public class TestPlanScenarioCaseController { @PostMapping("/relevance/list/{goPage}/{pageSize}") public Pager> relevanceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiScenarioRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); return PageUtils.setPageInfo(page, testPlanScenarioCaseService.relevanceList(request)); } diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java index 4313255f60..9f0a1cd147 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java @@ -114,7 +114,9 @@ public class TestCaseReviewService { reviewRequest.setUpdateTime(System.currentTimeMillis()); reviewRequest.setCreator(SessionUtils.getUser().getId());//创建人 reviewRequest.setStatus(TestCaseReviewStatus.Prepare.name()); - reviewRequest.setProjectId(SessionUtils.getCurrentProjectId()); + if (StringUtils.isBlank(reviewRequest.getProjectId())) { + reviewRequest.setProjectId(SessionUtils.getCurrentProjectId()); + } testCaseReviewMapper.insert(reviewRequest); // 发送通知 String context = getReviewContext(reviewRequest, NoticeConstants.Event.CREATE); @@ -496,7 +498,6 @@ public class TestCaseReviewService { } else { request.setReviewerId(user.getId()); } - request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); request.setProjectId(SessionUtils.getCurrentProjectId()); request.setReviewIds(extTestReviewCaseMapper.findRelateTestReviewId(user.getId(), SessionUtils.getCurrentWorkspaceId(), user.getLastProjectId())); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 5f7aec2809..e6f8218c1c 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -406,9 +406,8 @@ public class TestCaseService { TestCaseExample testCaseExample = new TestCaseExample(); TestCaseExample.Criteria criteria = testCaseExample.createCriteria(); criteria.andMaintainerEqualTo(request.getUserId()); - String projectId = SessionUtils.getCurrentProjectId(); - if (StringUtils.isNotBlank(projectId)) { - criteria.andProjectIdEqualTo(projectId); + if (StringUtils.isNotBlank(request.getProjectId())) { + criteria.andProjectIdEqualTo(request.getProjectId()); testCaseExample.setOrderByClause("update_time desc, sort desc"); return testCaseMapper.selectByExample(testCaseExample); } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index a88c1d2cb3..58e355a77f 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -149,7 +149,9 @@ public class TestPlanService { testPlan.setCreateTime(System.currentTimeMillis()); testPlan.setUpdateTime(System.currentTimeMillis()); testPlan.setCreator(SessionUtils.getUser().getId()); - testPlan.setProjectId(SessionUtils.getCurrentProjectId()); + if (StringUtils.isBlank(testPlan.getProjectId())) { + testPlan.setProjectId(SessionUtils.getCurrentProjectId()); + } testPlanMapper.insert(testPlan); List userIds = new ArrayList<>(); @@ -172,7 +174,7 @@ public class TestPlanService { public List getTestPlanByName(String name) { TestPlanExample example = new TestPlanExample(); - example.createCriteria().andWorkspaceIdEqualTo(SessionUtils.getCurrentWorkspaceId()) + example.createCriteria() .andProjectIdEqualTo(SessionUtils.getCurrentProjectId()) .andNameEqualTo(name); return testPlanMapper.selectByExample(example); @@ -385,9 +387,8 @@ public class TestPlanService { public List listTestPlan(QueryTestPlanRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - String projectId = SessionUtils.getCurrentProjectId(); - if (StringUtils.isNotBlank(projectId)) { - request.setProjectId(projectId); + if (StringUtils.isNotBlank(request.getProjectId())) { + request.setProjectId(request.getProjectId()); } List testPlans = extTestPlanMapper.list(request); testPlans.forEach(item -> { diff --git a/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue b/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue index adfec6c57d..100ab722ae 100644 --- a/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue +++ b/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue @@ -270,6 +270,7 @@ export default { this.$warning(this.$t('commons.check_project_tip')); return; } + this.condition.projectId = getCurrentProjectID(); this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => { let data = response.data; this.total = data.itemCount; diff --git a/frontend/src/business/components/api/report/ApiReportList.vue b/frontend/src/business/components/api/report/ApiReportList.vue index 4ba0aef919..7034291eab 100644 --- a/frontend/src/business/components/api/report/ApiReportList.vue +++ b/frontend/src/business/components/api/report/ApiReportList.vue @@ -70,6 +70,7 @@ import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem" import {REPORT_CONFIGS} from "../../common/components/search/search-components"; import ShowMoreBtn from "../../track/case/components/ShowMoreBtn"; import {_filter, _sort} from "@/common/js/tableUtils"; +import {getCurrentProjectID} from "@/common/js/utils"; export default { components: { @@ -121,7 +122,7 @@ export default { if (this.testId !== 'all') { this.condition.testId = this.testId; } - + this.condition.projectId = getCurrentProjectID(); let url = "/api/report/list/" + this.currentPage + "/" + this.pageSize; this.result = this.$post(url, this.condition, response => { let data = response.data; diff --git a/frontend/src/business/components/common/head/HeaderOrgWs.vue b/frontend/src/business/components/common/head/HeaderOrgWs.vue index 87b61be53c..9d225ee25e 100644 --- a/frontend/src/business/components/common/head/HeaderOrgWs.vue +++ b/frontend/src/business/components/common/head/HeaderOrgWs.vue @@ -28,7 +28,7 @@ {{ item.name }} + v-if="item.id === getCurrentOrganizationId()"> @@ -53,7 +53,7 @@ {{ item.name }} - + @@ -61,7 +61,8 @@