工单报备按钮加防重复点击,提交报备做必填项的判断

This commit is contained in:
2023-08-22 18:05:12 +08:00
parent 37e4b8d514
commit 2b5e3a7396
9 changed files with 104 additions and 46 deletions

View File

@@ -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()
}
},
}
}