Browse Source

Merge remote-tracking branch 'origin/maindropSearch' into dev/new1

zhouna 5 years atrás
parent
commit
164b5deae8
2 changed files with 9 additions and 8 deletions
  1. 8 8
      src/components/SpreadDrop/index.jsx
  2. 1 0
      src/containers/eleType.js

+ 8 - 8
src/components/SpreadDrop/index.jsx

@@ -360,7 +360,7 @@ class SpreadDrop extends Component{
     }
   }*/
   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 clickIndx = ikey.split('-')[1];//展开下拉的index
     if(!show&&tmpDom){
@@ -381,7 +381,7 @@ class SpreadDrop extends Component{
         onInput={this.onChange}
         onkeydown={handleEnter}
         >{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>
       </div>
   }
@@ -441,14 +441,14 @@ class ListItems extends Component{
     handleConfirm&&handleConfirm();       //确定事件
   }
   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 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();}}>
       {noPush?'':<p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>}
         {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;}}/>
         </div>}
         <div className="oper clearfix">
@@ -569,12 +569,12 @@ class ListItem extends Component{
   }
 
   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不设置宽度)
     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()}
     </ul>
   }

+ 1 - 0
src/containers/eleType.js

@@ -141,6 +141,7 @@ function multCheckLabels(params,tagType){
   let isHigh=importLabel&&importLabel.includes(data.id);
   const showInx = boxMark+"-"+i+'-0';
   return <SpreadDrop data={data.questionMapping}
+                     pos={data.pos}
                      ikey={showInx}
                      setHighter={setHighter}
                      placeholder={data.name}