有分页的表格,搜索或重置的时候pageNum切换到第一页
This commit is contained in:
@ -157,6 +157,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch(){
|
onSearch(){
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
const [alarmStartTime='',alarmEndTime='']=(this.dateRange || [])
|
const [alarmStartTime='',alarmEndTime='']=(this.dateRange || [])
|
||||||
// 选中了时间范围
|
// 选中了时间范围
|
||||||
if(alarmStartTime && alarmStartTime){
|
if(alarmStartTime && alarmStartTime){
|
||||||
@ -175,6 +176,7 @@ export default {
|
|||||||
onReset(){
|
onReset(){
|
||||||
this.search={deviceType:'',alarmLevel:''}
|
this.search={deviceType:'',alarmLevel:''}
|
||||||
this.dateRange=[]
|
this.dateRange=[]
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
// 切换今日、历史告警
|
// 切换今日、历史告警
|
||||||
|
@ -117,6 +117,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch(){
|
onSearch(){
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
@ -125,6 +126,7 @@ export default {
|
|||||||
onReset(){
|
onReset(){
|
||||||
this.search={stackId:'',clusterId:''}
|
this.search={stackId:'',clusterId:''}
|
||||||
this.clusterOptions=[]
|
this.clusterOptions=[]
|
||||||
|
this.pageNum = 1
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
changeStackId(val){
|
changeStackId(val){
|
||||||
|
Reference in New Issue
Block a user