Two approaches to the description of spin dynamics of electron-nuclear system in quantum dots are compared: the quantum-mechanical one is based on direct diagonalization of the model Hamiltonian and semiclassical one is based on coupled equations for precession of mean electron spin and mean spin of nuclear spin fluctuations. The comparison was done for a model problem describing periodic excitation of electron-nuclear system by optical excitation. The computation results show that scattering of parameters related to fluctuation of the nuclear spin system leads to appearance of an ordered state in the system caused by periodic excitation and to the effect of electron-spin mode locking in an external magnetic field. It is concluded that both models can qualitatively describe the mode-locking effect, however give significantly different quantitative results. This may indicate the limited applicability of the precession model for describing the spin dynamics in quantum dots in the presence of optical pumping.