|
|
@ -8,6 +8,10 @@ import PointJson from "./point.json";
|
|
|
|
import { onMounted, ref, reactive, watch, onUnmounted } from "vue";
|
|
|
|
import { onMounted, ref, reactive, watch, onUnmounted } from "vue";
|
|
|
|
import moment from "moment";
|
|
|
|
import moment from "moment";
|
|
|
|
import useUavStore from "@/store/modules/uav";
|
|
|
|
import useUavStore from "@/store/modules/uav";
|
|
|
|
|
|
|
|
import markerTypePark from "@/assets/images/marker-park.png"
|
|
|
|
|
|
|
|
import markerTypeSchool from "@/assets/images/marker-school.png"
|
|
|
|
|
|
|
|
import markerTypeUav from "@/assets/images/marker-uav.png"
|
|
|
|
|
|
|
|
|
|
|
|
const uavStore = useUavStore();
|
|
|
|
const uavStore = useUavStore();
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
|
@ -78,10 +82,7 @@ let animationFrameId;
|
|
|
|
|
|
|
|
|
|
|
|
let gamepad = reactive({});
|
|
|
|
let gamepad = reactive({});
|
|
|
|
|
|
|
|
|
|
|
|
// 使用 import.meta.glob 动态导入本地图片
|
|
|
|
|
|
|
|
const imageModules = import.meta.glob("@/assets/images/*.png", { eager: true });
|
|
|
|
|
|
|
|
// 获取图片路径
|
|
|
|
|
|
|
|
const imageUrls = Object.values(imageModules).map((module) => module.default);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let map = null;
|
|
|
|
let map = null;
|
|
|
|
let list = [];
|
|
|
|
let list = [];
|
|
|
@ -405,10 +406,10 @@ const lablePoint = (item, index) => {
|
|
|
|
} ">${item.name}</div>
|
|
|
|
} ">${item.name}</div>
|
|
|
|
<img class="marker-icon" src="${
|
|
|
|
<img class="marker-icon" src="${
|
|
|
|
item.type == "school"
|
|
|
|
item.type == "school"
|
|
|
|
? imageUrls[5]
|
|
|
|
? markerTypeSchool
|
|
|
|
: item.type == "park"
|
|
|
|
: item.type == "park"
|
|
|
|
? imageUrls[4]
|
|
|
|
? markerTypePark
|
|
|
|
: imageUrls[6]
|
|
|
|
: markerTypeUav
|
|
|
|
}" />
|
|
|
|
}" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|