| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-11-08 11:00:30 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-08 12:10:21 |
| | | * @LastEditTime: 2024-11-09 15:31:53 |
| | | * @FilePath: \bigScreen\src\views\companyInfo\index.vue |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2024 by shuishen, All Rights Reserved. |
| | | --> |
| | | <script setup> |
| | | import { computerCapacity } from "utils/turfPolygon.js" |
| | | import qyfw from "@/assets/json/qyfw" |
| | | import rightContainer from './components/rightContainer.vue' |
| | | import centerContainer from './components/centerContainer.vue' // 修改这里 |
| | | import mainMenuVue from './components/mainMenu.vue' |
| | | import { onUnmounted } from "vue" |
| | | |
| | | const Cesium = DC.getLib('Cesium') |
| | | const turf = DC.getLib('turf') |
| | | console.log(Cesium, turf, 1111) |
| | | let buttonIndex = ref(1) |
| | | let data = reactive({ |
| | | companyInfo: {} |
| | |
| | | data.companyInfo = JSON.parse(localStorage.getItem('companyInfo')) |
| | | let curCompany = qyfw.features.find(item => item.properties.name == data.companyInfo.name) |
| | | |
| | | console.log(curCompany.geometry.coordinates[0].map(d => [...d, 150].join(',')).join(';'), 111) |
| | | |
| | | let wall = new DC.Wall( |
| | | curCompany.geometry.coordinates[0].map(d => [...d, 150].join(',')).join(';') |
| | | curCompany.geometry.coordinates[0].map(d => [...d, 125].join(',')).join(';') |
| | | ) |
| | | |
| | | wall.setStyle({ |
| | | material: new DC.WallTrailMaterialProperty({ |
| | | color: DC.Color.YELLOW, |
| | | speed: 2 |
| | | color: Cesium.Color.fromBytes(255, 255, 0, 180), |
| | | speed: 10 |
| | | }) |
| | | }) |
| | | curCompanyWall.addOverlay(wall) |
| | | |
| | | onMounted(() => { |
| | | window.$viewer.zoomToPosition(new DC.Position( |
| | | Number(data.companyInfo.lng), |
| | | Number(data.companyInfo.lat), |
| | | 800, |
| | | 0, |
| | | -80, |
| | | 0 |
| | | ), () => { |
| | | }) |
| | | window.$viewer.flyTo(curCompanyWall) |
| | | }) |
| | | |
| | | onUnmounted(() => { |