|
@@ -120,10 +120,10 @@
|
|
|
},
|
|
|
switchStartPoint(newVal) {
|
|
|
let currentSelectPath = this.dataParams.selectedPoints[this.selectTrack.id];
|
|
|
- if(!currentSelectPath){
|
|
|
+ if (!currentSelectPath) {
|
|
|
currentSelectPath = {
|
|
|
- 'start':[],
|
|
|
- 'end':[]
|
|
|
+ 'start': [],
|
|
|
+ 'end': []
|
|
|
};
|
|
|
}
|
|
|
let pointNames = currentSelectPath["start"];
|
|
@@ -137,14 +137,14 @@
|
|
|
},
|
|
|
switchEndPoint(newVal) {
|
|
|
let currentSelectPath = this.dataParams.selectedPoints[this.selectTrack.id];
|
|
|
- if(!currentSelectPath){
|
|
|
+ if (!currentSelectPath) {
|
|
|
currentSelectPath = {
|
|
|
- 'start':[],
|
|
|
- 'end':[]
|
|
|
+ 'start': [],
|
|
|
+ 'end': []
|
|
|
};
|
|
|
}
|
|
|
let pointNames = currentSelectPath["end"];
|
|
|
-
|
|
|
+
|
|
|
let searchIndex = pointNames.indexOf(this.preEndPointName);
|
|
|
if (searchIndex != -1) {
|
|
|
pointNames.splice(searchIndex, 1);
|
|
@@ -174,8 +174,8 @@
|
|
|
watch: {
|
|
|
params: {
|
|
|
handler(newVal, oldVal) {
|
|
|
- this.selectTrack = {},
|
|
|
- this.dataParams = JSON.parse(JSON.stringify(newVal));
|
|
|
+ this.selectTrack = {};
|
|
|
+ this.dataParams = JSON.parse(JSON.stringify(newVal));
|
|
|
this.preStartPointName = this.dataParams.pathStartJson.name;
|
|
|
this.preEndPointName = this.dataParams.pathEndJson.name;
|
|
|
this.getMapDetails(newVal.mapId);
|