<!--
  Description: 报警详情图片展示
  Author: 李亚光
  Date: 2023-05-22
 -->
<script lang="ts" setup name="EditPerson">
const dialogFormVisible = ref(false) // 对话框是否显示

const imgurl = ref('')
const initDialog = (url: string) => {
  dialogFormVisible.value = true
  imgurl.value = `${import.meta.env.VITE_APP_API_BASEURL}/${url}`
}
// 弹窗关闭
// watch(() => dialogFormVisible.value, (newVal) => {
//   if (!newVal) {
//   }
// })
defineExpose({
  initDialog,
})
</script>

<template>
  <el-dialog
    v-model="dialogFormVisible" title="报警详情" append-to-body width="540px" draggable
    :close-on-click-modal="false"
  >
    <img :src="imgurl" width="500" height="500">
  </el-dialog>
</template>

<style lang="scss" scoped>
.el-dialog {
  width: 700px;
}
</style>
