
<template>
  <el-row>
    <el-col :span="24">
      <el-form :model="pacsForm" ref="pacsForm" class="sub-form" :validate-on-rule-change="false">
        <el-form-item label="性别" label-width="110px" prop="gender">
          <el-select v-model="pacsForm.gender" placeholder="请选择性别" clearable style="width: 100%"  @change="handleValue('gender')">
            <el-option label="男" value="男"></el-option>
            <el-option label="女" value="女"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </el-col>
  </el-row>
</template>

<script>
export default {
  name: 'PacsForm',
  props: ['data'],
  data() {
    return {
      pacsForm: {
        gender: ''
      }
    };
  },
  computed: {},
  created() {
    this._initData();
  },
  mounted() {},
  methods: {
    _initData() {
      this.pacsForm.gender = this.data.gender;
    },
    // 传值
    handleValue(from) {
      this.$emit('handleInput', {
        type: from,
        value: this.pacsForm[from]
      });
    }
  }
};
</script>

<style lang="less" scoped>
</style>