瀏覽代碼

Merge remote-tracking branch 'origin/dev/byll' into dev/new1

# Conflicts:
#	src/components/OtherHistory/index.jsx
#	src/components/PreviewBody/index.jsx
zhouna 6 年之前
父節點
當前提交
2b7ce81ae4

+ 0 - 1
src/components/AddAssistCheck/Textarea/index.jsx

@@ -15,7 +15,6 @@ class Textarea extends Component {
     const {handleChangeAssistValue,idx,handlePush} = this.props;
     const text = e.target.innerText;
     const stimer = this.state.timer;
-    console.log(text)
     handleChangeAssistValue&&handleChangeAssistValue(text,idx);
     //右侧推送--延时推送
     clearTimeout(stimer);

+ 9 - 9
src/components/AddInspect/index.jsx

@@ -235,11 +235,11 @@ class Inspect extends React.Component {
         if(val.questionDetailList.length > 0){
             return val.questionDetailList.map((item)=>{
                 if(val.value == item.name){
-                    return <td className={item.abnormal != '0' ?"red":'' }>{val.value}</td>
+                    return <td style={{width:'20%'}} className={item.abnormal != '0' ?"red":'' }>{val.value}</td>
                 }
             })
         }else{
-            return <td><span className={(val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue?"red":''):''}>{val.value}</span> { val.labelSuffix}</td>
+            return <td style={{width:'20%'}}><span className={(val.value - 0).toString() == 'NaN'?"red":(val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue?"red":''):''}>{val.value}</span> { val.labelSuffix}</td>
         }
     }
     render() {
@@ -264,12 +264,12 @@ class Inspect extends React.Component {
                                                     {
                                                         item.lisExcelItem && item.lisExcelItem.map((value)=>{
                                                             return <tr>
-                                                                <td>{value.itemName}</td>
-                                                                <td><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
-                                                                <td>
+                                                                <td style={{width:'30%'}}>{value.itemName}</td>
+                                                                <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
+                                                                <td style={{width:'25%'}}>
                                                                     {normalVal(value.min,value.max)}
                                                                 </td>
-                                                                <td>{value.time == ''?('导入时间: '+this.state.dateTime):'化验时间: '+value.time}</td>
+                                                                <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+this.state.dateTime):'化验时间: '+value.time}</td>
                                                             </tr>
                                                         })
                                                     }
@@ -303,12 +303,12 @@ class Inspect extends React.Component {
                                                     item.details.map((val)=>{
                                                         if(val.value && val.value != ''){
                                                             return <tr>
-                                                                <td>{val.name}</td>
+                                                                <td style={{width:'30%'}}>{val.name}</td>
                                                                 {this.showDetails(val)}
-                                                                <td>
+                                                                <td style={{width:'25%'}}>
                                                                     {normalVal(val.minValue,val.maxValue)}
                                                                 </td>
-                                                                <td>{'化验时间:'+item.time}</td>
+                                                                <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
                                                             </tr>
                                                         }
                                                     })

+ 11 - 11
src/components/AddInspect/index.less

@@ -43,8 +43,9 @@
     position: relative;
     vertical-align: top;
     padding: 2px 10px;
-    margin-right: 10px;
-    width: 180px;
+    box-sizing: border-box;
+    width: 20%;
+    float: left;
     span {
         border-bottom: 1px solid #666666 ;
     }
@@ -66,13 +67,13 @@
 }
 .labelWrap {
     .table {
-        display: inline-block;
         color: #000;
+        width: 80%;
         tr {
             line-height: 18px;
             height: 18px;
+            width: 100%;
             td {
-                width: 180px;
                 padding-top: 3px;
             }
         }
@@ -122,17 +123,14 @@
     // line-height: 28px;
     overflow: hidden;
     padding-top: 0 !important;
-    // width: 292px;
     width: 290px;
     float: left;
     padding: 0 15px;
     box-sizing: border-box;
-    // border-bottom: 1px solid #000;
     span {
         display: inline-block;
     }
     .itemPartL {
-        // width: 100px;
         max-width: 180px;
         overflow: hidden;
         text-overflow: ellipsis;
@@ -173,21 +171,23 @@
         border-radius: 50%;
     }
     .excelDataLis {
-        padding: 2px 10px;
+        padding: 2px 0px;
         border-bottom: 1px dashed #989DA3;
         .excelDataTitle {
             display: inline-block;
-            width: 180px;
+            width: 20%;
             vertical-align: top;
+            padding-left: 10px;
+            float: left;
         }
         table {
-            display: inline-block;
+            width: 80%;
             tr {
                 height: 16px;
                 line-height: 16px;
+                width: 100%;
             }
             td {
-                width: 180px;
                 text-align: left;
                 padding-top: 3px;
             }

+ 11 - 6
src/components/CurrentIll/index.jsx

@@ -4,7 +4,7 @@ import {Button,InlineTag,ItemBox,Notify,Textarea} from '@commonComp';
 import TailInlineTag from '@commonComp/TailInlineTag';
 import chooseType from '@containers/eleType.js';
 import SearchDrop from '@components/SearchDrop';
-import {filterDataArr,getPageCoordinate,windowEventHandler} from '@utils/tools'
+import {filterDataArr,getPageCoordinate,windowEventHandler,isIE} from '@utils/tools'
 import $ from 'jquery';
 
 class CurrentIll extends Component{
@@ -82,14 +82,19 @@ class CurrentIll extends Component{
   handleClick(e){//让搜索框跟随鼠标点击移动
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    const ele = document.activeElement;
-    if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-      return;
+    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
+    if(isIE()){
+      leftL = getPageCoordinate(e).boxLeft
+    }else{
+      const ele = document.activeElement;
+      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
+        return;
+      }
+      leftL = ele.offsetLeft+90
     }
-    const leftL = ele.offsetLeft;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
     this.setState({
       // boxLeft:getPageCoordinate(e).boxLeft,
-      boxLeft:leftL+90,
+      boxLeft:leftL,
       boxTop:getPageCoordinate(e).boxTop,
       tmpScroll: $("#addScrollEvent")[0].scrollTop,
       tmpTop:getPageCoordinate(e).boxTop

+ 1 - 1
src/components/EMRContainer/index.less

@@ -6,7 +6,7 @@
   padding: 0px 0 10px 0 ;
   box-sizing: border-box;
   position: absolute;
-  min-width: 700px;
+  // min-width: 700px;
   float: left;
   overflow-y:auto;
   overflow-x: hidden;

+ 10 - 5
src/components/MainSuit/index.jsx

@@ -136,14 +136,19 @@ class MainSuit extends Component{
   handleClick(e){//让搜索框跟随鼠标点击移动
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    const ele = document.activeElement;
-    if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-      // return;    //主诉清空焦点在div内
+    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
+    if(isIE()){
+      leftL = getPageCoordinate(e).boxLeft
+    }else{
+      const ele = document.activeElement;
+      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
+        return;
+      }
+      leftL = ele.offsetLeft+60
     }
-    const leftL = ele.offsetLeft;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
     this.setState({
       // boxLeft:getPageCoordinate(e).boxLeft,
-      boxLeft:leftL+60,
+      boxLeft:leftL,
       boxTop:getPageCoordinate(e).boxTop,
       tmpScroll: $("#addScrollEvent")[0].scrollTop,
       tmpTop:getPageCoordinate(e).boxTop

二進制
src/components/Operation/img/check-circle.png


二進制
src/components/Operation/img/check-right.png


+ 44 - 6
src/components/Operation/index.jsx

@@ -6,8 +6,11 @@ import saveHistory from '@common/images/saveHistory.png';
 import PrintPreviewContainer from '@containers/PrintPreviewContainer';
 import PreviewContainer from '@containers/PreviewContainer';
 import { ConfirmModal, Notify } from '@commonComp';
-import {getAllDataList,getAllDataStringList,isAllClear,filterArr} from '@utils/tools';
+import check_circle from './img/check-circle.png';
+import check_right from './img/check-right.png';
+import {getAllDataList,getAllDataStringList,isAllClear,filterDataArr} from '@utils/tools';
 import store from '@store';
+import $ from 'jquery';
 
 
 class Operation extends Component {
@@ -21,7 +24,8 @@ class Operation extends Component {
       oKBg: '',
       msg: '',
       type: '',
-      zIndex:40
+      zIndex:40,
+      sex:'3',
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -80,7 +84,7 @@ class Operation extends Component {
   keepHistory(){
     let baseList = store.getState();
     let jsonStr = getAllDataStringList(baseList);
-    if(filterArr(JSON.parse(jsonStr.chief)) == ''){
+    if(filterDataArr(JSON.parse(jsonStr.chief)) == ''){
         Notify.info('主诉不能为空');
         return false;
     }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
@@ -237,8 +241,41 @@ class Operation extends Component {
         onKeyPress={e => this.keypress(e)}
       />
       <div className={style['line']}></div>
+      <div className={style['iptWrap']}>
+        <p>请选择模板性别归属(错误引用页面显示可能有误)</p>
+        <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
+        <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
+        <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
+      </div>
     </div>
   }
+  changeRadio(sex){
+    if(sex == 1){
+      $('#commonSex img').attr('src',check_right)
+      $('#maleSex img').attr('src',check_circle)
+      $('#femaleSex img').attr('src',check_circle)
+      $('#commonSex i').css('color','#000')
+      $('#maleSex i').css('color','#6b6969')
+      $('#femaleSex i').css('color','#6b6969')
+      this.setState({sex:'3'})
+    }else if(sex == 2){
+      $('#commonSex img').attr('src',check_circle)
+      $('#maleSex img').attr('src',check_right)
+      $('#femaleSex img').attr('src',check_circle)
+      $('#commonSex i').css('color','#6b6969')
+      $('#maleSex i').css('color','#000')
+      $('#femaleSex i').css('color','#6b6969')
+      this.setState({sex:'1'})
+    }else if(sex == 3){
+      $('#commonSex img').attr('src',check_circle)
+      $('#maleSex img').attr('src',check_circle)
+      $('#femaleSex img').attr('src',check_right)
+      $('#commonSex i').css('color','#6b6969')
+      $('#maleSex i').css('color','#6b6969')
+      $('#femaleSex i').css('color','#000')
+      this.setState({sex:'2'})
+    }
+  }
   makeSure() {
     const { save, clear, saveDataAll,diagShowTmp } = this.props;
     const { type } = this.state;
@@ -255,8 +292,7 @@ class Operation extends Component {
         Notify.error('请输入模板名称')
         return;
       }
-      // diagShowTmp(false)
-      saveDataAll(this.state.title);
+      saveDataAll(this.state.title,this.state.sex);
     }
   }
   closeDiagBox(){
@@ -273,7 +309,7 @@ class Operation extends Component {
   render() {
     const { showPrint, closePrint, showPreview, closePreview } = this;
     const { visible, preVisible,diagShow } = this.props.print;
-    const {zIndex} = this.state;
+    const {zIndex,type} = this.state;
     return <div className={style['container']} style={{zIndex:zIndex}}>
       <span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
       <span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
@@ -288,6 +324,8 @@ class Operation extends Component {
         close={() => { this.closeDiagBox()}}
         cancel={() => {this.closeDiagBox()}}
         okText={this.state.okText}
+        height={type==3?228:200}
+        width={type==3?400:300}
         okBorderColor={this.state.borderColor}
         okColor={this.state.okColor}
         oKBg={this.state.oKBg}

+ 30 - 4
src/components/Operation/index.less

@@ -6,7 +6,7 @@
     bottom: 0;
     left: 10px;
     right: 470px;
-    min-width: 720px;
+    // min-width: 720px;
     background-color: #fff;
     // z-index: 240;
     padding-bottom: 10px;
@@ -108,6 +108,32 @@
         margin-bottom: 20px;
     }
 }
+.iptWrap {
+  width: 320px;
+  line-height: 18px;
+  margin: 10px auto;
+  text-align: center;
+  p {
+    text-align: left;
+    font-size: 12px;
+    color: #6b6969;
+    margin-bottom: 5px;
+  }
+  span {
+    display: inline-block;
+    cursor: pointer;
+    padding-right: 24px;
+    font-size: 14px;
+    i {
+      color: #6b6969;
+    }
+    img {
+      vertical-align: middle;
+      position: relative;
+      top: -1px;
+    }
+  }
+}
 .msg {
     text-align: center;
     font-size: 16px;
@@ -117,11 +143,11 @@
 .box {
     padding-top: 10px;
     box-sizing: border-box;
-    height: 80px;
+    height: 110px;
 }
 .ipt {
     font-size: 16px;
-    width: 170px;
+    width: 320px;
     height: 20px;
     line-height: 18px;
     display: block;
@@ -129,7 +155,7 @@
     text-align: left;
 }
 .line {
-    width: 182px;
+    width: 332px;
     height: 1px;
     margin: 8px auto 0 auto;
     background: #D8D8D8;

+ 11 - 6
src/components/OtherHistory/index.jsx

@@ -2,7 +2,7 @@ import React,{Component} from 'react';
 import {Button,InlineTag,ItemBox,Textarea,Notify} from '@commonComp';
 import chooseType from '@containers/eleType.js';
 import SearchDrop from '@components/SearchDrop';
-import {filterDataArr,getPageCoordinate,windowEventHandler} from '@utils/tools'
+import {filterDataArr,getPageCoordinate,windowEventHandler,isIE} from '@utils/tools'
 import $ from 'jquery';
 
 class OtherHistory extends Component{
@@ -49,15 +49,20 @@ class OtherHistory extends Component{
     const {fetchPushInfos} = this.props;
     //fetchPushInfos&&fetchPushInfos();
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    const ele = document.activeElement;
     this.getData();
-    if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-      return;
+    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
+    if(isIE()){
+      leftL = getPageCoordinate(e).boxLeft
+    }else{
+      const ele = document.activeElement;
+      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
+        return;
+      }
+      leftL = ele.offsetLeft+90
     }
-    const leftL = ele.offsetLeft;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
     this.setState({
       // boxLeft:getPageCoordinate(e).boxLeft,
-      boxLeft:leftL+90,
+      boxLeft:leftL,
       boxTop:getPageCoordinate(e).boxTop,
       tmpScroll: $("#addScrollEvent")[0].scrollTop,
       tmpTop:getPageCoordinate(e).boxTop

+ 52 - 55
src/components/PreviewBody/index.jsx

@@ -98,81 +98,79 @@ class PreviewBody extends Component {
         if(val.questionDetailList.length > 0){
             return val.questionDetailList.map((item)=>{
                 if(val.value == item.name){
-                    return <td style={{width:'23%'}}><span style={{color:item.abnormal != '0' ?"red":null}}>{val.value}</span> { val.labelSuffix}</td>
+                    return <td style={{width:'20%',fontSize:'12px'}}><span style={{color:item.abnormal != '0' ?"red":null}}>{val.value}</span> { val.labelSuffix}</td>
                 }
             })
         }else{ 
-            return <td style={{width:'23%'}}><span style={{color:(val.maxValue || val.minValue)?(val.value > val.maxValue || val.value < val.minValue?"red":null):null}}>{val.value}</span> { val.labelSuffix}</td>
+            return <td style={{width:'20%',fontSize:'12px'}}><span style={{color:(val.value - 0).toString() == 'NaN'?"red":(val.maxValue || val.minValue)?(val.value > val.maxValue || val.value < val.minValue?"red":null):null}}>{val.value}</span> { val.labelSuffix}</td>
         }
     }
     render() {
         const { show, preInfo, dataJson, dataStr,baseObj } = this.props;
-        const infoNull = JSON.stringify(preInfo) == '{}';
 
         return <div className={style['content']}>
-            <div className={style['contents']} id="content" style={{margin:"0 auto"}}>
-                <div ref={this.$content} className={style['hisName']}>{preInfo.hospitalName}</div>
-                <table className={style['patInfo']}>
+            <div className={style['contents']} id="content" style={{margin:"0 auto",maxWidth:"600px"}}>
+                <div ref={this.$content} style={{ clear: 'both', fontSize: '24px', margin: '0px 0px 30px 0px',textAlign:'center' }}>{preInfo.hospitalName}</div>
+                <table className={style['patInfo']} style={{ margin: '0px 0px 30px 0px', borderCollapse: 'collapse', width: "100%" }}>
                     <tr>
-                        <td>卡号:{baseObj?baseObj.patientIdNo:infoNull?'':preInfo.patientIdNo}</td>
-                        <td >姓名:{baseObj?baseObj.patientName:infoNull?'':preInfo.patientName}</td>
-                        <td >年龄:{baseObj?baseObj.patientAge:infoNull?'':preInfo.patientAge}</td>
-                        <td >性别:{baseObj?baseObj.patientSex:infoNull?'':preInfo.patientSex}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>卡号:{baseObj?baseObj.patientIdNo:JSON.stringify(preInfo) == '{}'?'':preInfo.patientIdNo}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>姓名:{baseObj?baseObj.patientName:JSON.stringify(preInfo) == '{}'?'':preInfo.patientName}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>年龄:{baseObj?baseObj.patientAge:JSON.stringify(preInfo) == '{}'?'':preInfo.patientAge}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>性别:{baseObj?baseObj.patientSex:JSON.stringify(preInfo) == '{}'?'':preInfo.patientSex}</td>
                     </tr>
                     <tr>
-                        <td>就诊时间:{baseObj?baseObj.inquiryDate:(infoNull?'':preInfo.systemTime.split(' ')[0])}</td>
-                        <td>科室:{baseObj?baseObj.hospitalDeptName:(infoNull?'':preInfo.hospitalDeptName)}</td>
-                        <td>医生:{baseObj?baseObj.doctorName:(infoNull?'':preInfo.doctorName)}</td>
-                        <td>门诊号:{baseObj?baseObj.inquiryCode:(infoNull?'':preInfo.recordId)}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>就诊时间:{baseObj?baseObj.inquiryDate:(JSON.stringify(preInfo) == '{}'?'':preInfo.systemTime.split(' ')[0])}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>科室:{baseObj?baseObj.hospitalDeptName:(JSON.stringify(preInfo) == '{}'?'':preInfo.hospitalDeptName)}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>医生:{baseObj?baseObj.doctorName:(JSON.stringify(preInfo) == '{}'?'':preInfo.doctorName)}</td>
+                        <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%',fontSize:"14px" }}>门诊号:{baseObj?baseObj.inquiryCode:(JSON.stringify(preInfo) == '{}'?'':preInfo.recordId)}</td>
                     </tr>
                 </table>
-                <table>
-                    <tr style={{ verticalAlign: 'top' }}>
-                        <td className={style['title']}>主诉:</td>
-                        <td className={style['text']}>
+                <table style={{width:"100%", borderCollapse: 'collapse'}}>
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>主诉:</td>
+                        <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px',lineHeight:'20px' }}>
                             {
                                 filterDataArr(JSON.parse(dataStr.chief))
                             }
                         </td>
                     </tr>
-                    <tr style={{ verticalAlign: 'top' }}>
-                        <td className={style['title']}>现病史:</td>
-                        <td className={style['text']}>
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>现病史:</td>
+                        <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px',lineHeight:'20px' }}>
                             {
                                 filterDataArr(JSON.parse(dataStr.present))
                             }
                         </td>
                     </tr>
-                    <tr style={{ verticalAlign: 'top' }}>
-                        <td className={style['title']}>其他史:</td>
-                        <td className={style['text']}>
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>其他史:</td>
+                        <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px',lineHeight:'20px'  }}>
                             {
                                 filterDataArr(JSON.parse(dataStr.other))
                             }
                         </td>
                     </tr>
-                    <tr style={{ verticalAlign: 'top' }}>
-                        <td className={style['title']}>查体:</td>
-                        <td className={style['text']}>
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>查体:</td>
+                        <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px',lineHeight:'20px'  }}>
                             {
                                 filterDataArr(JSON.parse(dataStr.vital))
                             }
                         </td>
                     </tr>
-                    <tr style={{ verticalAlign: 'top',width:'100%',overflow:"hidden" }}>
-                        <td className={style['title']}>化验:</td>
-                        <td className={style['text']}>
-                            {/* <table style={{ width: '100%' }}> */}
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ width: 70, textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>化验:</td>
+                        <td style={{ fontSize: '14px', padding: '4px 0px 8px 0px',lineHeight:'20px',maxWidth:'650px'}}>
                                 {
                                     dataJson.lis.getExcelDataList && dataJson.lis.getExcelDataList.map((items)=>{
                                         return items.lisExcelRes && items.lisExcelRes.map((item)=>{
-                                            return <table style={{margin:'8px 0',width:'100%',fontSize:'12px'}}>
-                                                <tr style={{fontSize:'14px',lineHeight:'1.5'}}>{item.menus}</tr>
+                                            return <table style={{marginBottom:'10px',width:'100%',fontSize:'12px'}}>
+                                                <tr style={{fontSize:'14px',lineHeight:'1.5'}}><td><span style={{borderBottom:'1px solid #666666'}}>{item.menus}</span></td></tr>
                                                 {
                                                     item.lisExcelItem && item.lisExcelItem.map((value)=>{
                                                         return <tr style={{lineHeight:'1.5',maxWidth:'650px'}}>
-                                                            <td style={{width:'25%',fontSize:'12px'}}>{value.itemName}</td>
-                                                            <td style={{width:'23%',fontSize:'12px'}}><span style={{fontSize:'12px',color:value.type == 1?"red":null}}>{value.value}</span> {value.unit}</td>
+                                                            <td style={{width:'32%',fontSize:'12px'}}>{value.itemName}</td>
+                                                            <td style={{width:'16%',fontSize:'12px'}}><span style={{fontSize:'12px',color:value.type == 1?"red":null}}>{value.value}</span> {value.unit}</td>
                                                             <td style={{width:'24%',fontSize:'12px'}}>
                                                                 {normalVal(value.min,value.max)}
                                                             </td>
@@ -188,18 +186,18 @@ class PreviewBody extends Component {
                                     dataJson.lis.labelList && dataJson.lis.labelList.map((item,idx) => {
                                         if(item.show){
                                             return <table style={{margin:'8px 0',width:'100%'}}>
-                                                <tr style={{fontSize:'14px',lineHeight:'1.5'}}>{item.name}</tr>
+                                                <tr style={{fontSize:'14px',lineHeight:'1.5'}}><td><span style={{borderBottom:'1px solid #666666'}}>{item.name}</span></td></tr>
                                                 {
                                                     item.details.map((val)=>{
                                                         if(val.value && val.value != ''){
                                                             return <tr style={{lineHeight:'1.5',width:'100%',fontSize:'12px'}}>
-                                                                <td style={{width:'25%'}}>{val.name}</td>
+                                                                <td style={{width:'32%',fontSize:'12px'}}>{val.name}</td>
                                                                 {this.showDetails(val)}
                                                                 
-                                                                <td style={{width:'24%'}}>
+                                                                <td style={{width:'24%',fontSize:'12px'}}>
                                                                     {normalVal(val.minValue,val.maxValue)}
                                                                 </td>
-                                                                <td style={{width:'28%'}}>{'化验时间:'+item.time}</td>
+                                                                <td style={{width:'28%',fontSize:'12px'}}>{'化验时间:'+item.time}</td>
                                                             </tr>
                                                         }
                                                     })
@@ -208,12 +206,11 @@ class PreviewBody extends Component {
                                         }
                                     })
                                 }
-                            {/* </table> */}
                         </td>
                     </tr>
-                    <tr style={{ verticalAlign: 'top' }}>
-                        <td className={style['title']}>辅检:</td>
-                        <td className={style['text']}>
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>辅检:</td>
+                        <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px',lineHeight:'20px' }}>
                             {
                                 dataStr.pacs && dataStr.pacs != '' && dataStr.pacs.split(';').map((item)=>{
                                     return <div style={{ fontSize: '14px' }}>{item}</div>
@@ -221,9 +218,9 @@ class PreviewBody extends Component {
                             }
                         </td>
                     </tr>
-                    <tr style={{ verticalAlign: 'top' }}>
-                        <td className={style['title']}>诊断:</td>
-                        <td className={style['text']}>
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>诊断:</td>
+                        <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px',lineHeight:'20px' }}>
                             {
                                 dataStr.diag && dataStr.diag != '' && dataStr.diag.split(';').map((item)=>{
                                     return <div style={{ fontSize: '14px'}}>{item}</div>
@@ -231,31 +228,31 @@ class PreviewBody extends Component {
                             }
                         </td>
                     </tr>
-                    <tr style={{ verticalAlign: 'top' }}>
-                        <td className={style['title']}>医嘱:</td>
-                        <td className={style['text']}>
+                    <tr style={{ verticalAlign:'top',borderBottom:"1px solid #e2e4e6" }}>
+                        <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px' }}>医嘱:</td>
+                        <td style={{ fontSize: '14px', padding: '1px 0px 8px 0px',lineHeight:'20px' }}>
                             {
-                                dataJson.advice.assay && dataJson.advice.assay.length > 0 || dataJson.advice.check && dataJson.advice.check.length > 0 ? <p style={{fontSize:'14px',marginBottom:"8px"}}>开单项目</p> : ''
+                                dataJson.advice.assay && dataJson.advice.assay.length > 0 || dataJson.advice.check && dataJson.advice.check.length > 0 ? <p style={{fontSize:'14px',marginBottom:"8px"}}><span>开单项目</span></p> : ''
                             }
                             {
-                                dataJson.advice.assay && <div style={{ fontSize: '12px', padding: '0px 0px 5px 0px' }}>{dataJson.advice.assay}</div>
+                                dataJson.advice.assay && <div style={{ padding: '0px 0px 5px 0px' }}>{dataJson.advice.assay}</div>
                             }
                             {
-                                dataJson.advice.check && <div style={{ fontSize: '12px', padding: '0px 0px 5px 0px' }}>{dataJson.advice.check}</div>
+                                dataJson.advice.check && <div style={{ padding: '0px 0px 5px 0px' }}>{dataJson.advice.check}</div>
                             }
-                            {dataJson.advice.scheme && dataJson.advice.scheme.length > 0  && <p style={{fontSize:'14px', marginBottom: '8px',marginTop:'8px'}}>治疗方案</p>}
+                            {dataJson.advice.scheme && dataJson.advice.scheme.length > 0  && <p style={{fontSize:'14px', marginBottom: '8px',marginTop:'8px'}}><span>治疗方案</span></p>}
                             {
                                 dataJson.advice.scheme && dataJson.advice.scheme.map((item, index) => {
                                     return <p>{item.treatment.map((it,ii) =>{
                                       return(it.treatmentStr && it.treatmentStr.length > 0 ? 
-                                        <div style={{ fontSize: '12px', padding: '0px 0px 5px 0px' }}>{ it.treatmentStr }</div>: '')
+                                        <div style={{ padding: '0px 0px 5px 0px' }}>{ it.treatmentStr }</div>: '')
                                     })}</p>
                                   })
                             }
                         </td>
                     </tr>
                 </table>
-                <table style={{ marginTop: '10px',marginBottom:'30px',display: show ? 'block' : 'none' }}>
+                <table style={{ marginTop: '10px',marginBottom:'30px',position:'relative',display: show ? 'block' : 'none' }}>
                     <tr style={{position:'absolute',right:'0px',verticalAlign: 'top'}}>
                         <td>医生签名:</td>
                         <td style={{

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

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import { getAllDataList, getAllDataStringList,filterArr } from '@utils/tools';
+import { getAllDataList, getAllDataStringList,filterDataArr } from '@utils/tools';
 import style from "./index.less";
 import PreviewBody from "../PreviewBody";
 import store from '@store';
@@ -12,7 +12,7 @@ class PrintPreview extends Component {
         super(props)
     }
     surePrint(jsonStr){
-        if(filterArr(JSON.parse(jsonStr.chief)) == ''){
+        if(filterDataArr(JSON.parse(jsonStr.chief)) == ''){
           Notify.info('主诉不能为空');
             return false;
         }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){

+ 14 - 14
src/components/TemplateItems/TemplateItem/index.jsx

@@ -10,6 +10,7 @@ import edit_icon from './img/edit_grey.png';
 import editing_icon from './img/edit_blue.png';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
+import Notify from '@commonComp/Notify';
 import store from '@store'
 import {checkItems} from '@store/actions/tabTemplate';
 import $ from 'jquery';
@@ -57,8 +58,12 @@ class TemplateItem extends React.Component {
         }
     }
 
-    handleContentClick(e) {
+    handleContentClick(e,sex) {
         e.stopPropagation();
+        let baseSex = store.getState().patInfo.message.sex
+        if(sex != 3 && sex != baseSex){
+          Notify.info('引用该模版可能显示有误');
+        }
         this.props.handleContentClick(this.props.id);
     }
 
@@ -146,25 +151,20 @@ class TemplateItem extends React.Component {
         });
     }
 
-    handleEditIconClick(e) {
+    handleEditIconClick(e,name) {
         e.stopPropagation();
-        const text = this.titleDOM.innerHTML;
         let currId = this.props.id
-        this.props.handleTitleChange(currId,text);
+        this.props.handleTitleChange(currId,name);
     }
 
     recoverTitle() {
         this.titleDOM.innerHTML = this.props.title;
     }
 
-    confirmChangeTitle() {
-        
-    }
-
     render() {
-        // const DesItems = this.genContent();
-        const { allCheckShow,id,name,preview } = this.props;
+        const { allCheckShow,id,name,preview,sex } = this.props;
         let previewJson = JSON.parse(preview);
+        let sexStr = sex==2?' (女)':sex==1?' (男)':' (通用)';
         return (
             <div className={style.wrapper}>
                 <div className={ 
@@ -182,9 +182,9 @@ class TemplateItem extends React.Component {
                     <span
                         ref={(title) => this.titleDOM = title}
                         className={style['title']}
-                        title={name}
+                        title={name+sexStr}
                     >
-                        {name}
+                        {name+sexStr}
                     </span>
                     <img className={style.arrow} src={this.getArrow()} />
                     <img title={'删除模板'} 
@@ -195,13 +195,13 @@ class TemplateItem extends React.Component {
                         onMouseLeave={() => this.handleDelIconMouseLeave()}
                         onClick={(e) => this.handleTemplateDel(e)} 
                     />
-                    <span className={style.quote} onClick={(e) => this.handleContentClick(e)}>引用</span>
+                    <span className={style.quote} onClick={(e) => this.handleContentClick(e,sex)}>引用</span>
                     <img title={'修改模板标题'}
                         className={style.edit}
                         src={this.getEditIcon()}
                         onMouseEnter={() => this.handleEditIconMouseEnter()}
                         onMouseLeave={() => this.handleEditIconMouseLeave()}
-                        onClick={(e) => this.handleEditIconClick(e)}
+                        onClick={(e) => this.handleEditIconClick(e,name)}
                     />
                 </div>
                 <div

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

@@ -16,10 +16,10 @@ class TemplateItems extends React.Component {
         this.genItems = this.genItems.bind(this);
     }  
     componentDidMount(){
-        const height = getWindowInnerHeight()-216;
+        const height = getWindowInnerHeight()-206;
         this.$cont.current.style.height = height+"px";
         windowEventHandler('resize', ()=>{
-            const height = getWindowInnerHeight()-216;
+            const height = getWindowInnerHeight()-206;
             this.$cont.current.style.height = height+"px";
         });
     }

+ 2 - 2
src/containers/OperationContainer.js

@@ -47,8 +47,8 @@ function mapDispatchToProps(dispatch) {
         clear: () => {
             clearMessages()
         },
-        saveDataAll(val){
-          dispatch(saveTemplateDetail(val))
+        saveDataAll(val,sex){
+          dispatch(saveTemplateDetail(val,sex))
         },
         diagShowTmp(bool){
           dispatch({

+ 2 - 3
src/store/async-actions/tabTemplate.js

@@ -37,13 +37,12 @@ export const initItemList = (type) => { //初始化数据
   }
 };
 
-export const saveTemplateDetail = (val) => { //保存为模板
+export const saveTemplateDetail = (val,sex) => { //保存为模板
   let baseList = store.getState();
   let jsonData = getAllDataList(baseList);
   let jsonStr = getAllDataStringList(baseList);
   let whichSign = baseList.typeConfig.typeConfig;
   let state = baseList.patInfo.message;
-  console.log(state)
   let preview = {
     "chief": jsonStr.chief,
     "present": jsonStr.present,
@@ -63,7 +62,7 @@ export const saveTemplateDetail = (val) => { //保存为模板
       "modeName": val,
       "modeType": whichSign,
       "preview": idx ? JSON.stringify(preview):preview,
-      "sex":state.sex
+      "sex":sex
     }
     return tmpObj;
   }

+ 5 - 5
src/utils/tools.js

@@ -509,7 +509,7 @@ function filterDataArr(arrTmp){   //数据处理
             }
         }
     }
-    return (tmpArr.join('')).replace(/^,+/,"").replace(/,+$/,"").replace(/^,+$/,"").replace(/,+$/,"");
+    return (tmpArr.join('')).replace(/^,+/,"").replace(/,+$/,"").replace(/^,+$/,"").replace(/,+$/,"").replace(/^。+/,"").replace(/。+$/,"。");
 }
 // 取消默认行为
 function preventDefault(event) {
@@ -596,10 +596,10 @@ function isAllClear(jsonData,jsonStr){
     jsonData.lis.labelList.length < 1 &&
     jsonData.lis.getExcelDataList.length < 1 &&
     JSON.stringify(jsonData.advice) == '{}' &&
-    filterArr(JSON.parse(jsonStr.chief)) == '' &&
-    filterArr(JSON.parse(jsonStr.present)) == '' &&
-    filterArr(JSON.parse(jsonStr.other)) == '' &&
-    filterArr(JSON.parse(jsonStr.vital)) == '' &&
+    filterDataArr(JSON.parse(jsonStr.chief)) == '' &&
+    filterDataArr(JSON.parse(jsonStr.present)) == '' &&
+    filterDataArr(JSON.parse(jsonStr.other)) == '' &&           //这里都是filterDataArr不是filterArr,要去符号的
+    filterDataArr(JSON.parse(jsonStr.vital)) == '' &&
     jsonData.diag.length < 1 &&
     jsonData.pacs.length < 1 &&
     jsonData.lis.labelList.length < 1 &&