有分页的表格,搜索或重置的时候pageNum切换到第一页

This commit is contained in:
白菜
2025-07-02 17:44:14 +08:00
parent c53bc4dc45
commit 328f893da9
2 changed files with 4 additions and 0 deletions

View File

@ -157,6 +157,7 @@ export default {
},
// 搜索
onSearch(){
this.pageNum =1//每次搜索从1开始搜索
const [alarmStartTime='',alarmEndTime='']=(this.dateRange || [])
// 选中了时间范围
if(alarmStartTime && alarmStartTime){
@ -175,6 +176,7 @@ export default {
onReset(){
this.search={deviceType:'',alarmLevel:''}
this.dateRange=[]
this.pageNum =1//每次搜索从1开始搜索
this.getData()
},
// 切换今日、历史告警

View File

@ -117,6 +117,7 @@ export default {
},
// 搜索
onSearch(){
this.pageNum =1//每次搜索从1开始搜索
this.getTableData()
},
// 重置
@ -125,6 +126,7 @@ export default {
onReset(){
this.search={stackId:'',clusterId:''}
this.clusterOptions=[]
this.pageNum = 1
this.getTableData()
},
changeStackId(val){