The Shanghai index closes nearly 8% lower as investors weigh the impact of the outbreak.