<template>
  <div>
    <a-form-model-item v-if="!hideMultipleOption">
      <a-checkbox slot="label" v-model="component.attrFD.formItemProps.inputProps.multiple">
        多选
      </a-checkbox>
    </a-form-model-item>
    <a-form-model-item label="选择范围域">
      <a-input v-model="component.attrFD.formItemProps.inputProps.selectField"></a-input>
    </a-form-model-item>
    <a-form-model-item label="被检查单位ID回写域">
      <a-input v-model="component.attrFD.formItemProps.inputProps.groupIdField"></a-input>
    </a-form-model-item>
    <a-form-model-item label="被检查单位code回写域">
      <a-input v-model="component.attrFD.formItemProps.inputProps.groupCodeField"></a-input>
    </a-form-model-item>
    <a-form-model-item label="被检查单位名称回写域">
      <a-input v-model="component.attrFD.formItemProps.inputProps.groupNameField"></a-input>
    </a-form-model-item>
    <a-form-model-item label="字符长度范围">
      <sd-range-input
        :max.sync="component.attr.maxLength"
        :min.sync="component.attr.minLength"
        disable-negative
        :max-max="2000"
      />
    </a-form-model-item>
  </div>
</template>

<script>
import { Input, Button } from 'ant-design-vue'
import sdRangeInput from '@/form-designer/sd-range-input'
import auditGroupPicker from '../../../src_product/iam/components/picker/audit-group-picker.vue'
import components from './_import-components/xm-select-modal-import'
export const metaInfo = {
  caption: '被检查单位选择',
  component: {
    props: ['designerData'],
    render() {
      return (
        <auditGroupPicker
          v-bind='$attrs'
          single={false}
          read-only={false}
          selectchecked={true}
          selectcheckfw={[]}
        />
      )
    },
  },
  icon: 'sd-list',
  order: 900,
}
export const fieldProps = {
  dataType: 'selectperson',
  attr: { selectionType: 'GROUP', multiple: 'true' },
  attrFD: {
    formItemProps: {
      inputProps: {
        selectField: '',
        groupIdField: '',
        groupCodeField: '',
        groupNameField: '',
        multiple: false,
      },
    },
  },
}

export default {
  name: 'XmSelectModal',
  components: { sdRangeInput, ...components },
  data() {
    return {}
  },
  methods: {},
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
:global(.xmselinput) {
  :global .ant-input {
    width: 60%;
    margin-right: 5px;
  }
  :global .ant-btn {
    padding: 0 5px;
  }
}
</style>
