morphone1995 %!s(int64=4) %!d(string=hai) anos
pai
achega
12142579a9

+ 8 - 23
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -8,7 +8,7 @@ import close from "./img/close.png";
 import PreviewBody from '@components/PreviewBody';
 import Empty from '@components/Empty'
 import { pushAllDataList,didPushParamChange } from '@utils/tools';
-import { dragBox } from '@utils/drag';
+// import { dragBox } from '@utils/drag';
 import { initItemList, setInitHistory } from '@store/async-actions/historyTemplates';
 import HistoryCases from '@containers/HistoryCases';
 import $ from 'jquery';
@@ -61,7 +61,7 @@ class HistoryCaseContainer extends React.Component {
     }
     componentDidMount(){
       const {items} = this.props
-      dragBox('hisWrapMove','closeHis','add')
+      // dragBox('hisWrapMove','closeHis','add')
       setTimeout(() => {
         this.handleCaseClick(0, items[0])
       }, 50);      
@@ -116,7 +116,7 @@ class HistoryCaseContainer extends React.Component {
         store.dispatch(getHistempDetail(activeHis));  // 获取引用数据
         const {handleQuoteClick} = this.props;
         handleQuoteClick&&handleQuoteClick();
-        dragBox('hisWrapMove','closeHis','del');
+        // dragBox('hisWrapMove','closeHis','del');
     }
     //确认删除病历
     makeSureDel(){
@@ -337,30 +337,19 @@ class HistoryCaseContainer extends React.Component {
       };
       const barStyle = { background: '#777', width: '100%' };
         return (
-            <div style={{height: '80%'}}>
             <div className={styles.mainHistory} id="hisWrapMove">
-                <div className={`${styles.closeHis} drag-title`} id="closeHis"></div>
-                <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox}/>
+                <div className={styles.mainTop}>
+                  <div className={`${styles.closeHis} drag-title`} id="closeHis"></div>
+                  <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox} />
+                </div>
                 <div className={styles.mainHistoryLeft}>
                     <div className={styles.title}>
                         <span className={styles.his}>历史病历</span>
                         <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span>
                     </div>
                     <div className={styles.lists}>
-                {/* <ScrollArea speed={0.8}
-                  key= {items.length}
-                  // ref={this.$scrollRef}
-                  horizontal={false}
-                  // stopScrollPropagation={items.length > 6 ? true : false}
-                  style={{ maxHeight: '722px' }}
-                  onScroll={(value) => {}}
-                  className={styles["area"]}
-                  verticalContainerStyle={contStyle}
-                  verticalScrollbarStyle={barStyle}
-                  contentClassName="content"> */}
                         <ul id="hislistLeft" style={{ maxHeight: '722px',overflow:'auto' }} >
-                            {(items && items.length > 0) ? items.map((val,idx)=>{
-                                    // return <li key={val.id} className={val.id == activeHistory.id?styles.bgc:''} onClick={(e)=>{this.handleCaseClick(e,idx)}}>
+                            {(items && items.length > 0) ? items.map((val,idx)=>{                                    
                               return <li key={val.id} onClick={() => { this.handleCaseClick(idx, val) }} onMouseEnter={() => this.handleMouseEnterLi(idx)} onMouseLeave={() => this.handleMouseLeaveLi(idx)}>
                                          <div className={styles.itemLeft}>
                                            <div className={styles.historyTop}>
@@ -387,9 +376,6 @@ class HistoryCaseContainer extends React.Component {
                                 }):<Empty message={'无历史病历'}></Empty>
                             }
                         </ul>
-
-                  {/* </ScrollArea> */}
-
                     </div>
                 </div>
                 <div className={styles.mainHistoryRight}>
@@ -453,7 +439,6 @@ class HistoryCaseContainer extends React.Component {
                     </div>
                 </ConfirmModal>
             </div>
-          </div>
         )
     }
 }

+ 3 - 0
src/components/Information/index.less

@@ -16,6 +16,9 @@
     width: 50%;
   }
 }
+// .information{
+//   margin-top: 40px;
+// }
 @media print{
   .title {
     clear: both;

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

@@ -25,12 +25,15 @@ export default class Select extends Component {
           title: '性别',
           maxlength: 11
         },
-      ]
+      ],
+      isEnter: false
     };
     this.toggleContainer = React.createRef();
     this.onClickHandler = this.onClickHandler.bind(this)
     this.onClickOutsideHandler = this.onClickOutsideHandler.bind(this)
     this.onChange = this.onChange.bind(this)
