Commit 47172720 authored by xxx's avatar xxx

1

parent 95237528
......@@ -105,7 +105,7 @@
import Avatar from '@/assets/images/avatar.png'
import { encrypt } from "@/utils/rsaEncrypt.js";
import { httpGet, httpPostForJson, putForJson, httpDelForJson} from "@/common/httpBean.js"
import {updatePass,personalCenterInforQuery,vehicleInformationQuery,vehicleInformationUpdate} from "@/axios/api.js"
import {updatePass,personalCenterInforQuery,vehicleInformationQuery,vehicleInformationUpdate,dingDanBiaoCaoZuo} from "@/axios/api.js"
export default {
data() {
......@@ -152,10 +152,22 @@ export default {
if(res1.data.totalElements == 0){
return
}else{
//退出时删除所有单子
httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((resDel) => {
if(resDel.code == 200 && resDel.data.totalElements != 0){
httpDelForJson(dingDanBiaoCaoZuo,[resDel.data.content[0].id]).then((resDelSon) => {
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {
this.logout();
});
});
}else{
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {
this.logout();
});
}
})
}
}
});
......@@ -240,8 +252,18 @@ export default {
if(res1.data.totalElements == 0){
return
}else{
//退出时删除所有单子
httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((resDel) => {
if(resDel.code == 200 && resDel.data.totalElements != 0){
httpDelForJson(dingDanBiaoCaoZuo,[resDel.data.content[0].id]).then((resDelSon) => {
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {});
});
}else{
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {});
}
})
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment