<template>
  <el-row>
    <el-col :span="24">
      <el-form
        :model="diseaseForm"
        ref="diseaseForm"
        class="sub-form"
        :validate-on-rule-change="false"
        :rules="rules"
      >
        <el-form-item label="疾病别称" label-width="110px" prop="planName">
          <el-input v-model="diseaseForm.planName" placeholder="请输入疾病别称"></el-input>
        </el-form-item>

        <el-row>
          <el-col :span="12">
            <el-form-item label="年龄范围" label-width="110px" prop="planName">
              <el-input v-model="diseaseForm.planName" placeholder="请输入最小值"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="2">
            <div class="turns">——</div>
          </el-col>
          <el-col :span="10">
            <el-form-item label label-width="0px" prop="planName">
              <el-input v-model="diseaseForm.planName" placeholder="请输入最大值"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="所属科室" label-width="110px" prop="planName">
          <el-input v-model="diseaseForm.planName" placeholder="请输入所属科室"></el-input>
        </el-form-item>
        <el-form-item label="性别" label-width="110px" prop="planName">
          <el-select
            v-model="diseaseForm.sexType"
            placeholder="请选择性别"
            clearable
            style="width: 100%"
          >
            <el-option label="男" :value="1"></el-option>
            <el-option label="女" :value="2"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </el-col>
  </el-row>
</template>

<script>
import api from '@api/icss.js';
export default {
  name: 'diseaseForm',
  props: [],
  data() {
    let checkFrequency = (rule, value, callback) => {
      let conditionListName = this.$refs.conditionListName.value;
      if (conditionListName === '') {
        callback('请输入条件明细');
      } else {
        callback();
      }
    };

    return {
      diseaseForm: {
        planName: '',
        sexType: ''
      },
      rules: {
        condition: [
          {
            required: true,
            validator: checkFrequency,
            trigger: ['blur', 'change']
          }
        ]
      }
    };
  },
  computed: {},
  created() {},
  mounted() {},
  methods: {}
};
</script>

<style lang="less" scoped>
.turns{
  text-align: center;
  height:40px;
  line-height: 40px;
  color: #DCDFE6;
}
</style>