<template>
  <div class="app-container">
    <!--    代课信息-->
    <span>老师信息</span>
    <hr>
    <br>
    <el-form :model="techerInfoForm" ref="reftecherInfoForm" size="small" :inline="true" label-width="100px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="教师名称" clearable prop="teacherName">
            <el-input v-model="techerInfoForm.teacherName" disabled clearable @keyup.enter.native="handleQuery"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="性别" prop="sex">
            <el-select disabled v-model="techerInfoForm.sex" style="width: 100%" placeholder="请选择性别">
              <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
                         :value="dict.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="教师电话" clearable prop="teacherTel">
            <el-input disabled v-model="techerInfoForm.teacherTel" clearable @keyup.enter.native="handleQuery"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="工作编号" clearable prop="teacherCode">
            <el-input disabled v-model="techerInfoForm.teacherCode" clearable @keyup.enter.native="handleQuery"/>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <span>代课信息</span>
    <hr>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="date"
        label="年级"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="班级"
        width="180">
      </el-table-column>
      <el-table-column
        prop="address"
        label="课程名称">
      </el-table-column>

      <el-table-column
        prop="name"
        label="班主任"
        width="180">
      </el-table-column>
      <el-table-column
        prop="address"
        label="联系电话">
      </el-table-column>
      <el-table-column
        prop="name"
        label="所在教学楼"
        width="180">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import {getInform,} from "@/api/smartSchool/teacherManage/teacherInformation";

export default {
  name: "index.vue",
  dicts: ['education', 'sys_user_sex', 'honor'],
  created() {
    // this.getList();
    this.getTeacherInfo();
  },
  data() {
    return {
      // 教师个人信息表单
      techerInfoForm: {},
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]


    }
  },
  methods: {
    // 获取教师个人信息
    getTeacherInfo() {
      const id = this.$route.query.teacherId;
      console.log(id, 888888888888)
      getInform(id).then(res => {
        this.techerInfoForm = res.data;
      })
    },
  }


}
</script>

<style scoped>

</style>
