<template>
<div v-if="list.length">
  <el-button type="text" @click="dialogVisible = true">查看图片</el-button>
  <el-dialog
    :modal="modal"
    title="提示"
    :visible.sync="dialogVisible"
    width="50%">
    <div style="display: flex;flex-wrap: wrap;">
      <div v-for="item in list" style="padding: 10px"><el-image
        style="width: 100px; height: 100px"
        :src="item"
        :preview-src-list="list">
      </el-image></div>
    </div>
  </el-dialog>

</div>
</template>

<script>
import {warehousePictureList} from "@/api/ecw/order";

export default {
  props:{
    item:{
      type:Object,
      default:{}
    },
    status:Number,
    modal:{
      type:Boolean,
      default: true,
    }
  },
  name: "warehouse-video-list",
  data(){
    return {
      dialogVisible:false,
      list:[],
    }
  },
  mounted() {
    this.warehousePictureListFn()
    },
  methods:{
    warehousePictureListFn(){
      let p = {bizId:this.item.id,type:this.status}
      warehousePictureList(p).then(r =>{
         this.list = r.data.map(i =>i.url)
      })
    }
  }

}
</script>

<style scoped>

</style>
