wyq 3 роки тому
батько
коміт
fac608bf34

BIN
src/common/images/billing2_time.png


BIN
src/common/images/report2_time.png


+ 11 - 8
src/components/PreviewBody/Inspect/index.jsx

@@ -1,18 +1,21 @@
 import style from "../index.less";
 import { normalVal, getStatusImg } from '@utils/tools';
-import report from '@common/images/report_time.png';
-import billing from '@common/images/billing_time.png';
+import report from '@common/images/report2_time.png';
+import billing from '@common/images/billing2_time.png';
 
 const PreviewInspect = (props) => {
   const { dataJson, toTime, dateTime, showDetails } = props;
   // console.log(dateTime,'dateTime');
-  return <tr className={style['patInfoFst']}>
-    <td className={style['patInfoSec']}>检验:</td>
-    <td className={style['patInfoSec']}>
+  return <tr className={style['patInfoFst']} style={{ flexFlow: 'column' }}>
+    <td className={style['patInfoSec']} className={style['patInfoSecs']}>
+      检验:
+      {
+        (dataJson.labelListSmall.length !== 0 || dataJson.labelListBig.length !== 0) && (<span style={{ lineHeight: '36px' }}>检验结果数据</span>)
+      }
+    </td>
+    <td className={style['patInfoSec']} style={{ padding: '0px 5px 8px 30px' }}>
       <table className={style.assistTable}>
-        {
-          (dataJson.labelListSmall.length !== 0 || dataJson.labelListBig.length !== 0) && (<span style={{ lineHeight: '36px' }}>检验结果数据</span>)
-        }
+        
         {
           dataJson && dataJson.labelListSmall && dataJson.labelListSmall.map((item) => {
             // console.log(item, item,'=====');

+ 25 - 0
src/components/PreviewBody/ItemPect/index.jsx

@@ -0,0 +1,25 @@
+import style from "../index.less";
+import { filterDataArr } from '@utils/tools';
+import down from '@images/down.png';
+const ItemPart = (props) => {
+  let { dataStr, title, type, dataJson, other_yjs, lastDot } = props;
+  // console.log(dataStr,'dataStr===============');
+  if (lastDot) {
+    dataStr = dataStr.trim().replace(/;$/g, '');
+  }
+  return <tr className={style['patInfoFst']} style={{ flexFlow: 'column' }}>
+    <td className={style['patInfoSec']} className={style['patInfoSecs']}>
+      检查:
+        <span style={{ lineHeight: '36px' }}>检查结果数据</span>
+    </td>
+    <td className={style['patInfoSec']} style={{ padding: '0px 5px 8px 30px',justifyContent:'flex-start' }}>
+      {
+        dataStr && dataStr != '' && dataStr.split('^;').map((item) => {
+          return <div className={style.checkAssist} dangerouslySetInnerHTML={{ __html: item }}></div>
+        })
+      }
+    </td>
+  </tr>
+}
+
+export default ItemPart;

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

@@ -1,11 +1,12 @@
 import React, { Component } from "react";
 import style from "./index.less";
-import { getStatusImg,getDomUpDown, filterDataArr, filterOtherDataArr,timestampToTime } from '@utils/tools';
+import { getStatusImg, getDomUpDown, filterDataArr, filterOtherDataArr, timestampToTime } from '@utils/tools';
 import Notify from '@commonComp/Notify';
 import Information from '../Information';
 import MedicalAdvice from './MedicalAdvice';
 import PreviewInspect from './Inspect';
 import ItemPart from './ItemPart';
+import ItemPect from './ItemPect';
 import $ from "jquery";
 import AssessResultHis from '@containers/AssessResultHis';
 import { dragBox } from '@utils/drag';
@@ -57,7 +58,7 @@ class PreviewBody extends Component {
   }
   showDetails(val) {
     let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
-    dom = getDomUpDown(min,max,value)
+    dom = getDomUpDown(min, max, value)
     if (val.questionDetailList && val.questionDetailList.length > 0) {
       return val.questionDetailList.map((item) => {
         if (val.value == item.name) {
@@ -69,31 +70,31 @@ class PreviewBody extends Component {
     }
   }
 
-  toTime(time){
-    let tmpTim = time.split(',').join('')-0
-    if(time && tmpTim.toString() != 'NaN'){
+  toTime(time) {
+    let tmpTim = time.split(',').join('') - 0
+    if (time && tmpTim.toString() != 'NaN') {
       let date = new Date('1900-01-01');
       let dateTim = date.getTime();
-      let times = (tmpTim-2)*24*60*60*1000;
-      let result = timestampToTime(dateTim+times).split(' ')[0]
+      let times = (tmpTim - 2) * 24 * 60 * 60 * 1000;
+      let result = timestampToTime(dateTim + times).split(' ')[0]
       return result;
-    }else{
+    } else {
       return time;
     }
   }
   render() {
-    const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;//console.log(3,dataStr)
-    let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
+    const { show, preInfo, dataJson, dataStr, baseObj, flg, come, showAssessBtn, showHistoryCases } = this.props;//console.log(3,dataStr)
+    let other_data = {}, lis_data = {}, pas_data = {}, other_yjs = '', access = '', adviceData = {};
     let isShowSex = baseObj.sex !== 2 ? false : true
     const contStyle = {
       opacity: '1',
       right: '0',
       top: '1px',
       zIndex: '15',
-      width:'7px',
+      width: '7px',
       background: '#f1f1f1'
     };
-    const barStyle = { borderRadius:'4px',background: '#C9C9C9', width: '100%' };
+    const barStyle = { borderRadius: '4px', background: '#C9C9C9', width: '100%' };
     // if(!come){
     //   other_data = JSON.parse(baseObj.detailList[2].contentJson)
     //   lis_data = JSON.parse(baseObj.detailList[4].contentJson)
@@ -107,7 +108,7 @@ class PreviewBody extends Component {
     //   adviceData=dataJson.advice
     // }
     // const noData = JSON.stringify(preInfo) == '{}';
-    return <div className={style['content']} style={{ width: '700px'}} ref={this.$scrollRef}>
+    return <div className={style['content']} style={{ width: '700px' }} ref={this.$scrollRef}>
       <ScrollArea speed={0.8}
         horizontal={false}
         // stopScrollPropagation={items.length > 6 ? true : false}
@@ -117,31 +118,31 @@ class PreviewBody extends Component {
         verticalContainerStyle={contStyle}
         verticalScrollbarStyle={barStyle}
         contentClassName="content">
-      <div className={style['contents']} id="content">
-        {/* <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>
-          <ItemPart dataStr={dataStr.present} title={'现病史:'} type={1}></ItemPart>
-          <ItemPart dataStr={dataStr.pastHistory} title={'既往史:'} type={1}></ItemPart>
-          <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={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>
-          <ItemPart dataStr={dataStr.tcmDiag} title={'中医诊断:'} type={2} lastDot={true}></ItemPart>
-          <MedicalAdvice advice={dataStr.advice}></MedicalAdvice>
-         
-        </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>:""}
-        <div onClick={() => { this.surePrint(dataStr) }} className={style.printBtn} style={{
-          display: show ? 'inline-block' : 'none',
-        }}>打印</div>
-      </div>
+        <div className={style['contents']} id="content">
+          {/* <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>
+            <ItemPart dataStr={dataStr.present} title={'现病史:'} type={1}></ItemPart>
+            <ItemPart dataStr={dataStr.pastHistory} title={'既往史:'} type={1}></ItemPart>
+            <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={dataStr.lis} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetailsCopy}></PreviewInspect>
+            <ItemPect dataStr={dataStr.pacs} title={'检查:'} type={2}></ItemPect>
+            <ItemPart dataStr={dataStr.diag} title={'西医诊断:'} type={2} lastDot={true}></ItemPart>
+            <ItemPart dataStr={dataStr.tcmDiag} title={'中医诊断:'} type={2} lastDot={true}></ItemPart>
+            <MedicalAdvice advice={dataStr.advice}></MedicalAdvice>
+
+          </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> : ""}
+          <div onClick={() => { this.surePrint(dataStr) }} className={style.printBtn} style={{
+            display: show ? 'inline-block' : 'none',
+          }}>打印</div>
+        </div>
       </ScrollArea>
     </div>
   }

+ 13 - 3
src/components/PreviewBody/index.less

@@ -28,11 +28,21 @@ table{
   .patInfoFst{
     vertical-align: top;
     border-bottom: 1px solid #e2e4e6;
+    display: flex;
+  }
+  .patInfoFst .patInfoSecs{
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    padding-left: 30px;
   }
+  
   .patInfoFst .patInfoSec{
     padding: 9px 5px 8px 0px;
     line-height: 20px;
     word-break: break-all;
+    display: flex;
+    justify-content: flex-end;
   }
   .patInfoFst .patInfoSec:first-child{
     text-align: right;    
@@ -114,7 +124,7 @@ table{
   }
 }
 .assistTableTdFst {
-  width: 90px;
+  width: 120px;
   overflow: hidden;
   white-space: nowrap;
   text-overflow: ellipsis;
@@ -125,7 +135,7 @@ table{
   width: 28%;
 }
 .assistTableTdSec {
-  width: 70px;
+  width: 120px;
   position: relative;
   overflow: hidden;
   white-space: nowrap;
@@ -139,7 +149,7 @@ table{
 //   width:3%;
 // }
 .assistTableTdTrd {
-  width: 90px;
+  width: 120px;
   position: relative;
   overflow: hidden;
   white-space: nowrap;

Різницю між файлами не показано, бо вона завелика
+ 1162 - 1161
src/utils/tools.js