| | |
| | | import { load } from '@amap/amap-jsapi-loader' |
| | | import { getRoot } from '/@/root' |
| | | |
| | | import * as Cesium from 'cesium' |
| | | |
| | | const { appContext } = getCurrentInstance() |
| | | const global = appContext.config.globalProperties |
| | | |
| | | const loading = ref(false) |
| | | const store = useMyStore() |
| | | const projectId = store.state.common.projectId |
| | |
| | | return |
| | | } |
| | | canRefresh.value = false |
| | | getWaylineFiles(workspaceId, { |
| | | page: pagination.page, |
| | | page_size: pagination.page_size, |
| | | order_by: 'update_time desc' |
| | | getWaylineFiles({ |
| | | workspaceId: projectId, |
| | | }).then(res => { |
| | | if (res.code !== 0) { |
| | | console.log(res, '+++++++++++++++++++++++++++++++++++++') |
| | | |
| | | if (res.code !== 5000) { |
| | | return |
| | | } |
| | | waylinesData.data = [...waylinesData.data, ...res.data.list] |
| | | pagination.total = res.data.pagination.total |
| | | pagination.page = res.data.pagination.page |
| | | |
| | | const data = res.data |
| | | |
| | | waylinesData.data = [...waylinesData.data, ...data] |
| | | }).finally(() => { |
| | | canRefresh.value = true |
| | | }) |
| | |
| | | } |
| | | |
| | | function selectRoute (wayline: WaylineFile) { |
| | | store.commit('SET_SELECT_WAYLINE_INFO', wayline) |
| | | console.log(global, '+++++++++++') |
| | | |
| | | const options = { |
| | | camera: global.$viewer.scene.camera, |
| | | canvas: global.$viewer.scene.canvas, |
| | | screenOverlayContainer: global.$viewer.container, |
| | | } |
| | | global.$viewer.dataSources.add( |
| | | Cesium.KmlDataSource.load( |
| | | '/src/assets/kmz/test.kmz', |
| | | options |
| | | )).then(res => { |
| | | console.log(res, '+++++++++++++++++++') |
| | | }) |
| | | |
| | | // store.commit('SET_SELECT_WAYLINE_INFO', wayline) |
| | | } |
| | | |
| | | function onScroll (e: any) { |