Przeglądaj źródła

资源电视墙

qinhouyu 2 lat temu
rodzic
commit
0edfc5bde2
2 zmienionych plików z 68 dodań i 8 usunięć
  1. 3 2
      src/components/supermap-2.5d.vue
  2. 65 6
      src/views/forest.vue

+ 3 - 2
src/components/supermap-2.5d.vue

@@ -5,7 +5,7 @@
       <transition name='fade'>
         <div class="map-tit" v-show="mapshow">
           <div class="top-tit">
-            <i class="iconfont sj-icon-jkzx" @click="openTvwall()"></i>
+            <i class="iconfont sj-icon-jkzx"></i>
             <span><img src="../assets/images/close.svg" @click="mapshow=false"/></span>
           </div>
           <div class="map-txt" v-html="bindPopupHtml">
@@ -788,7 +788,8 @@
         this.mapshow = false;
         if(this.openZt){
           this.$emit('fatherMethod', this.dianshiqiang, this.longitude, this.latitude, this.userList);
-        }else{
+        }
+        else{
           this.$emit(this.clickName, this.parameter);
         }
       },

+ 65 - 6
src/views/forest.vue

@@ -117,7 +117,7 @@
       <!--      <supermap ref="supermap" style="width: 100%;height: 100vh;" class="indexSupermapClass" :mapDiv="'forestMap'"-->
       <!--                :dynamicPlotting="false" :mapSite="{ doubleClickZoom: false }" :codes="['9fa5']" :isSideBySide="false"-->
       <!--                @showEventDialog="showEventDialog"></supermap>-->
-      <supermap ref="supermap" style="width: 100%;height: 100vh;" @showEventDialog="showEventDialog" :showLayer="true" @fatherMethod="fatherMethod"></supermap>
+      <supermap ref="supermap" style="width: 100%;height: 100vh;" @showEventDialog="showEventDialog" :showLayer="true" @fatherMethod="fatherMethod" @sewageOutletClick="sewageOutletClick"></supermap>
       <!-- 右侧 -->
       <div class="rightbar rightbar-index" ref="right">
         <div class="right-item1">
@@ -756,6 +756,8 @@
       },
 
       getMarkersMap(resourceTable, markersMap, item) {
+        markersMap.click = "sewageOutletClick";
+        markersMap.parameter = item;
         if (resourceTable == 'centerdata_t_resources_illegal_construction') { //违建信息
           markersMap.icon = 'sj-icon-map-centerdata-t-resources-illegal-constructionon'
           markersMap.lng = (item.longitude ? item.longitude : "")
@@ -793,7 +795,8 @@
             '                </div>' +
             '                </div>' +
             '                </span></div>'
-        } else if (resourceTable == 'centerdata_t_resources_deposit') { //矿产资源
+        }
+        else if (resourceTable == 'centerdata_t_resources_deposit') { //矿产资源
           markersMap.icon = 'sj-icon-map-centerdata-t-resources-deposit'
           markersMap.lng = (item.longitude ? item.longitude : "")
           markersMap.lat = (item.latitude ? item.latitude : "")
@@ -827,7 +830,8 @@
             '                </div>' +
             '                </div>' +
             '                </span></div>'
-        } else if (resourceTable == 'centerdata_t_resources_forest') { //森林资源管理信息
+        }
+        else if (resourceTable == 'centerdata_t_resources_forest') { //森林资源管理信息
           markersMap.icon = 'sj-icon-map-centerdata-t-forest-landing'
           markersMap.lng = (item.longitude ? item.longitude : "")
           markersMap.lat = (item.latitude ? item.latitude : "")
@@ -863,7 +867,8 @@
             '                </div>' +
             '                </div>' +
             '                </span></div>'
-        } else if (resourceTable == 'centerdata_t_resources_geologic_hazard') { //地质灾害易发区
+        }
+        else if (resourceTable == 'centerdata_t_resources_geologic_hazard') { //地质灾害易发区
           markersMap.icon = 'sj-icon-map-centerdata-t-resources-geologic-hazard'
           markersMap.lng = (item.longitude ? item.longitude : "")
           markersMap.lat = (item.latitude ? item.latitude : "")
@@ -899,7 +904,8 @@
             '                </div>' +
             '                </div>' +
             '                </span></div>'
-        } else if (resourceTable == 'centerdata_t_resources_hydroenergy') { //水能资源
+        }
+        else if (resourceTable == 'centerdata_t_resources_hydroenergy') { //水能资源
           markersMap.icon = 'sj-icon-map-centerdata-t-forest-checkpoint'
           markersMap.lng = (item.longitude ? item.longitude : "")
           markersMap.lat = (item.latitude ? item.latitude : "")
@@ -944,7 +950,8 @@
             '                </div>' +
             '                </div>' +
             '                </span></div>'
-        } else if (resourceTable == 'centerdata_t_resources_land') { //土地资源管理信息
+        }
+        else if (resourceTable == 'centerdata_t_resources_land') { //土地资源管理信息
           markersMap.icon = 'sj-icon-map-centerdata-t-forest-waterintake'
           markersMap.lng = (item.longitude ? item.longitude : "")
           markersMap.lat = (item.latitude ? item.latitude : "")
@@ -1243,6 +1250,58 @@
           item
         );
       },
+      sewageOutletClick(data) {
+        const params = Object.assign({});
+        params.longitude = data.longitude;
+        params.latitude = data.latitude;
+        const treeLabels = [
+          {
+            id: null,
+            labelCode: "999",
+            labelName: "电视墙",
+            cameraType: null,
+            parentLabelCode: "",
+          },
+        ];
+        const labelChannels = [];
+        for (let i in data.cameraList) {
+          treeLabels.push({
+            id: null,
+            labelCode: data.cameraList[i].cameraCode,
+            labelName: data.cameraList[i].cameraName,
+            cameraType:data.cameraList[i].cameraType,
+            parentLabelCode: "999",
+          });
+          labelChannels.push({
+            labelCode: data.cameraList[i].cameraCode,
+            channelDates: [
+              {
+                channelCode: data.cameraList[i].cameraCode,
+                channelName: data.cameraList[i].cameraName,
+                channelSn: null,
+                cameraType:data.cameraList[i].cameraType,
+                online: "1",
+                cameraCode: "1",
+              },
+            ],
+          });
+        }
+        const dianshiqiang = [
+          {
+            switchTab: "2",
+            treeLabels: treeLabels,
+            labelChannels: labelChannels,
+          },
+        ];
+        if (data.cameraList.length > 0) {
+          this.$refs.TVWall.showTVWall1(
+            data.longitude,
+            data.latitude,
+            dianshiqiang
+          );
+        }
+      },
+
       getBaseInfo() {
         //左侧获取部门信息
         getBaseInfo().then(res => {