Commit 41f9441c authored by zhanglw's avatar zhanglw

下班,登录后台操作

parent aadc30f6
This diff is collapsed.
......@@ -66,3 +66,5 @@ export const completeZC = '/api/tRealTimeOrder/completeZC'; //卡车界面点击
export const crossDB = '/api/tRealTimeOrder/crossDB'; //卡车界面点击到达卸点
export const completeXC = '/api/tRealTimeOrder/completeXC'; //卡车界面点击完成装车
export const navigationRoute = '/api/navigationRoute'; //获取导航路径
export const logOutStatus = '/api/logOnStatus/logOutRemoveOrder'; //退出时订单操作
export const logOnStatus = '/api/logOnStatus/logOnAndRecordTime'; //登陆时后台额外操作
This diff is collapsed.
......@@ -105,7 +105,14 @@
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,dingDanBiaoCaoZuo} from "@/axios/api.js"
import {
updatePass,
personalCenterInforQuery,
vehicleInformationQuery,
vehicleInformationUpdate,
logOutStatus,
} from "@/axios/api.js"
export default {
data() {
......@@ -148,7 +155,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res1) => {
httpGet(vehicleInformationQuery,{number:this.$parent.carnumber}).then((res1) => {
if(res1.code == 200){
if(res1.data.totalElements == 0){
return
......@@ -157,17 +164,10 @@ export default {
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1,workStatus:0,weightStatus:0}).then((res2) => {
//人员信息表中与车辆解绑
putForJson(personalCenterInforQuery,{id:this.personalInformationData.id,car:''}).then((res3) => {
this.logout();
//删除调度单子
// httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((res3Del) => {
// if(res3Del.code == 200 && res3Del.data.content.length != 0){
// httpDelForJson(dingDanBiaoCaoZuo,[res3Del.data.content[0].id,this.carnumber,res3Del.data.content[0].odd]).then((res3DelSon) => {
// this.logout();
// });
// }else{
// this.logout();
// }
// })
//删除当前进行的订单
httpDelForJson(logOutStatus,{carNumber:this.$parent.carnumber}).then((res3) => {
this.logout();
});
})
});
}
......@@ -258,12 +258,7 @@ export default {
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1,workStatus:0,weightStatus:0}).then((res2) => {});
//人员信息表中与车辆解绑
putForJson(personalCenterInforQuery,{id:this.personalInformationData.id,car:''}).then((res3) => {})
//删除调度单子
httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((res3Del) => {
if(res3Del.code == 200 && res3Del.data.content.length != 0){
httpDelForJson(dingDanBiaoCaoZuo,[res3Del.data.content[0].id,this.carnumber,res3Del.data.content[0].odd]).then((res3DelSon) => {});
}
})
}
}
});
......
......@@ -57,6 +57,7 @@ import qzc from "@/assets/audio/qzc.mp3";
import gdb from "@/assets/audio/gdb.mp3";
import wdd from "@/assets/audio/wdd.mp3";
import ddwc from "@/assets/audio/ddwc.mp3";
import xbl from "@/assets/audio/xbl.mp3";
export default {
data() {
......@@ -86,6 +87,10 @@ export default {
queryOrder(){
httpGet(tRealTimeOrder,{carNumber: this.carNumber}).then((res) => {
if(res.code===200 && res.data){
if(!this.$parent.isLastOrder && res.data.isLastOrder){
this.$parent.isLastOrder = true;
this.audioPlayByUrl(xbl);
}
if(res.data.id!==this.orderObj.id && res.data.status===1){
//有新的订单
this.$parent.kcListView = false;
......@@ -97,9 +102,6 @@ export default {
if(this.orderObj.mdd.length>5){
this.orderObj.mdd = this.orderObj.mdd.substr(0,5)+'...'
}
// if(this.orderObj.xcArea.length>5){
// this.orderObj.xcArea = this.orderObj.xcArea.substr(0,5)+'...'
// }
this.audioPlayByUrl(xdd);
} else {
if (res.data.id !== this.orderObj) {
......@@ -108,12 +110,6 @@ export default {
if(this.orderObj.mdd.length>6){
this.orderObj.mdd = this.orderObj.mdd.substr(0,5)+'...'
}
// if(this.orderObj.zcArea.length>6){
// this.orderObj.zcArea = this.orderObj.zcArea.substr(0,5)+'...'
// }
// if(this.orderObj.xcArea.length>6){
// this.orderObj.xcArea = this.orderObj.xcArea.substr(0,5)+'...'
// }
}
this.orderObj.status = res.data.status;
if (this.orderObj.status === 6) {
......
......@@ -4,6 +4,10 @@
<img src="../../assets/images/truckTuPian/jjtz.png" height="15"/>
<span style="padding:5px">收到<span style="color:red">紧急通知</span>,请点击确认!</span>
</div>
<div v-show="isLastOrder" class="roadblockStyle" style="font-size:14px;bottom:20vh;left:15vw;width:28vw;display:flex;justify-content:center;align-items:center;" @click="nowLogout()">
<img src="../../assets/images/truckTuPian/xbicon.png" height="32"/>
<span style="padding:5px">可以<span style="color:red">下班</span>了,卸车完成后请<span style="color:red;text-decoration:underline">退出登录</span>!</span>
</div>
<div class="topViews">
<div class="topTitle">{{ systemTitle }}</div>
<div class="topcontent">
......@@ -244,6 +248,7 @@ export default {
kcListView: false,
localName: null,
trailLine: null,//导航开启后的行驶轨迹
isLastOrder: false,
};
},
mounted() {
......@@ -493,6 +498,21 @@ export default {
}
}
).addTo(layer);
if(res.msg){
this.$notify({
title: res.msg,
type: "success",
duration: 5000,
dangerouslyUseHTMLString: true,
});
}
}else{
this.$notify({
title: '网络异常',
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
}
});
},
......@@ -1588,6 +1608,9 @@ export default {
indexListeningDelFn(index) {
this.$refs.voiceApplicationMethod.selectDeleteSituation(index);
},
nowLogout(){
this.$refs.personalCenterMethod.openLogOut();
},
//获取当前时间
currentTimeFn() {
var date = new Date();
......@@ -1626,6 +1649,7 @@ export default {
this.$refs.voiceApplicationMethod.xintiaoCloseFn();
this.$refs.startOrderReceivingMethod.dingshiqiCloseFn();
this.websocketcloseIndex();
this.isLastOrder = false;
if (this.zongTimer1) {
clearInterval(this.zongTimer1);
this.zongTimer1 = null;
......
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