Commit 14207815 authored by xxx's avatar xxx

修改路径图配置问题

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