no message
							parent
							
								
									8aaa373c91
								
							
						
					
					
						commit
						ba52fdfbd7
					
				| 
						 | 
					@ -70,7 +70,6 @@ import moment from "moment";
 | 
				
			||||||
import crudPoint from "@/api/point";
 | 
					import crudPoint from "@/api/point";
 | 
				
			||||||
import crudAgvTask from "@/api/agvTask"
 | 
					import crudAgvTask from "@/api/agvTask"
 | 
				
			||||||
import CRUD from "@crud/crud";
 | 
					import CRUD from "@crud/crud";
 | 
				
			||||||
import 'echarts-gl';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
| 
						 | 
					@ -135,7 +134,6 @@ export default {
 | 
				
			||||||
    //初始化
 | 
					    //初始化
 | 
				
			||||||
    setInterval(this.updateTime, 1000);//自动读秒
 | 
					    setInterval(this.updateTime, 1000);//自动读秒
 | 
				
			||||||
    this.getInit()//树状图
 | 
					    this.getInit()//树状图
 | 
				
			||||||
    this.createEarth3D();
 | 
					 | 
				
			||||||
    this.queryAgvTaskInfo();//AGV任务列表
 | 
					    this.queryAgvTaskInfo();//AGV任务列表
 | 
				
			||||||
    this.queryListInfo(this.currentPage, this.pageSize)//库位图
 | 
					    this.queryListInfo(this.currentPage, this.pageSize)//库位图
 | 
				
			||||||
    this.intervalId = setInterval(this.printNextItem, 5000);//定时分页调用
 | 
					    this.intervalId = setInterval(this.printNextItem, 5000);//定时分页调用
 | 
				
			||||||
| 
						 | 
					@ -253,80 +251,6 @@ export default {
 | 
				
			||||||
        clearInterval(this.intervalId);
 | 
					        clearInterval(this.intervalId);
 | 
				
			||||||
        this.intervalId = null;
 | 
					        this.intervalId = null;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    createEarth3D() {
 | 
					 | 
				
			||||||
      var ROOT_PATH = 'https://echarts.apache.org/examples';
 | 
					 | 
				
			||||||
      var chartDom = document.getElementById('threeDEarth');
 | 
					 | 
				
			||||||
      var myChart = echarts.init(chartDom, 'dark');
 | 
					 | 
				
			||||||
      var option;
 | 
					 | 
				
			||||||
      option = {
 | 
					 | 
				
			||||||
        backgroundColor: '#000',
 | 
					 | 
				
			||||||
        globe: {
 | 
					 | 
				
			||||||
          baseTexture: ROOT_PATH + '/data-gl/asset/earth.jpg',
 | 
					 | 
				
			||||||
          heightTexture: ROOT_PATH + '/data-gl/asset/bathymetry_bw_composite_4k.jpg',
 | 
					 | 
				
			||||||
          displacementScale: 0.1,
 | 
					 | 
				
			||||||
          shading: 'lambert',
 | 
					 | 
				
			||||||
          environment: ROOT_PATH + '/data-gl/asset/starfield.jpg',
 | 
					 | 
				
			||||||
          light: {
 | 
					 | 
				
			||||||
            ambient: {
 | 
					 | 
				
			||||||
              intensity: 0.1
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            main: {
 | 
					 | 
				
			||||||
              intensity: 1.5
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          layers: [
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
              type: 'blend',
 | 
					 | 
				
			||||||
              blendTo: 'emission',
 | 
					 | 
				
			||||||
              texture: ROOT_PATH + '/data-gl/asset/night.jpg'
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
              type: 'overlay',
 | 
					 | 
				
			||||||
              texture: ROOT_PATH + '/data-gl/asset/clouds.png',
 | 
					 | 
				
			||||||
              shading: 'lambert',
 | 
					 | 
				
			||||||
              distance: 5
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          ]
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        series: []
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      option && myChart.setOption(option);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      /*const scene = new THREE.Scene();
 | 
					 | 
				
			||||||
      const camera = new THREE.PerspectiveCamera(75, 30 / 30, 0.1, 1000);
 | 
					 | 
				
			||||||
      const renderer = new THREE.WebGLRenderer();
 | 
					 | 
				
			||||||
      renderer.setSize(30, 30);
 | 
					 | 
				
			||||||
      document.getElementById('container').appendChild(renderer.domElement);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // 创建地球几何体
 | 
					 | 
				
			||||||
      const earthGeometry = new THREE.SphereGeometry(15, 50, 50);
 | 
					 | 
				
			||||||
      // 加载地球材质(使用three.js内置的Earth材质,需要先加载纹理)
 | 
					 | 
				
			||||||
      const earthTextureLoader = new THREE.TextureLoader();
 | 
					 | 
				
			||||||
      const earthTexture = earthTextureLoader.load(imageFile);
 | 
					 | 
				
			||||||
      const earthMaterial = new THREE.MeshPhongMaterial({map: earthTexture});
 | 
					 | 
				
			||||||
      const earthMesh = new THREE.Mesh(earthGeometry, earthMaterial);
 | 
					 | 
				
			||||||
      scene.add(earthMesh);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // 添加灯光
 | 
					 | 
				
			||||||
      const ambientLight = new THREE.AmbientLight(0xffffff, 3);//0xcccccc
 | 
					 | 
				
			||||||
      scene.add(ambientLight);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // 设置相机位置并指向地球
 | 
					 | 
				
			||||||
      camera.position.z = 50;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // 渲染循环
 | 
					 | 
				
			||||||
      function animate() {
 | 
					 | 
				
			||||||
        requestAnimationFrame(animate);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 旋转地球
 | 
					 | 
				
			||||||
        earthMesh.rotation.y += 0.01;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        renderer.render(scene, camera);
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      animate();*/
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					@ -388,6 +312,5 @@ export default {
 | 
				
			||||||
  position: absolute;
 | 
					  position: absolute;
 | 
				
			||||||
  left: 79%;
 | 
					  left: 79%;
 | 
				
			||||||
  top: 34px;
 | 
					  top: 34px;
 | 
				
			||||||
  border: 1px solid red;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue