Typhoon leaves at least 31 dead in Vietnam