Преглед на файлове

Merge remote-tracking branch 'origin/master'

conghelong преди 8 месеца
родител
ревизия
83a9abbc0f
променени са 2 файла, в които са добавени 41 реда и са изтрити 37 реда
  1. BIN
      screen-demo/src/assets/offPoint.png
  2. 41 37
      screen-demo/src/views/templateInstance.vue

BIN
screen-demo/src/assets/offPoint.png


+ 41 - 37
screen-demo/src/views/templateInstance.vue

@@ -170,9 +170,13 @@
         <progress :max="5" :value="CameraZ.offlineCnt" class="progress"></progress>
       </div>
       <!-- echarts 图表容器 -->
-      <!-- 经纬度实时拾取 -->
+      <!-- 经纬度实时拾取 开始 -->
+      <br/>
+      <div>
+        <p><b><span id="mouse-position" style="color: #fff"></span></b></p>
+      </div>
     </div>
-      <p><b><span id="mouse-position"></span></b></p>
+    <!-- 经纬度实时拾取 结束 -->
   </div>
 </template>
 
@@ -535,8 +539,8 @@ export default {
         for (let i = 0; i < splitArr1.length; i++) {
           options.positions.push(splitArr1[i].split(','))
         }
-        let highlight= new CTMapOl.cesiumComponent.Highlight(this.mapType === "3D" ? this.map : this.map.map, options);
-        console.log(highlight)
+        // let highlight= new CTMapOl.cesiumComponent.Highlight(this.mapType === "3D" ? this.map : this.map.map, options);
+        // console.log(highlight)
       })
     },
     focus1(num){
@@ -1333,7 +1337,7 @@ export default {
       mapDom.entities.removeAll();
       // 格式化打点位置信息数据
       let data = this.markPoints.map((item) => {
-        return [`${item.longitude}, ${item.latitude}`, item, this.dropIcon, "10,10"]
+        return [`${item.longitude}, ${item.latitude}`, item, item.categorycode != '1' ? this.dropIcon : require('../assets/offPoint.png'), "10,10"]
       })
       // 打点数据信息
       let options = {
@@ -1426,7 +1430,7 @@ export default {
                 offset: [-36, -40],
                 offsetOrigin: "bottom-right",
                 size: [100, 100],
-                src: this.dropIcon,
+                src: v.categorycode != '1' ? this.dropIcon : require('../assets/offPoint.png'),
               }),
             })
         );
@@ -1754,40 +1758,40 @@ export default {
           {},
           {},
           "post"
-      ).then(() => {
-        // this.markPoints = res.data;
+      ).then((res) => {
+        this.markPoints = res.data;
         // 数据拟真 先写死 后期维护一个计算聚合点位的算法函数
         // 添加打点
         if (this.map) {
-          setTimeout(() => {
-            const data1 = [
-              { longitude: 116.05, latitude: 39.7, count: 50 },
-              { longitude: 116.39, latitude: 39.8, count: 113 },
-              { longitude: 116.53, latitude: 39.99, count: 88 },
-            ]
-            const data2 = [
-              { longitude: 116.01, latitude: 39.5, count: 12 },
-              { longitude: 116.12, latitude: 39.95, count: 16 },
-              { longitude: 116.23, latitude: 39.6, count: 6 },
-              { longitude: 116.34, latitude: 39.85, count: 6 },
-              { longitude: 116.45, latitude: 39.7, count: 3 },
-              { longitude: 116.56, latitude: 39.75, count: 12 },
-              { longitude: 116.67, latitude: 39.98, count: 3 },
-              { longitude: 116.78, latitude: 39.89, count: 12 }
-            ]
-            this.lcvs = new CTMapOl.extend.LayeredClusterViewShed(this.map.map, [
-              { data: this.transformProj(data1), maxZoom: 10, onClick: data => { console.log(data) } },
-              { data: this.transformProj(data2), minZoom: 10, maxZoom: 12, onClick: data => { console.log(data) } },
-              { data: this.transformProj(makeRandomData(3000)),minZoom: 12, onClick: data => { console.log(data) }}
-            ], {
-              minViewShed: 12,
-            })
-          })
-          // if (this.mapType === "3D") {
-          //   this.addPoint3D(this.map);
-          // } else {
-          //   this.addPoint(this.map.map);
-          // }
+          // setTimeout(() => {
+          //   const data1 = [
+          //     { longitude: 116.05, latitude: 39.7, count: 50 },
+          //     { longitude: 116.39, latitude: 39.8, count: 113 },
+          //     { longitude: 116.53, latitude: 39.99, count: 88 },
+          //   ]
+          //   const data2 = [
+          //     { longitude: 116.01, latitude: 39.5, count: 12 },
+          //     { longitude: 116.12, latitude: 39.95, count: 16 },
+          //     { longitude: 116.23, latitude: 39.6, count: 6 },
+          //     { longitude: 116.34, latitude: 39.85, count: 6 },
+          //     { longitude: 116.45, latitude: 39.7, count: 3 },
+          //     { longitude: 116.56, latitude: 39.75, count: 12 },
+          //     { longitude: 116.67, latitude: 39.98, count: 3 },
+          //     { longitude: 116.78, latitude: 39.89, count: 12 }
+          //   ]
+          //   this.lcvs = new CTMapOl.extend.LayeredClusterViewShed(this.map.map, [
+          //     { data: this.transformProj(data1), maxZoom: 10, onClick: data => { console.log(data) } },
+          //     { data: this.transformProj(data2), minZoom: 10, maxZoom: 12, onClick: data => { console.log(data) } },
+          //     { data: this.transformProj(makeRandomData(3000)),minZoom: 12, onClick: data => { console.log(data) }}
+          //   ], {
+          //     minViewShed: 12,
+          //   })
+          // })
+          if (this.mapType === "3D") {
+            this.addPoint3D(this.map);
+          } else {
+            this.addPoint(this.map.map);
+          }
         }
       });
       // 添加打点