fix: 数据超过100弹出
This commit is contained in:
@@ -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));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user