Edit in JSFiddle

Vue.component('check-all', {
  template: '<input type="checkbox" @click="checkall()" />',
  // 但是我们却给每个组件实例返回了同一个对象的引用
  props: {
    // 必须为string类型
    data: {
      type: String,
    },
  },
  methods: {
    checkall: function() {
      var data = this.data ? this.data : "list";
      var row = this.$root.$refs[data].rows;
      var arr = [];
      var sels = [];
      for (var i = 1; i < row.length; i++) {
        if (row[i].children[0].children[0].checked) {
          arr.push(row[i].children[0].children[0].checked);
        };
      };
      if (arr.length === row.length - 1) {
        for (var i = 1; i < row.length; i++) {

          row[i].children[0].children[0].checked = false;
        }
      } else {
        for (var i = 1; i < row.length; i++) {
          row[i].children[0].children[0].checked = true;
          sels.push(this.$root[data][row[i - 1].rowIndex]);
        }
      }
      this.$emit('ymhy-select-all', sels)
    }
  }
})
Vue.component('check-item', {
  template: '<input type="checkbox" @click="checkitem()" />',
  // 技术上 data 的确是一个函数了,因此 Vue 不会警告,
  // 但是我们却给每个组件实例返回了同一个对象的引用
  props: {
    // 数组/对象的默认值应当由一个工厂函数返回
    data: {
      type: String,
    },
  },
  data: function() {
    return {}
  },
  methods: {
    checkitem: function() {
      var data = this.data ? this.data : "list";
      var row = this.$root.$refs[data].rows;
      var arr = [];
      var sels = [];
      for (var i = 1; i < row.length; i++) {
        if (row[i].children[0].children[0].checked) {
          arr.push(row[i].children[0].children[0].checked);
          sels.push(this.$root[data][row[i - 1].rowIndex]);
        };
      }
 
      if (arr.length === row.length - 1) {
        row[0].children[0].children[0].checked = true;
      } else {
        row[0].children[0].children[0].checked = false;
      }
      this.$emit('ymhy-select-item', sels)
    },
  }
})

var Main = {
  data() {
      return {
        zx: [{
          id: 1,
          date: '2016-05-03',
          name: '张三',
          sex: '男',
          phone: '17688888888',
          status: '在职',
          position: '普通员工'
        }, {
          id: 2,
          date: '2016-05-03',
          name: '李四',
          sex: '男',
          phone: '17611111111',
          status: '离职',
          position: '基地负责人'
        }, {
          id: 3,
          date: '2016-05-03',
          name: '王五',
          sex: '男',
          phone: '17699999999',
          status: '在职',
          position: '分区负责人'
        }, {
          id: 4,
          date: '2016-05-03',
          name: '赵六',
          sex: '男',
          phone: '17622222222',
          status: '在职',
          position: '普通员工'
        }, {
          id: 5,
          date: '2016-05-03',
          name: '仓鼠',
          sex: '男',
          phone: '17677777777',
          status: '离职',
          position: '普通员工'
        }, {
          id: 6,
          date: '2016-05-03',
          name: '荷兰猪',
          sex: '男',
          phone: '17655555555',
          status: '在职',
          position: '普通员工'
        }],
        currentPage: 1, //分页参数ue: '3'
        multipleSelection: [],
      }
    },

    methods: {
      toggleSelection: function(rows) {
        if (rows) {
          rows.forEach(row => {
            this.$refs.multipleTable.toggleRowSelection(row);
          });
        } else {
          this.$refs.multipleTable.clearSelection();
        }
      },
      handleSelectionChange: function(val) {
        this.multipleSelection = val;
      },
      handleSizeChange: function(val) {
        console.log('每页' + val + '条');
      },
      handleCurrentChange: function(val) {
        console.log('当前页:' + val);
      },
      checkall: function(sels) {
      console.log(sels)
      },
      checkitem: function(sels) {
        console.log(sels)
      },

    },
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
@import url("//unpkg.com/[email protected]/lib/theme-chalk/index.css");
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
  <div class="panel-body">
    <!-- 查询表单 -->
    <div>
      <table class="table table-bordered table-striped" ref="zx">
        <thead>
          <tr>
            <th>
              <!-- <input type="checkbox" @sel="checkfull()" /> -->
              <check-all data="zx" @ymhy-select-all="checkall"></check-all>
            </th>
            <th>序号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>手机号码</th>
            <th>职位</th>
            <th>入职时间</th>
            <th>在职状态</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="(item,index) in zx">
            <td>
              <!--               <input type="checkbox" data="list" @click="checkitem(item,index)" /> -->
              <check-item data="zx" @ymhy-select-item="checkitem"></check-item>
            </td>
            <td>{{index+1}}</td>
            <td>
              <a href="mandetails" style="color:#20a0ff;text-decoration: underline;">{{item.name}}</a>
            </td>
            <td>{{item.sex}}</td>
            <td>{{item.phone}}</td>
            <td>{{item.position}}</td>
            <td>{{item.date}}</td>
            <td>{{item.status}}</td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="block">
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="8000">
      </el-pagination>
    </div>
  </div>
</div>