Explorar el Código

fix: 默认选项

lxf hace 1 semana
padre
commit
8060cf8460
Se han modificado 2 ficheros con 2 adiciones y 280 borrados
  1. 0 161
      src/views/warningHome/area.js
  2. 2 119
      src/views/warningHome/index.vue

+ 0 - 161
src/views/warningHome/area.js

@@ -1,161 +0,0 @@
-
-export const areaListOptions = [
-    {
-        value: "3",
-        label: "广东省",
-        children: [
-            {
-                value: "广州市",
-                label: "广州市",
-                children: [
-                    {
-                        value: "3186",
-                        label: "从化区",
-                    },
-                    {
-                        value: "荔湾区",
-                        label: "荔湾区",
-                    },
-                    {
-                        value: "越秀区",
-                        label: "越秀区",
-                    },
-                    {
-                        value: "天河区",
-                        label: "天河区",
-                    },
-                    {
-                        value: "海珠区",
-                        label: "海珠区",
-                    },
-                    {
-                        value: "增城区",
-                        label: "增城区",
-                    },
-                    {
-                        value: "南沙区",
-                        label: "南沙区",
-                    },
-                    {
-                        value: "番禺区",
-                        label: "番禺区",
-                    },
-                    {
-                        value: "白云区",
-                        label: "白云区",
-                    },
-                ],
-            },
-            {
-                value: "韶关市",
-                label: "韶关市",
-                children: [
-                    {
-                        value: "武江区",
-                        label: "武江区",
-                    },
-                    {
-                        value: "浈江区",
-                        label: "浈江区",
-                    },
-                    {
-                        value: "曲江区",
-                        label: "曲江区",
-                    },
-                ],
-            },
-            {
-                value: "汕头市",
-                label: "汕头市",
-                children: [
-                    {
-                        value: "龙湖区",
-                        label: "龙湖区",
-                    },
-                    {
-                        value: "金平区",
-                        label: "金平区",
-                    },
-                ],
-            },
-            {
-                value: "佛山市",
-                label: "佛山市",
-                children: [
-                    {
-                        value: "顺德区",
-                        label: "顺德区",
-                    },
-                    {
-                        value: "南海区",
-                        label: "南海区",
-                    },
-                    {
-                        value: "禅城区",
-                        label: "禅城区",
-                    },
-                ],
-            },
-            {
-                value: "江门市",
-                label: "江门市",
-                children: [
-                    {
-                        value: "蓬江区",
-                        label: "蓬江区",
-                    },
-                ]
-            },
-            {
-                value: "湛江市",
-                label: "湛江市",
-                children: [
-                    {
-                        value: "赤坎区",
-                        label: "赤坎区",
-                    },
-                ]
-            },
-            {
-                value: "茂名市",
-                label: "茂名市",
-                children: [
-                    {
-                        value: "茂南区",
-                        label: "茂南区",
-                    },
-                ]
-            },
-            {
-                value: "肇庆市",
-                label: "肇庆市",
-                children: [
-                    {
-                        value: "端州区",
-                        label: "端州区",
-                    },
-                ]
-            },
-            {
-                value: "惠州市",
-                label: "惠州市",
-                children: [
-                    {
-                        value: "惠城区",
-                        label: "惠城区",
-                    },
-                ]
-            },
-            {
-                value: "梅州市",
-                label: "梅州市",
-                children: [
-                    {
-                        value: "梅江区",
-                        label: "梅江区",
-                    },
-                ]
-            },
-        ],
-    }
-]

+ 2 - 119
src/views/warningHome/index.vue

@@ -124,18 +124,6 @@
         </div>
     </div>
     <div ref="mapRef" class="bottom-map"></div>
-    <div id="popup" class="ol-popup-warning">
-        <div class="warning-info-title">
-            <div class="icon">
-                <img src="@/assets/images/common/chart-icon.png" />
-            </div>
-            <div id="popup-title"></div>
-            <div class="close" @click="destroyPopup">
-                <img src="@/assets/images/warningHome/close-btn.png" />
-            </div>
-        </div>
-        <div id="popup-content" class="info-content"></div>
-    </div>
     <track-dialog></track-dialog>
 </template>
 
@@ -152,7 +140,6 @@ import trackDialog from "./components/trackDialog.vue";
 import alarmList from "./components/alarmList.vue";
 import timeLine from "./components/timeLine.vue";
 import eventBus from "@/api/eventBus";
-import { areaListOptions } from "./area";
 import { useStore } from "vuex";
 import farmInfoGroup from "./components/farmInfoGroup.vue";
 import mapLegend from "./components/mapLegend.vue";
