Browse Source

加注释

qinhouyu 8 months atrás
parent
commit
df75baa4f4
1 changed files with 15 additions and 12 deletions
  1. 15 12
      screen-demo/src/views/templateInstance.vue

+ 15 - 12
screen-demo/src/views/templateInstance.vue

@@ -300,9 +300,10 @@ export default {
     });
   },
   methods: {
+    //树懒加载 + setValue  飞与高亮
     loadOptions(node, resolve) {
       if (node.level > 2) return resolve([]); // Adjust the maximum level allowed for selection
-      if (!this.isLoading && node.data.id) {
+      if (!this.isLoading && node.data.areaCode) {
         this.setValue(node)
         this.isLoading = true;
         setTimeout(() => {
@@ -453,8 +454,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){
@@ -1243,11 +1244,12 @@ export default {
      * @param mapDom 地图实例
      */
     addPoint3D(mapDom) {
+      console.log('1',this.markPoints)
       // 删除所有点
       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 = {
@@ -1314,6 +1316,7 @@ export default {
      * @param mapDom 地图实例
      */
     addPoint(mapDom) {
+      console.log('1',this.markPoints)
       let arr = mapDom.getLayers().array_;
       arr = arr.filter((v) => v.className_ && v.className_ === "mark");
       // 判断之前是否有打点信息,有打点信息就删掉之前的打点信息
@@ -1338,7 +1341,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'),
               }),
             })
         );
@@ -2562,15 +2565,15 @@ progress::-webkit-progress-value {
     background-image: linear-gradient(to bottom, #132132,#3361A5) !important;
     border: 1px solid #B1DEFD;
   }
-  .router-item {
-    background-image: linear-gradient(to bottom, #132132, #496fa6) !important;
-    display: flex;
-    justify-content: space-between;
-    margin-bottom: 0px;
-    font-size: 14px;
-  }
 }
 
+.router-item {
+  background-image: linear-gradient(to bottom, #132132, #496fa6) !important;
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 0;
+  font-size: 14px;
+}
 
 .alias {
   font-weight: bold;