Browse Source

Merge branch 'master' of http://192.168.2.21:11666/chenlong/xx_sw_dp

cl 1 year ago
parent
commit
8c437b6ba4

+ 1 - 1
.env.development

@@ -88,5 +88,5 @@ VITE_GLOB_BASE_IMG = http://192.168.2.111:8001
 
 #自动更新数据时间update
 VITE_GLOB_UPDATE_TIME = 5000
-#自动更新数据时间map
+#自动更新数据时间map 更新地图站点数据时间
 VITE_GLOB_UPDATE_TIME_MP = 1200000

+ 1 - 1
index.html

@@ -109,7 +109,7 @@
         min-width: 120px;
         height: 56px;
         color: #fff;
-        padding:2px 10px;
+        padding:2px 6px;
         background-size: 100% 260px;
         overflow: hidden;
       }

BIN
public/static/img/legend/shuiwei.png


BIN
public/static/img/legend/shuiwen.png


BIN
public/static/img/siteimg/shuiwei.png


BIN
public/static/img/siteimg/shuiwen.png


BIN
public/static/img/siteimg/yuliang2.png


+ 9 - 3
src/utils/TFMapUitl.ts

@@ -263,11 +263,14 @@ class TFMapUitl {
    */
   clearPointLocation_list(map) {
     if(window.breathMarker){
+      window.breathMarker.update()
       window.breathMarker.breathe()
       window.breathMarker=null
     }
     window.impointFlag=true
-    window.getImportSites()
+    if(!window.isThematicMap){
+      window.getImportSites()
+    } 
     this.active();
     map.viewer.entities.removeById(this.PointLocation_listId);
     map.removeOverlay(this.bwClass);
@@ -415,10 +418,11 @@ class TFMapUitl {
     </div>`;
     for (let j = 0; j < i.sensor?.length; j++) {
       str2 += `<li><span> ${i.sensor[j].sensor_name} </span>  <br/>
-      <span style=" display: inline-block;"><span style="font-size:17px;color:#00A2FF; display: inline-block;margin-right:5px"> ${i.sensor[j].sensor_name.indexOf('风向') ==-1 ? i.sensor[j].real_value : this.setWd(i.sensor[j].real_value)}</span><span style="font-size:14px; display: inline-block;margin-right:10px"> ${i.sensor[j].sensor_name.indexOf('风向') ==-1  ? i.sensor[j].dchar : ''}</span>     ${i.sensor[j].real_time?.slice(11, 16)}</span></li>`
+      <span style=" display: inline-block;"><span style="font-size:17px;color:#00A2FF; display: inline-block;margin-right:5px"> ${i.sensor[j].sensor_name.indexOf('风向') ==-1 ? i.sensor[j].real_value : this.setWd(i.sensor[j].real_value)}</span><span style="font-size:14px; display: inline-block;margin-right:10px"> ${i.sensor[j].sensor_name.indexOf('风向') ==-1  ? i.sensor[j].dchar : ''}</span>     ${i.sensor[j].real_time?.slice(5, 16)}</span></li>`
     }
     return str + str2 + str3
   }
+  // 重要测站点
   impotPointDom(i) {
     const data = JSON.stringify(i).replace(/\"/g, "'");
     let str = 
@@ -433,7 +437,7 @@ class TFMapUitl {
       <span style="font-family: Source Han Sans CN;
       font-size: 14px;
       font-weight: 500;
-      color: #FFFFFF;margin-right:10px;"><span style="margin-right:10px">${i.st_name}</span> ${i.data_real[j].real_time?.slice(11, 16)}</span> 
+      color: #FFFFFF;margin-right:10px;"><span style="margin-right:10px">${i.st_name}</span> ${i.data_real[j].real_time?.slice(5, 16)}</span> 
       <img style="display: inline-block;width:12px"  title='查看详情' onclick="siteDetail(${data})" src='./static/img/detailArrow.png' />
       </div>
       <div style="width:100%">
@@ -766,10 +770,12 @@ class TFMapUitl {
  */
   setSTMarkerPopup(e) {
     if(window.breathMarker){
+      window.breathMarker.update()
       window.breathMarker.breathe()
       window.breathMarker=null
     }
     if (e && e.graphic && e.graphic.overlay) {
+        e.graphic.overlay.update()
         e.graphic.overlay.breathe(0,0)
         window.breathMarker=e.graphic.overlay
     }

+ 345 - 313
src/views/map/Map.vue

@@ -67,7 +67,7 @@ import fenquData from './fenqu.json';
 import { useMessage } from '/@/hooks/web/useMessage';
 import  './range.js'
 import { getAppEnvConfig } from '/@/utils/env';
-const { VITE_GLOB_UPDATE_TIME } = getAppEnvConfig();
+const { VITE_GLOB_UPDATE_TIME_MP } = getAppEnvConfig();
 let dzdxInfoList = null;
 let gcInfoList = null;
 let monitorSensorsList = null;
@@ -99,6 +99,7 @@ export default defineComponent({
       dialogvisable.value = i;
     };
     const rainData = ref([]);
+    const rainDataRange = ref({});
     const rainDatafq = ref([
       { name: '羊村—米林', value: 0 },
       { name: '米林—尼西—玉松', value: 0 },
@@ -122,6 +123,7 @@ export default defineComponent({
       qixiangData.value = [...basicStore.getStDetailInfo.st_wea_general, ...basicStore.getStDetailInfo.st_wea_standard];
       // 关闭基础图层
       if (val.flag) {
+        window.isThematicMap=true
         window.clearImpoint()
         map.showOverlay('shuiwenzhan*', false);
         map.showOverlay('shuiweizhan*', false);
@@ -165,7 +167,8 @@ export default defineComponent({
                   }
                 });
               });
-              eventBus.emit('rainLegend', {max:Math.max(...arr),min:Math.min(...arr)});
+              rainDataRange.value={max:Math.max(...arr),min:Math.min(...arr)}
+              eventBus.emit('rainLegend2', {max:Math.max(...arr),min:Math.min(...arr)});
               // 更新点
               uprainAreaLayer()
             }
@@ -228,6 +231,7 @@ export default defineComponent({
           });
         }
       } else {
+        window.isThematicMap=false
         // 获取重要测站点
         window.impointFlag=true
         window.getImportSites()
@@ -289,11 +293,13 @@ export default defineComponent({
           // console.log(marker.info, 74);
           marker.addListener(map, (e) => {
             if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }
               if (e && e.graphic && e.graphic.overlay) {
-                  e.graphic.breathe(0,0.3)
+                e.graphic.overlay.update()
+                e.graphic.overlay.breathe(-0.3,0.3)
                   window.breathMarker=e.graphic.overlay
               }
             var i = e.graphic.overlay.info
@@ -304,18 +310,44 @@ export default defineComponent({
         }
       });
     };
-    const colors = [
-    { min: 2000, max: 99999, color: "#ffffff" },
-    { min: 250, max: 2000, color: "#84003f" },
-    { min: 100, max: 250, color: "#fa00fa" },
-    { min: 50, max: 100, color: "#0000fe" },
-    { min: 25, max: 50, color: "#61b8ff" },
-    { min: 10, max: 25, color: "#3db93d" },
-    { min: 1, max: 10, color: "#a6f28e" },
-    { min: 0, max: 1, color: "rgb(234, 234, 234)" },
-    ]
+    
     // 更新面雨量分布图
     const uprainAreaLayer = () => {
+      let colors=[]
+      if(rainDataRange.value.max>0.5){
+        let level1=Number(((rainDataRange.value.max-0.5)/3 +0.5).toFixed(2)) 
+        let level2= Number((((rainDataRange.value.max-0.5)/3)*2 +0.5).toFixed(2))
+        colors = [
+        { min: rainDataRange.value.max, max: 9999, color: "rgba(0,0,0,0)" },
+        { min: level2, max: rainDataRange.value.max, color: "#3660bd" },
+        { min: level1, max: level2, color: "#638cc9" },
+        { min: 0.5, max: level1, color: "#7d8fbb" },
+        { min: 0, max: 0.5, color: "rgba(0,0,0,0)" },
+        ]
+      }else{
+        colors = [
+        { min: 7, max: 999, color: "rgba(0,0,0,0)" },
+        { min: 4.83, max: 7, color: "#3660bd" },
+        { min: 2.67, max: 4.83, color: "#638cc9" },
+        { min: 0.5, max: 2.67, color: "#7d8fbb" },
+        { min: 0, max: 0.5, color: "rgba(0,0,0,0)" },
+        ]
+      }
+      // const colors = [
+      // { min: 7, max: 999, color: "rgba(0,0,0,0)" },
+      // { min: 4.83, max: 7, color: "#3660bd" },
+      // { min: 2.67, max: 4.83, color: "#638cc9" },
+      // { min: 0.5, max: 2.67, color: "#7d8fbb" },
+      // { min: 0, max: 0.5, color: "rgba(0,0,0,0)" },
+      // // { min: 2000, max: 99999, color: "#ffffff" },
+      // // { min: 250, max: 2000, color: "#84003f" },
+      // // { min: 100, max: 250, color: "#fa00fa" },
+      // // { min: 50, max: 100, color: "#0000fe" },
+      // // { min: 25, max: 50, color: "#61b8ff" },
+      // // { min: 10, max: 25, color: "#3db93d" },
+      // // { min: 1, max: 10, color: "#a6f28e" },
+      // // { min: 0, max: 1, color: "rgb(234, 234, 234)" },
+      // ]
       // window.mapConfig.isosurfaceUrl='http://106.12.170.138:4001/isosurface'
       rainData.value.forEach(i=>{
         if(Number(i.value)){
@@ -377,11 +409,12 @@ export default defineComponent({
           // console.log(marker.info, 74);
           marker.addListener(map, (e) => {
             if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }
               if (e && e.graphic && e.graphic.overlay) {
-                  e.graphic.overlay.breathe(0,0.3)
+                  e.graphic.overlay.breathe(-0.3,0.3)
                   window.breathMarker=e.graphic.overlay
               }
             var i = e.graphic.overlay.info
@@ -508,7 +541,11 @@ export default defineComponent({
                 console.log(i,887)
                     // siteDetail(i);
                     // 高亮点
-                    window.breathMarker&& window.breathMarker.breathe();window.breathMarker=null
+                    if(window.breathMarker){
+                  window.breathMarker.update()
+                  window.breathMarker.breathe();
+                  window.breathMarker=null
+                }
                     window.breathMarker=map.findOverlay(`gcd&${i.stcd}`)
                     window.breathMarker.breathe(0,0.3)
               }
@@ -560,11 +597,17 @@ export default defineComponent({
               () => {
                 // siteDetail(i);
                 // 高亮点
-                window.breathMarker&& window.breathMarker.breathe();window.breathMarker=null
+                if(window.breathMarker){
+                  window.breathMarker.update()
+                  window.breathMarker.breathe();
+                  window.breathMarker=null
+                }
                 window.breathMarker=map.findOverlay(`gcd&${i.stcd}`)
                 if(i.st_type == 1||i.st_type==2||i.st_type==4){
+                  window.breathMarker.update()
                   window.breathMarker.breathe(0,0.3)
                 }else{
+                  window.breathMarker.update()
                   window.breathMarker.breathe()
                 }
                 
@@ -606,6 +649,8 @@ export default defineComponent({
   },
 
   mounted() {
+     // 进入专题图模式
+    window.isThematicMap=false
     window.impointFlag=true
     const geologicalStore = useGeologicalStore();
     const monitorDevicesStore = useMonitorDevicesStore();
@@ -620,7 +665,10 @@ export default defineComponent({
 
       this.getGCSite();
       // 二十分钟更新一次测站点信息
-      setInterval(()=>{ 
+      setInterval(()=>{
+        if(window.isThematicMap){
+          return
+        } 
         // 移除重新加载
         map.removeOverlay('shuiwenzhan*');
           map.removeOverlay('shuiweizhan*');
@@ -629,7 +677,7 @@ export default defineComponent({
           map.removeOverlay('biaozhunqixiangzhan*');
           map.removeOverlay('tanshuitongliangzhan*');
           this.getStDetailInfoAxios();
-      },VITE_GLOB_UPDATE_TIME)
+      },VITE_GLOB_UPDATE_TIME_MP)
       // rainMap({"start_time":"2023-07-05 10:00:00","end_time":"2023-07-05 01:00:00"})
       // //地灾点
       // this.getDzdxInfo(geologicalStore);
@@ -1003,229 +1051,229 @@ export default defineComponent({
       //   });
     },
 
-    getWater(monitorDevicesStore) {
-      monitorDevicesStore
-        .waterDevice({
-          pageNo: 1,
-          pageSize: 1000,
-        })
-        .then((res) => {
-          console.log('', res);
-          let devRes = {
-            success: true,
-            message: '',
-            code: 200,
-            result: {
-              records: [
-                {
-                  id: '90610001',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:12',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '羊村水文站',
-                  hydrologyDeviceCode: '90610001',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区山南市桑日县羊村',
-                  hydrologyDeviceLon: 91.816667,
-                  hydrologyDeviceLat: 29.266667,
-                  hydrologyDeviceonline: 0,
-                  catchmentArea: 153191,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '离线',
-                },
-                {
-                  id: '90610002',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:12',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '朗县水文站',
-                  hydrologyDeviceCode: '90610002',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: null,
-                  hydrologyDeviceLon: 93.033333,
-                  hydrologyDeviceLat: 29.05,
-                  hydrologyDeviceonline: 0,
-                  catchmentArea: 162844,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '离线',
-                },
-                {
-                  id: '90610003',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:12',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: 'ML水文站',
-                  hydrologyDeviceCode: '90610003',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区林芝市米林县扎西绕登乡甲玛村',
-                  hydrologyDeviceLon: 94.233333,
-                  hydrologyDeviceLat: 29.233333,
-                  hydrologyDeviceonline: 1,
-                  catchmentArea: 172170,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '在线',
-                },
-                {
-                  id: '90610004',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:12',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '派镇水文站',
-                  hydrologyDeviceCode: '90610004',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: null,
-                  hydrologyDeviceLon: 94.866667,
-                  hydrologyDeviceLat: 29.516667,
-                  hydrologyDeviceonline: 0,
-                  catchmentArea: 192977,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '离线',
-                },
-                {
-                  id: '90610005',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:12',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '排龙水文站',
-                  hydrologyDeviceCode: '90610005',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区波密县境内',
-                  hydrologyDeviceLon: 95.05,
-                  hydrologyDeviceLat: 30.066667,
-                  hydrologyDeviceonline: 1,
-                  catchmentArea: 25656,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '在线',
-                },
-                {
-                  id: '90610006',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:12',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '汗密水文站',
-                  hydrologyDeviceCode: '90610006',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区林芝市墨脱县背崩乡汗密',
-                  hydrologyDeviceLon: 95.133333,
-                  hydrologyDeviceLat: 29.366667,
-                  hydrologyDeviceonline: 1,
-                  catchmentArea: 126,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '在线',
-                },
-                {
-                  id: '90610007',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:12',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '德兴水文站',
-                  hydrologyDeviceCode: '90610007',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区林芝市墨脱县德兴乡德兴村',
-                  hydrologyDeviceLon: 95.3,
-                  hydrologyDeviceLat: 29.316667,
-                  hydrologyDeviceonline: 1,
-                  catchmentArea: 225871,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '在线',
-                },
-                {
-                  id: '90610008',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:13',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '希让水文站',
-                  hydrologyDeviceCode: '90610008',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区林芝市墨脱县背崩乡希让村',
-                  hydrologyDeviceLon: 95.016667,
-                  hydrologyDeviceLat: 29.166667,
-                  hydrologyDeviceonline: 0,
-                  catchmentArea: 227409,
-                  isNew: 0,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '离线',
-                },
-                {
-                  id: '90610009',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:13',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '扎西绕登水文站',
-                  hydrologyDeviceCode: '90610009',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区林芝市米林县扎西绕登乡',
-                  hydrologyDeviceLon: 94.033333,
-                  hydrologyDeviceLat: 29.266667,
-                  hydrologyDeviceonline: 0,
-                  catchmentArea: 1050,
-                  isNew: 1,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '离线',
-                },
-                {
-                  id: '90610010',
-                  createBy: 'sw',
-                  createTime: '2023-07-11 14:48:13',
-                  updateBy: null,
-                  updateTime: '2023-07-13 00:00:01',
-                  hydrologyDeviceName: '尼西水文站',
-                  hydrologyDeviceCode: '90610010',
-                  hydrologyDeviceKind: 'L3SW',
-                  hydrologyDeviceLocation: '西藏自治区林芝市巴宜区尼西村',
-                  hydrologyDeviceLon: 94.2,
-                  hydrologyDeviceLat: 29.75,
-                  hydrologyDeviceonline: 0,
-                  catchmentArea: 16148,
-                  isNew: 1,
-                  hydrologyDeviceKind_dictText: '水文站',
-                  hydrologyDeviceonline_dictText: '离线',
-                },
-              ],
-              total: 94,
-              size: 10,
-              current: 1,
-              orders: [],
-              optimizeCountSql: true,
-              searchCount: true,
-              countId: null,
-              maxLimit: null,
-              pages: 10,
-            },
-            timestamp: 1689238515268,
-          };
-          monitorDevicesList = devRes.result.records;
-          monitorDevicesList.map((e) => {
-            e.deviceKind = e.hydrologyDeviceKind;
-            e.deviceLon = e.hydrologyDeviceLon;
-            e.deviceLat = e.hydrologyDeviceLat;
-            e.online = e.hydrologyDeviceonline;
-            e.deviceName = e.hydrologyDeviceName;
-            e.elevation = '0';
-            e.deviceCode = e.hydrologyDeviceCode;
-          });
-          // i.deviceLon, i.deviceLat, map.terrain ? i.elevation : 0
-          this.waterMarker(monitorDevicesList);
-          this.devicesMarkerWord(monitorDevicesList);
-          setTimeout(() => this.controlMarker(), 2000);
-        });
-    },
+    // getWater(monitorDevicesStore) {
+    //   monitorDevicesStore
+    //     .waterDevice({
+    //       pageNo: 1,
+    //       pageSize: 1000,
+    //     })
+    //     .then((res) => {
+    //       console.log('', res);
+    //       let devRes = {
+    //         success: true,
+    //         message: '',
+    //         code: 200,
+    //         result: {
+    //           records: [
+    //             {
+    //               id: '90610001',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:12',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '羊村水文站',
+    //               hydrologyDeviceCode: '90610001',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区山南市桑日县羊村',
+    //               hydrologyDeviceLon: 91.816667,
+    //               hydrologyDeviceLat: 29.266667,
+    //               hydrologyDeviceonline: 0,
+    //               catchmentArea: 153191,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '离线',
+    //             },
+    //             {
+    //               id: '90610002',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:12',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '朗县水文站',
+    //               hydrologyDeviceCode: '90610002',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: null,
+    //               hydrologyDeviceLon: 93.033333,
+    //               hydrologyDeviceLat: 29.05,
+    //               hydrologyDeviceonline: 0,
+    //               catchmentArea: 162844,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '离线',
+    //             },
+    //             {
+    //               id: '90610003',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:12',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: 'ML水文站',
+    //               hydrologyDeviceCode: '90610003',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区林芝市米林县扎西绕登乡甲玛村',
+    //               hydrologyDeviceLon: 94.233333,
+    //               hydrologyDeviceLat: 29.233333,
+    //               hydrologyDeviceonline: 1,
+    //               catchmentArea: 172170,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '在线',
+    //             },
+    //             {
+    //               id: '90610004',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:12',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '派镇水文站',
+    //               hydrologyDeviceCode: '90610004',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: null,
+    //               hydrologyDeviceLon: 94.866667,
+    //               hydrologyDeviceLat: 29.516667,
+    //               hydrologyDeviceonline: 0,
+    //               catchmentArea: 192977,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '离线',
+    //             },
+    //             {
+    //               id: '90610005',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:12',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '排龙水文站',
+    //               hydrologyDeviceCode: '90610005',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区波密县境内',
+    //               hydrologyDeviceLon: 95.05,
+    //               hydrologyDeviceLat: 30.066667,
+    //               hydrologyDeviceonline: 1,
+    //               catchmentArea: 25656,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '在线',
+    //             },
+    //             {
+    //               id: '90610006',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:12',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '汗密水文站',
+    //               hydrologyDeviceCode: '90610006',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区林芝市墨脱县背崩乡汗密',
+    //               hydrologyDeviceLon: 95.133333,
+    //               hydrologyDeviceLat: 29.366667,
+    //               hydrologyDeviceonline: 1,
+    //               catchmentArea: 126,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '在线',
+    //             },
+    //             {
+    //               id: '90610007',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:12',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '德兴水文站',
+    //               hydrologyDeviceCode: '90610007',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区林芝市墨脱县德兴乡德兴村',
+    //               hydrologyDeviceLon: 95.3,
+    //               hydrologyDeviceLat: 29.316667,
+    //               hydrologyDeviceonline: 1,
+    //               catchmentArea: 225871,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '在线',
+    //             },
+    //             {
+    //               id: '90610008',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:13',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '希让水文站',
+    //               hydrologyDeviceCode: '90610008',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区林芝市墨脱县背崩乡希让村',
+    //               hydrologyDeviceLon: 95.016667,
+    //               hydrologyDeviceLat: 29.166667,
+    //               hydrologyDeviceonline: 0,
+    //               catchmentArea: 227409,
+    //               isNew: 0,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '离线',
+    //             },
+    //             {
+    //               id: '90610009',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:13',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '扎西绕登水文站',
+    //               hydrologyDeviceCode: '90610009',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区林芝市米林县扎西绕登乡',
+    //               hydrologyDeviceLon: 94.033333,
+    //               hydrologyDeviceLat: 29.266667,
+    //               hydrologyDeviceonline: 0,
+    //               catchmentArea: 1050,
+    //               isNew: 1,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '离线',
+    //             },
+    //             {
+    //               id: '90610010',
+    //               createBy: 'sw',
+    //               createTime: '2023-07-11 14:48:13',
+    //               updateBy: null,
+    //               updateTime: '2023-07-13 00:00:01',
+    //               hydrologyDeviceName: '尼西水文站',
+    //               hydrologyDeviceCode: '90610010',
+    //               hydrologyDeviceKind: 'L3SW',
+    //               hydrologyDeviceLocation: '西藏自治区林芝市巴宜区尼西村',
+    //               hydrologyDeviceLon: 94.2,
+    //               hydrologyDeviceLat: 29.75,
+    //               hydrologyDeviceonline: 0,
+    //               catchmentArea: 16148,
+    //               isNew: 1,
+    //               hydrologyDeviceKind_dictText: '水文站',
+    //               hydrologyDeviceonline_dictText: '离线',
+    //             },
+    //           ],
+    //           total: 94,
+    //           size: 10,
+    //           current: 1,
+    //           orders: [],
+    //           optimizeCountSql: true,
+    //           searchCount: true,
+    //           countId: null,
+    //           maxLimit: null,
+    //           pages: 10,
+    //         },
+    //         timestamp: 1689238515268,
+    //       };
+    //       monitorDevicesList = devRes.result.records;
+    //       monitorDevicesList.map((e) => {
+    //         e.deviceKind = e.hydrologyDeviceKind;
+    //         e.deviceLon = e.hydrologyDeviceLon;
+    //         e.deviceLat = e.hydrologyDeviceLat;
+    //         e.online = e.hydrologyDeviceonline;
+    //         e.deviceName = e.hydrologyDeviceName;
+    //         e.elevation = '0';
+    //         e.deviceCode = e.hydrologyDeviceCode;
+    //       });
+    //       // i.deviceLon, i.deviceLat, map.terrain ? i.elevation : 0
+    //       this.waterMarker(monitorDevicesList);
+    //       this.devicesMarkerWord(monitorDevicesList);
+    //       setTimeout(() => this.controlMarker(), 2000);
+    //     });
+    // },
 
     //获取传感器列表
     getMonitorSensorsList(monitorDevicesStore) {
@@ -1731,10 +1779,12 @@ export default defineComponent({
             marker.info = i;
             marker.addListener(map, e => {
               if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }
               if (e && e.graphic && e.graphic.overlay) {
+                  e.graphic.overlay.update()
                   e.graphic.overlay.breathe(0,0.3)
                   window.breathMarker=e.graphic.overlay
               }
@@ -1764,10 +1814,12 @@ export default defineComponent({
             marker.info = i;
             marker.addListener(map, e =>{
               if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }
               if (e && e.graphic && e.graphic.overlay) {
+                  e.graphic.overlay.update()
                   e.graphic.overlay.breathe(0,0.3)
                   window.breathMarker=e.graphic.overlay
               }
@@ -1782,38 +1834,39 @@ export default defineComponent({
         } else if (i.st_type == 4) {
           i.typeName = '雨量站';
           if (i.lat && i.lng) {
-            let canvas = document.createElement('canvas');
-            let context = canvas.getContext('2d');
-            let textWidth = 14;
-            canvas.width = 20;
-            canvas.height = 20;
-            let x = 0.8;
-            let y = 0.8;
-            let w = canvas.width;
-            let h = canvas.height;
-            let r = 5;
-            // 缩放
-            context.scale(0.8, 0.8);
-            // context.fillStyle = 'rgba(0,0,0,0.5)'
-            context.fillStyle = '#e7e7e7';
-            // context.fillStyle = 'rgba(231, 231, 231,0.9)'
-            // 阴影
-            context.shadowOffsetX = 5;
-            context.shadowOffsetY = 5;
-            context.shadowBlur = 2;
-            context.shadowColor = 'rgba(0,0,0,0.5)';
-            // 绘制圆角矩形
-            context.beginPath();
-            context.arc(w, h, r, 0, 2 * Math.PI);
-            context.closePath();
-            context.fill();
-
-            var marker = new TFMap.Marker({ x: i.lng, y: i.lat, z: i.high }, canvas, {
+            // let canvas = document.createElement('canvas');
+            // let context = canvas.getContext('2d');
+            // let textWidth = 14;
+            // canvas.width = 20;
+            // canvas.height = 20;
+            // let x = 0.8;
+            // let y = 0.8;
+            // let w = canvas.width;
+            // let h = canvas.height;
+            // let r = 5;
+            // // 缩放
+            // context.scale(0.8, 0.8);
+            // // context.fillStyle = 'rgba(0,0,0,0.5)'
+            // context.fillStyle = '#e7e7e7';
+            // // context.fillStyle = 'rgba(231, 231, 231,0.9)'
+            // // 阴影
+            // context.shadowOffsetX = 5;
+            // context.shadowOffsetY = 5;
+            // context.shadowBlur = 2;
+            // context.shadowColor = 'rgba(0,0,0,0.5)';
+            // // 绘制圆角矩形
+            // context.beginPath();
+            // context.arc(w, h, r, 0, 2 * Math.PI);
+            // context.closePath();
+            // context.fill();
+
+            var marker = new TFMap.Marker({ x: i.lng, y: i.lat, z: i.high }, './static/img/siteimg/yuliang.png', {
               scale: 1.2,
             })
-              // .action('./static/img/gc2.png')
+              .action('./static/img/siteimg/yuliang2.png')
               .init()
               .pierce();
+
             marker.setId('gcd&' + i.stcd);
             const tempClass = TFMapUitl.getId('gcd', i.stcd) + '*' + ',' + TFMapUitl.specialControl.yuliangzhan;
             marker.setClassify(tempClass);
@@ -1822,10 +1875,12 @@ export default defineComponent({
             marker.info = i;
             marker.addListener(map, e => {
               if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }
               if (e && e.graphic && e.graphic.overlay) {
+                  e.graphic.overlay.update()
                   e.graphic.overlay.breathe(0,0.3)
                   window.breathMarker=e.graphic.overlay
               }
@@ -1872,10 +1927,12 @@ export default defineComponent({
             marker.info = i;
             marker.addListener(map, e => {
               if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }
               if (e && e.graphic && e.graphic.overlay) {
+                  e.graphic.overlay.update()
                   e.graphic.overlay.breathe(0,0.3)
                   window.breathMarker=e.graphic.overlay
               }
@@ -1904,10 +1961,12 @@ export default defineComponent({
             marker.info = i;
             marker.addListener(map, e => {
               if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }
               if (e && e.graphic && e.graphic.overlay) {
+                  e.graphic.overlay.update()
                   e.graphic.overlay.breathe(0,0)
                   window.breathMarker=e.graphic.overlay
               }
@@ -2067,6 +2126,8 @@ export default defineComponent({
       window.getImportSites=function (){
         window.impointInterval&&clearInterval(window.impointInterval)
         window.impointFlowInterval&&clearInterval(window.impointFlowInterval)
+        window.impointDataLength=0
+        window.impointDataLengthNow=0
         if(window.impointFlag&&!window.impointNotShow){
           getImportPoint().then(res=>{
                   if(res.code==200&&res.data){
@@ -2099,11 +2160,15 @@ export default defineComponent({
                           TFMapUitl.impotPointDom(data)
                         ).init()
                         if(i.st_name=='派镇'){
-                          markerWindow.setOff(-50, -10)
+                          markerWindow.setOff(-46, -10)
                         }else if(i.st_name=='德兴'){
-                          markerWindow.setOff(-52, 30)
+                          markerWindow.setOff(-50, 55)
                         }else if(i.st_name=='加热萨'){
-                          markerWindow.setOff(-54, 24)
+                          markerWindow.setOff(-54, 55)
+                        }else if(i.st_name=='尼西'){
+                          markerWindow.setOff(-54, -20)
+                        }else if(i.st_name=='ML'){
+                          markerWindow.setOff(-48, 0)
                         }
                         else{
                           markerWindow.setOff(-52, -0)
@@ -2194,11 +2259,15 @@ export default defineComponent({
                           TFMapUitl.impotPointDom(data)
                         ).init()
                         if(i.st_name=='派镇'){
-                          markerWindow.setOff(-50, -10)
+                          markerWindow.setOff(-46, -10)
                         }else if(i.st_name=='德兴'){
-                          markerWindow.setOff(-52, 30)
+                          markerWindow.setOff(-50, 55)
                         }else if(i.st_name=='加热萨'){
-                          markerWindow.setOff(-54, 20)
+                          markerWindow.setOff(-54, 55)
+                        }else if(i.st_name=='尼西'){
+                          markerWindow.setOff(-54, -20)
+                        }else if(i.st_name=='ML'){
+                          markerWindow.setOff(-48, 0)
                         }
                         else{
                           markerWindow.setOff(-52, -0)
@@ -2211,43 +2280,7 @@ export default defineComponent({
                         }
                       })
                     })
-                    // 单独记录每一个的指标数量和当前滚动位置
-                    // window.indexNumInfo=[]
-                    // window.impoint&&window.impoint.forEach(i=>{
-                    //           // console.log(i,'8383')
-                    //           window.indexNumInfo.push({
-                    //             impointDataLengthNow:0,
-                    //             impointDataLength:i.info.sensor.length?i.info.sensor.length:0
-                    //           })
-                    //         })
-                        // 指标滚动
-                        window.impointFlowInterval=
-                          setInterval(()=>{
-                            // window.indexNumInfo&&window.indexNumInfo.forEach((i,index)=>{
-                            //     if(i.impointDataLengthNow<i.impointDataLength-1){
-                            //     i.impointDataLengthNow++
-                            //   }else{
-                            //     i.impointDataLengthNow=0
-                            //   }
-                            //   jquery(`.impopup`).eq(index).children().css({'margin-top':`-${52*i.impointDataLengthNow}px`})
-                            // })
-                            if(window.impointDataLength){
-                              if(window.impointDataLengthNow<window.impointDataLength-1){
-                                window.impointDataLengthNow++
-                              }else{
-                                window.impointDataLengthNow=0
-                              }
-                                jquery('.impopup-content').css({'margin-top':`-${52*window.impointDataLengthNow}px`})
-                                 // 隐藏空白
-                                 window.impoint.forEach(i=>{
-                                if(i.info.data_real.length-1<window.impointDataLengthNow){
-                                    document.getElementById(i.id).style.display='none'
-                                  }else{
-                                    document.getElementById(i.id).style.display='block'
-                                  }
-                                })
-                              }                              
-                            },5000)  
+
                   }
                 })
              }
@@ -2272,7 +2305,6 @@ export default defineComponent({
                 })
                 window.impoint=[]
               }
-        
       }
       // 
       // 获取测站并更新测站高程

+ 192 - 144
src/views/map/changeMap.vue

@@ -92,13 +92,18 @@
         <img src="../../assets/images/changeMap/checktime.png" style="display: inline-block" @click="search" />
       </div>
     </div>
+    <div class="class-legend" v-show="mapLgendShow3">
+      <div style="border-radius: 25px 25px 0 0; background-color: #3f3dbd; color: #fff">mm</div>
+      <div v-for="item in rainLegendNow2" :style="item.style">{{ item.value }}</div>
+      <div style="border-radius: 0 0 25px 25px; background-color: #fff; color: #000; font-size: 12px">0</div>
+    </div>
     <div class="class-legend" v-show="mapLgendShow">
-      <div style="border-radius: 25px 25px 0 0;background-color: #3f3dbd;color: #fff;">mm</div>
+      <div style="border-radius: 25px 25px 0 0; background-color: #3f3dbd; color: #fff">mm</div>
       <div v-for="item in rainLegendNow" :style="item.style">{{ item.value }}</div>
-      <div style="border-radius: 0 0 25px 25px ;background-color: #eaeaea;color: #000;font-size: 12px;">无数据</div>
+      <div style="border-radius: 0 0 25px 25px; background-color: #eaeaea; color: #000; font-size: 12px">无数据</div>
     </div>
     <div class="class-legendtwo" v-show="mapLgendShow2">
-      <div style="border-radius: 25px 25px 0 0;background-color: #3f3dbd;color: #fff;">℃</div>
+      <div style="border-radius: 25px 25px 0 0; background-color: #3f3dbd; color: #fff">℃</div>
       <div v-for="item in wdLegendNow" :style="item.style">{{ item.value }}</div>
       <!-- <div style="border-radius: 0 0 25px 25px ;background-color: #3f3dbd;color: #fff;">0</div> -->
     </div>
@@ -123,45 +128,72 @@ const headInfo = ref('');
 const headInfoShow = ref(false);
 const mapLgendShow = ref(false);
 const mapLgendShow2 = ref(false);
+const mapLgendShow3 = ref(false);
+
+const rainLegendNow2 = ref();
+eventBus.on('rainLegend2', (e) => {
+  let colors = [];
+  if (Number(e.max) > 0.5) {
+    let level1=Number(((e.max-0.5)/3 +0.5).toFixed(2)) 
+        let level2= Number((((e.max-0.5)/3)*2 +0.5).toFixed(2))
+    colors = [
+      {
+        style: 'background:#7d8fbb',
+        value: `0.5~${level1}`,
+      },
+      {
+        style: 'background:#638cc9',
+        value: `${level1}~${level2}`,
+      },
+      {
+        style: 'background:#3660bd',
+        value: `${level2}~${e.max}`,
+      },
+    ];
+  }
 
+  // console.log(maxIndex,minIndex,maxcolor,mincolor)
+  rainLegendNow2.value = colors;
+  rainLegendNow2.value.reverse();
+});
 eventBus.on('rainLegend', (e) => {
-  let maxcolor= getColorVal(e.max)
-  let mincolor= getColorVal(e.min)
-  let maxIndex=0
-  let minIndex=0
-  rainLegend.forEach((i,index)=>{
-    if(i.style.split(':')[1]==maxcolor){
-      maxIndex=index
+  let maxcolor = getColorVal(e.max);
+  let mincolor = getColorVal(e.min);
+  let maxIndex = 0;
+  let minIndex = 0;
+  rainLegend.forEach((i, index) => {
+    if (i.style.split(':')[1] == maxcolor) {
+      maxIndex = index;
     }
-    if(i.style.split(':')[1]==mincolor){
-      minIndex=index
+    if (i.style.split(':')[1] == mincolor) {
+      minIndex = index;
     }
-  })
+  });
   // console.log(maxIndex,minIndex,maxcolor,mincolor)
-  rainLegendNow.value=rainLegend.slice(minIndex,maxIndex+1)
-  rainLegendNow.value.reverse()
-    });
+  rainLegendNow.value = rainLegend.slice(minIndex, maxIndex + 1);
+  rainLegendNow.value.reverse();
+});
 eventBus.on('wdLegend', (e) => {
-  let maxcolor= getWdColorVal(e.max)
-  let mincolor= getWdColorVal(e.min)
-  let maxIndex=0
-  let minIndex=0
-  wdLegend.forEach((i,index)=>{
-    if(i.style.split(':')[1]==maxcolor){
-      maxIndex=index
+  let maxcolor = getWdColorVal(e.max);
+  let mincolor = getWdColorVal(e.min);
+  let maxIndex = 0;
+  let minIndex = 0;
+  wdLegend.forEach((i, index) => {
+    if (i.style.split(':')[1] == maxcolor) {
+      maxIndex = index;
     }
-    if(i.style.split(':')[1]==mincolor){
-      minIndex=index
+    if (i.style.split(':')[1] == mincolor) {
+      minIndex = index;
     }
-  })
-  console.log(maxIndex,minIndex,maxcolor,mincolor)
-  wdLegendNow.value=wdLegend.slice(minIndex,maxIndex+1)
-  console.log(wdLegendNow.value,908)
-  wdLegendNow.value.reverse()
-    });
-const rainLegendNow=ref()
+  });
+  console.log(maxIndex, minIndex, maxcolor, mincolor);
+  wdLegendNow.value = wdLegend.slice(minIndex, maxIndex + 1);
+  console.log(wdLegendNow.value, 908);
+  wdLegendNow.value.reverse();
+});
+const rainLegendNow = ref();
 const rainLegend = reactive([
-{
+  {
     style: 'background:#fffdff',
     value: '0~1',
   },
@@ -190,73 +222,73 @@ const rainLegend = reactive([
     value: '>250',
   },
 ]);
-const wdLegendNow=ref([])
-const wdLegend=reactive([
-    {
-        "style": "background:#032b8b",
-        "value": "<-12"
-    },
-    {
-        "style": "background:#195da7",
-        "value": "-12~-8"
-    },
-    {
-        "style": "background:#1d75d4",
-        "value": "-8~-4"
-    },
-    {
-        "style": "background:#3f9fe9",
-        "value": "-4~0"
-    },
-    {
-        "style": "background:#82d1ff",
-        "value": "0~4"
-    },
-    {
-        "style": "background:#abe9f8",
-        "value": "4~8"
-    },
-    {
-        "style": "background:#cffcff",
-        "value": "8~12"
-    },
-    {
-        "style": "background:#f3fdee",
-        "value": "12~16"
-    },
-    {
-        "style": "background:#ccffcc",
-        "value": "16~20"
-    },
-    {
-        "style": "background:#bffb91",
-        "value": "20~24"
-    },
-    {
-        "style": "background:#fdfb96",
-        "value": "24~28"
-    },
-    {
-        "style": "background:#fef2c2",
-        "value": "28~32"
-    },
-    {
-        "style": "background:#fecda1",
-        "value": "32~35"
-    },
-    {
-        "style": "background:#f99782",
-        "value": "35~37"
-    },
-    {
-        "style": "background:#f55900",
-        "value": "37~40"
-    },
-    {
-        "style": "background:#e60101",
-        "value": ">40"
-    }
-])
+const wdLegendNow = ref([]);
+const wdLegend = reactive([
+  {
+    style: 'background:#032b8b',
+    value: '<-12',
+  },
+  {
+    style: 'background:#195da7',
+    value: '-12~-8',
+  },
+  {
+    style: 'background:#1d75d4',
+    value: '-8~-4',
+  },
+  {
+    style: 'background:#3f9fe9',
+    value: '-4~0',
+  },
+  {
+    style: 'background:#82d1ff',
+    value: '0~4',
+  },
+  {
+    style: 'background:#abe9f8',
+    value: '4~8',
+  },
+  {
+    style: 'background:#cffcff',
+    value: '8~12',
+  },
+  {
+    style: 'background:#f3fdee',
+    value: '12~16',
+  },
+  {
+    style: 'background:#ccffcc',
+    value: '16~20',
+  },
+  {
+    style: 'background:#bffb91',
+    value: '20~24',
+  },
+  {
+    style: 'background:#fdfb96',
+    value: '24~28',
+  },
+  {
+    style: 'background:#fef2c2',
+    value: '28~32',
+  },
+  {
+    style: 'background:#fecda1',
+    value: '32~35',
+  },
+  {
+    style: 'background:#f99782',
+    value: '35~37',
+  },
+  {
+    style: 'background:#f55900',
+    value: '37~40',
+  },
+  {
+    style: 'background:#e60101',
+    value: '>40',
+  },
+]);
 
 const disabledDate = (current) => {
   return current > moment(endData.value).valueOf();
@@ -399,7 +431,6 @@ const changeTime = (i) => {
 const searchID = ref();
 
 const setClass = (i) => {
-
   // 初始时间
   startData.value = moment().format('YYYY-MM-DD');
   startTime.value = '08';
@@ -414,25 +445,42 @@ const setClass = (i) => {
       bkclick[index] = false;
     }
   });
-  if(i==0||i==1||i==2){
-    mapLgendShow.value=true
-    mapLgendShow2.value=false
-  if(bkclick[i]){
-    mapLgendShow.value=true
-  }else{
-    mapLgendShow.value=false
-  }}else if(i==3){
-    mapLgendShow.value=false
-    mapLgendShow2.value=true
-    if(bkclick[i]){
-    mapLgendShow2.value=true
-  }else{
-    mapLgendShow.value=false
-    mapLgendShow2.value=false
-  }
-  }else{
-    mapLgendShow.value=false
-    mapLgendShow2.value=false
+
+  if (i == 0 || i == 1 || i == 2) {
+    if (i == 0) {
+      mapLgendShow3.value = true;
+      mapLgendShow.value = false;
+      mapLgendShow2.value = false;
+      if (bkclick[i]) {
+        mapLgendShow3.value = true;
+      } else {
+        mapLgendShow3.value = false;
+      }
+    } else {
+      mapLgendShow.value = true;
+      mapLgendShow2.value = false;
+      mapLgendShow3.value = false;
+      if (bkclick[i]) {
+        mapLgendShow.value = true;
+      } else {
+        mapLgendShow.value = false;
+      }
+    }
+  } else if (i == 3) {
+    mapLgendShow3.value = false;
+    mapLgendShow.value = false;
+    mapLgendShow2.value = true;
+    if (bkclick[i]) {
+      mapLgendShow2.value = true;
+    } else {
+      mapLgendShow.value = false;
+      mapLgendShow2.value = false;
+      mapLgendShow3.value = false;
+    }
+  } else {
+    mapLgendShow.value = false;
+    mapLgendShow2.value = false;
+    mapLgendShow3.value = false;
   }
   // eventBus.emit('legendColor', { maptype: searchID.value, flag: bkclick[searchID.value] });
   emit('changeMap', {
@@ -464,30 +512,29 @@ const getTip = (i) => {
   infoShow.value = true;
   if (mapStore.sideMenu) {
     if (i == '面雨量分布图') {
-    px.value = ' right: 500px;top: 370px;';
-  } else if (i == '站点雨量图') {
-    px.value = ' right: 500px;top: 400px;';
-  } else if (i == '分区雨量图') {
-    px.value = ' right: 500px;top: 420px;';
-  } else if (i == '站点温度图') {
-    px.value = ' right: 500px;top: 450px;';
-  } else if (i == '站点风速风向图') {
-    px.value = ' right: 500px;top: 480px;';
-  }
-  }else{
+      px.value = ' right: 500px;top: 370px;';
+    } else if (i == '站点雨量图') {
+      px.value = ' right: 500px;top: 400px;';
+    } else if (i == '分区雨量图') {
+      px.value = ' right: 500px;top: 420px;';
+    } else if (i == '站点温度图') {
+      px.value = ' right: 500px;top: 450px;';
+    } else if (i == '站点风速风向图') {
+      px.value = ' right: 500px;top: 480px;';
+    }
+  } else {
     if (i == '面雨量分布图') {
-    px.value = ' right: 70px;top: 370px;';
-  } else if (i == '站点雨量图') {
-    px.value = ' right: 70px;top: 400px;';
-  } else if (i == '分区雨量图') {
-    px.value = ' right: 70px;top: 420px;';
-  } else if (i == '站点温度图') {
-    px.value = ' right: 70px;top: 450px;';
-  } else if (i == '站点风速风向图') {
-    px.value = ' right: 70px;top: 480px;';
-  }
+      px.value = ' right: 70px;top: 370px;';
+    } else if (i == '站点雨量图') {
+      px.value = ' right: 70px;top: 400px;';
+    } else if (i == '分区雨量图') {
+      px.value = ' right: 70px;top: 420px;';
+    } else if (i == '站点温度图') {
+      px.value = ' right: 70px;top: 450px;';
+    } else if (i == '站点风速风向图') {
+      px.value = ' right: 70px;top: 480px;';
+    }
   }
-
 };
 const closetip = () => {
   infoShow.value = false;
@@ -625,6 +672,7 @@ const closetip = () => {
     line-height: 25px;
     text-align: center;
     color: #222;
+    padding: 0 4px;
   }
 }
 .class-legendtwo {
@@ -640,8 +688,8 @@ const closetip = () => {
     text-align: center;
     color: #222;
   }
-  &>div:last-child{
-    border-radius:0 0 25px 25px;
+  & > div:last-child {
+    border-radius: 0 0 25px 25px;
   }
 }
 </style>

+ 4 - 4
src/views/map/legend.vue

@@ -12,7 +12,7 @@
         }
       "
     >
-      <img src="../../assets/images/legend/legend.png" />
+      <img :src="'./static/img/legend/legend.png'" />
     </div>
     <!-- 图例模块 -->
     <div v-drag class="tuli" v-show="tuliType">
@@ -22,14 +22,14 @@
         </div>
         <div class="tuil-body">
           <div class="title2" @click="siteShow=!siteShow">
-            <img src="../../assets/images/legend/arrow.png" style="display: inline;margin-top: -4px;" v-if="siteShow"/>
-            <img src="../../assets/images/legend/arrow.png" style="display: inline;transform: rotate(-90deg);margin-top: -4px;" v-else/>
+            <img :src="'./static/img/legend/arrow.png'" style="display: inline;margin-top: -4px;" v-if="siteShow"/>
+            <img :src="'./static/img/legend/arrow.png'" style="display: inline;transform: rotate(-90deg);margin-top: -4px;" v-else/>
             <span>站点</span>
           </div>
           <div class="title2-body" v-if="siteShow">
             <div class="legend-item">
               <div class="img-box">
-                <img src="../../assets/images/legend/shuiwen.png" style="display: inline" />
+                <img :src="'./static/img/legend/shuiwen.png'" style="display: inline" />
               </div>
               水文站
             </div>

+ 1 - 0
src/views/map/toolBox.vue

@@ -489,6 +489,7 @@ export default defineComponent({
       } else if (i == 0) {
         this.flyHome();
         if(window.breathMarker){
+                window.breathMarker.update()
                 window.breathMarker.breathe()
                 window.breathMarker=null
               }