车辆管理,司机管理代码优化
This commit is contained in:
@ -83,12 +83,12 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.supplierType = urlParams.get('supplierType');
|
this.supplierType = urlParams.get('supplierType');
|
||||||
this.getDriverList()
|
// this.getDriverList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
async onLoad(){
|
async onLoad(){
|
||||||
this.pageNum++;
|
|
||||||
await this.getDriverList()
|
await this.getDriverList()
|
||||||
|
this.pageNum++;
|
||||||
// 加载状态结束
|
// 加载状态结束
|
||||||
this.loading1 = false;
|
this.loading1 = false;
|
||||||
// 数据全部加载完成
|
// 数据全部加载完成
|
||||||
@ -97,6 +97,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
|
this.pageNum=1;
|
||||||
this.getDriverList()
|
this.getDriverList()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$toast('刷新成功');
|
this.$toast('刷新成功');
|
||||||
|
@ -69,12 +69,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getVehicleList();
|
// this.getVehicleList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
async onLoad(){
|
async onLoad(){
|
||||||
this.pageNum++;
|
|
||||||
await this.getVehicleList()
|
await this.getVehicleList()
|
||||||
|
this.pageNum++;
|
||||||
// 加载状态结束
|
// 加载状态结束
|
||||||
this.loading1 = false;
|
this.loading1 = false;
|
||||||
// 数据全部加载完成
|
// 数据全部加载完成
|
||||||
@ -83,6 +83,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
|
this.pageNum=1
|
||||||
this.getVehicleList()
|
this.getVehicleList()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$toast('刷新成功');
|
this.$toast('刷新成功');
|
||||||
@ -111,12 +112,9 @@ export default {
|
|||||||
await deleteVehicle({
|
await deleteVehicle({
|
||||||
vehicleId:this.id
|
vehicleId:this.id
|
||||||
})
|
})
|
||||||
// if(result.code === 200){
|
|
||||||
this.$toast('删除成功');
|
this.$toast('删除成功');
|
||||||
this.pageNum=1
|
this.pageNum=1
|
||||||
// this.vehicleList=[]
|
await this.getVehicleList();
|
||||||
await this.getVehicleList();
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
updateVehicle(item){//修改
|
updateVehicle(item){//修改
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
Reference in New Issue
Block a user