From 74c8be756aade4a76111c95a202c8c864e1f1ba5 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 7 May 2020 14:35:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserRoleController.java | 2 +- .../common/components/MsRolesTag.vue | 35 +++++++++++++++++++ .../organization/OrganizationMember.vue | 7 ++-- .../organization/OrganizationWorkspace.vue | 16 +++++---- .../settings/system/Organization.vue | 7 ++-- .../settings/system/SystemWorkspace.vue | 13 +++---- .../settings/workspace/WorkspaceMember.vue | 14 ++++---- 7 files changed, 65 insertions(+), 29 deletions(-) create mode 100644 frontend/src/business/components/common/components/MsRolesTag.vue diff --git a/backend/src/main/java/io/metersphere/controller/UserRoleController.java b/backend/src/main/java/io/metersphere/controller/UserRoleController.java index 35a3645201..132f1ba5c7 100644 --- a/backend/src/main/java/io/metersphere/controller/UserRoleController.java +++ b/backend/src/main/java/io/metersphere/controller/UserRoleController.java @@ -27,7 +27,7 @@ public class UserRoleController { @GetMapping("/list/ws/{workspaceId}/{userId}") @RequiresRoles(value = {RoleConstants.ADMIN,RoleConstants.ORG_ADMIN}, logical = Logical.OR) - public List getWorkspaceMemberRole(@PathVariable String workspaceId, @PathVariable String userId) { + public List getWorkspaceMemberRoles(@PathVariable String workspaceId, @PathVariable String userId) { return userRoleService.getWorkspaceMemberRoles(workspaceId, userId); } } diff --git a/frontend/src/business/components/common/components/MsRolesTag.vue b/frontend/src/business/components/common/components/MsRolesTag.vue new file mode 100644 index 0000000000..a51f13c988 --- /dev/null +++ b/frontend/src/business/components/common/components/MsRolesTag.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/frontend/src/business/components/settings/organization/OrganizationMember.vue b/frontend/src/business/components/settings/organization/OrganizationMember.vue index 22fe460ff9..affb01751c 100644 --- a/frontend/src/business/components/settings/organization/OrganizationMember.vue +++ b/frontend/src/business/components/settings/organization/OrganizationMember.vue @@ -11,9 +11,7 @@ @@ -105,10 +103,11 @@ import {TokenKey} from "../../../../common/js/constants"; import MsTablePagination from "../../common/pagination/TablePagination"; import MsTableHeader from "../../common/components/MsTableHeader"; + import MsRolesTag from "../../common/components/MsRolesTag"; export default { name: "MsOrganizationMember", - components: {MsCreateBox, MsTablePagination, MsTableHeader}, + components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag}, created() { this.initTableData(); }, diff --git a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue index 027c90d6de..6b7e5714cc 100644 --- a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue +++ b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue @@ -55,9 +55,7 @@ @@ -69,12 +67,14 @@ - - @@ -112,7 +112,8 @@ - @@ -156,10 +157,11 @@ import {TokenKey} from "../../../../common/js/constants"; import MsTablePagination from "../../common/pagination/TablePagination"; import MsTableHeader from "../../common/components/MsTableHeader"; + import MsRolesTag from "../../common/components/MsRolesTag"; export default { name: "MsOrganizationWorkspace", - components: {MsCreateBox, MsTablePagination, MsTableHeader}, + components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag}, mounted() { this.list(); }, diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index 6df8ccbebd..0aa3dac8ee 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -41,9 +41,7 @@ @@ -185,10 +183,11 @@ import MsCreateBox from "../CreateBox"; import MsTablePagination from "../../common/pagination/TablePagination"; import MsTableHeader from "../../common/components/MsTableHeader"; + import MsRolesTag from "../../common/components/MsRolesTag"; export default { name: "MsOrganization", - components: {MsCreateBox, MsTablePagination, MsTableHeader}, + components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag}, data() { return { queryPath: '/organization/list', diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index 42b247a3ff..5d0b105953 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -96,9 +96,7 @@ @@ -116,7 +114,8 @@ - @@ -153,7 +152,8 @@ - @@ -197,10 +197,11 @@ import {Message} from "element-ui"; import MsTablePagination from "../../common/pagination/TablePagination"; import MsTableHeader from "../../common/components/MsTableHeader"; + import MsRolesTag from "../../common/components/MsRolesTag"; export default { name: "MsSystemWorkspace", - components: {MsCreateBox, MsTablePagination, MsTableHeader}, + components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag}, mounted() { this.list(); }, diff --git a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue index aaacfb980b..5a183344e8 100644 --- a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue +++ b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue @@ -11,9 +11,7 @@ @@ -29,7 +27,8 @@ :total="total"/> - + - + @@ -104,11 +104,11 @@ import {TokenKey} from "../../../../common/js/constants"; import MsTablePagination from "../../common/pagination/TablePagination"; import MsTableHeader from "../../common/components/MsTableHeader"; - import MsTag from "../../common/components/MsTag"; + import MsRolesTag from "../../common/components/MsRolesTag"; export default { name: "MsMember", - components: {MsCreateBox, MsTablePagination, MsTableHeader, MsTag}, + components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag}, data() { return { result: {},