Newer
Older
carbon-metering-front / src / views / data / electricity / detailDialog.vue
liyaguang on 30 Mar 2023 1 KB feat(*): 碳计算保存功能
<script lang="ts" setup>
import { ref } from 'vue'
import showPhoto from './showPhoto.vue'
const centerDialogVisible = ref(false)
const imgurl = ref('')
const title = ref('')
const initDialog = (row: any) => {
  centerDialogVisible.value = true
  imgurl.value = row.electricityDetail
  title.value = `${row.electricityName}配电网`
}
defineExpose({
  initDialog,
})
</script>

<template>
  <el-dialog
    v-model="centerDialogVisible"
    :title="title"
    width="60%"
    align-center
    append-to-body
  >
    <show-photo :minio-file-name="imgurl" width="100%" height="400px" />
    <!-- <template #footer>
      <span class="dialog-footer">
        <el-button @click="centerDialogVisible = false">Cancel</el-button>
        <el-button type="primary" @click="centerDialogVisible = false">
          Confirm
        </el-button>
      </span>
    </template> -->
  </el-dialog>
</template>

<style lang="scss" scoped>
.dialog-footer button:first-child {
  margin-right: 10px;
}

::v-deep .el-image {
  margin: 0 auto;
}
</style>