Browse Source

Merge branch 'dev5.3.4' of http://192.168.2.236:10080/zhouna/newICSS into dev5.3.4

luolei 5 years ago
parent
commit
e6b708a275

+ 4 - 1
src/components/PreviewBody/ItemPart/index.jsx

@@ -2,7 +2,10 @@ import style from "../index.less";
 import { filterDataArr } from '@utils/tools';
 
 const ItemPart = (props) => {
-  const {dataStr,title,type,dataJson,other_yjs} = props;
+  let {dataStr,title,type,dataJson,other_yjs,lastDot} = props;
+  if(lastDot){
+    dataStr=dataStr.trim().replace(/;$/g,'。');
+  }
   return <tr className={style['patInfoFst']}>
     <td className={style['patInfoSec']}>{title}</td>
     {

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

@@ -103,7 +103,7 @@ class PreviewBody extends Component {
           <ItemPart dataStr={dataStr.vital} title={'查体:'} type={1}></ItemPart>
           <PreviewInspect dataJson={come?dataJson.lis:lis_data} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetails}></PreviewInspect>
           <ItemPart dataStr={dataStr.pacs} title={'辅检:'} type={2}></ItemPart>
-          <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2}></ItemPart>
+          <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2} lastDot={true}></ItemPart>
           <tr className={style['patInfoFst']}>
             <td className={style['patInfoSec']}>医嘱:</td>
             <td className={`${style['patInfoSec']} ${style['pushMessage']} ${style['font14']}`}>

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

@@ -360,8 +360,8 @@ class SpreadDrop extends Component{
     return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
   }
   ifDefault(){
-    const {type,otherDefault,curDefault} = this.props;
-    const showDefaulted = (type=='2'&&curDefault)||(type=='3'&&otherDefault);
+    const {type,otherDefault,curDefault,showVal} = this.props;
+    const showDefaulted = ((type=='2'&&curDefault)||(type=='3'&&otherDefault))&&showVal;
     return showDefaulted;
   }
   componentDidMount(){

+ 2 - 1
src/utils/tools.js

@@ -545,9 +545,10 @@ function filterOtherDataArr(arrTmp,jsonArr){
 }
 //去掉开头的标点符号,最后的标点保留第一个,中间连续的保留第一个
 function trimDots(str){
+  if(!str)return'' ;
   return str.replace(config.punReg,function(word){
     return word.substr(0,1);
-  }).replace(/^[,,.。::"“??”;;、!!\s]+/,'');
+  }).replace(/^[,,.。::"“??”;;、!!\s]+/,'').replace(/[,,.。::"“??”;;、!!\s]*$/,'。');
 }
 
 //标签间连续标点只保留一个,保留前面一个