yangjie #43

Merged
yangqiang merged 4 commits from yangjie into master 2024-12-12 14:23:48 +08:00
1 changed files with 8 additions and 1 deletions
Showing only changes of commit c8d8db27d7 - Show all commits

View File

@ -9,6 +9,7 @@ const SingIn = forwardRef((props: any, ref: any) => {
getRoomSingnIn() getRoomSingnIn()
}, },
getModal: () => { getModal: () => {
setIsMessage(true)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
setSingInModal(bool => { setSingInModal(bool => {
resolve(bool) resolve(bool)
@ -18,6 +19,7 @@ const SingIn = forwardRef((props: any, ref: any) => {
}, },
})) }))
const [singInModal, setSingInModal] = useState(false); const [singInModal, setSingInModal] = useState(false);
const [isMessage, setIsMessage] = useState(false);
const [singInList, setSingInList] = useState([]); const [singInList, setSingInList] = useState([]);
const getRoomSingnIn = async (): Promise<void> => { const getRoomSingnIn = async (): Promise<void> => {
await GetRoomSingnIn().then(res => { await GetRoomSingnIn().then(res => {
@ -25,8 +27,13 @@ const SingIn = forwardRef((props: any, ref: any) => {
if (res.data.length) { if (res.data.length) {
setSingInModal(true) setSingInModal(true)
} else { } else {
setIsMessage(bool => {
if (!bool) {
message.error('暂未绑定签到人,请联系管理员添加后签到!') message.error('暂未绑定签到人,请联系管理员添加后签到!')
} }
return false
})
}
setSingInList(res.data.map((item: any) => { setSingInList(res.data.map((item: any) => {
return { return {
...item, ...item,