From 28bd61701bb409257ea0dd3c78f32bd0b45ebbd5 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期一, 06 三月 2023 09:16:35 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW --- src/components/MapView/mapMenuPop.vue | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/components/MapView/mapMenuPop.vue b/src/components/MapView/mapMenuPop.vue index 8069838..777bcf5 100644 --- a/src/components/MapView/mapMenuPop.vue +++ b/src/components/MapView/mapMenuPop.vue @@ -24,8 +24,9 @@ <el-table :data="tableData" ref="dialogPayChannel" - height="300px" + height="100%" style="width: 100%" + border > <el-table-column align="center" @@ -56,7 +57,10 @@ ></el-table-column> </el-table> </div> - <div class="pagination_box"> + <div + class="pagination_box" + style="margin-top:10px" + > <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -542,7 +546,7 @@ this.imagePoint = null; } var wkt = this.$wkt.parse(val1); - this.setMapLoaction(wkt); + this.setMapLoaction(wkt, row); } }, setMapLoaction(res) { @@ -600,6 +604,7 @@ this.listdata.pageIndex = 1; this.listdata.pageSize = 10; this.listdata.name = res.entity; + this.$store.state.propertiesName = res; this.getTableDateHidder(); }, handleSizeChange(val) { @@ -638,6 +643,7 @@ }, async showAllImage(res) { for (var i in res) { + let properties = res[i]; var param = { gid: res[i].gid, name: this.listdata.name, @@ -650,7 +656,7 @@ if (val1) { var wkt = this.$wkt.parse(val1); // this.getprimitiLayer(wkt); - this.primitivesAddLayer(wkt); + this.primitivesAddLayer(wkt, properties); } } }, @@ -663,7 +669,7 @@ break; } }, - primitivesAddLayer(res) { + primitivesAddLayer(res, properties) { switch (res.type) { case "Point": var val = Cesium.Cartesian3.fromDegrees( @@ -672,6 +678,8 @@ ); var point = Viewer.entities.add({ position: val, + properties: properties, + tag: "properties_point", billboard: { // 鍥惧儚鍦板潃锛孶RI鎴朇anvas鐨勫睘鎬� image: SmartEarthRootUrl + "Workers/image/mark.png", @@ -690,6 +698,29 @@ }); point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY; this.$store.state.queryInfo.push(point); + //鐐瑰嚮浜嬩欢 + window.propertieshandler = new Cesium.ScreenSpaceEventHandler( + sgworld.Viewer.scene.canvas + ); + window.propertieshandler.setInputAction(event => { + let pick = sgworld.Viewer.scene.pick(event.position); + // ; + if (pick && pick.id && pick.id.tag == "properties_point") { + this.$store.state.propertiesFlag = '1'; + let properties = pick.id.properties; + let propertyNames = pick.id.properties.propertyNames; + let obj = {}; + obj["eventid"] = properties['_eventid']._value; + this.attributeData.forEach(item => { + propertyNames.forEach(itemElement => { + if (itemElement == item.field) { + obj[item.alias] = properties[itemElement]._value + } + }) + }) + this.$store.state.propertiesInfo = obj; + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); break; case "LineString": case "MultiLineString": @@ -748,6 +779,9 @@ } }); }, + destroyed() { + this.$store.state.propertiesFlag = null; + } }; </script> @@ -794,7 +828,8 @@ width: 100%; } .tableBox { - height: 327px; + position: relative; + height: 89%; } .rightPage { margin-left: 50px; -- Gitblit v1.9.3