This commit is contained in:
yj 2024-07-26 13:45:30 +08:00
parent a275885115
commit 0de1122908
6 changed files with 27 additions and 8 deletions

View File

@ -11,8 +11,9 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
useImperativeHandle(ref, () => ({
changeInvitingPersonnelModal: () => {
let userInfo = JSON.parse(storage.getItem('user') as string)
setCheckedList([])
setUser(userInfo)
getUserList()
getUserList(true)
setIsInvitingPersonnelModal(true)
}
}))
@ -53,7 +54,7 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
}
}, [optionsValue]);
// 获取用户列表
const getUserList = async (): Promise<void> => {
const getUserList = async (bool: boolean = false): Promise<void> => {
Promise.all([
GetRoomUser(state.channelId),
GetUserList({
@ -70,8 +71,8 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
data: res[1].data.items.map((item: any) => {
return {
...item,
checked: checkedList.find((checkedItem: any) => checkedItem.id === item.id) ? true : false,
disabled: res[0].data.find((row: any) => row.account === item.account) ? true : false
checked: bool ? false : checkedList.find((checkedItem: any) => checkedItem.id === item.id) ? true : false,
disabled: bool ? false : res[0].data.find((row: any) => row.account === item.account) ? true : false
}
}),
})
@ -86,6 +87,7 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
footer={null}
onCancel={() => setIsInvitingPersonnelModal(false)}
centered
destroyOnClose={true}
width={'700px'}
>
<div className={styles.invitingPersonnelModal}>
@ -137,7 +139,7 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
return checkedList
}
})
}} defaultChecked={item.checked} disabled={!item.isOnline || item.account === user.account || item.disabled}></Checkbox>
}} disabled={!item.isOnline || item.account === user.account || item.disabled} checked={item.checked}></Checkbox>
<div><Avatar name={item.userName} /></div>
<span>{item.userName}</span>
</div>

View File

@ -47,7 +47,7 @@ const QuitTips = forwardRef((props: any, ref: any) => {
<Checkbox onChange={(e) => {
setIsTips(e.target.checked)
storage.setItem('isTips', e.target.checked)
}} defaultChecked={isTips}></Checkbox>
}} checked={isTips}></Checkbox>
<div>
<Button type="primary" className='m-ant-btn' onClick={() => {
setIsCloseModal(false)

View File

@ -46,7 +46,7 @@ const SpeakerModeModal = forwardRef((props: any, ref: any) => {
</div>
<Checkbox onChange={(e) => {
setIsView(e.target.checked)
}} defaultChecked={isView}></Checkbox>
}} checked={isView}></Checkbox>
</Modal>
</>
)

View File

@ -24,8 +24,15 @@ const Index: React.FC = () => {
const [user, setUser] = useState<any>({});
const [joinRoomFrom, setJoinRoomFrom] = useState<string>('')
useEffect(() => {
let time = null as any
let userInfo = JSON.parse(storage.getItem('user') as string)
setUser(userInfo)
time = setInterval(() => {
getRoomList()
}, 1000 * 30)
return () => {
clearInterval(time)
}
}, []);
useEffect(() => {
getRoomList()

View File

@ -387,7 +387,7 @@ const User: React.FC = () => {
<Button type="primary" className='m-ant-btn' onClick={() => {
DeleteUser(selectedRowKeys).then(res => {
if (res.code === 200) {
setDeleteUserPawModal(true)
setDeleteUserPawModal(false)
setSelectedRowKeys([])
message.success('删除成功!')
getUserList()

View File

@ -872,6 +872,16 @@ const Meeting: React.FC = () => {
keyword: e.target.value
})
}}
onPressEnter={() => {
if (fileList.pageIndex === 1) {
getRoomFile()
} else {
setFileList({
...fileList,
pageIndex: 1
})
}
}}
onBlur={() => {
if (fileList.pageIndex === 1) {
getRoomFile()