Commit 75885e68 authored by zhanglw's avatar zhanglw

订单到达校验

parent 559a8f2d
......@@ -180,7 +180,7 @@ export default {
},
//校验目的地
checkDestination() {
if(this.$parent.currArea==this.orderObj.xcArea){
if(this.$parent.localName==this.orderObj.xcArea){
this.navStu = 0;
this.$notify({
title: '您已到达'+this.orderObj.xcArea+',请卸车',
......
......@@ -240,6 +240,7 @@ export default {
areaNum: 0,
areaTimer: null,
kcListView: false,
localName: null,
};
},
mounted() {
......@@ -498,8 +499,11 @@ export default {
let area = null;
const point = new maptalks.Coordinate(item.lon, item.lat);
this.mapDom.getLayer('regionLayer').getGeometries().forEach((polygon) => {
if (polygon.properties.areaLimitClass && polygon.containsPoint(point)) {
area = polygon.properties.name;
if (polygon.containsPoint(point)) {
this.localName = polygon.properties.name;
if(polygon.properties.areaLimitClass){
area = polygon.properties.name;
}
}
})
if (this.currArea !== area) {
......
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