|
@@ -382,7 +382,7 @@ class SpreadDrop extends Component{
|
|
|
onkeydown={handleEnter}
|
|
|
>{value||placeholder}</div>
|
|
|
<ListItems parDiv={this.$list} data={data} order={order} left={left} boxMark={type} tagType={tagType}
|
|
|
- show={show} cliIndex={clickIndx} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
|
|
|
+ show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
|
|
|
</div>
|
|
|
}
|
|
|
}
|
|
@@ -424,7 +424,7 @@ class ListItems extends Component{
|
|
|
clickConfirm(){
|
|
|
const {handleConfirm} = this.props;
|
|
|
this.child&&this.child.reset();//重置搜索框中的数据
|
|
|
- handleConfirm();
|
|
|
+ handleConfirm();
|
|
|
}
|
|
|
getStyle(){
|
|
|
const {show,left} = this.props;
|
|
@@ -433,20 +433,23 @@ class ListItems extends Component{
|
|
|
left:left
|
|
|
}
|
|
|
}
|
|
|
+ searchSelect(item){
|
|
|
+ const {handleSelect,handleConfirm} = this.props;
|
|
|
+ handleSelect&&handleSelect(item); //添加到大数据推送一起选中
|
|
|
+ handleConfirm&&handleConfirm(); //确定事件
|
|
|
+ }
|
|
|
render (){
|
|
|
- const {handleClear,handleConfirm,order,parDiv,boxMark,tagType,show,cliIndex} = this.props;
|
|
|
+ const {handleClear,order,parDiv,boxMark,tagType,show} = this.props;
|
|
|
return <div className={style["drop-list"]} ref={parDiv} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
|
|
|
<p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>
|
|
|
{this.getLabels()}
|
|
|
+ {boxMark==1 && tagType==11 && <div className="search">
|
|
|
+ <SearchBox show={show} onSelect={this.searchSelect.bind(this)} onRef={(child)=>{this.child = child;}}/>
|
|
|
+ </div>}
|
|
|
<div className="oper clearfix">
|
|
|
<span className={style['clear']} onClick={handleClear}>清空选项</span>
|
|
|
<span className={style['confirm']} onClick={this.clickConfirm}>确定</span>
|
|
|
</div>
|
|
|
-
|
|
|
- {boxMark==1 && tagType==11 && <div className="search">
|
|
|
- <div className={style["line"]}></div>
|
|
|
- <SearchBox show={show} cliIndex={cliIndex} onSelect={handleConfirm} onRef={(child)=>{this.child = child;}}/>
|
|
|
- </div>}
|
|
|
</div>
|
|
|
}
|
|
|
}
|
|
@@ -545,8 +548,8 @@ class ListItem extends Component{
|
|
|
getMainData(){//主诉添加症状-带搜索框
|
|
|
const {datas,isSpecialPos} = this.props;
|
|
|
return datas&&datas.map((it,i)=>{
|
|
|
- return <li onClick={(e)=>this.handleClick(e,it,i)}
|
|
|
- className={this.getClass(it.id)}
|
|
|
+ return <li onClick={(e)=>this.handleClick(e,it,i)}
|
|
|
+ className={this.getClass(it.id)}
|
|
|
title={it.name.length>4?it.name:''}
|
|
|
style={{'width':'55px','display':'inline-block'}}>
|
|
|
{it.name&&it.name.length>4?it.name.slice(0,4)+'...':it.name}
|