Переглянути джерело

底图切换调整;分页增加单个疑点定位功能;

Bella 2 роки тому
батько
коміт
216c072ce0

+ 3 - 0
src/components/common/BottomForm/CustomModelDialog.vue

@@ -206,6 +206,9 @@ export default {
 
       // console.log(val, "checkedList");
     },
+    filterText(val){
+      this.$refs.transferTree.filter(val)
+    }
   },
   created() {
     this.checkedKeysArr = [];

+ 7 - 7
src/components/map/BasemapChange.vue

@@ -44,25 +44,25 @@ export default {
       state: {
         // 图片数组
         images: [
-          {
-            src: require("@/assets/map/darkmap.png"),
-            type: 1,
-            active: "SEA",
-            defalut: "SE",
-          },
           {
             src: require("@/assets/map/sat2022.png"),
             type: 0,
             active: "DXA",
             defalut: "DX",
           },
+          {
+            src: require("@/assets/map/darkmap.png"),
+            type: 1,
+            active: "SEA",
+            defalut: "SE",
+          },
+
           {
             src: require("@/assets/map/sat2019.png"),
             type: 2,
             active: "DXA1",
             defalut: "DX1",
           },
-          
         ],
         rightPX: 50, // 每张图片距离右侧的距离 * index
       },

+ 2 - 1
src/components/map/MapHolder.vue

@@ -23,7 +23,6 @@ import { streetLocation, townData } from "@/config/common";
 import CaseAuditPopup from "@/components/popup/CaseAuditPopup.vue";
 import NormalAttrPopup from "@/components/popup/NormalAttrPopup.vue";
 import LabelCasePopup from "@/components/popup/LabelCasePopup.vue";
-
 import coordinate from "@/utils/coordinate.js";
 import { nextTick } from "vue";
 export default {
@@ -798,6 +797,8 @@ export default {
         fillOpacity: 0,
       }).addTo(map2DViewer.analysisGroups[uniqueId]);
 
+      map2DViewer.polygons[cid] = polygon;
+
       polygon.on("click", (e) => {
         let geojsonData = geometry;
         // 所有图层下的疑点图层 -- 常规展示

+ 104 - 57
src/views/ComprehensiveAnalysis.vue

@@ -6,7 +6,7 @@
     element-loading-spinner="el-icon-loading"
     element-loading-background="rgba(0, 0, 0, 0.8)"
   >
-    <BasemapChange  style="pointer-events:auto;"/>
+    <BasemapChange style="pointer-events: auto" />
     <LawPopup class="comprehensive-analysis-law-popup" />
     <LabelCasePopup
       class="comprehensive-analysis-label-popup"
@@ -223,16 +223,31 @@
                   class="panel-list-item"
                   v-for="(v, i) in originalData[key]"
                   :key="v.id"
-                  @click.stop="listItemClick('default', v)"
                 >
+                  <div>
+                    {{
+                      v.title +
+                      "_" +
+                      ((paginationData.currentPage - 1) *
+                        paginationData.pageSize +
+                        (i + 1))
+                    }}
+                  </div>
+                  <span class="normal-icon">
+                    <el-button
+                      size="normal"
+                      type="text"
+                      icon="el-icon-location"
+                      @click.stop="locateCase(v)"
+                    ></el-button
+                    ><el-button
+                      size="normal"
+                      type="text"
+                      icon="el-icon-more"
+                      @click.stop="listItemClick('default', v)"
+                    ></el-button>
+                  </span>
                   <!-- {{ v.column_name + "_" + (i + 1) }} -->
-                  {{
-                    v.title +
-                    "_" +
-                    ((paginationData.currentPage - 1) *
-                      paginationData.pageSize +
-                      (i + 1))
-                  }}
                 </div>
                 <div class="panel-footer" @mouseenter="mouseenter(key)">
                   <Pagination :paginationData="paginationData" />
@@ -479,11 +494,27 @@ export default {
           oldVal.index &&
           oldVal.index === "3"
         ) {
+          // 不进入综合分析页面 -- 切换回暗黑地图
+          if (!map2DViewer.map.hasLayer(map2DViewer.layers["darkmap"])) {
+            map2DViewer.map.hasLayer(map2DViewer.layers["imagery"]) &&
+              map2DViewer.map.removeLayer(map2DViewer.layers["imagery"]);
+            map2DViewer.map.hasLayer(map2DViewer.layers["imagery2"]) &&
+              map2DViewer.map.removeLayer(map2DViewer.layers["imagery2"]);
+            map2DViewer.map.addLayer(map2DViewer.layers["darkmap"]);
+          }
           this.clearAllData();
           this.labelAllVisibleChecked = false;
         }
 
         if (val.index === "3") {
+          // 默认切换为最新航空影像图
+          if (!map2DViewer.map.hasLayer(map2DViewer.layers["imagery"])) {
+            map2DViewer.map.hasLayer(map2DViewer.layers["darkmap"]) &&
+              map2DViewer.map.removeLayer(map2DViewer.layers["darkmap"]);
+            map2DViewer.map.hasLayer(map2DViewer.layers["imagery2"]) &&
+              map2DViewer.map.removeLayer(map2DViewer.layers["imagery2"]);
+            map2DViewer.map.addLayer(map2DViewer.layers["imagery"]);
+          }
           // console.log("进入综合分析页面 -- 默认展开老港镇数据");
           setTimeout(() => {
             this.changeTownEvent(this.townSelectVal);
@@ -781,7 +812,13 @@ export default {
       this.updateCasePopupShow = false;
       map2DViewer.map.closePopup();
     },
-
+    // 右侧分页栏图斑定位
+    locateCase(data) {
+      console.log(data, "locateCase");
+      if (map2DViewer.polygons[data.id]) {
+        map2DViewer.map.fitBounds(map2DViewer.polygons[data.id].getBounds());
+      }
+    },
     labelAllLocate() {
       if (map2DViewer.groups["我的标记图层组"]) {
         map2DViewer.map.fitBounds(
@@ -792,6 +829,7 @@ export default {
     labelAllVisible() {
       this.labelAllVisibleChecked = !this.labelAllVisibleChecked;
     },
+
     mouseenter(val) {
       if (this.rightPanelDataMap.has(val)) {
         // 方便获取
@@ -901,49 +939,13 @@ export default {
               });
 
               // 所有图层可视化数据 -- 需要分页展示
-              if (mainType === "所有图层") {
-                // 激活当前展开面板
-                this.activeNames = ["myLabel", uniqueId];
-                // 用于分页数据
-                this.originalData[uniqueId] = this.originalDataMap
-                  .get(uniqueId)
-                  .map((ele) => {
-                    return {
-                      id: ele.id,
-                      // "垃圾堆放点"
-                      column_name: ele.column_name,
-                      // 是否疑点
-                      c_boolean: ele.c_boolean ? "是" : "否",
-                      // 行政区划
-                      c_xzqh: ele.c_xzqh,
-                      // 空间信息
-                      c_content: ele.c_content,
-                      // 疑点修改时间
-                      c_date_time: ele.c_date_time,
-                      // 修改人员名称
-                      // c_editor_name: ele.c_editor_name,
-                      // 标题
-                      title: ele.title,
-                      column_id: ele.column_id,
-                      content: ele.content,
-                      secret_level: ele.secret_level,
-                    };
-                  });
-
-                // 进行分页列表展示
-                this.changeSingleLayer(
-                  1,
-                  this.currentPageSize,
-                  columnId,
-                  uniqueId,
-                  mainType,
-                  sourceType
-                );
-              }
-
-              // 预设模型可视化数据 -- 不需要分页展示
-              if (mainType === "预设模型") {
-                this.originalDataMap.get(uniqueId).map((ele) => {
+              // if (mainType === "所有图层") {
+              // 激活当前展开面板
+              this.activeNames = ["myLabel", uniqueId];
+              // 用于分页数据
+              this.originalData[uniqueId] = this.originalDataMap
+                .get(uniqueId)
+                .map((ele) => {
                   return {
                     id: ele.id,
                     // "垃圾堆放点"
@@ -965,7 +967,43 @@ export default {
                     secret_level: ele.secret_level,
                   };
                 });
-              }
+
+              // 进行分页列表展示
+              this.changeSingleLayer(
+                1,
+                this.currentPageSize,
+                columnId,
+                uniqueId,
+                mainType,
+                sourceType
+              );
+              // }
+
+              // 预设模型可视化数据 -- 不需要分页展示
+              // if (mainType === "预设模型") {
+              //   this.originalDataMap.get(uniqueId).map((ele) => {
+              //     return {
+              //       id: ele.id,
+              //       // "垃圾堆放点"
+              //       column_name: ele.column_name,
+              //       // 是否疑点
+              //       c_boolean: ele.c_boolean ? "是" : "否",
+              //       // 行政区划
+              //       c_xzqh: ele.c_xzqh,
+              //       // 空间信息
+              //       c_content: ele.c_content,
+              //       // 疑点修改时间
+              //       c_date_time: ele.c_date_time,
+              //       // 修改人员名称
+              //       // c_editor_name: ele.c_editor_name,
+              //       // 标题
+              //       title: ele.title,
+              //       column_id: ele.column_id,
+              //       content: ele.content,
+              //       secret_level: ele.secret_level,
+              //     };
+              //   });
+              // }
 
               // 当前图斑数小于数据库中的图斑总数时,递归请求图斑
               if (
@@ -1588,7 +1626,7 @@ export default {
             this.originalDataMap.delete(data.id);
 
             if (
-              data.mainType === "所有图层" &&
+              // data.mainType === "所有图层" &&
               this.originalData &&
               this.originalData[data.id]
             ) {
@@ -2411,10 +2449,19 @@ export default {
           border-right: 1px solid rgba(207, 222, 255, 0.2);
           border-bottom: 1px solid rgba(207, 222, 255, 0.2);
           cursor: pointer;
+          .normal-icon {
+            position: absolute;
+            right: 20px;
+            top: 0;
+            display: flex;
+            align-items: center;
+            justify-content: space-around;
+            width: 75px;
+          }
 
           .operation-icon {
             position: absolute;
-            right: 100px;
+            right: 60px;
             top: 0;
             display: flex;
             align-items: center;
@@ -2424,7 +2471,7 @@ export default {
           }
           .visible-icon {
             position: absolute;
-            right: 60px;
+            right: 20px;
             top: 9.5px;
             width: 20px;
             height: 20px;