<template>
  <el-card
    shadow="never"
    class="aui-card--fill"
  >
    <div class="mod-sys__user">
      <el-form
        :inline="true"
        :model="dataForm"
        @keyup.enter.native="getDataList()"
      >
        <el-form-item>
          <el-input
            v-model="dataForm.company"
            placeholder="请输入单位名称"
            clearable
          ></el-input>
        </el-form-item>

        <el-form-item>
          <el-input
            v-model="dataForm.name"
            placeholder="请输入姓名"
            clearable
          ></el-input>
        </el-form-item>

        <el-form-item>
          <el-button @click="getDataList()">{{ $t('query') }}</el-button>
        </el-form-item>

        <el-form-item>
          <el-button
            v-if="$hasPermission('user:user:delete')"
            type="danger"
            @click="deleteHandle()"
          >{{ $t('deleteBatch') }}</el-button>
        </el-form-item>

        <!--  <el-form-item>
          <el-button
            type="info"
            @click="taozhuan()"
          >跳转页面测试按钮</el-button>
        </el-form-item> -->
      </el-form>
      <el-table
        v-loading="dataListLoading"
        :data="dataList"
        border
        @selection-change="dataListSelectionChangeHandle"
        style="width: 100%;"
      >
        <el-table-column
          type="selection"
          header-align="center"
          align="center"
          width="50"
        ></el-table-column>

        <el-table-column
          prop="company"
          label="单位"
          header-align="center"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="name"
          label="联系人"
          header-align="center"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="email"
          label="邮箱"
          header-align="center"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="updateDate"
          label="创建时间"
          header-align="center"
          align="center"
        ></el-table-column>
        <!--   <el-table-column prop="id" label="用户ID" header-align="center" align="center"></el-table-column>
       
        <el-table-column prop="sex" label="性别；1,男;2,女" header-align="center" align="center"></el-table-column>
        <el-table-column prop="mobile" label="手机号" header-align="center" align="center"></el-table-column>
       
        
        <el-table-column prop="position" label="所属职位" header-align="center" align="center"></el-table-column>
        <el-table-column prop="member" label="是否会员;1,是;2,否" header-align="center" align="center"></el-table-column>
        <el-table-column prop="committeeId" label="委员会ID" header-align="center" align="center"></el-table-column>
        <el-table-column prop="areaId" label="区市ID" header-align="center" align="center"></el-table-column>
        <el-table-column prop="ifCheck" label="是否审核;0,待审核1,已审核;2,审核未通过" header-align="center" align="center"></el-table-column>
        <el-table-column prop="openid" label="微信用户openId" header-align="center" align="center"></el-table-column>
        <el-table-column prop="creator" label="创建者" header-align="center" align="center"></el-table-column>
   
        <el-table-column prop="updateDate" label="更新时间" header-align="center" align="center"></el-table-column> -->
        <el-table-column
          :label="$t('handle')"
          fixed="right"
          header-align="center"
          align="center"
          width="150"
        >
          <template slot-scope="scope">
            <el-button
              v-if="$hasPermission('user:user:update')"
              type="text"
              size="small"
              @click="taozhuan(scope.row.id)"
            >审核</el-button>
            <!--  <el-button
              v-if="$hasPermission('user:user:delete')"
              type="text"
              size="small"
              @click="deleteHandle(scope.row.id)"
            >{{ $t('delete') }}</el-button> -->
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        :current-page="page"
        :page-sizes="[10, 20, 50, 100]"
        :page-size="limit"
        :total="total"
        layout="total, sizes, prev, pager, next, jumper"
        @size-change="pageSizeChangeHandle"
        @current-change="pageCurrentChangeHandle"
      >
      </el-pagination>

    </div>
  </el-card>
</template>

<script>
import mixinViewModule from "@/mixins/view-module";

export default {
  mixins: [mixinViewModule],
  data() {
    return {
      mixinViewModuleOptions: {
        getDataListURL: "/user/user/page?check=0",
        getDataListIsPage: true,
        exportURL: "/user/user/export",
        deleteURL: "/user/user",
        deleteIsBatch: true,
      },
      dataForm: {
        company: "",
        name: "",
      },
    };
  },
  methods: {
    taozhuan(id) {
      console.log("id", id);
      this.$router.push({
        path: "/memberManageExamine",
        query: { type: "shenhe", id: id },
      });
    },
  },
  shenhe(id) {},
};
</script>
