<template>
  <el-dialog v-model="visible" width="90%" append-to-body title="综合表彰材料">
    <auth-img 
      v-for="src in imgUrl" 
      :key="src.title" 
      :authSrc="src.url" 
      style="height:1000px;"
    />
  </el-dialog>
</template>

<script setup lang="ts">
import { ref, nextTick } from 'vue'
import authImg from '/@/components/tools/auth-img.vue'

interface ImageItem {
  title: string
  url: string
}

const visible = ref(false)
const row = ref<any>({})
const imgUrl = ref<ImageItem[]>([])

const init = (rowData: any) => {
  row.value = rowData
  imgUrl.value = []
  nextTick(() => {
    const obj: ImageItem = {
      title: '',
      url: row.value.attachment
    }
    imgUrl.value.push(obj)
    visible.value = true
  })
}

defineExpose({
  init
})
</script>

<style scoped lang="scss">
</style>
