<style>
  .signList_Table{
    width:100%;
    border-collapse:collapse;
    margin-top:20px;
  }
  .signTableDiv{
    width:100%;
    min-width: 800px;
    /* overflow: hidden; */
    overflow-x: auto;
  }
  .signList_Table th{
    border:1px solid #EBEEF5;
    height:48px;
    line-height: 48px;
    text-align: center;
    color:#909399;
    padding:0 10px;
    text-align: left;
  }
  .signList_Table td{
    border:1px solid #EBEEF5;
    height:48px;
    line-height: 48px;
    text-align: center;
    color:#606266;
    font-size:14px;
    padding:0 10px;
    text-align: left;
  }
  .signList_Table tr:hover>td{
    background-color: #F5F7FA;
  }
</style>
<template>
  <div class="signList tradeactivity">
    <div class="head-title">
      活动报名列表
    </div>
    <div class="content">
      <div>
        <div class="searchInput" style="width:250px">
          <el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
            style="display:inline-block;width:225px;height:30px" placeholder="活动名称" v-model="msg.ActivityName"
            size="small" clearable>
          </el-input>
          <span @click="msg.pageIndex=1,getList()" class="el-icon-search"
            style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
        </div>
        <div style="float:right;">
          <el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="Export()">导出</el-button>
        </div>
      </div>
      <div class="signTableDiv">
        <table class="signList_Table" cellpadding="0" cellspa>
          <thead>
            <tr>
              <th>
                用户昵称
              </th>
              <th>
                认证状态
              </th>
              <th>
                认证公司
              </th>
              <th>
                认证信息
              </th>
              <th>
                公司
              </th>
              <th>
                性质
              </th>
              <th>
                联系人
              </th>
              <th>
                联系电话
              </th>
              <th>
                职务
              </th>
              <th>
                地址
              </th>
            </tr>
          </thead>
          <tbody v-for="(item,index) in tableData" :key="index">
            <tr v-for="(sItem,sIndex) in item.SignUserList" :key="sIndex">
              <td :rowspan="item.SignUserList.length>1?item.SignUserList.length:0" v-if='sIndex==0'>
                {{item.UserName}}
              </td>
              <td :rowspan="item.SignUserList.length>1?item.SignUserList.length:0" v-if='sIndex==0'>
                {{item.CompanyStatusStr}}
              </td>
              <td :rowspan="item.SignUserList.length>1?item.SignUserList.length:0" v-if='sIndex==0'>
                {{item.CompanyName}}
              </td>
              <td :rowspan="item.SignUserList.length>1?item.SignUserList.length:0" v-if='sIndex==0'>
                {{item.AuthName}}
              </td>
              <td>
                {{sItem.CompanyName}}
              </td>
              <td>
                {{sItem.Nature}}
              </td>
              <td>
                {{sItem.LinkMan}}
              </td>
              <td>
                {{sItem.LinkTel}}
              </td>
              <td>
                {{sItem.Post}}
              </td>
              <td>
                {{sItem.CountryInfo}}
              </td>
            </tr>
          </tbody>

        </table>
      </div>
      <el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
        :current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
      </el-pagination>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        msg: {
          pageIndex: 1,
          pageSize: 10,
          ActivityId: 0
        },
        tableData: [],
        total: 0,
      };
    },
    created() {},
    mounted() {
      if (this.$route.query.Id) {
        this.msg.ActivityId = this.$route.query.Id;
      }
      this.getList();
    },
    methods: {
      getList() {
        this.loading = true;
        this.apipost("/api/Trade/GetConsultStaticPage", this.msg, res => {
          this.loading = false;
          if (res.data.resultCode == 1) {
            this.tableData = res.data.data.pageData;
            console.log("tableData", this.tableData);
            this.total = res.data.data.count;
          }
        })
      },
      //导出
      Export() {
        this.GetLocalFile(
          "/api/Trade/DownLoadConsultStatic", this.msg,
          "活动报名.xls"
        );
      },
      handleCurrentChange(val) {
        this.msg.pageIndex = val;
        this.getList();
      },
    }
  };

</script>
<style>
  .signTable {
    border-collapse: collapse;
  }

  .signTable tr td {
    border: 1px solid grey;
  }

  .signList .remark_name {
    color: #888888;
    font-size: 12px;
    margin-left: 10px;
    float: right;
  }

  .signList .app-image {
    background-position: center center;
    width: 50px;
    height: 50px;
    border-radius: 0%;
    float: left;
    margin-right: 8px;
  }

  .signList .blue {
    color: #409EFF;

  }

  .signList .content .searchInput {
    border: 1px solid #DCDFE6;
    border-radius: 4px;
  }

  .signList .content .searchInput .el-input__inner {
    border: none;
    outline: none;
    height: 30px;
    line-height: 30px;
  }

  .signList .content .searchInput {
    line-height: normal;
    display: inline-table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    width: 250px;
    margin-right: 20px;
  }

  .signList .content {
    background: #fff;
    margin-top: 10px;
    padding: 20px;
    box-sizing: border-box;
  }

  .tradeactivity .el-form-item__content {
    line-height: 0;
  }

</style>
