diff --git a/src/components/SharedFilesModel/index.tsx b/src/components/SharedFilesModel/index.tsx index 23d4358..1609348 100644 --- a/src/components/SharedFilesModel/index.tsx +++ b/src/components/SharedFilesModel/index.tsx @@ -8,7 +8,7 @@ import { } from '@ant-design/icons'; import { Button, Input, message, Modal, Pagination, Progress, Table } from 'antd'; import { forwardRef, useEffect, useImperativeHandle, useState } from "react"; -import { DeleteRoomFile, GetRoomFile, GetRoomFileDwUrl, GetRoomUpFileurl, PostRoomFile } from '@/api/Meeting'; +import { DeleteRoomFile, GetRoomFile, GetRoomFileDwUrl, GetRoomUpFileurl, GetRoomUserItem, PostRoomFile } from '@/api/Meeting'; import axios from 'axios'; import { useLocation } from 'react-router-dom'; import { storage } from '@/utils'; @@ -21,10 +21,16 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { useImperativeHandle(ref, () => ({ getData: () => { setIsSharedFilesModel(true) + GetRoomUserItem(state.channelId, user.uid).then((res: any) => { + if (res.code === 200) { + setRoomUserItem(res.data) + } + }) } })) const { state } = useLocation(); const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [roomUserItem, setRoomUserItem] = useState({}) const [showRowSelection, setShowRowSelection] = useState(false); const [isUpFile, setIsUpFile] = useState(false); const [isSharedFilesModel, setIsSharedFilesModel] = useState(false); @@ -120,9 +126,9 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { }) } }} /> - { + {roomUserItem && roomUserItem.roleId === '1' || roomUserItem.isRoomManager ? { setShowRowSelection(!showRowSelection) - }} style={{ color: showRowSelection ? '#5575F2' : 'white' }} /> + }} style={{ color: showRowSelection ? '#5575F2' : 'white' }} /> : null} {showRowSelection ? { if (selectedRowKeys.length) { DeleteRoomFile(selectedRowKeys).then(res => { diff --git a/src/page/Home/Index/index.module.scss b/src/page/Home/Index/index.module.scss index 5d68efb..0d12ad8 100644 --- a/src/page/Home/Index/index.module.scss +++ b/src/page/Home/Index/index.module.scss @@ -19,7 +19,6 @@ background-color: #3A1457; box-shadow: none; color: white; - margin-left: 22px; &:hover { background-color: lighten(#3A1457, 5%) !important; diff --git a/src/page/Home/Index/index.tsx b/src/page/Home/Index/index.tsx index 568d6f1..899da7b 100644 --- a/src/page/Home/Index/index.tsx +++ b/src/page/Home/Index/index.tsx @@ -6,6 +6,7 @@ import { GetRoom, PostRomm, GetCheckoutRoomNum } from '@/api/Home/Index'; import ImageUrl from '@/utils/package/ImageUrl' import { ReloadOutlined } from '@ant-design/icons'; import JoinSetting from '@/components/JoinSetting'; +import { storage } from '@/utils'; const Index: React.FC = () => { const [list, setList] = useState({ data: [], @@ -19,6 +20,11 @@ const Index: React.FC = () => { roomNum: "" }) const joinSettingRef = useRef(); + const [user, setUser] = useState({}); + const userInfo = JSON.parse(storage.getItem('user') as string) + useEffect(() => { + setUser(userInfo) + }, []) useEffect(() => { let time = null as any if (time) { @@ -68,7 +74,7 @@ const Index: React.FC = () => {
- + : null}
: null ) })}
-
{ +
{ stupWizardRef.current.changeModal() }}>
diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 318c9ef..54713cf 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -636,7 +636,13 @@ const Meeting: React.FC = () => { stupWizardRef.current.changeModal() break; case '邀请人员': - invitingPersonnelRef.current.changeInvitingPersonnelModal() + await getUserRoomInfo().then(async (res) => { + if (res) { + invitingPersonnelRef.current.changeInvitingPersonnelModal() + } else { + message.error(msgTips) + } + }) break; case '录制': window.electron.getSources().then((sources: any) => { @@ -1297,7 +1303,15 @@ const Meeting: React.FC = () => { )}
-
invitingPersonnelRef.current.changeInvitingPersonnelModal()}>邀请
+
{ + await getUserRoomInfo().then(async (res) => { + if (res) { + invitingPersonnelRef.current.changeInvitingPersonnelModal() + } else { + message.error(msgTips) + } + }) + }}>邀请
postOpenMicr(false, user.id, true)}>全员静音