{
let res = [];
data.forEach((item) => {
if (Object.prototype.hasOwnProperty.call(item.period, 'morning')) {
item.period.morning.forEach((doctorName) => {
res.push({name: doctorName})
res[res.length-1][item.date] = "上午"
})
}
if (Object.prototype.hasOwnProperty.call(item.period, 'afternoon')) {
item.period.afternoon.forEach((doctorName) => {
res.push({name: doctorName})
res[res.length-1][item.date] += "下午"
})
}
});
return res;
}