md
This commit is contained in:
parent
46cea9f4f8
commit
7a116cb06c
@ -9,6 +9,7 @@
|
||||
|
||||
<script>
|
||||
import { getDeviceNoByBillCode } from "@/api/emis/emisTmsMapTrace";
|
||||
import { getWaybillDetail} from "@/api/emis/emisWaybill";
|
||||
|
||||
export default {
|
||||
name: "MapTraceView",
|
||||
@ -31,7 +32,11 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
traceMapUrl: function () {
|
||||
return "https://lbs.jtrs56.com/showTraceMap?deviceNo="+this.deviceNo+"&beginDate="+beginTraceDate+"&endDate="+endTraceDate;
|
||||
if(this.showUrl==null){
|
||||
return "https://lbs.jtrs56.com/showTraceMap?deviceNo";
|
||||
}else{
|
||||
return this.showUrl;
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
@ -45,24 +50,23 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
async initData() {
|
||||
this.isNeedTrace=true;
|
||||
this.isNeedTrace=false;
|
||||
if(this.billCode) {
|
||||
let res=await getDeviceNoByBillCode(this.billCode);
|
||||
if(res.code==200){
|
||||
this.deviceNo=response.data;
|
||||
this.deviceNo=res.data;
|
||||
if(this.deviceNo!='-1'){
|
||||
this.isNeedTrace=true;
|
||||
let resBillDtl=getWaybillDetail(this.billCode);
|
||||
let resBillDtl=await getWaybillDetail(this.billCode);
|
||||
if(resBillDtl.code==200){
|
||||
|
||||
let billDetail=resBillDtl.data;
|
||||
this.beginTraceDate=billDetail.sendDate;
|
||||
this.endTraceDate=billDetail.signDate
|
||||
if(this.endTraceDate==null){
|
||||
this.endTraceDate=new Date();
|
||||
}
|
||||
this.showUrl="https://lbs.jtrs56.com/showTraceMap?deviceNo="+this.deviceNo+"&beginDate="+this.beginTraceDate+"&endDate="+this.endTraceDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user