|
|
|
@ -153,6 +153,17 @@
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="图片预览"
|
|
|
|
|
:visible.sync="imagePreviewVisible"
|
|
|
|
|
width="80%"
|
|
|
|
|
append-to-body
|
|
|
|
|
center
|
|
|
|
|
>
|
|
|
|
|
<div class="image-preview-container">
|
|
|
|
|
<img :src="previewImageUrl" style="max-width: 100%; max-height: 70vh;"/>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<div class="almReminder" @click="openAlm" v-if="almData.filter(e=>e.isWaiting).length>0"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -182,6 +193,10 @@ export default {
|
|
|
|
|
// 操作按钮loading
|
|
|
|
|
alarmProcessing: false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
previewImageUrl: '',
|
|
|
|
|
imagePreviewVisible: false,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -484,7 +499,25 @@ export default {
|
|
|
|
|
|
|
|
|
|
this.$set(this.almData[index], 'isWaiting', true)
|
|
|
|
|
this.$router.push('/')
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 获取完整的图片URL
|
|
|
|
|
getFullImageUrl(relativePath) {
|
|
|
|
|
if (!relativePath) return '';
|
|
|
|
|
|
|
|
|
|
// 如果已经是完整URL,直接返回(兼容历史数据)
|
|
|
|
|
if (relativePath.startsWith('http')) {
|
|
|
|
|
return relativePath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 动态拼接当前环境的baseURL
|
|
|
|
|
const baseURL = process.env.VUE_APP_BASE_API || '';
|
|
|
|
|
return baseURL + relativePath;
|
|
|
|
|
},
|
|
|
|
|
previewImage(url) {
|
|
|
|
|
this.previewImageUrl = url
|
|
|
|
|
this.imagePreviewVisible = true
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|