Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
74c8be75
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
74c8be75
编写于
5月 07, 2020
作者:
S
shiziyuan9527
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码优化
上级
02ab2f23
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
65 addition
and
29 deletion
+65
-29
backend/src/main/java/io/metersphere/controller/UserRoleController.java
...in/java/io/metersphere/controller/UserRoleController.java
+1
-1
frontend/src/business/components/common/components/MsRolesTag.vue
.../src/business/components/common/components/MsRolesTag.vue
+35
-0
frontend/src/business/components/settings/organization/OrganizationMember.vue
...s/components/settings/organization/OrganizationMember.vue
+3
-4
frontend/src/business/components/settings/organization/OrganizationWorkspace.vue
...omponents/settings/organization/OrganizationWorkspace.vue
+9
-7
frontend/src/business/components/settings/system/Organization.vue
.../src/business/components/settings/system/Organization.vue
+3
-4
frontend/src/business/components/settings/system/SystemWorkspace.vue
...c/business/components/settings/system/SystemWorkspace.vue
+7
-6
frontend/src/business/components/settings/workspace/WorkspaceMember.vue
...usiness/components/settings/workspace/WorkspaceMember.vue
+7
-7
未找到文件。
backend/src/main/java/io/metersphere/controller/UserRoleController.java
浏览文件 @
74c8be75
...
...
@@ -27,7 +27,7 @@ public class UserRoleController {
@GetMapping
(
"/list/ws/{workspaceId}/{userId}"
)
@RequiresRoles
(
value
=
{
RoleConstants
.
ADMIN
,
RoleConstants
.
ORG_ADMIN
},
logical
=
Logical
.
OR
)
public
List
<
Role
>
getWorkspaceMemberRole
(
@PathVariable
String
workspaceId
,
@PathVariable
String
userId
)
{
public
List
<
Role
>
getWorkspaceMemberRole
s
(
@PathVariable
String
workspaceId
,
@PathVariable
String
userId
)
{
return
userRoleService
.
getWorkspaceMemberRoles
(
workspaceId
,
userId
);
}
}
frontend/src/business/components/common/components/MsRolesTag.vue
0 → 100644
浏览文件 @
74c8be75
<
template
>
<div>
<ms-tag
v-for=
"(role, index) in roles"
:key=
"index"
:effect=
"effect"
:type=
"type"
:content=
"role.name"
/>
</div>
</
template
>
<
script
>
import
MsTag
from
"
./MsTag
"
;
export
default
{
name
:
"
MsRolesTag
"
,
components
:
{
MsTag
},
props
:
{
type
:
{
type
:
String
,
default
:
'
primary
'
,
},
roles
:
{
type
:
Array
},
effect
:
{
type
:
String
,
default
:
'
dark
'
,
}
}
}
</
script
>
<
style
scoped
>
</
style
>
frontend/src/business/components/settings/organization/OrganizationMember.vue
浏览文件 @
74c8be75
...
...
@@ -11,9 +11,7 @@
<el-table-column
prop=
"phone"
:label=
"$t('commons.phone')"
/>
<el-table-column
prop=
"roles"
:label=
"$t('commons.role')"
width=
"140"
>
<
template
v-slot:default=
"scope"
>
<el-tag
v-for=
"(role, index) in scope.row.roles"
:key=
"index"
size=
"mini"
effect=
"dark"
>
{{
role
.
name
}}
</el-tag>
<ms-roles-tag
:roles=
"scope.row.roles"
/>
</
template
>
</el-table-column>
<el-table-column>
...
...
@@ -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
();
},
...
...
frontend/src/business/components/settings/organization/OrganizationWorkspace.vue
浏览文件 @
74c8be75
...
...
@@ -55,9 +55,7 @@
<el-table-column
prop=
"phone"
:label=
"$t('commons.phone')"
/>
<el-table-column
:label=
"$t('commons.role')"
width=
"120"
>
<
template
v-slot:default=
"scope"
>
<el-tag
v-for=
"(role, index) in scope.row.roles"
:key=
"index"
size=
"mini"
effect=
"dark"
type=
"success"
>
{{
role
.
name
}}
</el-tag>
<ms-roles-tag
:roles=
"scope.row.roles"
type=
"success"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('commons.operating')"
>
...
...
@@ -69,12 +67,14 @@
</
template
>
</el-table-column>
</el-table>
<ms-table-pagination
:change=
"dialogSearch"
:current-page.sync=
"dialogCurrentPage"
:page-size.sync=
"dialogPageSize"
<ms-table-pagination
:change=
"dialogSearch"
:current-page.sync=
"dialogCurrentPage"
:page-size.sync=
"dialogPageSize"
:total=
"dialogTotal"
/>
</el-dialog>
<!-- add workspace member dialog -->
<el-dialog
:title=
"$t('member.create')"
:visible.sync=
"dialogWsMemberAddVisible"
width=
"30%"
:destroy-on-close=
"true"
<el-dialog
:title=
"$t('member.create')"
:visible.sync=
"dialogWsMemberAddVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-form
:model=
"memberForm"
ref=
"form"
:rules=
"wsMemberRule"
label-position=
"right"
label-width=
"100px"
size=
"small"
>
...
...
@@ -112,7 +112,8 @@
</el-dialog>
<!-- update workspace member dialog -->
<el-dialog
:title=
"$t('member.modify')"
:visible.sync=
"dialogWsMemberUpdateVisible"
width=
"30%"
:destroy-on-close=
"true"
<el-dialog
:title=
"$t('member.modify')"
:visible.sync=
"dialogWsMemberUpdateVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-form
:model=
"memberForm"
label-position=
"right"
label-width=
"100px"
size=
"small"
ref=
"updateUserForm"
>
<el-form-item
label=
"ID"
prop=
"id"
>
...
...
@@ -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
();
},
...
...
frontend/src/business/components/settings/system/Organization.vue
浏览文件 @
74c8be75
...
...
@@ -41,9 +41,7 @@
<el-table-column
prop=
"phone"
:label=
"$t('commons.phone')"
/>
<el-table-column
:label=
"$t('commons.role')"
width=
"140"
>
<
template
v-slot:default=
"scope"
>
<el-tag
v-for=
"(role, index) in scope.row.roles"
:key=
"index"
size=
"mini"
effect=
"dark"
>
{{
role
.
name
}}
</el-tag>
<ms-roles-tag
:roles=
"scope.row.roles"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('commons.operating')"
>
...
...
@@ -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
'
,
...
...
frontend/src/business/components/settings/system/SystemWorkspace.vue
浏览文件 @
74c8be75
...
...
@@ -96,9 +96,7 @@
<el-table-column
prop=
"phone"
:label=
"$t('commons.phone')"
/>
<el-table-column
:label=
"$t('commons.role')"
width=
"120"
>
<
template
v-slot:default=
"scope"
>
<el-tag
v-for=
"(role, index) in scope.row.roles"
:key=
"index"
size=
"mini"
effect=
"dark"
type=
"success"
>
{{
role
.
name
}}
</el-tag>
<ms-roles-tag
:roles=
"scope.row.roles"
type=
"success"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('commons.operating')"
>
...
...
@@ -116,7 +114,8 @@
</el-dialog>
<!-- add workspace member dialog -->
<el-dialog
:title=
"$t('member.create')"
:visible.sync=
"dialogWsMemberAddVisible"
width=
"30%"
:destroy-on-close=
"true"
<el-dialog
:title=
"$t('member.create')"
:visible.sync=
"dialogWsMemberAddVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-form
:model=
"memberForm"
ref=
"form"
:rules=
"wsMemberRule"
label-position=
"right"
label-width=
"100px"
size=
"small"
>
...
...
@@ -153,7 +152,8 @@
</el-dialog>
<!-- update workspace member dialog -->
<el-dialog
:title=
"$t('member.modify')"
:visible.sync=
"dialogWsMemberUpdateVisible"
width=
"30%"
:destroy-on-close=
"true"
<el-dialog
:title=
"$t('member.modify')"
:visible.sync=
"dialogWsMemberUpdateVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-form
:model=
"memberForm"
label-position=
"right"
label-width=
"100px"
size=
"small"
ref=
"updateUserForm"
>
<el-form-item
label=
"ID"
prop=
"id"
>
...
...
@@ -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
();
},
...
...
frontend/src/business/components/settings/workspace/WorkspaceMember.vue
浏览文件 @
74c8be75
...
...
@@ -11,9 +11,7 @@
<el-table-column
prop=
"phone"
:label=
"$t('commons.phone')"
/>
<el-table-column
prop=
"roles"
:label=
"$t('commons.role')"
width=
"120"
>
<
template
v-slot:default=
"scope"
>
<el-tag
v-for=
"(role, index) in scope.row.roles"
:key=
"index"
size=
"mini"
effect=
"dark"
type=
"success"
>
{{
role
.
name
}}
</el-tag>
<ms-roles-tag
:roles=
"scope.row.roles"
type=
"success"
/>
</
template
>
</el-table-column>
<el-table-column>
...
...
@@ -29,7 +27,8 @@
:total=
"total"
/>
</el-card>
<el-dialog
:title=
"$t('member.create')"
:visible.sync=
"createVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-dialog
:title=
"$t('member.create')"
:visible.sync=
"createVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-position=
"right"
label-width=
"100px"
size=
"small"
>
<el-form-item
:label=
"$t('commons.member')"
prop=
"userIds"
>
<el-select
v-model=
"form.userIds"
multiple
:placeholder=
"$t('member.please_choose_member')"
...
...
@@ -63,7 +62,8 @@
</
template
>
</el-dialog>
<el-dialog
:title=
"$t('member.modify')"
:visible.sync=
"updateVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-dialog
:title=
"$t('member.modify')"
:visible.sync=
"updateVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"closeFunc"
>
<el-form
:model=
"form"
label-position=
"right"
label-width=
"100px"
size=
"small"
ref=
"updateUserForm"
>
<el-form-item
label=
"ID"
prop=
"id"
>
<el-input
v-model=
"form.id"
autocomplete=
"off"
:disabled=
"true"
/>
...
...
@@ -104,11 +104,11 @@
import
{
TokenKey
}
from
"
../../../../common/js/constants
"
;
import
MsTablePagination
from
"
../../common/pagination/TablePagination
"
;
import
MsTableHeader
from
"
../../common/components/MsTableHeader
"
;
import
Ms
Tag
from
"
../../common/components/M
sTag
"
;
import
Ms
RolesTag
from
"
../../common/components/MsRole
sTag
"
;
export
default
{
name
:
"
MsMember
"
,
components
:
{
MsCreateBox
,
MsTablePagination
,
MsTableHeader
,
MsTag
},
components
:
{
MsCreateBox
,
MsTablePagination
,
MsTableHeader
,
Ms
Roles
Tag
},
data
()
{
return
{
result
:
{},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录