Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/dev5.4.1' into dev/new1

zhouna 5 anni fa
parent
commit
9d98b86d6d

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

@@ -164,7 +164,7 @@ class EditableSpan extends Component{
       if(textIndex == 0){
         preventDefault(ev);
         if(obj){
-          obj[0]&&this.moveEnd(obj[0]);
+          obj[0]&&moveEnd(obj[0]);
         }
       }
     }
@@ -208,9 +208,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里往后删除
@@ -222,9 +222,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({
@@ -232,17 +232,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)
           }
         }
       }
@@ -257,7 +257,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]);
         }
       }
 
@@ -285,7 +285,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
           })
@@ -296,9 +296,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{
@@ -306,7 +306,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 - 2
src/components/ChronicInfo/index.jsx

@@ -146,7 +146,7 @@ class ChronicInfo extends React.Component{
   // 量表明细-关闭,isClose是否是点击关闭按钮
   closeTable(isClose){
     const {scaleParam} = this.state;
-    const {showHide} = this.props;
+    const {showHide,chronicMagItem} = this.props;
     if(!showHide.isPop){
       //量表结果,判断需要计算并且dom中有值才能加入病例记录
       // innerHTML 兼容FF26
@@ -155,7 +155,7 @@ class ChronicInfo extends React.Component{
         Notify.info("请先计算量表结果!");
         return ;
       }
-      !isClose&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
+      !isClose&&chronicMagItem&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);   //是慢病流程才能加入病例
       this.setState({
         scaleParam:{}
       });

+ 2 - 2
src/components/PushItems/index.less

@@ -1,7 +1,7 @@
 @import "~@less/variables.less";
 .push-content-wrapper{
   // padding-top: 50px;
-  padding: 10px 15px 40px;
+  padding: 0px 15px 40px;
   line-height: 20px; 
   width: @push-width;
   overflow: hidden;
@@ -119,6 +119,6 @@
   color: #979797;
   text-align: center;
   position: absolute;
-  bottom: -10px;
+  bottom: 0px;
 }
 

+ 3 - 2
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,
   }
 }
 
@@ -56,7 +57,7 @@ function mapDispatchToProps(dispatch){
         }
       });
     },
-    rePush(){console.log(222)
+    rePush(){
       dispatch(pregetCheckbodyData(false,true));
     }
   }

+ 3 - 0
src/store/async-actions/fetchModules.js

@@ -159,6 +159,9 @@ export function pregetCheckbodyData(flag,addValued){     //flag=true获取到数
           dispatch({
             type:REPUSH_CHECK_LABELS,
             data:data
+          });
+          dispatch({
+            type: ISREAD
           })
         }
         if(flag){

+ 10 - 1
src/store/reducers/assessResult.js

@@ -48,13 +48,22 @@ export default (state=init,action)=>{
       return res;
     case CLEAR_ASSESS_RESULT_VALUE:
       res.data = {};
+      res.indexTimeTypes={};
+      res.indexData={};
       res.indexNames = {};
       res.addedScaleIds = [];
       res.calcuResult = {};
       res.calcuValues = {};
       res.wholeAssess = [];
       res.wholeIndexs = {};
-      res.wholeResults = {};
+      res.wholeResults = {
+        possible:{},
+        radioVal:{}
+        };
+      res.chooseSelecteds={};
+      res.wholeAssessText ={};
+      res.wholeScaleItems={};
+      //res = deepClone(init)     //量表信息仍在,原因未明
       return res;
     case SET_INDEX_SUB_TYPE:
       if(!index){

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-const host='http://192.168.2.236:5050';//后端接口访问地址
-// const host='http://192.168.2.241:5050';//后端接口访问地址
+// const host='http://192.168.2.236:5050';//后端接口访问地址
+const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚

+ 6 - 0
src/utils/tools.js

@@ -1494,6 +1494,12 @@ const setFontColorSize = (flg,pacs) => {
 //获取查体体征和已选中的标签
 function getValuedLabels(arr){
   const newArr = arr.filter((it)=>{
+    if(it.tagType=='3'){      //血压类型
+      if(it.questionMapping.findIndex((i)=>i.value!==undefined)!==-1||+it.specFlag===4){
+        return true;
+      }
+      return false;
+    }
     return it.value||+it.specFlag===4;
   });
   return newArr;