diff --git a/src/api/Meeting/index.ts b/src/api/Meeting/index.ts index 1c2ba98..3733fae 100644 --- a/src/api/Meeting/index.ts +++ b/src/api/Meeting/index.ts @@ -134,4 +134,17 @@ export const GetPolling = (roomNum: string, count: string) => request({ url: `/room/polling?roomNum=${roomNum}&count=${count}`, method: 'get' + }) + +export const GetRoomSingnIn = () => + request({ + url: `/room/sign-in`, + method: 'get' + }) + +export const PostRoomSingnIn = (data: any) => + request({ + url: `/room/sign-in`, + method: 'post', + data }) \ No newline at end of file diff --git a/src/assets/icon52-select.png b/src/assets/icon52-select.png new file mode 100644 index 0000000..38f3e0c Binary files /dev/null and b/src/assets/icon52-select.png differ diff --git a/src/assets/icon52.png b/src/assets/icon52.png new file mode 100644 index 0000000..49a4752 Binary files /dev/null and b/src/assets/icon52.png differ diff --git a/src/components/SingIn/index.module.scss b/src/components/SingIn/index.module.scss new file mode 100644 index 0000000..451317b --- /dev/null +++ b/src/components/SingIn/index.module.scss @@ -0,0 +1,32 @@ +.singInModal { + max-height: 80vh; + + .singInModalContent { + flex-grow: 1; + overflow-y: auto; + margin: 10px 0; + + >div { + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px #363636 solid; + padding-bottom: 10px; + + >span { + flex-grow: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 16px; + color: white; + } + } + } + + .singInModalFooter { + flex-shrink: 0; + display: flex; + justify-content: center; + } +} \ No newline at end of file diff --git a/src/components/SingIn/index.tsx b/src/components/SingIn/index.tsx new file mode 100644 index 0000000..d37dbf7 --- /dev/null +++ b/src/components/SingIn/index.tsx @@ -0,0 +1,77 @@ +import { GetRoomSingnIn, PostRoomSingnIn } from '@/api/Meeting'; +import styles from '@/components/SingIn/index.module.scss' +import { storage } from '@/utils'; +import { Button, message, Modal } from 'antd'; +import { useState, useImperativeHandle, forwardRef } from "react"; +const SingIn = forwardRef((props: any, ref: any) => { + useImperativeHandle(ref, () => ({ + changeModal: () => { + setSingInModal(true) + getRoomSingnIn() + }, + getModal: () => { + return new Promise((resolve, reject) => { + setSingInModal(bool => { + resolve(bool) + return bool + }) + }) + }, + })) + const [singInModal, setSingInModal] = useState(false); + const [singInList, setSingInList] = useState([]); + const getRoomSingnIn = async (): Promise => { + await GetRoomSingnIn().then(res => { + if (res.code === 200) { + setSingInList(res.data.map((item: any) => { + return { + ...item, + active: true + } + })) + } + }) + } + return ( + <> + setSingInModal(false)} + centered + width={'300px'} + > +
+
+ {singInList.map((item: any, index: number) => { + return
+ {item.signInName} + {item.active ? + + : } +
+ })} +
+
+ +
+
+
+ + ) +}) + +export default SingIn \ No newline at end of file diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 862083d..993ec24 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -23,6 +23,7 @@ import { role } from '@/config/role'; import { fixWebmDuration } from "webm-duration-fix-buffer"; import { getKeyOpenChildWindow, setKeyOpenChildWindow } from '@/utils/package/public'; import MeetingDisconnected from '@/components/MeetingDisconnected'; +import SingIn from '@/components/SingIn'; const { confirm } = Modal; const { exec } = require('child_process'); const fs = require('fs').promises; @@ -36,6 +37,7 @@ const Meeting: React.FC = () => { const stupWizardRef = useRef(); const equipmentManagementRef = useRef(); const meetingDisconnectedRef = useRef(); + const singInRef = useRef(); const [isClicked, setIsClicked] = useState(false); const [statusList, setStatusList] = useState({ userList: false, @@ -102,6 +104,13 @@ const Meeting: React.FC = () => { active: false, select: false, }, + { + title: '签到', + icon: ImageUrl.icon52, + iconSelect: ImageUrl.icon52Select, + active: false, + select: false, + }, { title: '设置', icon: ImageUrl.icon28, @@ -432,8 +441,18 @@ const Meeting: React.FC = () => { } else { message.error('当前不在会议室!') } + singInRef.current.getModal().then((res: boolean) => { + if (!res) { + singInRef.current.changeModal() + } + }) }, onCancel() { + singInRef.current.getModal().then((res: boolean) => { + if (!res) { + singInRef.current.changeModal() + } + }) } }) } @@ -1455,7 +1474,6 @@ const Meeting: React.FC = () => { await getUserRoomInfo().then(async (res) => { stupWizardRef.current.changeModal(0, res) }) - break; case '邀请人员': await getUserRoomInfo().then(async (res) => { @@ -1559,6 +1577,9 @@ const Meeting: React.FC = () => { storage.setItem('noViewChatList', 0) setNoViewChatList(0) break; + case '签到': + singInRef.current.changeModal() + break; } } // 停止录制 @@ -2705,10 +2726,23 @@ const Meeting: React.FC = () => { {row.title} + case '签到': + if (!role.ID.includes(user.roleId)) { + return
changeStatusList(row, itemIndex, rowIndex)} + onMouseDown={() => changeFooterListSelect(row, itemIndex, rowIndex, true)} + onMouseUp={() => changeFooterListSelect(row, itemIndex, rowIndex, false)} + onMouseLeave={() => changeFooterListSelect(row, itemIndex, rowIndex, false)} + key={rowIndex}> + {row.select ? : } + {row.title} +
+ } + return null case '申请发言': // if (!role.ID.includes(user.roleId)) { // return
changeStatusList(row, itemIndex, rowIndex)} key={rowIndex}> - // + // {row.select ? : } // {row.title} //
// } @@ -2917,6 +2951,7 @@ const Meeting: React.FC = () => { + ) } diff --git a/src/utils/package/imageUrl.ts b/src/utils/package/imageUrl.ts index 2722e37..3b8e6dc 100644 --- a/src/utils/package/imageUrl.ts +++ b/src/utils/package/imageUrl.ts @@ -79,6 +79,8 @@ import virtualBackground3 from '@/assets/virtualBackground/3.png' import virtualBackground4 from '@/assets/virtualBackground/4.png' import virtualBackground5 from '@/assets/virtualBackground/5.png' import virtualBackground6 from '@/assets/virtualBackground/6.png' +import icon52 from '@/assets/icon52.png' +import icon52Select from '@/assets/icon52-select.png' export default { loading, icon, @@ -161,4 +163,6 @@ export default { virtualBackground4, virtualBackground5, virtualBackground6, + icon52, + icon52Select } \ No newline at end of file