소스 검색

查体重新加载按钮显示bug修改2770

zhouna 5 년 전
부모
커밋
303b53b35f
3개의 변경된 파일17개의 추가작업 그리고 16개의 파일을 삭제
  1. 13 13
      src/common/components/EditableSpan/index.jsx
  2. 2 2
      src/components/CheckBody/index.jsx
  3. 2 1
      src/containers/CheckBody.js

+ 13 - 13
src/common/components/EditableSpan/index.jsx

@@ -162,7 +162,7 @@ class EditableSpan extends Component{
       if(textIndex == 0){
         preventDefault(ev);
         if(obj){
-          obj[0]&&this.moveEnd(obj[0]);
+          obj[0]&&moveEnd(obj[0]);
         }
       }
     }
@@ -206,9 +206,9 @@ class EditableSpan extends Component{
         //如果后一个不是标签,则光标移到最前
         if(nextObj && nextObj[0].nodeName !=="DIV"){
           // nextObj.focus();
-          this.moveEnd(nextObj[0],1)
+          moveEnd(nextObj[0],1)
         }else{
-          this.moveEnd(preObj[0])
+          moveEnd(preObj[0])
         }
       }
       //action里往后删除
@@ -220,9 +220,9 @@ class EditableSpan extends Component{
             // IE浏览器focus光标在最后,其他浏览器在最前
             // nextObj.focus();
             if(boxMark==2&&this.props.data[index+1]&&this.props.data[index+1].flag==3){
-              this.moveEnd(nexObjN[0],1);
+              moveEnd(nexObjN[0],1);
             }else{
-              this.moveEnd(nextObj[0],1);
+              moveEnd(nextObj[0],1);
             }
           }
           /*this.setState({
@@ -230,17 +230,17 @@ class EditableSpan extends Component{
           })*/
         }else if(indexNum ==innerVal.length&&nexObj[0]&&nexObj[0].nodeName=="DIV"){//span最后一位后面为div标签
           handleKeydown&&handleKeydown({boxMark,i:index+1,text:data,flag:'del'});
-          this.moveEnd(nextObj[0]);
+          moveEnd(nextObj[0]);
         }else if(nexObj[0]&&nexObj[0].nodeName=="SPAN"){
           if(nexVal.length <= 1){//为空或者一个字delete时候
             removeId && removeId({boxMark,i:index+1,text:"",flag:'del'});
             handleClear && handleClear({boxMark});
-            this.moveEnd(nexObj[0])
+            moveEnd(nexObj[0])
           }else if(nexVal.length > 1){
             let tmpVal = nexVal.substr(1,data.length)
             handleChange&&handleChange({text1:tmpVal,boxMark,i:index+1});
             nexObj.html(tmpVal)
-            this.moveEnd(nexObj[0],1)
+            moveEnd(nexObj[0],1)
           }
         }
       }
@@ -255,7 +255,7 @@ class EditableSpan extends Component{
         removeId && removeId({boxMark,i:index,text:""});
         handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
         if(preObj[0].nodeName !=="DIV"){
-          this.moveEnd(preObj[0]);
+          moveEnd(preObj[0]);
         }
       }
 
@@ -283,7 +283,7 @@ class EditableSpan extends Component{
           // let preObj = $(this.$span.current).prev();
           let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
           handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'backsp'});
-          this.moveEnd(obj[0]);
+          moveEnd(obj[0]);
           this.setState({
             index: null
           })
@@ -294,9 +294,9 @@ class EditableSpan extends Component{
             handleClear && handleClear({boxMark});
             if(preObj[0].nodeName !=="DIV"){
               if(boxMark==2){
-                this.moveEnd(preObj[0],1);
+                moveEnd(preObj[0],1);
               }else{
-                this.moveEnd(preObj[0]);
+                moveEnd(preObj[0]);
               }
             }
           }else{
@@ -304,7 +304,7 @@ class EditableSpan extends Component{
             handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
             preObj.html(tmpVal)
             if(preObj[0].nodeName !=="DIV"){
-              this.moveEnd(preObj[0]);
+              moveEnd(preObj[0]);
             }
           }
         }

+ 2 - 2
src/components/CheckBody/index.jsx

@@ -111,10 +111,10 @@ class CheckBody extends Component{
     });
   }
   render(){
-    const {searchData,totalHide,data,saveText,rePush,hasMain,isEmpty} = this.props;
+    const {searchData,totalHide,rePush,hasMain,isEmpty,isChronic} = this.props;
     const {boxLeft,boxTop} = this.state;
     return <ItemBox title='查体' handleClick={this.handleClick}>
-        <img className={style['refresh']} src={rePushIcon} title='重新加载' onClick={!hasMain&&isEmpty?null:rePush}/>
+      {!isEmpty&&!isChronic?<img className={style['refresh']} src={rePushIcon} title='重新加载' onClick={!hasMain&&isEmpty?null:rePush}/>:''}
         {this.getLabels()}
         {/*{showMoreBtn?more:''}*/}
         {searchData && searchData.length>0?<SearchDrop data={searchData} show={!totalHide} left={boxLeft} top={boxTop} onSelect={this.handleSearchSelect}></SearchDrop>:''}

+ 2 - 1
src/containers/CheckBody.js

@@ -7,7 +7,7 @@ import {billing} from '@store/async-actions/pushMessage';
 import {didPushParamChange,filterDataArr} from '@utils/tools.js';
 
 function mapStateToProps(state){ 
-  const {homePage,mainSuit,checkBody} = state;
+  const {homePage,mainSuit,checkBody,diagnosticList} = state;
   const hasMain = filterDataArr(mainSuit.saveText);//||mainSuit.data.length;
   return {
     data:checkBody.data,
@@ -24,6 +24,7 @@ function mapStateToProps(state){
     searchInEnd:checkBody.searchInEnd,      //是否在搜索末尾插入结果
     importLabel:checkBody.importLabel,    //需高亮的标签id
     typeConfig: state.typeConfig,  //bug2764
+    isChronic:!!diagnosticList.chronicMagItem,
   }
 }