Commit 3828a6c0 authored by xxx's avatar xxx

1

parent 8ddbfbef
......@@ -56,6 +56,12 @@ export default {
lat:0,//纬度
lng:0,//经度
},
//智能调度订单自动接单属性
zhinengjiedan:0,
//人工调度订单自动接单属性
rengongjiedan:0,
//卸车语音计时
xiecheyuyinTimer:0,
}
},
mounted(){
......@@ -94,6 +100,10 @@ export default {
}
if(resSon1.data.content[0].workStatus == 0 && this.paidanFlag == 0){
if(res_1.data.content[0].orderClass == 0){
this.zhinengjiedan = this.zhinengjiedan + 1;
if(this.zhinengjiedan >= 4){
this.startPaidanFn();
}
this.showDe = true;
this.btnShow1 = true;
this.btnShow2 = false;
......@@ -118,6 +128,14 @@ export default {
this.dingDanId = res_1.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
this.orderClass = '卸车';
this.xiecheyuyinTimer = this.xiecheyuyinTimer + 1;
if(this.xiecheyuyinTimer <= 3){
//启动语音
this.startOrderSrcUrl = newOrder;
let au = document.getElementById('audio1');
au.currentTime = 0;
au.play();
}
}
}
//获取车辆坐标计算距离并返回给后台
......@@ -184,6 +202,10 @@ export default {
this.btnShow3 = true;
this.btnShow4 = true;
if(resSon1.data.content[0].workStatus == 0){
if(this.rengongjiedan >= 4){
this.startPaidanFn();
}
this.rengongjiedan = this.rengongjiedan + 1;
this.paidanFlag = res.data.content[0].flag;
this.showDe = true;
this.btnShow1 = true;
......@@ -200,6 +222,7 @@ export default {
au.play();
}else{
if(this.paidanFlag == 0){
this.rengongjiedan = this.rengongjiedan + 1;
this.paidanFlag = res.data.content[0].flag;
this.showDe = true;
this.btnShow1 = true;
......@@ -214,6 +237,27 @@ export default {
let au = document.getElementById('audio1');
au.currentTime = 0;
au.play();
}else{
if(this.zuizhongpaidanFlag == 0){
if(this.rengongjiedan >= 4){
this.startPaidanFn();
}
this.rengongjiedan = this.rengongjiedan + 1;
this.paidanFlag = res.data.content[0].flag;
this.showDe = true;
this.btnShow1 = true;
this.btnShow2 = false;
this.btnShow3 = false;
this.btnShow4 = false;
this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
//启动语音
this.startOrderSrcUrl = newOrder;
let au = document.getElementById('audio1');
au.currentTime = 0;
au.play();
}
}
}
//获取车辆坐标计算距离并返回给后台
......@@ -265,6 +309,10 @@ export default {
this.btnShow3 = true;
this.btnShow4 = true;
if(resSon1.data.content[0].workStatus == 0){
if(this.rengongjiedan >= 4){
this.startPaidanFn();
}
this.rengongjiedan = this.rengongjiedan + 1;
this.paidanFlag = res.data.content[0].flag;
this.showDe = true;
this.btnShow1 = true;
......@@ -281,6 +329,7 @@ export default {
au.play();
}else{
if(this.paidanFlag == 0){
this.rengongjiedan = this.rengongjiedan + 1;
this.paidanFlag = res.data.content[0].flag;
this.showDe = true;
this.btnShow1 = true;
......@@ -295,6 +344,27 @@ export default {
let au = document.getElementById('audio1');
au.currentTime = 0;
au.play();
}else{
if(this.zuizhongpaidanFlag == 0){
if(this.rengongjiedan >= 4){
this.startPaidanFn();
}
this.rengongjiedan = this.rengongjiedan + 1;
this.paidanFlag = res.data.content[0].flag;
this.showDe = true;
this.btnShow1 = true;
this.btnShow2 = false;
this.btnShow3 = false;
this.btnShow4 = false;
this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
//启动语音
this.startOrderSrcUrl = newOrder;
let au = document.getElementById('audio1');
au.currentTime = 0;
au.play();
}
}
}
//获取车辆坐标计算距离并返回给后台
......@@ -489,6 +559,9 @@ export default {
startPaidanFn(){
this.btnShow1 = false;
this.btnShow4 = true;
this.zhinengjiedan = 0;
this.rengongjiedan = 0;
this.xiecheyuyinTimer = 0;
this.$notify({
title: '已开始派单!',
type: 'success',
......@@ -544,6 +617,9 @@ export default {
this.showDe = false;
this.paidanFlag = 0;
this.zuizhongpaidanFlag = 0;
this.zhinengjiedan = 0;
this.rengongjiedan = 0;
this.xiecheyuyinTimer = 0;
this.$notify({
title: '已拒绝派单!',
type: 'success',
......@@ -600,6 +676,9 @@ export default {
this.btnShow4 = false;
this.paidanFlag = 0;
this.zuizhongpaidanFlag = 0;
this.zhinengjiedan = 0;
this.rengongjiedan = 0;
this.xiecheyuyinTimer = 0;
this.$nextTick(()=>{
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => {
if(res.code == 200){
......@@ -667,6 +746,9 @@ export default {
this.showDe = false;
this.paidanFlag = 0;
this.zuizhongpaidanFlag = 0;
this.zhinengjiedan = 0;
this.rengongjiedan = 0;
this.xiecheyuyinTimer = 0;
this.$nextTick(()=>{
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => {
if(res.code == 200){
......
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