Quellcode durchsuchen

1024下头部患者信息被遮住的问题;主诉现病史搜索选中添加推送;主诉搜索点击上去进行字数限制;

liucf vor 6 Jahren
Ursprung
Commit
de9ef33338

+ 5 - 4
src/common/components/EditableSpan/index.jsx

@@ -164,18 +164,19 @@ class EditableSpan extends Component{
     if(ev.keyCode==8){
       // 主诉现病史去重:删除最后一个字的时候移除该数据(将name、id和value替换成空)并移除id
       // 前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除;
+      // console.log(77,innerVal,preVal);
       let preObj = $(this.$span.current).prev();
-      if(index!==0&&preVal.trim().length==1){
+      if(index!==0&&preVal.trim().length==1&& !innerVal){
           removeId && removeId({boxMark,i:index,text:""});
           handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
           if(preObj[0].nodeName !=="DIV"){
             this.moveEnd(preObj[0]);
           }
         }
-      // console.log(77,innerVal,preVal);
+
       if(innerVal !==preVal){return false}
       // 中英文数字和下划线--单独删除标签
-      const reg = new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_])");
+      /*const reg = new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_])");
       if(index!==0 && reg.test(innerVal)){
         let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
         delSingleLable && delSingleLable({boxMark,i:index});
@@ -183,7 +184,7 @@ class EditableSpan extends Component{
         this.setState({
           index: null
         })
-      }
+      }*/
       let data = innerVal.trim();
       //判断是否为空、中英文:, 。、;,且不是第一位
       let pattern = new RegExp(/^\,?$|^\,?$|^\.?$|^\。?$|^\、?$|^\;?$|^\;?$|^\:?$|^\:?$\s/);

+ 1 - 1
src/components/InfoTitle/index.jsx

@@ -38,7 +38,7 @@ class InfoTitle extends Component {
         const {disVisible,copyVisible,winWidth} = this.props;
         const {le} = this.state;
         return <div className={style['title-wrapper']} style={{zIndex:disVisible||copyVisible?40:204,left:le}}>
-            <PatInfoContainer sizeFlag={winWidth <= 1035?true:false}/>
+            <PatInfoContainer sizeFlag={winWidth <= 1065?true:false}/>
             <div className={style["operations"]} onClick={this.showHistoryBox}>
                 <span><img src={historyCase} />&nbsp;历史病历</span>
             </div>

+ 13 - 4
src/components/MainSuit/index.jsx

@@ -6,7 +6,7 @@ import SearchDrop from '@components/SearchDrop';
 import CommonSymptom from '@components/CommonSymptom';
 import chooseType from '@containers/eleType.js';
 import config from "@config/index";
-import {isIE,getPageCoordinate,windowEventHandler} from "@utils/tools.js"
+import {isIE,getPageCoordinate,windowEventHandler,filterDataArr} from "@utils/tools.js"
 import $ from 'jquery';
 
 class MainSuit extends Component{
@@ -112,7 +112,15 @@ class MainSuit extends Component{
 
 
   handleSearchSelect(item){
-    const {clearSearch,insertSearch,datas,span} = this.props;
+    const {clearSearch,insertSearch,datas,span,saveText} = this.props;
+    let mainText = filterDataArr(saveText);//主诉字数
+    const itemL = item.name.length;
+    let lengths = mainText.length + itemL;
+    if(lengths>config.limited){
+      Notify.info(config.limitText);
+      clearSearch && clearSearch();
+      return
+    }
     clearTimeout(this.state.timer);
     if(datas.length==0){//没有使用模板时点击搜索结构要展开模板
       insertSearch &&insertSearch({item,span});
@@ -210,7 +218,7 @@ class MainSuit extends Component{
   }
 
   handleBlur(e){//隐藏常见症状下拉、存自由输入的值
-    const {freeText,saveText,datas} = this.props;
+    const {freeText,saveText,datas,clearSearch} = this.props;
     const that = this;
     let data = this.state.inpText;
     if(!isIE()){
@@ -224,9 +232,10 @@ class MainSuit extends Component{
         freeText && freeText(data);
       }
     }
-    // 延时关闭常见症状下拉,不延时会影响选中
+    // 延时关闭常见症状下拉、清空搜索结果,不延时会影响选中
       clearTimeout(this.state.clearTimer);
       const clearTimer = setTimeout(function(){
+        clearSearch && clearSearch();
         that.setState({
           symptom:false
         })

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

@@ -16,14 +16,14 @@ class PatInfo extends Component {
      return <table className={sizeFlag?`${style["table"]} ${style["newSize"]}`:style["table"]}>
       <tr>
         <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`}>卡号:{message.patientIdNo && message.patientIdNo}</td>
-        <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`}>姓名:{message.patientName && message.patientName}</td>
+        <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`} title={sizeFlag&&message.patientName&&message.patientName.length>3?message.patientName:''}>姓名:{sizeFlag&&message.patientName && message.patientName.length>3?message.patientName.slice(0,3)+'...':message.patientName}</td>
         <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`}>年龄:{message.patientAge && message.patientAge}</td>
         <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`}>性别:{message.patientSex && message.patientSex}</td>
       </tr>
       <tr>
         <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}}>就诊时间:{message.systemTime&&message.systemTime.substring(0, 10)}</td>
         <td key='6' className={`${style.tdBorderR}`}>科室:{message.hospitalDeptName && message.hospitalDeptName}</td>
-        <td key='7' className={`${style.tdBorderR}`}>医生:{message.doctorName && message.doctorName}</td>
+        <td key='7' className={`${style.tdBorderR}`} title={sizeFlag&&message.doctorName&&message.doctorName.length>3?message.doctorName:''}>医生:{sizeFlag&&message.doctorName && message.doctorName.length>3?message.doctorName.slice(0,3)+'...':message.doctorName}</td>
         <td key='8' className={`${style.tdBorderR}`}>门诊号:{message.recordId && message.recordId}</td>
       </tr>
     </table>;

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

@@ -9,6 +9,7 @@
     line-height: 30px;
     padding-left: 10px;
     width: 200px;
+    white-space: nowrap;
   }
   .tdBorderB {
       border-bottom: 1px solid @person-table-color;
@@ -19,6 +20,9 @@
 }
 .newSize{
   td{
-  font-size: 13px;
+    overflow: hidden;
+    font-size: 13px;
+    white-space: nowrap;
+    text-overflow: ellipsis;
   }
 }

+ 4 - 0
src/containers/CurrentIll.js

@@ -115,6 +115,10 @@ function mapDispatchToProps(dispatch) {
                   })
                 }
             });
+          //右侧推送
+          setTimeout(function(){ 
+            dispatch(billing());
+          },200);
         },
         changeEditIll(bool){
             dispatch({

+ 4 - 0
src/containers/MainSuit.js

@@ -118,6 +118,10 @@ function mapDispatchToProps(dispatch) {
         dispatch({
           type:ISREAD
         })
+        //右侧推送
+        setTimeout(function(){ 
+          dispatch(billing());
+        },200);
       },
       clearSearch:()=>{
         dispatch({