zpf пре 11 месеци
родитељ
комит
7e60f5d66f
1 измењених фајлова са 45 додато и 6 уклоњено
  1. 45 6
      src/components/Query/clickQuery/MultiLevelQuery.vue

+ 45 - 6
src/components/Query/clickQuery/MultiLevelQuery.vue

@@ -249,6 +249,18 @@ export default {
             const that = this;
             store.state.query_pick_last_pane = null;
             store.state.query_pick_pane = [];
+
+            this.remove_query_click_by_iserver();
+
+        },
+        remove_query_click_by_iserver() {
+            for (var i = 0; i < 10; i++) {
+                query_click_by_iserver.entities.values.forEach((res) => {
+
+                    query_click_by_iserver.entities.remove(res);
+
+                })
+            }
         },
         init_handler() {
 
@@ -285,10 +297,10 @@ export default {
                 };
 
                 const wkt = wellknown.stringify(geojsonPoint);
-                // let id = store.state.vectorlayerlist[store.state.vectorlayerlist.length - 1].id
+                let id = store.state.vectorlayerlist[store.state.vectorlayerlist.length - 1].id
                 let obj = {
                     defaultType: null,
-                    // layerId:id
+                    layerId: id
                 }
                 let data = await GetTabsData(obj);
 
@@ -296,8 +308,8 @@ export default {
                     const element = data.data[index];
                     let tableId = element.tableId;
                     let pane_obj = {
-                        sourcePointWkt: "POINT(109.5139541 18.3146153)",
-                        sourceLayerId: "dd699f839bc04969ae2dc2e1964d0ad1",
+                        sourcePointWkt: wkt,
+                        sourceLayerId: id,
                         sourceLayerType: '0',
                         queryTableId: tableId,
 
@@ -325,7 +337,7 @@ export default {
                     }
                 }
 
-                // this.highlightResults(longitude, latitude);
+                this.highlightResults(longitude, latitude);
 
                 that.handler_multi_level_query.destroy();
                 that.handler_multi_level_query = null;
@@ -362,6 +374,32 @@ export default {
                 this.$refs.echartRef[index].setOptions({ data, type, max, legend_right });
             });
         },
+        calcIserverURI(url) {
+            let uriArr = url.split("/");
+            uriArr[5] = uriArr[5].replace("map-", "data-");
+            uriArr[7] = "data";
+            uriArr[8] = "featureResults.rjson?returnContent=true";
+            return uriArr.join("/");
+        },
+        convertCoordinates(coordArray) {
+            return coordArray.map(coord => [coord.x, coord.y]);
+        },
+        isArray2D(arr) {
+            // 首先检查arr是否是数组
+            if (!Array.isArray(arr)) {
+                return false;
+            }
+
+            // 检查数组中的每个元素是否也是数组
+            for (let i = 0; i < arr.length; i++) {
+                if (!Array.isArray(arr[i])) {
+                    return false;
+                }
+            }
+
+            // 如果所有元素都是数组,那么arr是二维数组
+            return true;
+        },
         async highlightResults(longitude, latitude) {
             // 高亮结果
             let queryByIDParameters = {
@@ -443,7 +481,8 @@ export default {
     mounted() {
         const that = this;
         this.$nextTick(() => {
-
+            query_click_by_iserver = new Cesium.CustomDataSource("query_click_by_iserver");
+            viewer.dataSources.add(query_click_by_iserver);
         })
 
     }, //生命周期 - 挂在完成