工单报备按钮加防重复点击,提交报备做必填项的判断
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="wrap" @scroll="handleScroll">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="司机管理"
|
||||
@@ -76,7 +76,13 @@ export default {
|
||||
});
|
||||
if(res.code == 200){
|
||||
this.total=res.total
|
||||
this.driverList=res.data
|
||||
if(this.pageNum == 1){
|
||||
this.driverList=res.data
|
||||
}else{
|
||||
let preList = this.driverList;
|
||||
let arr = res.data;
|
||||
this.driverList = preList.concat(arr)
|
||||
}
|
||||
}
|
||||
},
|
||||
async handleStatus(item){
|
||||
@@ -109,6 +115,16 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
async handleScroll(){
|
||||
let num = Math.ceil( this.total / 10)
|
||||
if(num <= this.pageNum){
|
||||
// console.log("不在加载数据")
|
||||
}else{
|
||||
console.log("111111111111")
|
||||
this.pageNum++;
|
||||
await this.getDriverList()
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user