<template>
  <div class="body1">
    <p class="title">资产概况</p>
    <div class="img_span1">
      <span v-for="(item,index) in img_data " :key="index"  @click="onPreview(img_data.url)">{{item.name}}（{{item.url.length +1}}）</span>
      <el-image-viewer
        v-if="showViewer"
        :on-close="closeViewer"
        :url-list="img_url"
        :z-index="9999"
      />
    </div>
    <p class="p_info">资产名称：{{contentDatas.asset_data.serial_name}}</p>
    <p class="p_info">资产类型：{{contentDatas.asset_data.asset_type_name}}</p>
    <p class="p_info">转让价格：￥{{contentDatas.asset_data.price}}元/{{contentDatas.asset_data.asset_unit}}</p>
    <p class="p_info">涉及数量：{{contentDatas.asset_data.count}}</p>
    <p class="p_info">资产转让有效期：{{contentDatas.asset_data.reg_money}}</p>
    <p class="p_info">基本回报：{{contentDatas.asset_data.legal_name}}</p>
    <p class="p_info">额外回报：{{contentDatas.asset_data.domicile}}</p>
    <p class="p_info">其他：{{contentDatas.asset_data.establish_time }}</p>
    <p class="p_info" v-if="contentDatas.asset_data.delist!=null">
      摘牌申请详情：
      <a :href="contentDatas.asset_data.delist" class="p_info_a">点击下载</a>
    </p>
  </div>
</template>
<script>
export default {
  components: {
    ElImageViewer: () => import('element-ui/packages/image/src/image-viewer')
  },
  props:{
    contentDatas:{
      require: true
    },

  },
  data() {
    return{
      img_data:[],
      showViewer:false,
      img_url:[]
    }
  },
  methods:{
    onPreview(img) {
      // this.img_url = img
      this.showViewer = true
    },
    // 关闭查看器
    closeViewer() {
      this.showViewer = false
    },
  },
  created(){
    this.img_url = this.contentDatas.asset_data.serial_img
    this.img_data=[{name:'资产图片',url:[this.contentDatas.asset_data.serial_img]}
    ]
  }
}
</script>
<style scoped>
  @import url('../../../../assets/css/sidebar.css');
  .p_info_a{
    text-decoration: underline;
  }
</style>
