refactor(项目设置): 添加成员只展示所属空间的成员列表
--story=1006218 --user=李玉号 项目添加成员只展示所属空间的成员列表 https://www.tapd.cn/55049933/s/1130533
This commit is contained in:
parent
76ad13e7d0
commit
1eb9c1f8e6
|
@ -158,12 +158,20 @@ public class UserController {
|
|||
return userService.getMemberList(request);
|
||||
}
|
||||
|
||||
@GetMapping("/ws/current/member/list")
|
||||
public List<User> getCurrentWorkspaceMember() {
|
||||
QueryMemberRequest request = new QueryMemberRequest();
|
||||
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
return userService.getMemberList(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加工作空间成员
|
||||
*/
|
||||
@PostMapping("/ws/member/add")
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.CREATE, title = "添加工作空间成员")
|
||||
public void addMember(@RequestBody AddMemberRequest request) {
|
||||
|
||||
String wsId = request.getWorkspaceId();
|
||||
// workspaceService.checkWorkspaceOwner(wsId);
|
||||
userService.addMember(request);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<add-member :group-type="GROUP_PROJECT" :group-scope-id="workspaceId" ref="addMember" @submit="submit"/>
|
||||
<add-member :group-type="GROUP_PROJECT"
|
||||
:group-scope-id="workspaceId"
|
||||
ref="addMember"
|
||||
@submit="submit"
|
||||
:user-resource-url="userResourceUrl"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -23,6 +27,7 @@ export default {
|
|||
]
|
||||
},
|
||||
userList: [],
|
||||
userResourceUrl: 'user/ws/current/member/list'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -80,6 +80,12 @@ export default {
|
|||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
userResourceUrl: {
|
||||
type: String,
|
||||
default() {
|
||||
return '/user/list/';
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -96,7 +102,7 @@ export default {
|
|||
},
|
||||
open() {
|
||||
this.dialogVisible = true;
|
||||
this.result = this.$get('/user/list/', response => {
|
||||
this.result = this.$get(this.userResourceUrl, response => {
|
||||
this.userList = response.data;
|
||||
this.copyUserList = response.data;
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue