车辆管理,司机管理代码优化

This commit is contained in:
2023-08-30 15:14:48 +08:00
parent eb644563d9
commit 700e35d7ed
2 changed files with 7 additions and 8 deletions

View File

@ -83,12 +83,12 @@ export default {
mounted() {
const urlParams = new URLSearchParams(window.location.search);
this.supplierType = urlParams.get('supplierType');
this.getDriverList()
// this.getDriverList()
},
methods:{
async onLoad(){
this.pageNum++;
await this.getDriverList()
this.pageNum++;
// 加载状态结束
this.loading1 = false;
// 数据全部加载完成
@ -97,6 +97,7 @@ export default {
}
},
onRefresh() {
this.pageNum=1;
this.getDriverList()
setTimeout(() => {
this.$toast('刷新成功');

View File

@ -69,12 +69,12 @@ export default {
}
},
mounted() {
this.getVehicleList();
// this.getVehicleList();
},
methods:{
async onLoad(){
this.pageNum++;
await this.getVehicleList()
this.pageNum++;
// 加载状态结束
this.loading1 = false;
// 数据全部加载完成
@ -83,6 +83,7 @@ export default {
}
},
onRefresh() {
this.pageNum=1
this.getVehicleList()
setTimeout(() => {
this.$toast('刷新成功');
@ -111,12 +112,9 @@ export default {
await deleteVehicle({
vehicleId:this.id
})
// if(result.code === 200){
this.$toast('删除成功');
this.pageNum=1
// this.vehicleList=[]
await this.getVehicleList();
// }
await this.getVehicleList();
},
updateVehicle(item){//修改
this.$router.push({