<template>
  <el-dialog
    :title="dialogTitle"
    :visible.sync="dialogVisible"
    width="600px"
    append-to-body
  >
  <div class="statistics_box">
    <div class="value">数据总条数{{extent}}</div>
  </div>
    <el-table :data="phoneList" border>
      <el-table-column
        label="用户手机号"
        align="center"
        prop="phone"
      />
    </el-table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel">关 闭</el-button>
    </div>
  </el-dialog>
</template>
<script>

export default {
  name: "editCategory",
  watch: {
  },
  data() {
    return {
      dialogTitle: "查看名单",
      dialogVisible: false,
      phoneList: [],
    
      extent:0,
      
    };
  },
  methods: {

    cancel() {
      this.extent=0;
      this.phoneList=[];
      this.dialogVisible = false;
    },
    show(list) {
      if (list) {
          for(var i=0;i<list.length;i++){
            var phoneObj = {};
            phoneObj.phone=list[i];
            console.log(phoneObj);
            this.phoneList.push(phoneObj)
            
          }
       this.extent=list.length
      }
      this.dialogVisible = true;
    },
    dismiss() {
      this.dialogVisible = false;
    },

  },
};
</script>
<style scoped>
.dialog-footer {
  display: flex;
  padding-bottom: 20px;
  justify-content: flex-end;
}
</style>
