if (that.pageIdx == 1) {
this.dataList_0 = newArr;//第一页的数据 直接加进来
} else {
//第二页的数据 判断日期是不是一样
for (let i = 0; i < newArr.length; i++) {
const _obj = newArr[i];
if (_obj.dateStr == this.dataList_0[this.dataList_0.length - 1].dateStr) {
this.dataList_0[this.dataList_0.length - 1].childList = this.dataList_0[
this.dataList_0.length - 1
].childList.concat(newArr[0].childList);
} else {
this.dataList_0.push(newArr[i]); //数组追加
}
}
}
//没有数据时候 结束分页
if (that.dataList_0.length == 0) {
that.noDataTip = '';
that.upFinished = true;
that.noData = true;
return;
} else {
that.noDataTip = '- 显示近30天内的历史任务记录 -';
that.noData = false;
}
if (res.data.result.hasMore == 1) {
that.upFinished = true;
}
网友评论