// 合同模板
<template>
  <div class="center">
    <div class="center_css">
      <div class="top_css">
        <el-row>
          <el-col :span="14">
            <el-button type="primary">添加</el-button>
          </el-col>
          <el-col :span="10">
            <div class="screen">
              <el-input class='find' placeholder="可按司机姓名、账号、身份证号查找" @keyup.enter.native="find" v-model="searchkeyWord" clearable></el-input>
              <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
                  src="../../../public/img/sousuo.png" /></el-button><span
                class="count_css">共{{ deptBudgetTotal }}条</span>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col>
            <div class="search_btn">
              <div :class="search == '' ? 'search' : 'searchNo'" class="search_item search_block"
                @click="searchBtn('')">
                全部
              </div>
              <div :class="search == 1 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(1)">
                待审核
              </div>
              <div :class="search == 3 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(3)">
                已通过
              </div>
              <div :class="search == 2 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(2)">
                已驳回
              </div>
              <div :class="search == 5 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(5)">
                已过期
              </div>
              <!-- <div :class="search == 7 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(7)">
								未认证
							</div> -->
              <!-- <div :class="search == 8 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(8)">
								已注销
							</div> -->
              <div :class="search == 4 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(4)">
                已禁用
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="55.8vh" border>
        <el-table-column type="index" width="60"  label="序号" align="center">
            <template scope="scope">
                <span>{{scope.$index + 1}}</span>
                <!-- <span v-else>{{scope.$index}}</span> -->
            </template>
        </el-table-column>
        <el-table-column prop="driverName" label="司机姓名" min-width="130"></el-table-column>
        <el-table-column prop="driverPhone" label="账号" min-width="110"></el-table-column>
        <el-table-column prop="numberCard" label="身份证号" min-width="165"></el-table-column>
        <el-table-column prop="amountMoney" label="承运次数"></el-table-column>
        <el-table-column prop="createDate" label="注册日期" min-width="100"></el-table-column>
        <el-table-column prop="authenticationStatus" label="状态"></el-table-column>
        <el-table-column label="操作" min-width="300">
          <template slot-scope="scope">
            <el-link target="_blank" type="primary" :underline="false">通过</el-link>
            <el-divider direction="vertical"></el-divider>
            <el-link target="_blank" type="primary" :underline="false">驳回</el-link>
            <el-divider direction="vertical"></el-divider>
            <el-link target="_blank" type="primary" :underline="false">消息</el-link>
            <el-divider direction="vertical"></el-divider>
            <el-dropdown>
              <span class="btn_css">•••</span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item><span @click="switchChange(scope.row,'1')">禁用</span>
                </el-dropdown-item>
                <el-dropdown-item><span @click="switchChange(scope.row,'2')">启用</span>
                </el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
      style="text-align: center; margin-top: 10px" :page-size="deptCircularPage.pageSize"
      layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
    </el-pagination>
    <!-- //消息 -->
    <el-dialog :close-on-click-modal='false' title="发送信息" :visible.sync="sendInfo" width="400px" :before-close="sendInfoClose">
      <div class="Info_css">
        <div class="Info_title">标题</div>
        <div class="Info_item">
          <el-input placeholder="输入消息标题，不超过4-20个字。" v-model="Info.newsTitle" maxlength="20"></el-input>
        </div>
        <div class="Info_title">内容</div>
        <div class="Info_item">
          <el-input type="textarea" :rows="3" resize="none" placeholder="消息内容10-100字" maxlength="100"
            v-model="Info.newsContent"></el-input>
        </div>
        <div class="Info_btn">
          <el-button @click="sendInfoClose">取消</el-button>
          <el-button @click="submitInfo" type="primary">确定</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
  // import {} from '@/api/driverManagement'
  export default {
    data() {
      return {
        tableData: [],
        //分页
        searchkeyWord: "",
        currentPage: 1,
        pageSize: 10,
        deptBudgetTotal: 0,
        deptCircularPage: {},
        search: "",
        Info: {},
        sendInfo: false,

      };
    },

    mounted() {
      this.getList()
    },
    methods: {
      getList() {
        this.listLoading = true
      },
      find() {
        this.currentPage = 1
        this.getList()
      },
      sendInfoClose() {
        this.sendInfo = false
      },
      submitInfo() {},
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.pageSize = val;
        this.getList();
      },
      handleCurrentChange(val) {
        this.currentPage = val;
        console.log(`当前页: ${val}`);
        this.getList();
      },
    },
  };
</script>
<style lang="scss" scoped>
  .center {
    padding: 10px 20px;
    background: #f5f6f7;
    min-height: calc(100vh - 50px);

    .top_css {
      padding: 10px;

      .search_btn {
        height: 80px;
        background: linear-gradient(#fafbfb, #ffffff);
        display: flex;
        margin-top: 20px;

        .search_block {
          margin-left: 20px;
        }

        .search_item {
          text-align: center;
          font-size: 14px;
          font-weight: 600;
          line-height: 40px;
          width: 112px;
          height: 40px;
          background: #f7f8f9;
          cursor: pointer;
          margin-top: 30px;
        }

        .searchNo {
          color: #323233;
        }

        .search {
          color: #2f53eb;
          background: #ffffff;
        }
      }
    }

    .screen {
      display: flex;

      .search {
        width: 40px;
        height: 40px;
        background: #2f53eb;
        border-radius: 0px 2px 2px 0px;
        border: 1px solid #DCDFE6;
        margin-left:-1px;
      }

      .count_css {
        width: 80px;
        text-align: center;
        line-height: 40px;
        color: #666666;
      }
    }

    .el-button {
      padding: 10px 20px !important;
    }

    .center_css {
      background: #ffffff;
      border-radius: 1px;
      margin-top: 10px;
      padding-bottom: 10px;

      ::v-deep .el-table th,
      ::v-deep .el-table td {
        text-align: center;
      }

      .fujian {
        font-size: 24px;
        color: #409eff;
      }

      .warning {
        font-size: 14px;
        color: #ed1d1d;
      }
    }
  }
.el-button--primary {
    color: #FFF;
    background-color: #2f53eb;
    border-color: #2f53eb;
}
  .tips {
    color: #999999;
    font-size: 14px;
  }

  .car_item {
    width: 200px;
    height: 160px;
    border-radius: 5px;
  }

  ::v-deep .el-table--border .el-table__header th {
    background: #f7f8f9;
  }

  .btn_css {
    color: #409EFF;
    cursor: pointer
  }

  .btn_css1 {
    margin-left: -20px;
  }

  .sign {
    font-size: 14px;
    color: red;
  }

  //发送信息
  .Info_css {
    .Info_title {
      color: #323233;
      font-size: 16px;
    }

    .Info_item {
      margin: 20px 0;
    }

    .Info_btn {
      text-align: right;
      margin-top: 10px;
    }
  }
  .find::v-deep input.el-input__inner{
    border-radius:0;
  }
</style>
