Commit cff156e5 authored by xxx's avatar xxx

1

parent 23b1280b
......@@ -78,7 +78,7 @@
</dt>
<dd v-for="(item,index) in intelligentDispatchData" :key="index">
<div>{{item.odd}}</div>
<div>{{item.qidian}}</div>
<div>{{item.startAdr}}</div>
<div>{{item.destination}}</div>
<div>{{parseFloat(item.mil).toFixed(2)}}</div>
<div>{{item.createTime}}</div>
......
......@@ -105,11 +105,12 @@
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} from "@/axios/api.js"
import {updatePass,personalCenterInforQuery,vehicleInformationQuery,vehicleInformationUpdate} from "@/axios/api.js"
export default {
data() {
return {
carnumber:'',
form: { oldPass: '', newPass: '', confirmPass: '' },
Avatar: Avatar,
showDecide:false,
......@@ -120,8 +121,9 @@ export default {
}
},
methods: {
loadData(value) {
loadData(value,carnumber) {
this.byValue = value;
this.carnumber = carnumber;
this.showDecide = true;
this.personalInViewShow = true;
this.changePassWordViewShow = false;
......@@ -145,7 +147,18 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.logout();
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res1) => {
if(res1.code == 200){
if(res1.data.totalElements == 0){
return
}else{
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0}).then((res2) => {
this.logout();
});
}
}
});
})
},
logout() {
......@@ -221,6 +234,16 @@ export default {
type: 'success',
duration: 1500
})
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res1) => {
if(res1.code == 200){
if(res1.data.totalElements == 0){
return
}else{
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0}).then((res2) => {});
}
}
});
setTimeout(() => {
this.$router.push({ path:'/login'})
window.sessionStorage.clear();
......
......@@ -455,7 +455,7 @@ export default {
this.$refs.carInformationMethod.carInCloseFn();
this.$refs.smallWindowMethod.carInCloseFn();
let byValue = this.personalName;
this.$refs.personalCenterMethod.loadData(byValue);
this.$refs.personalCenterMethod.loadData(byValue,this.carnumber);
}else{
this.selectFunction = 0;
this.$refs.voiceApplicationMethod.voiceAppCloseFn();
......
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