邀请修改
This commit is contained in:
parent
47a438a5b6
commit
793b4cbb16
|
|
@ -12,7 +12,6 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
|||
useImperativeHandle(ref, () => ({
|
||||
changeInvitingPersonnelModal: () => {
|
||||
setCheckedList([])
|
||||
setUser(userInfo)
|
||||
getUserList()
|
||||
setIsInvitingPersonnelModal(true)
|
||||
}
|
||||
|
|
@ -20,7 +19,6 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
|||
const { state } = useLocation();
|
||||
const [isInvitingPersonnelModal, setIsInvitingPersonnelModal] = useState(false);
|
||||
const [isFirstRender, setIsFirstRender] = useState(true);
|
||||
const [user, setUser] = useState<any>({});
|
||||
const [optionsValue, setOperationValue] = useState<number>(1);
|
||||
const [list, setList] = useState<any>({
|
||||
data: [],
|
||||
|
|
@ -149,7 +147,7 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
|||
return checkedList
|
||||
}
|
||||
})
|
||||
}} disabled={!item.isOnline || item.account === user.account || item.disabled} checked={item.checked}></Checkbox>
|
||||
}} disabled={!item.isOnline || item.account === userInfo.account || item.disabled} checked={item.checked}></Checkbox>
|
||||
<div><Avatar name={item.userName} /></div>
|
||||
<span>{item.userName}{item.disabled ? '(已入会)' : ''}</span>
|
||||
</div>
|
||||
|
|
@ -177,7 +175,7 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
|||
<Button type="primary" onClick={() => { setIsInvitingPersonnelModal(false) }} style={{ backgroundColor: '#31353A', marginRight: '14px' }}>取消</Button>
|
||||
<Button type="primary" className='m-ant-btn' onClick={() => {
|
||||
if (checkedList.length) {
|
||||
let me = checkedList.find((item: any) => item.id === user.uid)
|
||||
let me = checkedList.find((item: any) => item.id === userInfo.uid)
|
||||
if (me) {
|
||||
message.error('您不能邀请自己')
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue