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