Browse Source

底部公用组件

彭宇 2 years ago
parent
commit
7d36b99da7
3 changed files with 40 additions and 34 deletions
  1. 5 7
      src/components/vBottomMenu.vue
  2. 1 0
      src/views/event.vue
  3. 34 27
      src/views/forest.vue

+ 5 - 7
src/components/vBottomMenu.vue

@@ -4,9 +4,8 @@
 			@click.stop="showDialog(fastMenu.click)">
 			<a><i class="iconfont" :class="fastMenu.icon"></i>{{fastMenu.name}}
 				<div v-if="showChild && fastMenu.click == 'layerSwitching'" class="nav-child">
-					<el-button type="primary" @click.stop="test" class="nav-child-btn">图层1	</el-button>
-					<el-button type="primary" @click.stop="test" class="nav-child-btn">图层2</el-button>
-					<el-button type="primary" @click.stop="test" class="nav-child-btn">图层3</el-button>
+					<el-button type="primary" @click.stop="choseLayerSwitching('http://121.37.83.100:8090/iserver/services/map-sipingshi/rest/maps/tiedong_lunkuo')" class="nav-child-btn">铁东</el-button>
+					<el-button type="primary" @click.stop="choseLayerSwitching('http://121.37.83.100:8090/iserver/services/map-sipingshi/rest/maps/tiexi_lunkuo')" class="nav-child-btn">铁西</el-button>
 					<el-button type="danger" icon="el-icon-close" style="position: absolute;right: 0;top: 0;width: 1rem;height: 1rem;padding:0;"
 						@click.stop="closeChild"></el-button>
 				</div>
@@ -14,7 +13,6 @@
 
 		</div>
 	</div>
-	<!--事件弹层-->
 </template>
 
 <script>
@@ -55,8 +53,8 @@
 			showDialog(click) {
 				window.showDialog(click)
 			},
-			test() {
-				console.log('123132132132132132132132123131')
+      choseLayerSwitching(url) {
+        window.choseLayerSwitching(url);
 			},
 			closeChild() {
 				window.closeChild()
@@ -119,7 +117,7 @@
 				.nav-child-btn{
 					padding: .2rem;
 				}
-				
+
 			}
 		}
 

+ 1 - 0
src/views/event.vue

@@ -1044,6 +1044,7 @@
               if (res.data.eventListAll[i].eventStatus == "event_event_status_1" || res.data.eventListAll[i].eventStatus == "event_event_status_2" || res.data.eventListAll[i].eventStatus == "event_event_status_6") {
                 markersMap.click = "showEventInfo_Processed"
                 markersMap.icon = "sj-icon-map-clz"
+                markersMap.isAggregation = false
               } else if (res.data.eventListAll[i].eventStatus == "event_event_status_4") {
                 markersMap.click = "showEventInfo_notProcessed"
                 markersMap.icon = "sj-icon-map-wcl"

+ 34 - 27
src/views/forest.vue

@@ -487,11 +487,15 @@
       this.ws = DHWsInstance;
       console.log(this.ws);
       /** ----------------------------------摄像头预览结束------------------------------------- */
+
+      /** ----------------------------------底部按钮公用组件开始------------------------------------- */
       window.showDialog=this.showDialog
-	  window.closeChild=this.closeChild
+	    window.closeChild=this.closeChild
+	    window.choseLayerSwitching=this.choseLayerSwitching
+      /** ----------------------------------底部按钮公用组件结束------------------------------------- */
     },
 		mounted() {
-	  
+
       this.getBaseInfo()
       this.getTodayEvent()
 			this.personnelChart()
@@ -499,7 +503,7 @@
       /** ----------------------------------weosocket开始------------------------------------- */
       this.initWebSocket();
       /** ----------------------------------weosocket结束------------------------------------- */
-	  
+
 		},
 		/** ----------------------------------weosocket结束------------------------------------- */
 		data() {
@@ -706,34 +710,36 @@
         }
       },
       /** ----------------------------------weosocket结束------------------------------------- */
-  //弹出事件定位页面
-      showDialog(click){
-        if(click=="eventLocation"){
+
+      /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+      showDialog(click) {
+        if (click == "eventLocation") {
           this.$refs.eventLocation.showEventLocation()
-					this.$refs.bottomMenu.showChild = false
-        }else if(click=="editableLayers"){
-          if(!this.$refs.supermap.isEditableLayers){
-            this.$refs.supermap.isEditableLayers=true,
-						this.$refs.bottomMenu.showChild = false
-          }else{
-            this.$refs.supermap.isEditableLayers=false,
-						this.$refs.bottomMenu.showChild = false
+          this.$refs.bottomMenu.showChild = false
+        } else if (click == "editableLayers") {
+          if (!this.$refs.supermap.isEditableLayers) {
+            this.$refs.supermap.isEditableLayers = true,
+              this.$refs.bottomMenu.showChild = false
+          } else {
+            this.$refs.supermap.isEditableLayers = false,
+              this.$refs.bottomMenu.showChild = false
           }
-        }else if(click=="layerSwitching"){
-          this.$refs.supermap.layerSwitching('http://121.37.83.100:8090/iserver/services/map-sipingshi/rest/maps/tiedong_lunkuo',true);
-		  this.$refs.bottomMenu.showChild = true
+        } else if (click == "layerSwitching") {
+          this.$refs.bottomMenu.showChild = true
         }
       },
-	  //点击关闭选择图层
-	  closeChild(click){
-	  	 this.$refs.bottomMenu.showChild = false
-		 console.log(13213212321)
-	  },
-	  
-	  
-	  
-	  
-	  
+      //点击关闭选择图层
+      closeChild() {
+        this.$refs.bottomMenu.showChild = false
+      },
+      //选择图层
+      choseLayerSwitching(url) {
+        this.$refs.supermap.layerSwitching(url, true);
+      },
+      /** ----------------------------------底部按钮公用组件结束------------------------------------- */
+
+
+
 			//态势感知chart
 			cameraChat() {
 				// 基于准备好的dom,初始化echarts实例
@@ -1387,6 +1393,7 @@
               if (res.data.eventListAll[i].eventStatus == "event_event_status_1" || res.data.eventListAll[i].eventStatus == "event_event_status_2" || res.data.eventListAll[i].eventStatus == "event_event_status_6") {
                 markersMap.click = "showEventInfo_Processed"
                 markersMap.icon = "sj-icon-map-clz"
+                markersMap.isAggregation = false
               } else if (res.data.eventListAll[i].eventStatus == "event_event_status_4") {
                 markersMap.click = "showEventInfo_notProcessed"
                 markersMap.icon = "sj-icon-map-wcl"