Commit 0daa3731 authored by xxx's avatar xxx

1

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