<template>
  <div class="container">
    <el-dialog
      :visible.sync="contactTransferDlgVisible"
      :close-on-click-modal="false"
      :modal-append-to-body="true"
      :append-to-body="true"
      title="联系人转移记录"
      @close="$emit('update:contactTransferDlgVisible', false)"
      width="800px"
      v-dialogDrag
      center
    >
      <el-table :data="dataList" border max-height="300">
        <el-table-column label="转移时间" prop="CreateTime" align="center"> </el-table-column>
        <el-table-column label="原公司" prop="CompanyName" align="center"> </el-table-column>
        <el-table-column label="移至公司" prop="CompanyNameMove" align="center"> </el-table-column>
      </el-table>
      <div class="container-close">
        <el-button @click="$emit('update:contactTransferDlgVisible', false)">关闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { customInterence } from "@/api/api.js";

export default {
  name: "",
  components: {},
  props: {
    contactTransferDlgVisible: {
      type: Boolean,
      default: false,
    },
    TransferMobile:{
      type: Number,
      default: 0,
    }
  },
  data() {
    return {
      dataList: [],
    };
  },
  computed: {},
  watch: {
    contactTransferDlgVisible: {
      handler(val) {
        if (val) {
          this.getDateList();
        }
      },
      deep: true,
      immediate: true,
    },
  },
  created() {},
  mounted() {},
  methods: {
    async getDateList() {
      const res = await customInterence.getCustomListMoveLog({
        Mobile: this.TransferMobile,
      });
      if (res.Ret === 200) {
        this.dataList = res.Data.List;
      }
      console.log(res, "-----");
    },
  },
};
</script>
<style scoped>
.container-close {
  margin: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
