优化数据

This commit is contained in:
gyq 2024-07-22 16:27:19 +08:00
parent e4835d0d27
commit a393c2affb
2 changed files with 8 additions and 2 deletions

View File

@ -59,7 +59,11 @@ function refTable(isToFirst = false) {
return props.reqTableDataFunc(Object.assign({}, vdata.iPage, props.searchData)).then(({ bizData }) => {
Object.assign(vdata.apiResData, bizData); //
if (bizData.records) {
vdata.allData.push(...bizData.records); // forEach
if (isToFirst) {
vdata.allData = [...bizData.records]; // forEach
} else {
vdata.allData.push(...bizData.records); // forEach
}
}
});
}

View File

@ -200,8 +200,9 @@ const dayConfirm = (e) => {
nextTick(() => {
getStatList();
refTable.value.refTable(true);
// refTable.value.refTable(true);
refTable.value.refTable(true);
});
console.log('选择时间更新统计1');
};
//
const customTime = (e, val) => {
@ -213,6 +214,7 @@ const customTime = (e, val) => {
.format('YYYY-MM-DD HH:mm:ss')}`;
getStatList();
refTable.value.refTable(true);
console.log('选择时间更新统计2');
// refTable.value.refTable(true);
}
};