|
|
@@ -76,6 +76,7 @@ import landUseLegend from "./components/landUseLegend.vue";
|
|
|
import WarningMap from "./warningMap";
|
|
|
import AlarmLayer from "./map/alarmLayer";
|
|
|
import DistributionLayer from "./map/distributionLayer";
|
|
|
+import BoundaryLayer from "./map/boundaryLayer";
|
|
|
import trackDialog from "./components/trackDialog.vue";
|
|
|
import eventBus from "@/api/eventBus";
|
|
|
import { useStore } from "vuex";
|
|
|
@@ -89,6 +90,7 @@ let alarmLayer = null;
|
|
|
let staticMapLayers = null;
|
|
|
let staticMapPointLayers = null;
|
|
|
let distributionLayer = null;
|
|
|
+let boundaryLayer = null;
|
|
|
const areaVal = ref([]);
|
|
|
const mapRef = ref(null);
|
|
|
const treeRef = ref(null);
|
|
|
@@ -127,6 +129,7 @@ onMounted(async () => {
|
|
|
staticMapLayers = new StaticMapLayers(warningMap.kmap);
|
|
|
staticMapPointLayers = new StaticMapPointLayers(warningMap.kmap);
|
|
|
distributionLayer = new DistributionLayer(warningMap.kmap);
|
|
|
+ boundaryLayer = new BoundaryLayer(warningMap.kmap);
|
|
|
await getSpeciesListData();
|
|
|
|
|
|
getDistributionData();
|
|
|
@@ -138,6 +141,9 @@ onMounted(async () => {
|
|
|
}, 100);
|
|
|
}
|
|
|
|
|
|
+ // 胜华村的村界
|
|
|
+ getVillageBoundary()
|
|
|
+
|
|
|
eventBus.emit("warningMap:init", warningMap.kmap);
|
|
|
|
|
|
// 图例数据
|
|
|
@@ -196,6 +202,15 @@ onMounted(async () => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+const getVillageBoundary = async () => {
|
|
|
+ const res = await VE_API.warning.fetchVillageBoundary();
|
|
|
+ if (res.code === 0 && res.data) {
|
|
|
+ const villageBoundary = res.data;
|
|
|
+ console.log(villageBoundary);
|
|
|
+ boundaryLayer.initData(villageBoundary);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const handleClick = () => {
|
|
|
if (window.parent) {
|
|
|
window.parent.postMessage(
|