原来的:
async getData() {
let that = this;
//重设日期标题
this.doctorStatus = [];
this.headList = [];
this.dataList = [];
for (let i = 0; i < this.winSteps; i++) {
this.doctorStatus[i] = [];
this.dataList[i] = [];
}
for (let i = 0; i < this.winSteps; i++) {
let title = "";
title = (() => {
if (i == 0) {
return "今天"
}
if (i == 1) {
return "明天"
}
if (i == 2) {
return "后天"
}
return this.$util.dateFormat(this.$util.getDatePoint(this.date_start, 0, 0, i ), "周w")
})();
this.headList.push({
title: title,
dateStr: this.$util.dateFormat(this.$util.getDatePoint(this.date_start, 0, 0, i ),
"MM-DD")
})
}
// 预约号源
let questDoctor_future = {
"serviceCode": "getDoctorSchedulingList",
"doctorCode":this.doctorCode,
"deptCode": this.deptCode,
"beginDate": this.date_start,
"endDate": this.date_end,
}
await this.$http.post(questDoctor_future, (res) => {
if(res.data.resultCode == 0){
for (var item of res.data.item) {
var arr = [item.morningNum,item.afternoonNum,