Attenuation of Lyman-alpha emission by dust in damped Lyman-alpha systems