Phase diagram and spectral function of the two-dimensional disordered Bose-Hubbard model: A real-space dynamical-mean-field-theory analysis