1.修改逻辑,每次刷新后都会重新调用应急中心信息接口,重新处理
This commit is contained in:
2024-10-16 17:38:15 +08:00
parent 64feafb1d5
commit 27beb42eb0
2 changed files with 22 additions and 18 deletions
@@ -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();