+    this.handleMouseEnter = this.handleMouseEnter.bind(this)
+    this.handleMouseLeave = this.handleMouseLeave.bind(this)
   }
   componentDidMount() {
     window.addEventListener("click", this.onClickOutsideHandler);
@@ -77,6 +80,18 @@ export default class Select extends Component {
       type: CLEARMENSTRUATIONTEXTDATA,
     });
   };
+  handleMouseEnter(){
+    // console.log('鼠标进入');
+    this.setState({
+      isEnter: true
+    })
+  }
+  handleMouseLeave(){
+    // console.log('鼠标进入');
+    this.setState({
+      isEnter: false
+    })
+  }
   render() {
     const { isOpen, value, options} = this.state;
     const { label,  placeholder } = this.props;
@@ -92,7 +107,7 @@ export default class Select extends Component {
             onClick={this.onClickHandler}
             placeholder={placeholder}
           />
-          <div className={style.down} onClick={this.onClickHandler}>
+          <div className={this.state.isEnter ? style.downActive : style.down} onClick={this.onClickHandler} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>
             <img src={selectSex} alt=""/>
           </div>
           <div  className={[isOpen ? '' : style.optionsHidden, isOpen ? style.options :''].join('')}>

+ 35 - 4
src/components/PatInfo/index.less

@@ -133,15 +133,46 @@
     }
     .down{
       width: 20px;
-      height: 13px;
+      height: 20px;
+      border-radius: 50%;
+      // background-color: red;
       position: absolute;
-      margin-top: -6px;
+      margin-top: -10px;
       top: 50%;
       left: 38px;
       cursor: pointer;
       img{
-        width: 50%;
-        margin-bottom: 3px;
+        width: 16px;
+        height: 10px;
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        margin-left: -8px;
+        margin-top: -5px;
+        // width: 50%;
+        // margin-bottom: 3px;
+      }
+    }
+    .downActive{
+      width: 20px;
+      height: 20px;
+      border-radius: 50%;
+      background-color: #E2F1F8;
+      position: absolute;
+      margin-top: -10px;
+      top: 50%;
+      left: 38px;
+      cursor: pointer;
+      img{
+        width: 16px;
+        height: 10px;
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        margin-left: -8px;
+        margin-top: -5px;
+        // width: 50%;
+        // margin-bottom: 3px;
       }
     }
     .options {

+ 4 - 2
src/components/PreviewBody/MedicalAdvice/index.jsx

@@ -7,7 +7,7 @@ class MedicalAdvice extends Component {
   }
   render() { 
     const {advice} = this.props
-    // console.log(advice,'===========');
+    console.log(advice,'===========');
     const {labelListBig,labelListSmall} = advice
     return ( 
         <tr className={style['patInfoFst']}>
@@ -19,8 +19,9 @@ class MedicalAdvice extends Component {
                 return (
                   <tr>
                     <td className={style.adviceTableTdFst}>{item.name}</td>
-                    {/* <td className={style.assistTableTdSec}></td> */}
+                    
                     <td className={style.assistTableTdTrd}>药品</td>
+                    <td className={style.assistTableTdSec}>{item.value}</td>
                     <td className={style.assistTableTdFor}>{item.time}</td>
                   </tr>
                 )
@@ -33,6 +34,7 @@ class MedicalAdvice extends Component {
                       <td className={style.adviceTableTdFst}>{item.name}</td>
                       {/* <td className={style.assistTableTdSec}></td> */}
                       <td className={style.assistTableTdTrd}>手术/操作</td>
+                      <td className={style.assistTableTdSec}>{item.value}</td>
                       <td className={style.assistTableTdFor}>{item.time}</td>
                     </tr>
                   )

+ 7 - 39
src/components/PreviewBody/index.jsx

@@ -18,9 +18,11 @@ class PreviewBody extends Component {
     }
     this.getCurrentDate = this.getCurrentDate.bind(this);
     this.onPrint = this.onPrint.bind(this);
+    this.$scrollRef = React.createRef();
   }
   componentDidMount() {
     this.getCurrentDate();
+    // this.$scrollRef.current.scrollTop = -40
   }
   onPrint() {
     $("#content").jqprint({
@@ -96,8 +98,9 @@ class PreviewBody extends Component {
     //   adviceData=dataJson.advice
     // }
     // const noData = JSON.stringify(preInfo) == '{}';
-    return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
+    return <div className={style['content']} style={{ width: '700px'}} ref={this.$scrollRef}>
       <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>
+        {/* <div style={{height:'40px', backgroundColor: 'red', width:'100%'}}></div> */}
         <Information baseObj={baseObj} preInfo={preInfo}></Information>
         <table className={style['infos']}>
           <ItemPart dataStr={dataStr.chief} title={'主诉:'} type={1}></ItemPart>
@@ -106,48 +109,13 @@ class PreviewBody extends Component {
           <ItemPart dataStr={dataStr.personalHistory} title={'个人史:'} type={1}></ItemPart>
           <ItemPart dataStr={dataStr.familyHistory} title={'家族史:'} type={1}></ItemPart>
           <ItemPart dataStr={dataStr.marriageHistory} title={'婚育史:'} type={1}></ItemPart>
-          {isShowSex && <ItemPart dataStr={dataStr.menstruationHistory} title={'月经史:'} type={1}></ItemPart>}
-          
-          <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> */}
+          {isShowSex && <ItemPart dataStr={dataStr.menstruationHistory} title={'月经史:'} type={1}></ItemPart>}          
+          <ItemPart dataStr={dataStr.vital} title={'查体:'} type={1}></ItemPart>          
           <PreviewInspect dataJson={dataStr.lis} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetailsCopy}></PreviewInspect>
           <ItemPart dataStr={dataStr.pacs} title={'检查:'} type={2}></ItemPart>
           <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2} lastDot={true}></ItemPart>
           <MedicalAdvice advice={dataStr.advice}></MedicalAdvice>
-          {/* <tr className={style['patInfoFst']}>
-            <td className={style['patInfoSec']}>医嘱:</td>
-            <td className={`${style['patInfoSec']} ${style['pushMessage']} ${style['font14']}`}>
-              {((adviceData&&adviceData.assay && adviceData.assay.length > 0) || ((adviceData&&adviceData.check)&& (adviceData&&adviceData.assay.check > 0))) && <p className={style.pushMessageTitle}><span>开单项目</span></p>}
-              {
-               ((adviceData&&adviceData.assay && adviceData.assay.length > 0) || ((adviceData&&adviceData.check) && (adviceData&&adviceData.assay.check > 0))) && <div className={style.pushMessageDes}>{adviceData.assay}{adviceData.check}</div>
-              }
-              {adviceData&&adviceData.commontreatment && adviceData.commontreatment.length > 0 && <p  className={style.pushMessageTitle}><span>一般治疗</span></p>}
-              {
-                adviceData&&adviceData.commontreatment && <div dangerouslySetInnerHTML={{__html: adviceData.commontreatment}} className={style.pushMessageDes}></div>
-              }
-              {adviceData&&adviceData.followUp && adviceData.followUp.length > 0 && <p className={style.pushMessageTitle}><span>回访时间:<span className={style['bbtm']}>{adviceData.followUp}</span> 后回访,不适随诊</span></p>}
-              {adviceData&&adviceData.scheme && adviceData.scheme.length > 0 && <p className={style.pushMessageTitle}><span>治疗方案</span></p>}
-              {
-                adviceData&& adviceData.scheme && adviceData.scheme.map((item0, index0) => {
-                  return <p>
-                    {item0.treatment.map((item1, index1) => {
-                      return item1.meditionDetails.map((item2, index2) => {
-                      return <p>{
-                          item2.treatment.map((item3, index3) => {
-                            return(item3.treatmentStr && item3.treatmentStr.length > 0 ?
-                              <div className={style.pushMessageDes}>{item3.treatmentStr}</div> : '')
-                          })
-                        }</p>
-                      })
-                    })}
-                  </p>
-                })
-              }
-              {
-                adviceData&&adviceData.adviceInput && <div dangerouslySetInnerHTML={{__html: adviceData.adviceInput}} className={style.pushMessageDes}></div>
-              }
-            </td>
-          </tr> */}
+         
         </table>
         <p className={style.docName}>医生签名:<span>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
         {showAssessBtn&&access?<AssessResultHis showHistoryCases={showHistoryCases} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}

+ 5 - 6
src/components/PreviewBody/index.less

@@ -4,10 +4,9 @@
   overflow: auto;
   height: 100%;
   top: 0px;
-  width: 820px;
+  width: 700px;
   box-sizing: border-box;
   // background-color: red;
-
   .contents {
     position: relative;
     padding-bottom: 26px;
@@ -107,20 +106,20 @@ table{
   width: 32%;
 }
 .adviceTableTdFst {
-  width: 60%;
+  width: 45%;
 }
 .assistTableTdSec {
-  width: 16%;
+  width: 12%;
   position: relative;
   img {
     top: 6px !important;
   }
 }
 .assistTableTdTrd {
-  width: 24%;
+  width:18%;
 }
 .assistTableTdFor {
-  width: 28%;
+  width: 18%;
 }
 .assistTableTrSecExcel {
   line-height: 1.5;

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

@@ -37,7 +37,7 @@ class PushData extends Component{
     render(){
         const {hashNum } = this.state
         const {mrId,planCode,showPushData,togglePushData ,windowWidth,windowHeight} = this.props
-        console.log(windowWidth,windowHeight)
+        // console.log(windowWidth,windowHeight)
         const url =`${pushPage2}?mrId=${mrId}&planCode=${planCode}&data=${hashNum}`;
         return <div >
             {!showPushData&&<div className={style['slideButton']} style={{right:(windowWidth-1200)/2+'px'}} onClick={this.showPushData}> 

+ 1 - 1
src/store/async-actions/pushMessage.js

@@ -26,7 +26,7 @@ export const embedPush = (obj) => {      //内嵌页面推送时推送
   return (dispatch, getState) =>{
     // console.log(obj,'推送的obj');
     const param = getEMRParams();   // 获取推送参数
-    console.log(param,'=param');
+    // console.log(param,'=param');
     param.mode=obj?obj.mode:-1;    // 模式  >100 输入中    < 100  获取
     json(api.setMrInfo,param,true).then((res)=>{
       // console.log(res,'======推送的结果');

+ 144 - 32
src/utils/tools.js

@@ -900,50 +900,162 @@ function handleEnter(event){
 //   const hosCode = message.hospitalCode
 //   return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
 // };
+// 获取参数value
+function formatFormParmas(val,arr){
+    let item = arr.length!==0 && arr.find(item=>{
+       return item.id === val
+    })
+    return item.value
+}
+
 function getEMRParams(){
   const state = store.getState();
   const {id} =  state.historyTemplates && state.historyTemplates.HospitalInfo 
   const {message} = state.patInfo;
-  const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
+  const { patInfoData } = state.patInfo;
+  console.log(state, 'state================');
+
+  const {
+    mainSuit,
+    currentIll,
+    otherHistory,
+    checkBody,
+    inspect,
+    assistCheck,
+    diagnosticList,
+    marriageHistory,
+    pastHistory,
+    personalHistory,
+    familyHistory,
+    menstruationHistory,
+  } = state;
   const diag = [];
   for(let i = 0; i < diagnosticList.diagnosticList.length; i++) {
     diag.push({"dateValue": "","name": "","uniqueName": diagnosticList.diagnosticList[i].name})
   }
+  console.log(inspect.labelListSmall, 'inspect.labelListSmall');
   const obj = {
-    "hosCode": message.hospitalCode,
-    "age": message.patientAge,
-    "sex": message.sex,
-    "deptName":message.hospitalDeptName,
-    "chief": filterDataArr(mainSuit.saveText)||'',
-    "symptom": filterDataArr(currentIll.saveText)||'',
-    "vital": filterDataArr(checkBody.saveText)||'',
-    "pasts": filterDataArr(otherHistory.saveText)||'',
+    "hospitalId": id || '',
+    "age": formatFormParmas('patientAge', patInfoData),
+    "sex": formatFormParmas('patientSex', patInfoData),
+    "deptName": formatFormParmas('hospitalDeptName', patInfoData),
+    "chief": filterDataArr(mainSuit.saveText)||'',    //主诉
+    "symptom": filterDataArr(currentIll.saveText)||'',  //现病史
+    "vital": filterDataArr(checkBody.saveText)||'',  //查体
+    "pasts": filterDataArr(pastHistory.saveText)||'',  //既往史
+    "marriage": '',
+    "personal": filterDataArr(personalHistory.saveText)||'',  //个人史
+    "family": filterDataArr(familyHistory.saveText)||'',  //家族史
+    "marital": filterDataArr(marriageHistory.saveText)||'',  //婚育史
+    "menstrual": filterDataArr(menstruationHistory.saveText)||'',  //月经史
+
     "infectious": "",
-    "operation": "",
+    "operation": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],
+    "operationOrder": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],
+    "other": "",
+    "otherOrder": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],
     "allergy": "",
     "vaccination": "",
-    "personal": "",
-    "marital": "",
-    "family": "",
-    "menstrual": "",
-    "other": filterDataArr(otherHistory.saveText)||'',
-    "lisString": "",
-    "pacsString": "",
-    "diagString": "",
-    "drugString": "",
-    "lis": inspect.pushItem,
-    "pacs": assistCheck.dataArr||[],
-    "diag": [],
-    "lisOrder": [],
-    "pacsOrder": [],
-    "diagOrder": diag,
-    "drugOrder": [],
-    "operationOrder": [],
-    "otherOrder": [],
-    "patientId": message.patientId,
-    "drug": [],
-    "marriage": "",
-    "hospitalId": id || ''
+
+    "pacsString": "", //辅检文本数据
+    "lisString": "",  // 化验文本数据
+    "diagString": "", //诊断文本数据
+    "drugString": "",  // 药品文本数据
+    "lis": inspect.labelListSmall,  // 化验项目和结果
+    "dept": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],  // 科室
+    "diag": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],
+    "diagOrder": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],    
+    "diseaseName": {
+      "dateValue": "",
+      "name": "",
+      "uniqueName": ""
+    },
+    "drug": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],
+    "drugOrder": [
+      {
+        "dateValue": "",
+        "name": "",
+        "uniqueName": ""
+      }
+    ],  
+    "lisOrder": [
+      {
+        "dateValue": "",
+        "detailName": "",
+        "maxValue": 0,
+        "minValue": 0,
+        "name": "",
+        "otherValue": "",
+        "result": "",
+        "source": 0,
+        "uniqueName": "",
+        "units": "",
+        "value": 0
+      }
+    ], // 当前化验开单项
+    "pacs": [
+      {
+        "dateValue": "",
+        "desc": "",
+        "name": "",
+        "result": "",
+        "uniqueName": ""
+      }
+    ],  //辅检项目和结果
+    "pacsOrder": [
+      {
+        "dateValue": "",
+        "desc": "",
+        "name": "",
+        "result": "",
+        "uniqueName": ""
+      }
+    ],
+    "surgical": "",
+    "unknown": "",   // 不能分类文本
+
   }
   return obj;
 };