linqilong hace 8 meses
padre
commit
78b483be59

+ 823 - 6
src/api/home.ts

@@ -1,11 +1,828 @@
-import request from '@/utils/request'
-
 /**
  * 水文测站实时信息
  */
 export function getRStLLMaxDate() {
-  return request({
-    url: '/tbazmw_api/tbazmw/thdata/getRVandDrpMaxDate',
-    method: 'get'
-  })
+  // return request({
+  //   url: '/tbazmw_api/tbazmw/thdata/getRVandDrpMaxDate',
+  //   method: 'get'
+  // })
+  return Promise.resolve([
+    {
+      "stcd": "63304700",
+      "stnm": "太师桥",
+      "title": "太师桥",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.4941",
+      "lttd": "30.762836",
+      "shuxing": "基本站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.24",
+      "q": "73.791",
+      "drp": "0",
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63304650",
+      "stnm": "思源",
+      "title": "思源",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.522088",
+      "lttd": "30.841321",
+      "shuxing": "基本站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.15",
+      "q": "15.308",
+      "drp": "0",
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "70112100",
+      "stnm": "罗桐埠 ",
+      "title": "罗桐埠 ",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "119.254444",
+      "lttd": "29.476389",
+      "shuxing": "基本站",
+      "xzqh": "浙江杭州",
+      "z": "23.14",
+      "q": "0",
+      "drp": "0",
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "70111400",
+      "stnm": "街口",
+      "title": "街口",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "118.71691",
+      "lttd": "29.72391",
+      "shuxing": "基本站",
+      "xzqh": "浙江杭州",
+      "z": "102.43",
+      "q": "0",
+      "drp": "0",
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63301700",
+      "stnm": "北虹大桥",
+      "title": "北虹大桥",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.709747",
+      "lttd": "30.885936",
+      "shuxing": "基本站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.049",
+      "q": "26.255",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63304730",
+      "stnm": "文桥",
+      "title": "文桥",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.465831",
+      "lttd": "30.800258",
+      "shuxing": "预警站",
+      "xzqh": "浙江湖州",
+      "z": "3.21",
+      "q": "7.77",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63305451",
+      "stnm": "圣塘桥",
+      "title": "圣塘桥",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.589144",
+      "lttd": "30.838792",
+      "shuxing": "预警站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.13",
+      "q": "-40.204",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63205690",
+      "stnm": "太平桥",
+      "title": "太平桥",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.702609",
+      "lttd": "30.886256",
+      "shuxing": "预警站",
+      "xzqh": "江苏苏州",
+      "z": "3.05",
+      "q": "18.11",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63205680",
+      "stnm": "双林桥 ",
+      "title": "双林桥 ",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.705375",
+      "lttd": "30.922552",
+      "shuxing": "预警站",
+      "xzqh": "江苏苏州",
+      "z": "3.05",
+      "q": "-1.666",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63205670",
+      "stnm": "章湾圩公路桥",
+      "title": "章湾圩公路桥",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.756256",
+      "lttd": "30.978642",
+      "shuxing": "预警站",
+      "xzqh": "江苏苏州",
+      "z": "3.04",
+      "q": "-9.445",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63313001",
+      "stnm": "梅台港桥",
+      "title": "梅台港桥",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.774598",
+      "lttd": "30.99626",
+      "shuxing": "预警站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.11",
+      "q": "-66.298",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63312411",
+      "stnm": "陶庄枢纽",
+      "title": "陶庄枢纽",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.829083",
+      "lttd": "31.002328",
+      "shuxing": "预警站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.09",
+      "q": "-116.508",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63312340",
+      "stnm": "大舜枢纽",
+      "title": "大舜枢纽",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.906514",
+      "lttd": "31.017386",
+      "shuxing": "预警站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.16",
+      "q": "-36.413",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "63312300",
+      "stnm": "丁栅闸",
+      "title": "丁栅闸",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "120.9528",
+      "lttd": "31.018267",
+      "shuxing": "预警站",
+      "xzqh": "浙江嘉兴",
+      "z": "3.22",
+      "q": "-3.014",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "71501010",
+      "stnm": "托溪水文站",
+      "title": "托溪水文站",
+      "tm": "2024-10-30 14:00:00",
+      "lgtd": "119.354764",
+      "lttd": "27.491128",
+      "shuxing": null,
+      "xzqh": "福建宁德",
+      "z": "1.58",
+      "q": "2",
+      "drp": "0",
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    },
+    {
+      "stcd": "71111530",
+      "stnm": "马蹄岙电站",
+      "title": "马蹄岙电站",
+      "tm": "2024-10-28 00:00:00",
+      "lgtd": "118.91861",
+      "lttd": "27.61917",
+      "shuxing": null,
+      "xzqh": null,
+      "z": null,
+      "q": "12.69",
+      "drp": null,
+      "dyp": null,
+      "stjl": null,
+      "xsa": null,
+      "xsavv": null,
+      "xsmxv": null,
+      "flwchrcd": null,
+      "wptn": null,
+      "msqmt": null,
+      "msamt": null,
+      "msvmt": null,
+      "grz": null,
+      "wrz": null,
+      "avz": null,
+      "avq": null,
+      "maxz": null,
+      "minz": null,
+      "maxq": null,
+      "minq": null,
+      "maxztm": null,
+      "minztm": null,
+      "maxqtm": null,
+      "minqtm": null,
+      "day": null,
+      "mnth": null,
+      "ohmaxr": null,
+      "ohbgtm": null,
+      "twhmaxr": null,
+      "shmaxr": null,
+      "shbgtm": null,
+      "twemaxr": null,
+      "twbgtm": null,
+      "odbgtm": null,
+      "tedmaxr": null,
+      "tedbgtm": null,
+      "odmaxr": null,
+      "mydavz": null,
+      "mydavq": null,
+      "swz": null
+    }
+  ])
 }
