<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="code">
        <el-input v-model="formData.code" placeholder="请输入编号" clearable :style="{width: '100%'}"></el-input>
      </el-form-item>
    </el-col>
    <el-col :span="12">
      <el-form-item label="易记码" prop="remember_code">
        <el-input v-model="formData.remember_code" placeholder="请输入易记码" clearable :style="{width: '100%'}">
        </el-input>
      </el-form-item>
    </el-col>
  </el-row>
  <el-row>
    <el-col :span="8">
      <el-form-item label="性别" prop="gender">
        <el-select v-model="formData.gender" placeholder="请选择性别" clearable :style="{width: '100%'}" >
          <el-option
              v-for="item in genderOptions"
              :key="item.key"
              :label="item.label"
              :value="item.value"
            />
        </el-select>
      </el-form-item>
    </el-col>
    <el-col :span="8">
      <el-form-item label="座机号" prop="landline">
        <el-input v-model="formData.landline" placeholder="请输入座机" clearable :style="{width: '100%'}">
        </el-input>
      </el-form-item>
    </el-col>
    <el-col :span="8">
      <el-form-item label="邮箱" prop="email">
        <el-input v-model="formData.email" placeholder="请输入邮箱" clearable :style="{width: '100%'}">
        </el-input>
      </el-form-item>
    </el-col>
  </el-row>
    <el-row>
    <el-col :span="8">
      <el-form-item label="职称" prop="gender">
        <el-select v-model="formData.pro_title" placeholder="请选择职称" clearable :style="{width: '100%'}" >
          <el-option
              v-for="item in titleOptions"
              :key="item.key"
              :label="item.label"
              :value="item.value"
            />
        </el-select>
      </el-form-item>
    </el-col>
    <el-col :span="8">
      <el-form-item label="座机号" prop="landline">
        <el-input v-model="formData.landline" placeholder="请输入座机" clearable :style="{width: '100%'}">
        </el-input>
      </el-form-item>
    </el-col>
    <el-col :span="8">
      <el-form-item label="邮箱" prop="email">
        <el-input v-model="formData.email" 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>