Bläddra i källkod

工程现场 大屏界面修改

zhanghao 1 månad sedan
förälder
incheckning
315142ae5a
2 ändrade filer med 23 tillägg och 4 borttagningar
  1. 20 4
      src/views/pad/map/map.vue
  2. 3 0
      src/views/screen/map/map.vue

+ 20 - 4
src/views/pad/map/map.vue

@@ -423,7 +423,7 @@ export default {
               show: true, // 显示区域名称
               color: "#FFF", // 文字颜色
               fontSize: 16, // 文字大小
-              fontWeight: 300, // 字重
+              fontWeight: 500, // 字重
               emphasis: { color: "#fff" }, // 悬浮时的文字颜色
             },
             data: this.area
@@ -489,6 +489,8 @@ export default {
                   coordinate.push(it.ordinate)
                   obj.coordinate = coordinate
                   obj.name = it.projectName
+                  obj.appOrg = it.appOrg
+                  obj.subdivision = it.subdivision
                   this.projectList.push(obj)
                 }
                 this.sign = 1
@@ -573,16 +575,26 @@ export default {
           {
             type: "scatter", // 散点图(用于标注特殊位置)
             coordinateSystem: "geo", // 使用 `geo` 作为坐标系
+            symbol: "image://" + require("@/assets/images/main/map/xian.png"), // 自定义标记
+            symbolSize: 12, // 标记的大小
+            data: this.projectList.filter(({ subdivision }) => subdivision <= 10).map(({ name, coordinate }) => ({
+              name, // 点名称
+              value: coordinate // 经纬度坐标
+            })),
+          },
+          {
+            type: "scatter", // 散点图(用于标注特殊位置)
+            coordinateSystem: "geo", // 使用 `geo` 作为坐标系
             symbol: 'circle', // 自定义标记
-            symbolSize: 10, // 标记的大小
+            symbolSize: 12, // 标记的大小
             itemStyle: {
               color: 'yellow'
             },
-            data: this.projectList.map(({ name, coordinate }) => ({
+            data: this.projectList.filter(({ subdivision }) => subdivision > 10).map(({ name, coordinate }) => ({
               name, // 点名称
               value: coordinate // 经纬度坐标
             })),
-          },
+          }
         ]
       };
       echarts.registerMap("child", this.dataSource[cityName])
@@ -594,6 +606,9 @@ export default {
         } else if (params.componentType === "series") {
           // 点击的是自定义图标(scatter)
           console.log(params.data.value)
+          if (Array.isArray(params.data.value)){
+            return
+          }
           this.appOrg = params.data.value
           this.$emit('transmit', this.appOrg)
           // 销毁当前图表实例
@@ -727,6 +742,7 @@ export default {
                 obj.coordinate = coordinate
                 obj.name = it.projectName
                 obj.appOrg = it.appOrg
+                obj.subdivision = it.subdivision
                 this.projectList.push(obj)
               }
               this.sign = 1

+ 3 - 0
src/views/screen/map/map.vue

@@ -606,6 +606,9 @@ export default {
         } else if (params.componentType === "series") {
           // 点击的是自定义图标(scatter)
           console.log(params.data.value)
+          if (Array.isArray(params.data.value)){
+            return
+          }
           this.appOrg = params.data.value
           this.$emit('transmit', this.appOrg)
           // 销毁当前图表实例