| | |
| | | <div class="height-100 width-100 cesium" id="cesiumContainer"></div> |
| | | <div v-if="centerConfig.type && !centerConfig.latitude" class="pointLongitude">在地图上点击绘制项目中心点</div> |
| | | <div class="search"> |
| | | <a-auto-complete |
| | | v-model:value="searchText" |
| | | style="width: 200px" |
| | | placeholder="请输入地址" |
| | | @select="enter" |
| | | @change="searchLocation" |
| | | :options='resultList' |
| | | > |
| | | <a-auto-complete v-if="show" v-model:value="searchText" style="width: 200px;height: 100%;" placeholder="请输入地址" @select="enter" |
| | | @change="searchLocation" :options='resultList'> |
| | | </a-auto-complete> |
| | | <span class="search-icon" @click="() => show = !show"> |
| | | <SearchOutlined style="fontSize:24px; color: blue;" /> |
| | | </span> |
| | | </div> |
| | | <div class="switch"> |
| | | <div class="2d" v-if="dimension === 2" @click="switchDimension('3D')">2D</div> |
| | |
| | | import _ from 'lodash' |
| | | import { cesiumOperation } from '/@/hooks/use-cesium-tsa' |
| | | import { gaodeSearch } from '/@/api/gaode' |
| | | import { SearchOutlined } from '@ant-design/icons-vue' |
| | | import { useMyStore } from '/@/store' |
| | | import * as Cesium from 'cesium' |
| | | type result = { |
| | |
| | | const centerConfig = computed(() => { |
| | | return store.state.map.centerConfig |
| | | }) |
| | | const show = ref(false) |
| | | const search = async () => { |
| | | resultList.value = [] |
| | | const params = { |
| | |
| | | text-align: center; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .search { |
| | | position: absolute; |
| | | top: 40px; |
| | | right: 20px; |
| | | color: #fff; |
| | | font-size: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 32px; |
| | | .search-icon { |
| | | padding: 5px; |
| | | background-color: #fff; |
| | | height: 32px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .switch { |
| | | position: absolute; |
| | | background-color: #fff; |