bxtp.vue 1.33 KB
<template>
  <div>
    <template v-if="this.row.wbxbfwttp">
      <el-link type="primary" @click="onClick">查看图片</el-link>
    </template>
    <template v-else>
      <el-link disabled type="primary" target="_blank">-</el-link>
    </template>
    <el-image-viewer v-if="isShowPics" :on-close="closeViewer" :url-list="srcList" />
  </div>
</template>
<script>
import ElImageViewer from "element-ui/packages/image/src/image-viewer";

export default {
  components: { ElImageViewer },
  props: {
    row: {
      type: Object
    },
    column: {
      type: Object
    },
    index: {
      type: String
    },
    desc: {
      type: String
    }
  },

  data() {
    return {
      isShowPics: false,
      srcList: []
    };
  },
  created() {

  },
  methods: {
    // 关闭查看器
    closeViewer() {
      this.isShowPics = false;
    },
    onClick() {
      let this_ = this;
      if (this.row.wbxbfwttp) {
        JSON.parse(this.row.wbxbfwttp).forEach(d => {
          this_.srcList.push(this_.$requestConfig.getImgSrc(d.response.fileId));
        });
        this.isShowPics = true;
      }
    }
  }
};
</script>

<style scoped lang="scss">
::v-deep .el-dialog__header {
  display: none;
}

.el-carousel__item:nth-child(2n) {
  //background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  //background-color: #d3dce6;
}
</style>