BEIJING—Chinese President Xi Jinping compensated his initial public visit to the front lines of the coronavirus outbreak, stopping at a Beijing medical center treating contaminated patients and at a neighborhood disease-management office soon after weeks of remaining largely out of public look at.

Mr. Xi on Monday visited the office of a community neighborhood center in Beijing’s Chaoyang district, exactly where he had his temperature taken by a neighborhood staff member, received a briefing on disease-avoidance work and waved at people cooped up in their residences, footage…