Browse Source

安全应急

bihuisong 10 months ago
parent
commit
1bda92c3bb
1 changed files with 7 additions and 1 deletions
  1. 7 1
      zhsq_qk-ui/src/views/fusion/aqyj.vue

+ 7 - 1
zhsq_qk-ui/src/views/fusion/aqyj.vue

@@ -88,7 +88,7 @@
           <div class="qkq_tit">监测预警</div>
           <ul class="qkq_csnl scrollbar">
             <li  v-for="(item, index) in eventData" :key="index">
-              <h4><span class="blue">【{{ item.warnTypeName }}】</span>{{ item.warnAddress}}</h4>
+              <h4><span class="blue">【{{ item.warnTypeName }}】</span>{{ truncateText(item.warnAddress, 10)}}</h4>
               <p>预警事件:{{ item.warnEvent}}</p>
               <p>预警时间:{{ item.warnTime}}</p>
             </li>
@@ -214,6 +214,12 @@ export default {
   },
 
   methods: {
+    truncateText(text, maxLength) {
+      if (text.length > maxLength) {
+        return text.substring(0, maxLength) + '...';
+      }
+      return text;
+    },
     handleClick() {
       this.$refs.supermap.clearM()
       let that = this;