Torrential rain and floods have hit parts of China, killing at least 12 people and forcing tens of thousands to evacuate.