mirror of
https://github.com/YMFE/yapi.git
synced 2025-04-12 15:10:23 +08:00
feat: 新建分组成员时选择成员权限
This commit is contained in:
parent
3fde003c9c
commit
138b246973
@ -79,12 +79,11 @@ class MemberList extends Component {
|
||||
// 增 - 添加成员
|
||||
@autobind
|
||||
handleOk() {
|
||||
console.log(this.props.currGroup._id, this.state.inputUid);
|
||||
this.props.addMember({
|
||||
id: this.props.currGroup._id,
|
||||
member_uid: this.state.inputUid
|
||||
member_uid: this.state.inputUid,
|
||||
role: this.state.inputRole
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
if (!res.payload.data.errcode) {
|
||||
message.success('添加成功!');
|
||||
this.reFetchList(); // 添加成功后重新获取分组成员列表
|
||||
@ -94,9 +93,9 @@ class MemberList extends Component {
|
||||
// 添加成员时 选择新增成员权限
|
||||
@autobind
|
||||
changeNewMemberRole(value) {
|
||||
return () => {
|
||||
console.log(this.props.currGroup._id, value);
|
||||
}
|
||||
this.setState({
|
||||
inputRole: value
|
||||
});
|
||||
}
|
||||
|
||||
// 删 - 删除分组成员
|
||||
@ -116,7 +115,6 @@ class MemberList extends Component {
|
||||
// 改 - 修改成员权限
|
||||
@autobind
|
||||
changeUserRole(e) {
|
||||
console.log(e);
|
||||
const id = this.props.currGroup._id;
|
||||
const role = e.split('-')[0];
|
||||
const member_uid = e.split('-')[1];
|
||||
@ -168,7 +166,6 @@ class MemberList extends Component {
|
||||
|
||||
@autobind
|
||||
onUserSelect(childState) {
|
||||
console.log(childState);
|
||||
this.setState({
|
||||
inputUid: childState.uid
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user