Commit 14207815 authored by xxx's avatar xxx

修改路径图配置问题

parent 0b03a3a7
...@@ -369,59 +369,64 @@ export default { ...@@ -369,59 +369,64 @@ export default {
}, },
//点击关键点获取对应数据 //点击关键点获取对应数据
clickPointFn(item){ clickPointFn(item){
this.transmitWay = 'edit'; if(this.addKeyPointsAble){
this.faControlPointId = item.id; return
if(item.type == '装车点'){
this.activeName = 'first';
let text1 = item.name + '';
this.entruckingValue1 = text1.split('/');
}else if(item.type == '卸车点'){
this.activeName = 'third';
let text1 = item.name + '';
this.detrainingValue2 = text1.split('/');
}else{ }else{
this.activeName = 'second'; this.transmitWay = 'edit';
this.controlPointValue3 = item.name; this.faControlPointId = item.id;
let arr1 = []; if(item.type == '装车点'){
//重置所有连接点时间为0 this.activeName = 'first';
this.controlPointData.forEach((items,indexs)=>{ let text1 = item.name + '';
this.controlPointData[indexs].weight = 0; this.entruckingValue1 = text1.split('/');
}) }else if(item.type == '卸车点'){
//获取已该点为起点的数据 this.activeName = 'third';
HttpReq.truckDispatching.apiPathmapQuery({size:9999,start:this.controlPointValue3}).then((res) => { let text1 = item.name + '';
if(res.code == 200){ this.detrainingValue2 = text1.split('/');
res.data.content.forEach((item2,index)=>{ }else{
let obj1 = {}; this.activeName = 'second';
obj1.end = item2.end; this.controlPointValue3 = item.name;
obj1.weight = item2.weight; let arr1 = [];
arr1.push(obj1); //重置所有连接点时间为0
}); this.controlPointData.forEach((items,indexs)=>{
//获取已该点为终点的数据 this.controlPointData[indexs].weight = 0;
HttpReq.truckDispatching.apiPathmapQuery({size:9999,end:this.controlPointValue3}).then((res1) => { })
if(res1.code == 200){ //获取已该点为起点的数据
res1.data.content.forEach((item1,index1)=>{ HttpReq.truckDispatching.apiPathmapQuery({size:9999,start:this.controlPointValue3}).then((res) => {
let obj2 = {}; if(res.code == 200){
obj2.end = item1.start; res.data.content.forEach((item2,index)=>{
obj2.weight = item1.weight; let obj1 = {};
arr1.push(obj2); obj1.end = item2.end;
}); obj1.weight = item2.weight;
//刷新展示连接点数据 arr1.push(obj1);
let arr2 = []; });
arr1.forEach((item3,index3)=>{ //获取已该点为终点的数据
arr2.push(item3.end); HttpReq.truckDispatching.apiPathmapQuery({size:9999,end:this.controlPointValue3}).then((res1) => {
this.controlPointData.forEach((item4,index4)=>{ if(res1.code == 200){
if(item3.end == item4.end){ res1.data.content.forEach((item1,index1)=>{
this.controlPointData[index4].weight = item3.weight; let obj2 = {};
} obj2.end = item1.start;
obj2.weight = item1.weight;
arr1.push(obj2);
});
//刷新展示连接点数据
let arr2 = [];
arr1.forEach((item3,index3)=>{
arr2.push(item3.end);
this.controlPointData.forEach((item4,index4)=>{
if(item3.end == item4.end){
this.controlPointData[index4].weight = item3.weight;
}
})
}) })
}) this.selectConnectPointArray = arr2;
this.selectConnectPointArray = arr2; }
} })
}) }
} })
})
}
} }
}, },
handleClick1(tab, event){ handleClick1(tab, event){
if(this.transmitWay == 'edit'){ if(this.transmitWay == 'edit'){
......
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