|
@@ -360,7 +360,7 @@ class SpreadDrop extends Component{
|
|
}
|
|
}
|
|
}*/
|
|
}*/
|
|
render(){
|
|
render(){
|
|
- const {placeholder,value,show,data,order,type,tagType,ikey} = this.props;
|
|
|
|
|
|
+ const {placeholder,value,show,data,order,type,tagType,ikey,pos} = this.props;
|
|
const {tmpDom,left} = this.state
|
|
const {tmpDom,left} = this.state
|
|
const clickIndx = ikey.split('-')[1];//展开下拉的index
|
|
const clickIndx = ikey.split('-')[1];//展开下拉的index
|
|
if(!show&&tmpDom){
|
|
if(!show&&tmpDom){
|
|
@@ -381,7 +381,7 @@ class SpreadDrop extends Component{
|
|
onInput={this.onChange}
|
|
onInput={this.onChange}
|
|
onkeydown={handleEnter}
|
|
onkeydown={handleEnter}
|
|
>{value||placeholder}</div>
|
|
>{value||placeholder}</div>
|
|
- <ListItems parDiv={this.$list} data={data} order={order} left={left} boxMark={type} tagType={tagType}
|
|
|
|
|
|
+ <ListItems parDiv={this.$list} pos={pos} data={data} order={order} left={left} boxMark={type} tagType={tagType}
|
|
show={show} 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>
|
|
</div>
|
|
}
|
|
}
|
|
@@ -441,14 +441,14 @@ class ListItems extends Component{
|
|
handleConfirm&&handleConfirm(); //确定事件
|
|
handleConfirm&&handleConfirm(); //确定事件
|
|
}
|
|
}
|
|
render (){
|
|
render (){
|
|
- const {handleClear,order,parDiv,boxMark,tagType,show,data} = this.props;
|
|
|
|
|
|
+ const {handleClear,order,parDiv,boxMark,tagType,show,data,pos} = this.props;
|
|
//推送标签没有推送结果时不显示顺序说明
|
|
//推送标签没有推送结果时不显示顺序说明
|
|
const pushUl = data.find((it)=>it.controlType===99);
|
|
const pushUl = data.find((it)=>it.controlType===99);
|
|
const noPush = tagType===11&&(pushUl&&(!pushUl.questionDetailList||pushUl.questionDetailList.length===0));
|
|
const noPush = tagType===11&&(pushUl&&(!pushUl.questionDetailList||pushUl.questionDetailList.length===0));
|
|
return <div className={style["drop-list"]} ref={parDiv} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
|
|
return <div className={style["drop-list"]} ref={parDiv} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
|
|
{noPush?'':<p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>}
|
|
{noPush?'':<p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>}
|
|
{this.getLabels()}
|
|
{this.getLabels()}
|
|
- {boxMark==1 && tagType==11 && <div className="search">
|
|
|
|
|
|
+ {boxMark==1 && tagType==11 && !pos && <div className="search">
|
|
<SearchBox show={show} onSelect={this.searchSelect.bind(this)} onRef={(child)=>{this.child = child;}}/>
|
|
<SearchBox show={show} onSelect={this.searchSelect.bind(this)} onRef={(child)=>{this.child = child;}}/>
|
|
</div>}
|
|
</div>}
|
|
<div className="oper clearfix">
|
|
<div className="oper clearfix">
|
|
@@ -569,12 +569,12 @@ class ListItem extends Component{
|
|
}
|
|
}
|
|
|
|
|
|
render(){
|
|
render(){
|
|
- const {datas,isSpecialPos,boxMark,tagType,listIndex,isSingle} = this.props;
|
|
|
|
- const pos = isSpecialPos?style['independent']:'';
|
|
|
|
- const ifMainSear = boxMark==1 && tagType==11?true:false;
|
|
|
|
|
|
+ const {datas,isSpecialPos,boxMark,tagType,listIndex,isSingle,pos} = this.props;
|
|
|
|
+ const posit = isSpecialPos?style['independent']:'';
|
|
|
|
+ const ifMainSear = boxMark==1 && tagType==11 && !pos?true:false;
|
|
// 单列直接设置宽度,多列则第二列设置(伴字ul不设置宽度)
|
|
// 单列直接设置宽度,多列则第二列设置(伴字ul不设置宽度)
|
|
const main = ifMainSear&&!isSingle&&listIndex==1?style['mainUl']:(ifMainSear&&isSingle?style['mainUl']:'');
|
|
const main = ifMainSear&&!isSingle&&listIndex==1?style['mainUl']:(ifMainSear&&isSingle?style['mainUl']:'');
|
|
- return <ul className={classNames(style['row'],pos,main)} onBlur={(e)=>e.stopPropagation()}>
|
|
|
|
|
|
+ return <ul className={classNames(style['row'],posit,main)} onBlur={(e)=>e.stopPropagation()}>
|
|
{ifMainSear?this.getMainData():this.getData()}
|
|
{ifMainSear?this.getMainData():this.getData()}
|
|
</ul>
|
|
</ul>
|
|
}
|
|
}
|