<script>
import EyesightPicker from "@/pagesOther/pages/ie/entry-ai/components/eyesight-picker.vue";
import AIFormRuleField from "@/pagesOther/pages/ie/components/ai-form/items/templates/AIFormRuleField";

export default {
  name: "ai-form-field-eyesight",
  extends: EyesightPicker,
  mixins: [AIFormRuleField],
  data() {
    return {
      item: null
    }
  },
  computed: {
    pickerValue() {
      return this.formModel[this.rule.fieldName]
    },
    pickerLabel() {
      return this.rule.label || '视力'
    },
    pickerRemark() {
      return this.rule.description || this.remark
    }
  },
  methods: {
    handleConfirm({value: [item]}) {
      this.item = item
      this.formModel[this.rule.fieldName] = this.getValue(item)
      this.show = false
      this.clearValidate()
    }
  }
}
</script>

<style scoped>

</style>