<!-- -->
<template>
  <el-dialog
    :visible.sync="dialogVisible"
    width="80%"
    style="height: 98%"
    :before-close="handleClose"
    top="5vh"
    lock-scroll
  >
    <div class="title" slot="title">
      <div class="divider"></div>
      <div class="label">选择需要复制的条目</div>
    </div>
    <div class="dialog-content">
      <TablePage
        :data="list.records"
        :tableTitle="tableTitle"
        hasSelection
        @handleCurrentChange="handleCurrentChange"
      >
        <!-- <template v-slot:displayType="data">
          {{ dict.displayType[data.scope.type] }}
        </template> -->
        <template v-slot:faceImageUrl="data">
          <img
            :src="data.scope.faceImageUrl"
            alt="查看大图"
            v-if="data.scope.faceImageUrl"
            style="cursor: pointer"
            width="100px"
            @click="handelPreviewImages(data.scope.faceImageUrl)"
          />
        </template>
      </TablePage>
      <div class="dialog-footer">
        <el-button type="primary" size="mini" @click="handleClose">关闭</el-button>
      </div>
    </div>
  </el-dialog>
</template>

<script>
import { title, operates, operations } from "../config";
import TablePage from "@/components/Table/TablePage.vue";
export default {
  components: {
    TablePage,
  },
  data() {
    return {};
  },
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    list: {
      type: Object,
      default: () => ({}),
    },
  },

  computed: {
    tableTitle() {
      return title;
    },
    dialogVisible: {
      get: function () {
        return this.visible;
      },
      set: function () {},
    },
  },
  mounted() {},
  methods: {
    handleClose() {
      this.$emit("handleClose");
    },
    handleCurrentChange(value) {
      this.handleClose();
      this.$emit("handleCopySelect",value);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>
