|
|
@@ -1,15 +1,39 @@
|
|
|
<template>
|
|
|
- <el-button>transportationSafetyCenter - 运输安全管理中心</el-button>
|
|
|
+ <div style="position: relative">
|
|
|
+ <div id="bmap"></div>
|
|
|
+ <NumberVue style="position: absolute; top: 0; left: 0"></NumberVue>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import router from "router/index";
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
export default {
|
|
|
setup() {
|
|
|
- return {};
|
|
|
+ const bmap = ref({});
|
|
|
+ function initMap() {
|
|
|
+ bmap.value = new BMapGL.Map("bmap");
|
|
|
+ bmap.value.setMapStyleV2({
|
|
|
+ styleId: "fa3f2f79d64ac87e2683cfa762891cb5",
|
|
|
+ });
|
|
|
+ bmap.value.centerAndZoom(new BMapGL.Point(116.404, 39.915), 11);
|
|
|
+ bmap.value.enableScrollWheelZoom(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ initMap();
|
|
|
+ });
|
|
|
+ return {
|
|
|
+ initMap,
|
|
|
+ };
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+#bmap {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100vh - 60px);
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
</style>
|