车辆服务刷新问题

This commit is contained in:
2025-09-11 09:48:53 +08:00
parent 3a7c06ff2f
commit ab7593ae2d

View File

@ -177,7 +177,6 @@ export default {
} }
}, },
mounted() { mounted() {
// this.getVehicleList();
this.getPermissions(); this.getPermissions();
}, },
methods:{ methods:{
@ -238,11 +237,12 @@ export default {
// 数据全部加载完成 // 数据全部加载完成
if (this.vehicleList.length >= this.total) { if (this.vehicleList.length >= this.total) {
this.finished = true; this.finished = true;
} else {
this.finished = false;
} }
}, },
onRefresh() { async onRefresh() {
this.pageNum=1 await this.resetHandler()
// this.getVehicleList()
setTimeout(() => { setTimeout(() => {
this.$toast('刷新成功'); this.$toast('刷新成功');
this.isLoading = false; this.isLoading = false;
@ -284,10 +284,11 @@ export default {
await this.getVehicleList(); await this.getVehicleList();
}, },
async resetHandler() { async resetHandler() {
// debounce(async () => {
this.pageNum=1 this.pageNum=1
this.finished = false;
this.total = 0;
// this.vehicleList = [];
await this.getVehicleList(); await this.getVehicleList();
// }, 1000)
}, },
updateVehicle(item){//修改 updateVehicle(item){//修改
if( this.permissonList.includes('vehicleModifyBtn') ) { if( this.permissonList.includes('vehicleModifyBtn') ) {