import React,{Component} from 'react'; import PropTypes from 'prop-types'; import style from './index.less'; import Select from '../CheckBox/Select'; import Radio from '../RadioB'; import Normal from '../Normal'; import CheckBox from '../CheckBox'; import className from 'classnames'; import Multiple from '../CheckBox/Multiple'; /*** 单选多选混合组件 接收参数: datas:数据源,为数组,必须; showDrop:控制填写单显示与隐藏,必须; confirmCheckBox:点击确定,必须 clearCheckBox:点击清空,必须 noSpecial:无殊选中标识,true为选中,有无殊时必须; noSpecialFlag:互斥标识,2选中其他 1选中无殊 0默认无选中; noSpecialClick:无殊点击事件; handleRadioClick:单选点击事件,有单选列时必须; handleCheckBoxClick:多选点击事件,有多选时必须; **/ class MixCheckBox extends React.Component{ constructor(props){ super(props); this.handleBtnConfirm = this.handleBtnConfirm.bind(this); this.handleBtnClear = this.handleBtnClear.bind(this); } getLabs(){ const {datas,noSpecial,noSpecialFlag,noSpecialClick,checkBoxId,flag} = this.props; let list = datas && datas.map((v,i)=>{ if(+v.formPosition == 1){//正常无殊 return }else{ if(v.controlType==1 && v.formPosition !== 1){//单选 return ; }else if(v.controlType==2){//2多选 return