At least 30 people have been killed and tens of thousands evacuated due to heavy rain and flooding in and around Beijing.