Crystallization, phase transition and optical properties of the rare-earth-doped nanophosphors synthesized by chemical deposition