<template>
<div class="imgList">
  <el-dialog title="图片列表" :visible.sync="dialogTableVisible">
    <div v-if="imgData.length>0">
<!--      <div v-for="(order,index) in imgData" class="item-list"></div>-->
      <el-image
        v-for="(order,index) in imgData"
        style="width: 100px; height: 100px;margin-left: 10px"
        :src="order.imageUrl"
        :preview-src-list="srcList">
      </el-image>
    </div>
    <div v-else>
      <span style="display: block;text-align: center;line-height: 40px;font-size: 14px">暂无数据</span>
    </div>
  </el-dialog>

</div>
</template>

<script>
import {getOrderTraceImage} from '@/api/order/orderList.js'
export default {
  name: "TracePic",
  data() {
    return {
      dialogTableVisible: false,
      idOrder:"",
      srcList:[],
      imgData:[]
    }
  },
  methods: {
    getOrderTraceImage(){
      const _that = this;
      _that.srcList = [];
      var data = {
        idOrder:_that.idOrder
      }
      getOrderTraceImage(data).then(response => {
        // console.log(response)
        _that.imgData = response.data
        for (let i = 0; i < _that.imgData.length; i++) {
          var datas = _that.imgData[i];
          _that.srcList.push(datas.imageUrl)
        }
      }).catch(err => {
      })
    }
  }
}
</script>

<style scoped>

</style>
