Browse Source

查看电视墙按钮

qinhouyu 1 năm trước cách đây
mục cha
commit
7e5b1f3c65
1 tập tin đã thay đổi với 28 bổ sung4 xóa
  1. 28 4
      src/components/supermap-2.5d.vue

+ 28 - 4
src/components/supermap-2.5d.vue

@@ -10,6 +10,10 @@
           </div>
           <div class="map-txt" v-html="bindPopupHtml">
           </div>
+          <el-button size="mini" type="primary"
+                     class="sj-icon-btn" @click="openTvwall"
+          >查看
+          </el-button>
           <div id="super2" />
         </div>
       </transition>
@@ -31,6 +35,9 @@
     name: 'supermap-2.5d',
     data() {
       return {
+        openZt: false,
+        clickName:null,
+        parameter:null,
         dianshiqiang:null,
         longitude:null,
         latitude:null,
@@ -703,6 +710,7 @@
             that.queryParams.mapData  = entity.pickResult[entity.layerID][0].feature.properties.SmUserID;
             that.queryParams.mapName  = entity.pickResult[entity.layerID][0].feature.properties.layer;
             getDeviceList(that.queryParams).then(res => {
+              that.openZt = true;
               const treeLabels = [{
                 "id": null,
                 "labelCode": "999",
@@ -748,7 +756,7 @@
                 "<span>" +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                "                  <h4>名称:" + that.queryParams.name +
+                "                  <h4>名称:" + (that.queryParams.name?that.queryParams.name:'') +
                 "</h4>" +
                 "                </div>" +
                 "                </div>" +
@@ -777,8 +785,12 @@
         });
       },
       openTvwall(){
-        this.mapshow=false
-        this.$emit('fatherMethod', this.dianshiqiang, this.longitude, this.latitude, this.userList);
+        this.mapshow = false;
+        if(this.openZt){
+          this.$emit('fatherMethod', this.dianshiqiang, this.longitude, this.latitude, this.userList);
+        }else{
+          this.$emit(this.clickName, this.parameter);
+        }
       },
       /**
        * 地图落点
@@ -824,8 +836,11 @@
             let html = id._description;
             clearInterval(that.timer)
             if (html != undefined && html._value != null && html._value != '' && html != 'cgq') {
-              that.bindPopupHtml = html
+              that.bindPopupHtml = html;
+              that.clickName=id._click;
+              that.parameter=id._parameter;
               that.mapshow = true
+              that.openZt = false
             } else if (html == 'cgq') {
               that.timer = setInterval(function() {
                 var color = "green";
@@ -1049,4 +1064,13 @@
     opacity: 0;
     transform: translateY(-10rem);
   }
+  .map-tit{
+    .sj-icon-btn{
+      display: block;
+      margin: 10px auto 15px auto;
+      padding: 0px 16px;
+      font-size: 10px;
+      height: 1.7rem;
+    }
+  }
 </style>