diff --git a/src/api/Home/User/index.ts b/src/api/Home/User/index.ts index 0a3b33c..579ed76 100644 --- a/src/api/Home/User/index.ts +++ b/src/api/Home/User/index.ts @@ -57,4 +57,30 @@ export const PostUserImport = (data: any) => url: `/user/import`, method: 'post', data - }) \ No newline at end of file + }) + +export const GetSigninList = () => + request({ + url: `/user/signin-list`, + method: 'get', + }) + +export const PostUserImportSigninList = (data: any) => + request({ + url: `/user/import/signin-list`, + method: 'post', + data + }) + +export const GetSigns = (uid: string) => + request({ + url: `/user/signs?uid=${uid}`, + method: 'get', + }) + +export const PutSigns = (uid: string, data: any) => + request({ + url: `/user/signs?uid=${uid}`, + method: 'put', + data, + }) 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..58d64e9 --- /dev/null +++ b/src/components/SingIn/index.tsx @@ -0,0 +1,79 @@ +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: () => { + 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) { + if (res.data.length) { + setSingInModal(true) + } + 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/Home/User/index.module.scss b/src/page/Home/User/index.module.scss index e0d7e8a..68a02b2 100644 --- a/src/page/Home/User/index.module.scss +++ b/src/page/Home/User/index.module.scss @@ -98,4 +98,19 @@ text-align: right; } } +} + +.signInUserModal { + max-height: 60vh; + display: flex; + flex-direction: column; + + >div:nth-child(1) { + flex-grow: 1; + overflow-y: auto; + } + + >div:nth-child(2) { + flex-shrink: 0; + } } \ No newline at end of file diff --git a/src/page/Home/User/index.tsx b/src/page/Home/User/index.tsx index 4a1ad55..b83d7d7 100644 --- a/src/page/Home/User/index.tsx +++ b/src/page/Home/User/index.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useRef } from "react"; import Operation from '@/components/Operation'; import { Button, Input, Table, Pagination, Modal, message, Select } from "antd"; import { ExclamationCircleFilled, SearchOutlined } from '@ant-design/icons'; -import { GetUserList, PostUser, PutUser, DeleteUser, PutUserPwd, GetRoleDpList, PostUserImport, GetSubDpList, PutUserBth } from '@/api/Home/User'; +import { GetUserList, PostUser, PutUser, DeleteUser, PutUserPwd, GetRoleDpList, PostUserImport, GetSubDpList, PutUserBth, GetSigninList, PostUserImportSigninList, GetSigns, PutSigns } from '@/api/Home/User'; import * as CryptoJS from 'crypto-js'; import ImageUrl from '@/utils/package/imageUrl'; import { storage } from '@/utils'; @@ -35,8 +35,14 @@ const User: React.FC = () => { year: '0', }) const [changeUserPawModal, setChangeUserPawModal] = useState(false) + const [signInModal, setSignInModal] = useState(false) + const [signInUserModal, setSignInUserModal] = useState(false) + const [signInUserForm, setSignInUserForm] = useState({ + currentUserList: [], + uid: '' + }) const [changeImportModal, setChangeImportModal] = useState(false) - const [changeUserPawFrom, setChangeUserPawFrom] = useState({ + const [changeUserPawForm, setChangeUserPawForm] = useState({ Pwd: "", newPwd: '', }) @@ -94,6 +100,7 @@ const User: React.FC = () => { const buffer = Buffer.from(arrayBuffer); await fs.writeFile(`${setting.shareFilesPath}\\${data.fileName}`, buffer, {}); setChangeImportModal(false) + setSignInModal(false) confirm({ title: '提示', icon: , @@ -160,14 +167,14 @@ const User: React.FC = () => { }} icon={} className='m-ant-btn'> - 添加用户 + 添加 + +
{
{subjectList.find((subject: any) => subject.value === item.subject)?.label}
)} /> - ( + ( <> + )} /> @@ -478,10 +512,10 @@ const User: React.FC = () => { { - setChangeUserPawFrom({ - ...changeUserPawFrom, + setChangeUserPawForm({ + ...changeUserPawForm, Pwd: e.target.value, }); }} @@ -492,10 +526,10 @@ const User: React.FC = () => { { - setChangeUserPawFrom({ - ...changeUserPawFrom, + setChangeUserPawForm({ + ...changeUserPawForm, newPwd: e.target.value, }); }} @@ -507,14 +541,14 @@ const User: React.FC = () => { }}>
+ setSignInModal(false)} footer={null} centered width={'300px'}> +
+
+ +
+
+ +
+
+
+ setSignInUserModal(false)} footer={null} centered width={'300px'}> +
+
+ {signInUserForm.currentUserList.map((item: any, index: number) => { + return ( +
+ { + let currentUserListTemp: any = [...signInUserForm.currentUserList] + currentUserListTemp[index].signInName = e.target.value + setSignInUserForm({ + ...signInUserForm, + currentUserList: currentUserListTemp, + }) + }} + /> + { + let currentUserListTemp: any = [...signInUserForm.currentUserList] + currentUserListTemp.splice(index, 1) + setSignInUserForm({ + ...signInUserForm, + currentUserList: currentUserListTemp, + }) + }} /> +
+ ) + }) + } + +
+
+ + +
+
+
) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 862083d..bf368ba 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, @@ -409,6 +418,15 @@ const Meeting: React.FC = () => { firstFooterList[0][1].title = state.enableCamera ? '关闭视频' : '开启视频' firstFooterList[0][1].active = !state.enableCamera setFooterList(firstFooterList) + function showSingIn() { + if (!role.ID.includes(userInfo.roleId)) { + singInRef.current.getModal().then((res: boolean) => { + if (!res) { + singInRef.current.changeModal() + } + }) + } + } setTimeout(async () => { const setting = await JSON.parse(storage.getItem('setting') as string); const stateInfo = await JSON.parse(storage.getItem('stateInfo') as string); @@ -432,8 +450,10 @@ const Meeting: React.FC = () => { } else { message.error('当前不在会议室!') } + showSingIn() }, onCancel() { + showSingIn() } }) } @@ -442,6 +462,13 @@ const Meeting: React.FC = () => { } return data }) + } else { + setIsScreenCapture(bool => { + if (!bool) { + showSingIn() + } + return bool + }) } }, 10000); return () => { @@ -1455,7 +1482,6 @@ const Meeting: React.FC = () => { await getUserRoomInfo().then(async (res) => { stupWizardRef.current.changeModal(0, res) }) - break; case '邀请人员': await getUserRoomInfo().then(async (res) => { @@ -1559,6 +1585,9 @@ const Meeting: React.FC = () => { storage.setItem('noViewChatList', 0) setNoViewChatList(0) break; + case '签到': + singInRef.current.changeModal() + break; } } // 停止录制 @@ -2705,10 +2734,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 +2959,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 diff --git a/src/utils/styles/App.scss b/src/utils/styles/App.scss index ab2bc9a..e82a365 100644 --- a/src/utils/styles/App.scss +++ b/src/utils/styles/App.scss @@ -26,6 +26,20 @@ $pagination-hover-background-color: #5575F2; .ant-select-suffix { color: white !important; } + + .ant-select-selection-overflow-item { + .ant-select-selection-item { + background-color: rgba(0, 0, 0, 0.6); + } + + .ant-select-selection-item-remove { + color: white !important; + } + } + + .ant-select-selection-search-input { + color: white !important; + } } // input