Commit 18d1ad72 authored by xxx's avatar xxx

修改

parent 796f29f7
......@@ -157,28 +157,26 @@ export default {
httpPostForJson(faultMonthAdd,this.from).then((res) => {});
httpPostForJson(faultYearAdd,this.from).then((res) => {});
httpPostForJson(failureDeclarationAdd,this.from).then((res) => {
if(res.code == 200){
if(res.code == 200){
this.$notify({
title: '故障申报成功!',
type: 'success',
duration: 2500
});
this.from = {car:'',carcode:'',name:'',fault:'',problem:'',lat:'',lon:''};
this.getLocationText = '点击获取车辆位置';
this.submitLoading = false;
this.zuobiaoShow = false;
}else{
this.$notify({
title: res.head.message,
type: 'error',
duration: 2500
})
this.from = {car:'',carcode:'',name:'',fault:'',problem:'',lat:'',lon:''};
this.getLocationText = '点击获取车辆位置';
this.submitLoading = false;
this.zuobiaoShow = false;
}
if(res.code == 200){
this.$notify({
title: '故障申报成功!',
type: 'success',
duration: 2500
});
this.from = {car:'',carcode:'',name:'',fault:'',problem:'',lat:'',lon:''};
this.getLocationText = '点击获取车辆位置';
this.submitLoading = false;
this.zuobiaoShow = false;
}else{
this.$notify({
title: res.head.message,
type: 'error',
duration: 2500
})
this.from = {car:'',carcode:'',name:'',fault:'',problem:'',lat:'',lon:''};
this.getLocationText = '点击获取车辆位置';
this.submitLoading = false;
this.zuobiaoShow = false;
}
});
},
......
......@@ -37,10 +37,11 @@
</div>
</div>
<!-- 点击地图车辆时展示的车辆详情信息,注释掉就可以,暂时用不到 -->
<!-- <div class="smallWindowStyle" @click="smallWinFn()">
<span class="el-icon-star-on"></span>
</div> -->
<div class="roadblockStyle" @click="failureDeFn()">
<div class="roadblockStyle" @click="failureDe1Fn()">
<img src="../../assets/images/truckTuPian/luzhang.png" height="17">
<span>路障申报</span>
</div>
......@@ -56,9 +57,9 @@
<personalCenter ref="personalCenterMethod" v-show="selectFunction == 6"/>
<smallWindow ref="smallWindowMethod" v-show="selectFunction == 7"/>
<!-- 地图区域 -->
<div id="centerDiv" class="mapcontainer">
<!-- <div id="centerDiv" class="mapcontainer">
<mars3dViewerMap :url="configUrl" @onload="onMapload" ref="mars3dViewerMapMethod"/>
</div>
</div> -->
<!-- 电铲待装车辆列表 -->
<div class="waitingtrucksView" v-if="carclass == '电铲'">
<div class="waitingtrucksView_title">待装卡车列表</div>
......@@ -82,7 +83,9 @@ import {
dingDanBiaoCaoZuo,
manualSchedulingQuery,
getalarmRealQuery,
dispatchFinishQuery
dispatchFinishQuery,
carRealTimeLocationQuery2,
failureDeclarationAdd,
} from "@/axios/api.js"
import startOrderReceiving from './components/startOrderReceiving/index.vue' //接受派单
import voiceApplication from './components/voiceApplication/index.vue' //语音申请
......@@ -437,6 +440,49 @@ export default {
}
])
},
//右下角的路障申报
failureDe1Fn(){
let that = this;
httpGet(vehicleInformationQuery,{number:that.carnumber}).then((res) => {
if(res.code == 200){
if(res.data.content[0].equipmentName == '' || !res.data.content[0].equipmentName){
this.$notify({
title: '暂无车辆位置,无法提交路障申报!',
type: 'error',
duration: 2500
})
}else{
httpGet(carRealTimeLocationQuery2,{name:res.data.content[0].equipmentName}).then((res1) => {
if(res1.data){
let lat = res1.data.lat;
let lon = res1.data.lon;
httpPostForJson(failureDeclarationAdd,{fault:'路障申报',lat:lat,lon:lon,carcode:that.carnumber}).then((res2) => {
if(res2.code == 200){
this.$notify({
title: '路障申报成功!',
type: 'success',
duration: 2500
});
}else{
this.$notify({
title: res2.head.message,
type: 'error',
duration: 2500
})
}
});
}else{
this.$notify({
title: '暂无车辆位置,无法提交路障申报!',
type: 'error',
duration: 2500
})
}
});
}
}
});
},
},
beforeDestroy(){
this.$refs.voiceApplicationMethod.xintiaoCloseFn();
......
......@@ -43,7 +43,7 @@ module.exports = {
// },
},
https: true,
//https: true,
},
configureWebpack: {
plugins: [
......
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