فهرست منبع

主诉添加症状无推送提示修改

zhouna 5 سال پیش
والد
کامیت
5740f1e20f
3فایلهای تغییر یافته به همراه17 افزوده شده و 23 حذف شده
  1. 10 2
      src/components/SpreadDrop/index.jsx
  2. 5 1
      src/components/SpreadDrop/index.less
  3. 2 20
      src/containers/SpreadDrop.js

+ 10 - 2
src/components/SpreadDrop/index.jsx

@@ -439,9 +439,11 @@ class ListItems extends Component{
     handleConfirm&&handleConfirm();       //确定事件
   }
   render (){
-    const {handleClear,order,parDiv,boxMark,tagType,show} = this.props;
+    const {handleClear,order,parDiv,boxMark,tagType,show,data} = this.props;
+    //推送标签没有推送结果时不显示顺序说明
+    const noPush = tagType===11&&(!data[1].questionDetailList||data[1].questionDetailList.length===0);
     return <div className={style["drop-list"]} ref={parDiv} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
-        <p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>
+      {noPush?'':<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;}}/>
@@ -520,6 +522,9 @@ class ListItem extends Component{
       width:'6px',
       background:'#f1f1f1'};
     const barStyle={background:'#777',width:'100%'};
+    if(!datas||datas.length===0){
+      return <li className={style['no-push-data']}>暂无推送</li>
+    }
     if(datas&&datas.length>11){
       return <ScrollArea speed={0.8}
                     horizontal={false}
@@ -547,6 +552,9 @@ class ListItem extends Component{
 
   getMainData(){//主诉添加症状-带搜索框
     const {datas,isSpecialPos} = this.props;
+    if(!datas||datas.length===0){
+      return <li className={style['no-push-data']}>暂无推送数据,可通过搜索查找更多内容~ </li>
+    }
     return datas&&datas.map((it,i)=>{
       return <li onClick={(e)=>this.handleClick(e,it,i)} 
             className={this.getClass(it.id)} 

+ 5 - 1
src/components/SpreadDrop/index.less

@@ -26,6 +26,10 @@
     li{
       width: 99px !important;
     }
+    .no-push-data{
+      color:@disable-color;
+      width: auto !important;
+    }
   }
   li{
     padding-left: 20px;
@@ -41,7 +45,7 @@
     .select-li;
     background-image: url(../../common/images/then.png);
   }
-  .exclusion{
+  .no-push-data,.exclusion{
     color:@disable-color;
   }
 }

+ 2 - 20
src/containers/SpreadDrop.js

@@ -509,26 +509,8 @@ function mapDispatchToProps(dispatch,store){
           }else{
             pushDataList = bigDataList;
           }
-          /*if(pushDataList.length > 0){
-            if(obj.type == 1){// 主诉--添加症状
-              dispatch({
-                type:GET_BIGDATAPUSH,
-                data:pushDataList,
-                info:obj
-              })
-            }else if(obj.type == 2){// 现病史--添加其他症状
-              dispatch({
-                type:CURRENT_GET_BIGDATAPUSH,
-                data:pushDataList,
-                info:obj
-              })
-            }
-          }else{
-            Notify.info("暂无推送");
-            // return
-          }*/
           //推送无数据显示空下拉并提示暂无推送--1.9/1.18
-          if(!pushDataList || pushDataList.length == 0){Notify.info("暂无推送");}
+          //if(!pushDataList || pushDataList.length == 0){Notify.info("暂无推送");}
           if(obj.type == 1){// 主诉--添加症状
               dispatch({
                 type:GET_BIGDATAPUSH,
@@ -544,7 +526,7 @@ function mapDispatchToProps(dispatch,store){
             }
         }else{
           console.log(result.msg);
-          Notify.info("暂无推送");
+          //Notify.info("暂无推送");
           // 接口请求失败,不往下执行显示下拉
           return
         }