<template>
  <div class="container" style="min-height: 100%; padding-bottom: 100px;">
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-border">
      <div style="display:inline-block;width:100%;">
        <el-row>
          <div style="background: grey">
            每日履职
          </div>
          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="营业前提醒分钟数" prop="workType">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="营业中提醒分钟数" prop="educationType">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>

          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="营业后提醒分钟数" prop="professionalQualifications">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="全天提醒分钟数" prop="professionalQualifications">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
        </el-row>

      </div>
      <div style="display:inline-block;width:100%;">
        <el-row>
          <div style="background: grey">
            每周履职
          </div>
          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="提前提醒天数" prop="educationType">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
        </el-row>

      </div>
      <div style="display:inline-block;width:100%;">
        <el-row>
          <div style="background: grey">
            每月履职
          </div>

          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="提前提醒天数" prop="educationType">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div style="display:inline-block;width:100%;">
        <el-row>
          <div style="background: grey">
            每季履职
          </div>

          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="提前提醒天数" prop="educationType">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div style="display:inline-block;width:100%;">
        <el-row>
          <div style="background: grey">
            半年履职
          </div>

          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="提前提醒天数" prop="educationType">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div style="display:inline-block;width:100%;">
        <el-row>
          <div style="background: grey">
            每年履职
          </div>
          <el-col :xs="24" :sm="12" :md="8" :lg="6">
            <el-form-item label="提前提醒天数" prop="educationType">
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </el-form>
    <div style="margin-top: 50px; margin-left: 42%">
      <el-button type="primary" @click="saveExtend" size="small">提交</el-button>
      <el-button type="primary" @click="nosaveExtend" size="small">取消</el-button>
    </div>
  </div>
  
</template>

<script>
export default {
  props: [],
  components: {},
  data() {
    return {
      num: 1,

      formData:{
        deptId: null,
        duties: null,
        workType: null,
        isFullTime: "1",
        highestEducation: null,
        educationType: null,
        certificateWork: "1",
        professionalQualifications: null,
        certificateFailReason: null,
        workTime: null,
        entryTime: null,
        bornTime: null,
        responsibilitiesLeaderName: null,
        responsibilitiesLeaderDuties: null,
        qualificationCertificateUrl: null,
        userId: null,
      },
      rules: {
        name: [
          {
            required: true,
            message: "请输入活动名称",
            trigger: "blur",
          },
          {
            min: 3,
            max: 5,
            message: "长度在 3 到 5 个字符",
            trigger: "blur",
          },
        ],
        region: [
          {
            required: true,
            message: "请选择活动区域",
            trigger: "change",
          },
        ],
        date1: [
          {
            type: "date",
            required: true,
            message: "请选择日期",
            trigger: "change",
          },
        ],
        date2: [
          {
            type: "date",
            required: true,
            message: "请选择时间",
            trigger: "change",
          },
        ],
        type: [
          {
            type: "array",
            required: true,
            message: "请至少选择一个活动性质",
            trigger: "change",
          },
        ],
        resource: [
          {
            required: true,
            message: "请选择活动资源",
            trigger: "change",
          },
        ],
        desc: [
          {
            required: true,
            message: "请填写活动形式",
            trigger: "blur",
          },
        ],
      },
    }
  },
  watch: {},
  computed: {},
  beforeCreate() { },
  created() { },
  beforeMount() { },
  mounted() { },
  beforeUpdate() { },
  updated() { },
  destroyed() { },
  methods: {
    request() { },
    handleChange(value) { },
    hello() {
      alert("来自预设逻辑代码的问候")
    },
    saveExtend(){
     // this.formData.userId = this.$route.params.userId;
     
      this.$refs['form'].validate((valid) => {
          if (valid) {
            extendUserInformation(this.formData).then(res=>{
                this.$message.success('保存成功！')
                this.$router.go(-1)
            })
          }
        });

    },


  },
  fillter: {},
}
</script>

<style scoped>
.container {}

.demo-border {
  border: 1px grey dashed;
  min-height: 1rem;
  border-radius: 5px;
}
</style>
