|
|
@@ -19,7 +19,6 @@
|
|
|
<!-- <map-legend></map-legend> -->
|
|
|
<!-- <land-use-legend @change="handleLegendChange"></land-use-legend> -->
|
|
|
<landUseLegend ref="legendRef"></landUseLegend>
|
|
|
- <div class="show-point yes-events" v-show="showPoint" @click="handleShowPointClick"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div ref="mapRef" class="bottom-map"></div>
|
|
|
@@ -36,7 +35,6 @@ import fnHeader from "@/components/fnHeader.vue";
|
|
|
import landUseLegend from "./components/legend.vue";
|
|
|
import WarningMap from "./warningMap";
|
|
|
import trackDialog from "./components/trackDialog.vue";
|
|
|
-import AlarmLayer from "./map/alarmLayer";
|
|
|
import DistributionLayer from "./map/distributionLayer";
|
|
|
import BoundaryLayer from "./map/boundaryLayer";
|
|
|
import WaterLayer from "./map/waterLayer";
|
|
|
@@ -48,7 +46,6 @@ let store = useStore();
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
let warningMap = new WarningMap();
|
|
|
-let alarmLayer = null;
|
|
|
let staticMapLayers = null;
|
|
|
let distributionLayer = null;
|
|
|
let staticMapPointLayers = null;
|
|
|
@@ -68,8 +65,6 @@ const activePhenologySecondId = ref(null);
|
|
|
const currentYear = ref(2025);
|
|
|
const currentQuarter = ref(1);
|
|
|
|
|
|
-const isLandRecognition = ref(false);
|
|
|
-
|
|
|
// 顶部基础 tabs
|
|
|
const baseTabs = ["Phenological Stage", "Crop Condition", "Hydrology", "Canals", "Resources", "Export Report"];
|
|
|
const activeBaseTab = ref("Phenological Stage");
|
|
|
@@ -82,7 +77,6 @@ const legendKeys = {
|
|
|
}
|
|
|
|
|
|
const warningLayers = ref({});
|
|
|
-const showPoint = ref(false)
|
|
|
const handleBaseTabClick = (tab) => {
|
|
|
const legendKey = legendKeys[tab];
|
|
|
if (legendKey) {
|
|
|
@@ -91,7 +85,6 @@ const handleBaseTabClick = (tab) => {
|
|
|
});
|
|
|
}
|
|
|
activeBaseTab.value = tab;
|
|
|
- showPoint.value = false
|
|
|
staticMapPointLayers.hidePoint()
|
|
|
staticMapLayers.hideAll()
|
|
|
// 水利图层隐藏
|
|
|
@@ -100,7 +93,7 @@ const handleBaseTabClick = (tab) => {
|
|
|
if (tab === "Resources") {
|
|
|
staticMapPointLayers.showPoint()
|
|
|
}else if (tab === "Canals") {
|
|
|
- showPoint.value = true
|
|
|
+ staticMapPointLayers.showImg(imgData.value)
|
|
|
waterLayer && waterLayer.toggleCanalLayer(true)
|
|
|
}else if (tab === "Crop Condition") {
|
|
|
staticMapLayers.showSingle("Dongguan长势", false);
|
|
|
@@ -115,10 +108,6 @@ const handleSmartFarmClick = () => {
|
|
|
window.open("https://feiniao-pc-gly.feiniaotech.com/#/login");
|
|
|
};
|
|
|
|
|
|
-const handleShowPointClick = () => {
|
|
|
- eventBus.emit("chat:showVideoDialog")
|
|
|
-}
|
|
|
-
|
|
|
const legendRef = ref(null);
|
|
|
const getLegendData = async (code) => {
|
|
|
const { data } = await VE_API.layer.legendList({ code });
|
|
|
@@ -154,7 +143,6 @@ onMounted(async () => {
|
|
|
}, 0);
|
|
|
}
|
|
|
|
|
|
- alarmLayer = new AlarmLayer(warningMap.kmap);
|
|
|
staticMapLayers = new StaticMapLayers(warningMap.kmap);
|
|
|
staticMapPointLayers = new StaticMapPointLayers(warningMap.kmap);
|
|
|
distributionLayer = new DistributionLayer(warningMap.kmap);
|
|
|
@@ -164,6 +152,7 @@ onMounted(async () => {
|
|
|
|
|
|
getWaterData();
|
|
|
getWaterCanalData();
|
|
|
+ getImgData();
|
|
|
|
|
|
getDistributionData();
|
|
|
|
|
|
@@ -280,6 +269,12 @@ const getWaterCanalData = async () => {
|
|
|
waterLayer.initCanal(data);
|
|
|
};
|
|
|
|
|
|
+const imgData = ref([]);
|
|
|
+const getImgData = async () => {
|
|
|
+ const { data } = await VE_API.warning.fetchImgList();
|
|
|
+ imgData.value = data;
|
|
|
+};
|
|
|
+
|
|
|
sessionStorage.removeItem("farmId");
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
@@ -459,19 +454,6 @@ const getTreeChecks = async (nodeData, data) => {
|
|
|
|
|
|
distributionLayer.initData(finalMapData);
|
|
|
};
|
|
|
-
|
|
|
-// 处理图例变化
|
|
|
-const handleLegendChange = (data) => {
|
|
|
- console.log("图例变化:", data);
|
|
|
- // 通过 eventBus 将选中的类别信息传递给饼图组件
|
|
|
- if (data.checked) {
|
|
|
- eventBus.emit("landUseLegend:change", {
|
|
|
- category: data.category,
|
|
|
- nonGrain: data.nonGrain,
|
|
|
- children: data.children,
|
|
|
- });
|
|
|
- }
|
|
|
-};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -493,16 +475,6 @@ const handleLegendChange = (data) => {
|
|
|
box-sizing: border-box;
|
|
|
position: relative;
|
|
|
|
|
|
- .show-point{
|
|
|
- position: absolute;
|
|
|
- top: calc(50% - 50px);
|
|
|
- left: calc(50% - 50px);
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- // background: red;
|
|
|
- z-index: 2;
|
|
|
- }
|
|
|
-
|
|
|
.left,
|
|
|
.right {
|
|
|
width: calc(376px + 54px);
|