<template>
  <div class="invigilation-detail">
    <div class="part-box-head">
      <div class="part-box-head-left"><h1>监考明细管理</h1></div>
    </div>

    <div class="part-filter">
      <div class="part-filter-form">
        <el-form
          class="part-box-filter-form"
          ref="FilterForm"
          label-position="left"
          inline
        >
          <el-form-item>
            <el-select
              v-model="filter.batchId"
              placeholder="请选择批次"
              clearable
            >
              <el-option
                v-for="item in batchs"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select
              v-model="filter.examroom"
              placeholder="请选择场次"
              clearable
            >
              <el-option
                v-for="item in exams"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select
              v-model="filter.examroom"
              placeholder="请选择考场"
              clearable
            >
              <el-option
                v-for="item in exams"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select
              v-model="filter.subjectId"
              placeholder="请选择科目"
              clearable
            >
              <el-option
                v-for="item in subjects"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-input
              v-model.trim="filter.content"
              placeholder="姓名/证件号"
              clearable
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-select
              v-model="filter.subjectId"
              placeholder="交卷方式"
              clearable
            >
              <el-option
                v-for="item in subjects"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select
              v-model="filter.subjectId"
              placeholder="筛选状态"
              clearable
            >
              <el-option
                v-for="item in subjects"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select
              v-model="filter.subjectId"
              placeholder="违纪/缺考"
              clearable
            >
              <el-option
                v-for="item in subjects"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="陌生人脸">
            <el-input-number
              style="width: 52px;"
              v-model.trim="filter.strangePersonDown"
              placeholder="下限"
              :controls="false"
            ></el-input-number>
            <span>-</span>
            <el-input-number
              style="width: 52px;"
              v-model.trim="filter.strangePersonUp"
              placeholder="上限"
              :controls="false"
            ></el-input-number>
          </el-form-item>
          <el-form-item label="异常处理">
            <el-input-number
              style="width: 52px;"
              v-model.trim="filter.exceptionDown"
              placeholder="下限"
              :controls="false"
            ></el-input-number>
            <span>-</span>
            <el-input-number
              style="width: 52px;"
              v-model.trim="filter.exceptionUp"
              placeholder="上限"
              :controls="false"
            ></el-input-number>
          </el-form-item>
          <el-form-item label="预警数">
            <el-input-number
              style="width: 52px;"
              v-model.trim="filter.warningDown"
              placeholder="下限"
              :controls="false"
            ></el-input-number>
            <span>-</span>
            <el-input-number
              style="width: 52px;"
              v-model.trim="filter.warningUp"
              placeholder="上限"
              :controls="false"
            ></el-input-number>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="toPage(1)">查询</el-button>
          </el-form-item>
        </el-form>
      </div>

      <div class="part-filter-info">
        <div class="part-filter-info-main summary-line">
          <p class="summary-line-item">
            <i class="icon icon-users"></i
            ><span class="line-name">全部应考</span><span>50人</span>
          </p>
          <p class="summary-line-item">
            <i class="line-point line-point-info"></i
            ><span class="line-name">已登录</span><span>5人</span>
          </p>
          <p class="summary-line-item">
            <i class="line-point line-point-success"></i
            ><span class="line-name">已待考</span><span>3人</span>
          </p>
          <p class="summary-line-item">
            <i class="line-point line-point-primary"></i>
            <el-popover
              placement="top-start"
              width="200"
              trigger="hover"
              content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
            >
              <span class="line-name" slot="reference">考试中</span>
            </el-popover>
            <span>2人</span>
          </p>
          <p class="summary-line-item">
            <i class="line-point line-point-danger"></i>
            <span class="line-name">已交卷</span><span>1人</span>
          </p>
        </div>
      </div>
    </div>

    <el-table ref="TableList" :data="dataList" border stripe>
      <el-table-column prop="batchName" label="批次"></el-table-column>
      <el-table-column prop="examName" label="场次"></el-table-column>
      <el-table-column prop="examroom" label="考场"> </el-table-column>
      <el-table-column prop="examId" label="考试ID"></el-table-column>
      <el-table-column prop="stdCardNo" label="证件号"></el-table-column>
      <el-table-column prop="stdName" label="姓名"></el-table-column>
      <el-table-column prop="subjectName" label="联系电话"></el-table-column>
      <el-table-column prop="subjectCode" label="科目(代码)"></el-table-column>
      <el-table-column prop="strangeNumber" label="状态"></el-table-column>
      <el-table-column prop="strangeNumber" label="交卷方式"></el-table-column>
      <el-table-column prop="strangeNumber" label="陌生人脸"></el-table-column>
      <el-table-column
        prop="exceptionNumber"
        label="异常处理"
      ></el-table-column>
      <el-table-column prop="warningNumber" label="预警数"></el-table-column>
      <el-table-column prop="isDiscipline" label="违纪"></el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
            class="btn-table-icon"
            type="primary"
            icon="icon icon-view"
            @click="toDetail(scope.row)"
            >详情</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <div class="part-page">
      <el-pagination
        background
        layout="prev, pager, next,total,sizes,jumper"
        :current-page="current"
        :total="total"
        :page-size="size"
        @current-change="toPage"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  name: "invigilation-detail",
  data() {
    return {
      filter: {
        batchId: null,
        examroom: null,
        subjectId: null,
        auditStatus: null,
        content: "",
        strangePersonUp: null,
        strangePersonDown: null,
        exceptionUp: null,
        exceptionDown: null,
        warningUp: null,
        warningDown: null,
      },
      current: 1,
      total: 0,
      size: 10,
      batchs: [],
      exams: [],
      subjects: [],
      dataList: [
        {
          id: 1,
          batchName: "第一批次",
          examName: "第一场次",
          examroom: "第一考场",
          examId: "123456",
          stdCardNo: "000000000000000008",
          stdName: "张龙龙",
          subjectName: "大学英语",
          subjectCode: "10006",
          strangeNumber: "0",
          exceptionNumber: "2",
          warningNumber: "2",
          isDiscipline: "",
          auditStatus: "未阅",
        },
      ],
    };
  },
  methods: {
    getList() {},
    toPage() {},
    cleanUnread() {},
    batchAction() {},
    toDetail(row) {
      console.log(row);
      this.$router.push({ name: "WainingDetail", params: { id: row.id } });
    },
  },
};
</script>
