fix: 数据超过100弹出

This commit is contained in:
TsMask
2024-03-21 10:05:36 +08:00
parent 16ab366136
commit 4ae5f64da3
2 changed files with 7 additions and 1 deletions

View File

@@ -344,6 +344,9 @@ function wsMessage(res: Record<string, any>) {
eventJSON: ueEvent.eventJSON, eventJSON: ueEvent.eventJSON,
}); });
tablePagination.total += 1; tablePagination.total += 1;
if (tableState.data.length > 100) {
tableState.data.pop();
}
await new Promise(resolve => setTimeout(resolve, 800)); await new Promise(resolve => setTimeout(resolve, 800));
}); });
} }

View File

@@ -47,7 +47,7 @@ let queryParams = reactive({
/**查询参数重置 */ /**查询参数重置 */
function fnQueryReset() { function fnQueryReset() {
recordTypes.value = ['MOC'] recordTypes.value = ['MOC'];
queryParams = Object.assign(queryParams, { queryParams = Object.assign(queryParams, {
recordType: 'MOC', recordType: 'MOC',
pageNum: 1, pageNum: 1,
@@ -378,6 +378,9 @@ function wsMessage(res: Record<string, any>) {
cdrJSON: cdrEvent.CDR, cdrJSON: cdrEvent.CDR,
}); });
tablePagination.total += 1; tablePagination.total += 1;
if (tableState.data.length > 100) {
tableState.data.pop();
}
await new Promise(resolve => setTimeout(resolve, 800)); await new Promise(resolve => setTimeout(resolve, 800));
}); });
} }