<template>
  <div>
    <!-- 基本信息区 -->
    <div class="readTop">
      <div class="baseMes">基本信息</div>
      <router-link to="/read">
        <span class="back">返回</span>
      </router-link>
    </div>
    <!-- 表格区域-->
    <table style="border-collapse:collapse;" class="tabEdit">
      <tr class="tr">
        <th>班级名称:</th>
        <td colspan="3">
          <input />
        </td>
      </tr>
      <tr>
        <th>学科:</th>
        <td style="padding:0">
          <el-select style="width:100% ;height:100%;border-radius:0" size="large" class="se">
            <el-option></el-option>
          </el-select>
        </td>
        <th>年级:</th>
        <td>
          <input />
        </td>
      </tr>
      <tr>
        <th>主负责人:</th>
        <td>
          <input />
        </td>
        <th>副负责人:</th>
        <td>
          <input />
        </td>
      </tr>
      <tr>
        <th>学科教师:</th>
        <td>
          <input />
        </td>
        <th>开班日期</th>

        <td style="padding:0" class="riqi">
          <el-date-picker
            style="width:100% ;height:100%;border:none"
            size="large"
            type="date"
            placeholder
          ></el-date-picker>
        </td>
      </tr>
      <tr>
        <th>状态:</th>
        <td>
          <el-checkbox>已毕业</el-checkbox>
          <el-checkbox>未毕业</el-checkbox>
        </td>
        <th>毕业日期：</th>
        <td style="padding:0" class="riqi">
          <el-date-picker
            style="width:100% ;height:100%;border:none"
            size="large"
            type="date"
            placeholder
          ></el-date-picker>
        </td>
      </tr>
    </table>
    <!-- 保存按钮 -->
    <el-button type="primary" size="mini" class="saveBtn">保存</el-button>

    <!-- 学生信息区域 -->
    <!-- 表格区域-->
    <table style="border-collapse:collapse;">
      <tr class="trmes">
        <th></th>
        <th>班级名称</th>
        <th>序号</th>
        <th>学生姓名</th>
        <th>学号/登录名</th>
        <th>家长姓名</th>
        <th>家长手机</th>
        <th>学生手机</th>
        <th>身份证</th>
        <th>操作</th>
      </tr>
    </table>
    <div class="kong">
      尚未添加学生，请尽快添加
      <el-button size="mini" type="primary" class="addBtn" @click="addDialog">手动添加</el-button>
    </div>

    <!-- 添加学生的对话框 -->

    <el-dialog class="addStu" title="添加学生" :visible.sync="addDialogVisible" width="60%">
      <span>
        <a href="#" class="copy">可从Excel表格中复制粘贴 或 手动输入</a>
        <table style="border-collapse:collapse;" class="addTable">
          <tr class="trmes">
            <th>班级名称</th>
            <th>序号</th>
            <th>学生姓名</th>
            <th>学号/登录名</th>
            <th>家长姓名</th>
            <th>家长手机</th>
          </tr>
          <tr>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
          </tr>
          <tr>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
          </tr>
          <tr>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
          </tr>
          <tr>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
          </tr>
          <tr>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
            <td>
              <input type="text" />
            </td>
          </tr>
        </table>
        <div class="line"></div>
      </span>

      <span slot="footer" class="dialog-footer">
        <el-button size="mini" @click="addDialogVisible = false">取 消</el-button>
        <el-button size="mini" type="primary" @click="addDialogVisible = false">添加</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [
        {
          id: "1",
          studentName: "第一期",
          xuehao: 56,
          parentName: "南湖恺",
          parentTel: "数学",
          studentTel: "123",
          idNum: "黄晓静"
        }
      ],
      addDialogVisible: false
    };
  },
  methods: {
    // 手动添加学生
    addDialog() {
      this.addDialogVisible = true;
    }
  }
};
</script>
<style scoped>
.readTop {
  position: relative;
  width: 100%;
  height: 40px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 45px;
}
.back {
  position: absolute;
  right: 0;
  color: #529bff;
}

.baseMes {
  position: absolute;
  top: 29px;
  left: 20px;
  background-color: #fff;
  padding: 0 5px;
}
/* 表格区域 */
table {
  font-size: 14px;
  color: #333;
  width: 100%;
  border: 1px solid #ccc;
  margin-top: 30px;
}
th {
  width: 20%;
  border: 1px solid #ccc;
  height: 40px;
  background-color: #fafafa;
}

td {
  padding-left: 10px;
  width: 30%;
  border: 1px solid #ccc;
  overflow: hidden;
}
td input {
  width: 100%;
  height: 40px;
  border: none;
  outline: none;
}
.el-date-picker {
  width: 100%;
}
.saveBtn {
  margin: 15px 0 10px 545px;
}
.trmes th {
  width: 10%;
}
.trmes th:nth-child(1) {
  width: 7%;
}
.kong {
  width: 100%;
  height: 200px;
  border: none;
  font-size: 14px;
  position: relative;
  text-align: center;
  line-height: 200px;
}
.addBtn {
  display: block;
  position: absolute;
  left: 50%;
  top: 75%;
  transform: translate(-50%, -50%);
}
.addTable {
  width: 100%;
  margin-top: 10px;
}
.addTable td {
  height: 30px;
  width: 10%;
  text-align: center;
}
.copy {
  color: #529bff;
}
.addStu .el-dialog__body {
  padding-top: 5px;
}
.line {
  width: 100%;
  height: 1px;
  background-color: #ccc;
  margin-top: 30px;
}
</style>