| | |
| | | ></FYOptionScene> |
| | | <slot name="left-top"></slot> |
| | | </el-row> |
| | | <el-scrollbar class="right-wrap"> |
| | | <div v-for="s in selectedSceneList" :key="s.guid"> |
| | | <el-checkbox |
| | | v-model="s._checked" |
| | | :label="s.name" |
| | | @change="handleChange" |
| | | /> |
| | | <!-- <el-text>{{ s.name }}</el-text> --> |
| | | </div> |
| | | </el-scrollbar> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch } from 'vue'; |
| | | import { ref, watch, computed } from 'vue'; |
| | | import { map, onMapMounted } from '@/utils/map/index'; |
| | | import marks from '@/utils/map/marks'; |
| | | import mapUtil from '@/utils/map/util'; |
| | | import { sceneIcon } from '@/assets/scene-icon'; |
| | | const props = defineProps({ |
| | | // 场景点位信息 |
| | |
| | | let markViewList = []; |
| | | |
| | | const scenetype = ref(); |
| | | |
| | | const selectedSceneList = computed(() => { |
| | | return props.data.filter((v) => { |
| | | v._checked = true; |
| | | return ( |
| | | scenetype.value == undefined || |
| | | scenetype.value.value == null || |
| | | v.typeid + '' == scenetype.value.value |
| | | ); |
| | | }); |
| | | }); |
| | | |
| | | watch( |
| | | () => props.data, |
| | |
| | | filterMarkViews(); |
| | | } |
| | | }); |
| | | |
| | | function handleChange(value) { |
| | | console.log(value); |
| | | |
| | | filterMarkViews(); |
| | | } |
| | | |
| | | function createSceneMarks() { |
| | | onMapMounted(() => { |
| | |
| | | content: '' |
| | | // direction: 'bottom' |
| | | }); |
| | | _extData._show = false |
| | | ev.target.setExtData(_extData) |
| | | _extData._show = false; |
| | | ev.target.setExtData(_extData); |
| | | } else { |
| | | ev.target.setLabel({ |
| | | content: _extData.name |
| | | // direction: 'bottom' |
| | | }); |
| | | _extData._show = true |
| | | ev.target.setExtData(_extData) |
| | | _extData._show = true; |
| | | ev.target.setExtData(_extData); |
| | | } |
| | | }); |
| | | allMarkViews.push(mark); |
| | |
| | | ); |
| | | }); |
| | | } |
| | | markViewList = markViewList.filter((v) => { |
| | | const _index = selectedSceneList.value.findIndex((s) => { |
| | | console.log(s.guid, v.getExtData().guid); |
| | | |
| | | s.guid == v.getExtData().guid; |
| | | }); |
| | | return _index != -1; |
| | | }); |
| | | map.add(markViewList); |
| | | setTimeout(() => { |
| | | map.setFitView(markViewList); |
| | | // const list = markViewList.map((v) => { |
| | | // const _extData = v.getExtData(); |
| | | // return [_extData.longitude, _extData.latitude]; |
| | | // }); |
| | | // mapUtil.setBound(list); |
| | | }, 1000); |
| | | }); |
| | | } |
| | |
| | | left: 0; |
| | | top: 0; |
| | | } |
| | | .right-wrap { |
| | | position: absolute; |
| | | right: 0px; |
| | | bottom: 0; |
| | | height: 50%; |
| | | background-color: white; |
| | | border-radius: 4px; |
| | | padding: 2px 8px; |
| | | max-width: 300px; |
| | | } |
| | | </style> |