This commit is contained in:
yj 2024-12-12 11:13:38 +08:00
parent 97abad8231
commit c8d8db27d7
1 changed files with 8 additions and 1 deletions

View File

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