<template>
  <div class="app-container">
    <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="培训主题" prop="name">
            <el-input v-model="formData.name" placeholder="请输入培训主题" clearable :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="培训机构" prop="train_org">
            <el-input v-model="formData.train_org" placeholder="请输入培训机构" clearable :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="开始日期" prop="start_time">
            <el-date-picker v-model="formData.start_time"
                            type="date"
                            placeholder="选择开始日期"
                            format="yyyy 年 MM 月 dd 日"
                            value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="结束日期" prop="end_time">
            <el-date-picker v-model="formData.end_time"
                            type="date"
                            placeholder="选择结束日期"
                            format="yyyy 年 MM 月 dd 日"
                            value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="学时" prop="hours">
            <el-input v-model="formData.hours" placeholder="请输入学时" clearable :style="{width: '100%'}">
            </el-input>
          </el-form-item>
        </el-col>



        <el-col :span="12">
          <el-form-item label="培训讲师" prop="teacher">
            <el-input v-model="formData.teacher" placeholder="请输入培训讲师" clearable :style="{width: '100%'}">
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="培训内容" prop="content">
            <el-input v-model="formData.teacher" placeholder="请输入培训内容" clearable :style="{width: '100%'}">
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训类型" prop="content">
              <el-select v-model="formData.train_type"
                         placeholder="请选择机构类型"
                         clearable
                         :style="{width: '100%'}">
                <el-option v-for="(item, index) in type_Options"
                           :key="index"
                           :label="item.name"
                           :value="item.value"
                           :disabled="item.disabled">

                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训备注" prop="remark">
              <el-input v-model="formData.remark" placeholder="请输入培训备注" clearable :style="{width: '100%'}">
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item size="large">
          <el-button type="primary" @click="submitForm">提交</el-button>
          <el-button @click="resetForm">重置</el-button>
        </el-form-item>
    </el-form>
</div>
</template>
<script>
const defaultForm = {
  
}
export default {
  components: {},
  props: [],
  data() {
    return {
      formData: Object.assign({}, defaultForm),
      rules: {},
      genderOptions:[
        {'value':'男','label':'男'},
        {'value':'女','label':'女'}
      ]
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (!valid) return
        // TODO 提交表单
      })
    },
    resetForm() {
      this.$refs['elForm'].resetFields()
    },
  }
}
</script>
