Commit 0daa3731 authored by xxx's avatar xxx

1

parent 6a6c31e5
......@@ -142,8 +142,23 @@ export default {
//获取停车时间段以及坐标点
if(that.leadTime){
HttpReq.truckDispatching.apimineAlarmHistoryTjQuery({number:that.carNumber,bTime:bTime,eTime:eTime}).then((resTj) => {
console.log(resTj);
that.stopCarCoordinates = [];
let arr1 = [];
resTj.data.forEach((itemTj1,indexTj1)=>{
let arr2 = {};
let arr2_5 = [];
itemTj1.line.forEach((itemTj2,indexTj2)=>{
let arr3 = [];
arr3.push(itemTj2.x);
arr3.push(itemTj2.y);
arr3.push(1000);
arr2_5.push(arr3);
})
arr2.time1 = itemTj1.time1;
arr2.time2 = itemTj1.time2;
arr2.line = arr2_5;
arr1.push(arr2);
})
that.stopCarCoordinates = arr1;
this.$nextTick(()=>{
if (this.appendToBody) {
......@@ -287,7 +302,7 @@ export default {
})
//展示轨迹
that.stopCarCoordinates,forEach((item,index)=>{
that.stopCarCoordinates.forEach((item,index)=>{
var graphicLayer3 = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer3);
initGraphicManager(graphicLayer3);
......@@ -391,7 +406,7 @@ export default {
//展示轨迹
addDemoGraphic2(graphicLayer,item) {
const graphic = new mars3d.graphic.PolylineEntity({
positions: item.lines,
positions: item.line,
style: {
width: 6,
materialType: mars3d.MaterialType.PolylineOutline,
......@@ -399,7 +414,7 @@ export default {
outlineWidth: 2,
outlineColor: Cesium.Color.BLACK,
label: {
text: '开始时间',
text: '',
font_size: 18,
color: "black",
distanceDisplayCondition: true,
......
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