|
@@ -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>
|
|
|
}
|