update
1.修改逻辑,每次刷新后都会重新调用应急中心信息接口,重新处理
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, ref } from 'vue';
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { RedoOutlined } from '@ant-design/icons-vue';
|
||||
import { Map } from '/@/assets/mapUtils/map';
|
||||
@@ -198,13 +198,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
function initMap() {
|
||||
Map.initMap({ el: 'centerMap', option: props.mapOptions }).then(() => {
|
||||
getMapData(tabList[0].type, { centerId: userStore.getCenterInfo?.id });
|
||||
Map.map && Map.map.on('zoomend', setLevel);
|
||||
Map.map && Map.map.on('zoomend', setLevel);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.mapOptions,
|
||||
() => {
|
||||
initMap();
|
||||
}
|
||||
);
|
||||
|
||||
// onMounted(() => {
|
||||
// });
|
||||
const routeList = ref([]);
|
||||
const showRoutePanel = ref(false);
|
||||
const panelTitle = ref();
|
||||
|
||||
Reference in New Issue
Block a user