ShipPicList.vue 3.75 KB
<template>
  <a-modal
    :width="modalWidth"
    :style="modalStyle"
    :visible="visible"
    :maskClosable="false"
    @cancel="handleCancel">
    <template slot="footer">
      <a-button @click="handleCancel">关闭</a-button>
    </template>

    <a-card :bordered="false">
      <a-col :span="18">
        <a-spin tip="Loading..." :spinning="spinning">
          <div>
            <a-row>
              <a-col :span="18">
                <p>
                  <a-divider orientation="left">现场拍照图片</a-divider>
                </p>
              </a-col>
              <a-col :span="6"></a-col>
              <!-- 预览区域 -->
              <a-col :span="12">
                <template>
                  <div v-for="(fileDetail,index) in imageSource[0].fileDetails" :key="index">
                    <div style="float: left;width:104px;height:104px;margin-right: 10px;margin: 0 8px 8px 0;">
                      <div
                        style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;">
                        <img style="width: 100%;" :src="fileDetail.imgUrl" :preview="imageSource[0].key">
                      </div>
                    </div>
                  </div>
                </template>
              </a-col>




            </a-row>
          </div>
        </a-spin>
        <p></p>
      </a-col>
    </a-card>
  </a-modal>
</template>

<script>

import {minioList} from "../../../api/api";
import ARow from 'ant-design-vue/es/grid/Row'
import HeadInfo from '@/components/tools/HeadInfo'
export default {
  name: 'ShipPicList',
  components: {
    ARow,HeadInfo
  },
  data () {
    return {
      statusList: [],
      modalWidth: '90%',
      modalStyle: { 'top': '8px'},
      ids:'',
      imgs:[],
      spinning:false,
      visible:false,
      imageSource: [{
        key:0,
        fileDetails:[
          {
            imgUrl:"https://static.jeecg.com/upload/test/3a4490d5d1cd495b826e528537a47cc1.jpg"
          },
          {
            imgUrl:"https://static.jeecg.com/temp/国炬软件logo_1606575029126.png"
          },
          {
            imgUrl:"https://static.jeecg.com/upload/test/3a4490d5d1cd495b826e528537a47cc1.jpg"
          },
          {
            imgUrl:"https://static.jeecg.com/temp/国炬软件logo_1606575029126.png"
          },
          {
            imgUrl:"https://static.jeecg.com/upload/test/3a4490d5d1cd495b826e528537a47cc1.jpg"
          },
          {
            imgUrl:"https://static.jeecg.com/temp/国炬软件logo_1606575029126.png"
          },
          {
            imgUrl:"https://static.jeecg.com/upload/test/3a4490d5d1cd495b826e528537a47cc1.jpg"
          },
          {
            imgUrl:"https://static.jeecg.com/temp/国炬软件logo_1606575029126.png"
          }
        ]
      }
      ],
    }
  },
  methods: {
    edit (headId) {
      minioList({head_id:headId}).then((res)=>{
        if (res.code == 200) {
          if(res.result.length>0){
            this.visible=true;
            this.imageSource[0].fileDetails=[];
            for (var i=0;i<res.result.length;i++){
              this.imageSource[0].fileDetails.push({imgUrl:res.result[i].url});
            }
          }else{
            this.visible=false;
            this.$message.error("未上传照片");
          }

        }
      });
    },

    handleCancel(){
      this.imgs=[];
      this.visible = false
    },


    }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
<style scoped>
.table-operator {
  margin-bottom: 10px
}

.clName .ant-tree li span.ant-tree-switcher, .ant-tree li span.ant-tree-iconEle {
  width: 10px !important;
}

.clName .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
  background-color: #1890FF !important;
}
</style>