From 9da22cf3d447bf01576fb1051445c57fb3292f8e Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 04 Aug 2022 16:33:29 +0800
Subject: [PATCH] 大屏地图上图标更改

---
 public/img/icon/map-jk.png   |    0 
 src/views/home/index.vue     |   27 +++++++++++++++++++++++++--
 public/img/icon/map-sz.png   |    0 
 public/img/icon/sz.png       |    0 
 public/img/icon/map-tr.png   |    0 
 src/components/map/index.vue |    4 ++--
 public/img/icon/map-qx.png   |    0 
 7 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/public/img/icon/map-jk.png b/public/img/icon/map-jk.png
new file mode 100644
index 0000000..88563fa
--- /dev/null
+++ b/public/img/icon/map-jk.png
Binary files differ
diff --git a/public/img/icon/map-qx.png b/public/img/icon/map-qx.png
new file mode 100644
index 0000000..2b2e5ef
--- /dev/null
+++ b/public/img/icon/map-qx.png
Binary files differ
diff --git a/public/img/icon/map-sz.png b/public/img/icon/map-sz.png
new file mode 100644
index 0000000..39b7ce8
--- /dev/null
+++ b/public/img/icon/map-sz.png
Binary files differ
diff --git a/public/img/icon/map-tr.png b/public/img/icon/map-tr.png
new file mode 100644
index 0000000..113da6a
--- /dev/null
+++ b/public/img/icon/map-tr.png
Binary files differ
diff --git a/public/img/icon/sz.png b/public/img/icon/sz.png
new file mode 100644
index 0000000..36e90a7
--- /dev/null
+++ b/public/img/icon/sz.png
Binary files differ
diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index f33ce91..7f6354f 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -284,7 +284,7 @@
                     far: 3000 // 最远距离
                 }, // 根据距离设置可见
                 font: '12px',
-                pixelOffset: { x: 0, y: -26 } // 偏移像素
+                pixelOffset: { x: 0, y: -32 } // 偏移像素
             })
 
             label.on(global.DC.MouseEventType.CLICK, (e) => {
@@ -292,7 +292,7 @@
             })
 
             const billboard = new global.DC.Billboard(new global.DC.Position(Number(item.lon), Number(item.lat)), url)
-            billboard.size = [18, 18]
+            billboard.size = [20, 28]
             billboard.attrParams = item
 
             billboard.on(global.DC.MouseEventType.CLICK, (e) => {
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index de27920..13de9b2 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -315,6 +315,10 @@
                     <div class="icon"></div>
                     <div class="title">气象监测</div>
                 </li>
+                <li>
+                    <div class="icon"></div>
+                    <div class="title">水质监测</div>
+                </li>
             </ul>
         </div>
 
@@ -1303,10 +1307,22 @@
                     that.equipmentList = res.data.data
 
                     that.equipmentList.staList.forEach(item => {
-                        that.$refs.modalForm.addSiteEntity(item, '/img/icon/jk.png')
+                        // 气象
+                        if (item.dictTypeNum == 1) {
+                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-qx.png')
+                        } else if (item.dictTypeNum == 2) {
+                            // 空气
+                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-qx.png')
+                        } else if (item.dictTypeNum == 3) {
+                            // 水质
+                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-sz.png')
+                        } else if (item.dictTypeNum == 4) {
+                            // 土壤
+                            that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-tr.png')
+                        }
                     })
                     that.equipmentList.vidList.forEach(item => {
-                        that.$refs.modalForm.addSiteEntity(item, '/img/icon/jk.png')
+                        that.$refs.modalForm.addSiteEntity(item, '/img/icon/map-jk.png')
                     })
                 }
             })
@@ -2126,6 +2142,13 @@
                     background-size: 100% 100%;
                 }
             }
+
+            li:nth-child(6) {
+                .icon {
+                    background: url(/img/icon/sz.png) no-repeat;
+                    background-size: 100% 100%;
+                }
+            }
         }
     }
 

--
Gitblit v1.9.3