ai-form-field-eyesight.vue 818 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script>
  2. import EyesightPicker from "@/pages/ie/entry-ai/components/eyesight-picker.vue";
  3. import AIFormRuleField from "@/pages/ie/components/ai-form/items/templates/AIFormRuleField";
  4. export default {
  5. name: "ai-form-field-eyesight",
  6. extends: EyesightPicker,
  7. mixins: [AIFormRuleField],
  8. data() {
  9. return {
  10. item: null
  11. }
  12. },
  13. computed: {
  14. pickerValue() {
  15. return this.formModel[this.rule.fieldName]
  16. },
  17. pickerLabel() {
  18. return this.rule.label || '视力'
  19. },
  20. pickerRemark() {
  21. return this.rule.description || this.remark
  22. }
  23. },
  24. methods: {
  25. handleConfirm({value: [item]}) {
  26. this.item = item
  27. this.formModel[this.rule.fieldName] = this.getValue(item)
  28. this.show = false
  29. this.clearValidate()
  30. }
  31. }
  32. }
  33. </script>
  34. <style scoped>
  35. </style>