@@ -190,111 +177,6 @@ import lb from "@/assets/images/map/type/小麦.png";
 import coldChainIcon from "@/assets/images/common/legend-icon-1.png";
 import factoryIcon from "@/assets/images/common/legend-icon-2.png";
 
-const originTreeData = [
-    {
-        id: 1,
-        label: "果类",
-        color: "#51B2FF",
-        fillColor: "rgba(5, 49, 84, 0.5)",
-        geom: "MULTIPOLYGON (((113.58668302396221 23.244659822289524, 113.32095411231998 23.24298858095617, 112.99338890476295 23.002328435946534, 113.13878785387456 22.604570799124076, 113.59503930394511 22.86862839611681, 113.58668302396221 23.244659822289524)))",
-        children: [
-            {
-                id: 4,
-                label: "荔枝",
-                color: "#2199F8",
-                imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E8%8D%94%E6%9E%9D.png",
-                imgName: lz,
-                wktArr: [
-                    "POINT(113.33722309500006 23.204074978290652)",
-                    "POINT(113.53593237057355 23.188789823486065)",
-                    "POINT(113.36970447853234 23.064596505297875)",
-                ],
-            },
-            {
-                id: 55,
-                label: "龙眼",
-                color: "#2199F8",
-                imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E7%99%BD%E7%B3%96.png",
-                imgName: ly,
-                wktArr: [
-                    "POINT(113.29900983080294 22.949956545068478)",
-                    "POINT(113.10412186488536 22.800924630297875)",
-                    "POINT(113.32384842738536 22.776086033715462)",
-                    "POINT(113.22640444442656 22.90983245840535)",
-                ],
-            },
-        ],
-    },
-    {
-        id: 2,
-        label: "粮食",
-        color: "#FF8E1C",
-        fillColor: "rgba(83, 46, 8, 0.5)",
-        geom: "MULTIPOLYGON (((112.42256410334443 23.14863707066071, 112.09584019992684 22.842930537988664, 112.25060416300033 22.62511471413565, 112.80278650958275 22.749307864685775, 112.75119857777094 23.13144100957107, 112.42256410334443 23.14863707066071)))",
-        children: [
-            {
-                id: 5,
-                label: "水稻",
-                color: "#FAA53D",
-                imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E6%8C%82%E7%BB%BF.png",
-                imgName: sd,
-                wktArr: [
-                    "POINT(112.70843577567298 22.969169477864167)",
-                    "POINT(112.23636397199755 22.85839626464389)",
-                    "POINT(112.35889247053002 23.008153324438585)",
-                    "POINT(112.47894566011911 22.9017143340381)",
-                ],
-            },
-            {
-                id: 6,
-                label: "小麦",
-                color: "#FAA53D",
-                imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E6%97%A0%E6%A0%B8.png",
-                imgName: xm,
-                wktArr: [
-                    "POINT(112.36777193304151 22.73892833157863)",
-                    "POINT(112.26684873669083 22.71150357559281)",
-                    "POINT(112.65408646638161 22.84862740364581)",
-                ],
-            },
-        ],
-    },
-    {
-        id: 3,
-        label: "蔬菜",
-        color: "#25BC07",
-        fillColor: "rgba(0, 69, 4, 0.5)",
-        children: [
-            {
-                id: 7,
-                label: "白菜",
-                color: "#7ABB00",
-                imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E7%99%BD%E8%8F%9C.png",
-                imgName: bc,
-                wktArr: [
-                    "POINT(110.34100329503417 21.516399336978793)",
-                    "POINT(113.89499662443995 22.653799122199416)",
-                    "POINT(113.9329988323152 22.653600638732314)",
-                    "POINT(113.94400024786592 22.614900553599)",
-                ],
-            },
-            {
-                id: 8,
-                label: "萝卜",
-                color: "#7ABB00",
-                imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E8%90%9D%E8%8F%9C.png",
-                imgName: lb,
-                wktArr: [
-                    "POINT(110.34100329503417 21.516399336978793)",
-                    "POINT(113.89499662443995 22.653799122199416)",
-                    "POINT(113.9329988323152 22.653600638732314)",
-                    "POINT(113.94400024786592 22.614900553599)",
-                ],
-            },
-        ],
-    },
-];
-
 const phenologyData = [
     {
         id: 1,
@@ -486,7 +368,7 @@ const phenologyData = [
     },
 ];
 
-const treeActionData = ref(originTreeData);
+const treeActionData = ref([]);
 
 // 物候期分布下,当前激活的“二级”节点(只允许一个)
 const activePhenologySecondId = ref(null);
@@ -807,6 +689,7 @@ const props1 = {
                         label: item.provName || item.name,
                         leaf: false, // 省级不是叶子节点
                     }));
+                    areaVal.value = nodes[0].value;
                     resolve(nodes);
                 } else {
                     resolve([]);