|
@@ -258,7 +258,7 @@
|
|
|
<div class="d-l-con padding-box nowrap" v-for="(item,index) in eventList"
|
|
|
@click="dropLocation(item.latitude,item.longitude)">
|
|
|
<div class="bgt-img">
|
|
|
- <img v-if="item.picturePath!=null&&item.picturePath!=''" :src="item.picturePath"
|
|
|
+ <img v-if="item.picturePath!=null&&item.picturePath!=''&& isAssetTypeAnImage(item.picturePath)" :src="item.picturePath"
|
|
|
style="width: 93px;height: 64px"/>
|
|
|
<img v-else src="../assets/images/integrated/event-img-sub.png" style="width: 93px;height: 64px"/>
|
|
|
</div>
|
|
@@ -582,7 +582,7 @@ export default {
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>'
|
|
|
- if (this.eventList[i].picturePath != null && this.eventList[i].picturePath != '') {
|
|
|
+ if (this.eventList[i].picturePath != null && this.eventList[i].picturePath != ''&& this.isAssetTypeAnImage(this.eventList[i].picturePath)) {
|
|
|
markersMap.bindPopupHtml += '<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
@@ -940,7 +940,7 @@ export default {
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>'
|
|
|
- if (this.eventList[i].picturePath != null && this.eventList[i].picturePath != '') {
|
|
|
+ if (this.eventList[i].picturePath != null && this.eventList[i].picturePath != ''&& this.isAssetTypeAnImage(this.eventList[i].picturePath) {
|
|
|
markersMap.bindPopupHtml += '<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
@@ -965,6 +965,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 判断是否为图片
|
|
|
+ isAssetTypeAnImage(filePath) {
|
|
|
+ //获取最后一个.的位置
|
|
|
+ var index = filePath.lastIndexOf('.')
|
|
|
+ //获取后缀
|
|
|
+ var ext = filePath.substr(index + 1)
|
|
|
+ let aa = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1
|
|
|
+ return aa
|
|
|
+ },
|
|
|
getEventByEventType(day) {
|
|
|
let that = this
|
|
|
//右侧获取事件分类
|