diff --git a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java index 840bea814d..6a1a5e2704 100644 --- a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java +++ b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java @@ -49,6 +49,13 @@ public class WorkspaceController { return PageUtils.setPageInfo(page, workspaceService.getWorkspaceList(request)); } + @PostMapping("list/all/{goPage}/{pageSize}") + @RequiresRoles(RoleConstants.ORG_ADMIN) + public Pager> getAllWorkspaceList(@PathVariable int goPage, @PathVariable int pageSize) { + Page page = PageHelper.startPage(goPage, pageSize, true); + return PageUtils.setPageInfo(page, workspaceService.getAllWorkspaceList()); + } + @GetMapping("/list/userworkspace/{userId}") public List getWorkspaceListByUserId(@PathVariable String userId) { return workspaceService.getWorkspaceListByUserId(userId); diff --git a/backend/src/main/java/io/metersphere/service/WorkspaceService.java b/backend/src/main/java/io/metersphere/service/WorkspaceService.java index 9ac36e13b6..b3a70a1a8c 100644 --- a/backend/src/main/java/io/metersphere/service/WorkspaceService.java +++ b/backend/src/main/java/io/metersphere/service/WorkspaceService.java @@ -69,6 +69,10 @@ public class WorkspaceService { return workspaceMapper.selectByExample(example); } + public List getAllWorkspaceList() { + return workspaceMapper.selectByExample(null); + } + public void deleteWorkspace(String workspaceId) { workspaceMapper.deleteByPrimaryKey(workspaceId); } diff --git a/frontend/src/performance/components/router/router.js b/frontend/src/performance/components/router/router.js index 259d936a3f..8739d34a96 100644 --- a/frontend/src/performance/components/router/router.js +++ b/frontend/src/performance/components/router/router.js @@ -13,6 +13,7 @@ import TestResourcePool from "../settings/TestResourcePool"; import MsProject from "../project/MsProject"; import OrganizationWorkspace from "../settings/OrganizationWorkspace"; import PersonSetting from "../settings/PersonSetting"; +import SystemWorkspace from "../settings/SystemWorkspace"; Vue.use(VueRouter); @@ -67,6 +68,10 @@ const router = new VueRouter({ path: 'member', component: Member }, + { + path: 'systemworkspace', + component: SystemWorkspace + }, { path: 'testresourcepool', component: TestResourcePool diff --git a/frontend/src/performance/components/settings/SettingMenu.vue b/frontend/src/performance/components/settings/SettingMenu.vue index b390c93bca..7189b03b76 100644 --- a/frontend/src/performance/components/settings/SettingMenu.vue +++ b/frontend/src/performance/components/settings/SettingMenu.vue @@ -7,7 +7,7 @@ 用户 组织 - 工作空间 + 工作空间 测试资源池 diff --git a/frontend/src/performance/components/settings/SystemWorkspace.vue b/frontend/src/performance/components/settings/SystemWorkspace.vue new file mode 100644 index 0000000000..593435b76e --- /dev/null +++ b/frontend/src/performance/components/settings/SystemWorkspace.vue @@ -0,0 +1,183 @@ + + + + + +