+

+ 5 - 2
src/components/AntvMap/index.vue

@@ -1,5 +1,5 @@
 <script lang="ts" setup>
-import {init, loadMap} from "@/utils/mapConfig";
+import {init, loadedStatus, loadMap} from "@/utils/mapConfig";
 import {onMounted, watch} from "vue";
 import {useMapStore} from "@/stores/map";
 
@@ -19,7 +19,10 @@ onMounted(() => {
   })
 })
 
-watch(() => store.mapOption, (option): void => {
+watch(() => store.mapOption, async (option) => {
+  while (!loadedStatus) {
+    await new Promise(resolve => setTimeout(resolve, 500));
+  }
   loadMap(option)
 })
 </script>

+ 16 - 1
src/components/UePlayer.vue

@@ -10,7 +10,17 @@ onMounted(() => {
   pixelStreamingApplicationStyles.applyStyleSheet();
 
   // 创建 config 对象
-  const config = new Config({useUrlParams: true});
+  const config = new Config({
+    useUrlParams: true,
+    initialSettings: {
+      ss: "ws://192.168.0.120:85",
+      AutoConnect: true,
+      AutoPlayVideo: true,
+      StartVideoMuted: false,
+      KeyboardInput: false,
+      MouseInput: true,
+    }
+  });
 
   // 创建实现 Delegate 接口类的本机 DOM 委托实例
   const stream = new PixelStreaming(config);
@@ -36,3 +46,8 @@ onMounted(() => {
   pointer-events: auto;
 }
 </style>
+<style lang="scss">
+#playerUI #uiFeatures #controls {
+  display: none;
+}
+</style>

+ 1 - 1
src/layout/components/Navbar.vue

@@ -93,7 +93,6 @@ onMounted(() => {
   background-size: 100%;
   position: relative;
   color: #fff;
-  pointer-events: auto;
 
   img {
     //width: 18%;
@@ -134,6 +133,7 @@ onMounted(() => {
       justify-content: center;
       align-items: center;
       cursor: pointer;
+      pointer-events: auto;
 
       &:hover {
         color: #4791f8;

+ 10 - 2
src/layout/index.vue

@@ -3,7 +3,7 @@ import {AppMain, Navbar} from '@/layout/components/index.js'
 import AntvMap from '@/components/AntvMap/index.vue'
 import UePlayer from "@/components/UePlayer.vue";
 import {useAppStore} from "@/stores/app";
-import {watch} from "vue";
+import {onMounted, watch} from "vue";
 import {useRoute} from "vue-router";
 
 let navbarHeight = '12vh'
@@ -14,12 +14,20 @@ let navbarStyle = {height: navbarHeight}
 const appStore = useAppStore()
 const route = useRoute()
 
-watch(() => route.path, path => {
+function changeFloorType(path) {
   if (path === '/index') {
     appStore.changeFloorType('map')
   } else {
     appStore.changeFloorType('ue')
   }
+}
+
+watch(() => route.path, path => {
+  changeFloorType(path)
+})
+
+onMounted(() => {
+  changeFloorType(route.path)
 })
 </script>
 

+ 15 - 29
src/utils/mapConfig.ts

@@ -5,10 +5,11 @@ import {formatStringByTemplate} from "@/utils/string";
 import bus from "@/utils/bus";
 
 export let scene: Scene;
+// 加载状态
+export let loadedStatus = false;
 export const imageMap = new Map()
 
 function loadImage(images: any[]) {
-  debugger
   images.forEach((item: any) => {
     if (!imageMap.has(item.name)) {
       imageMap.set(item.name, item.src);
@@ -30,6 +31,7 @@ export function init(config: any) {
   });
 
   scene.on('loaded', () => {
+    loadedStatus = true
     loadBaseLayer()
 
     // 加载图片
@@ -49,7 +51,8 @@ export function init(config: any) {
  * 加载底图
  */
 function loadBaseLayer() {
-  const url1 = 'https://t0.tianditu.gov.cn/img_w/wmts?tk=b72aa81ac2b3cae941d1eb213499e15e&';
+  // 底图服务
+  const url1 = 'https://t0.tianditu.gov.cn/img_w/wmts?tk=a4eab5a1b0d94268669e192b8799f626&';
   const layer1 = new RasterLayer().source(url1, {
     parser: {
       type: 'rasterTile',
@@ -63,33 +66,16 @@ function loadBaseLayer() {
   });
   scene.addLayer(layer1);
 
-  // // 天地图卫片地图
-  // scene.on('loaded', () => {
-  //   // 底图服务
-  //   const baseLayer = new RasterLayer({zIndex: 1})
-  //     .source(
-  //       `https://t1.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk=${this.token}`,
-  //       {
-  //         parser: {
-  //           type: 'rasterTile',
-  //           tileSize: 256,
-  //         }
-  //       }
-  //     );
-  //   // 注记服务
-  //   const annotionLayer = new RasterLayer({zIndex: 2})
-  //     .source(
-  //       `https://t1.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk=${this.token}`,
-  //       {
-  //         parser: {
-  //           type: 'rasterTile',
-  //           tileSize: 256,
-  //         }
-  //       }
-  //     );
-  //   scene.addLayer(baseLayer);
-  //   scene.addLayer(annotionLayer);
-  // });
+  // const baseLayer = new RasterLayer().source(
+  //   `https://t1.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk=a4eab5a1b0d94268669e192b8799f626}`,
+  //   {
+  //     parser: {
+  //       type: 'rasterTile',
+  //       tileSize: 256,
+  //     }
+  //   }
+  // );
+  // scene.addLayer(baseLayer);
 }
 
 /**