morphone1995 před 4 roky
rodič
revize
b923b506df
34 změnil soubory, kde provedl 795 přidání a 68 odebrání
  1. 1 0
      src/common/components/BlockInp/index.jsx
  2. 31 0
      src/components/BlockEmrCont/FamilyHistory.jsx
  3. 31 0
      src/components/BlockEmrCont/MenstruationHistory.jsx
  4. 31 0
      src/components/BlockEmrCont/PastHistory.jsx
  5. 31 0
      src/components/BlockEmrCont/PersonalHistory.jsx
  6. 17 2
      src/components/BlockEmrCont/index.jsx
  7. 32 0
      src/components/BlockEmrCont/marriageHistory.jsx
  8. 181 26
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  9. 60 12
      src/components/HistoryCaseContainer/HistoryList/index.less
  10. 8 9
      src/components/InfoTitle/index.jsx
  11. 2 2
      src/components/InfoTitle/index.less
  12. 1 1
      src/components/Operation/index.jsx
  13. 107 14
      src/components/PatInfo/index.jsx
  14. 37 0
      src/components/PatInfo/index.less
  15. 7 2
      src/components/PreviewBody/index.jsx
  16. 11 0
      src/containers/BlockInpContainer.js
  17. 1 0
      src/containers/OperationContainer.js
  18. 11 0
      src/store/actions/familyHistory.js
  19. 11 0
      src/store/actions/marriageHistory.js
  20. 11 0
      src/store/actions/menstruationHistory.js
  21. 11 0
      src/store/actions/pastHistory.js
  22. 11 0
      src/store/actions/personalHistory.js
  23. 6 0
      src/store/async-actions/print.js
  24. 10 0
      src/store/index.js
  25. 26 0
      src/store/reducers/familyHistory.js
  26. 26 0
      src/store/reducers/marriageHistory.js
  27. 26 0
      src/store/reducers/menstruationHistory.js
  28. 26 0
      src/store/reducers/pastHistory.js
  29. 26 0
      src/store/reducers/personalHistory.js
  30. 1 0
      src/store/types/familyHistory.js
  31. 1 0
      src/store/types/marriageHistory.js
  32. 1 0
      src/store/types/menstruationHistory.js
  33. 1 0
      src/store/types/pastHistory.js
  34. 1 0
      src/store/types/personalHistory.js

+ 1 - 0
src/common/components/BlockInp/index.jsx

@@ -100,6 +100,7 @@ class BlockInp extends Component {
   }
   render() {
     const { title,boxMark } = this.props;
+    // console.log(this.props,'=============');
     return (
       <div className={style["box"]}>
         <div className={`${style["title"]} ${setFontColorSize(2,4)}`}>{title}</div>

+ 31 - 0
src/components/BlockEmrCont/FamilyHistory.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class FamilyHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='家族史' boxMark='15' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { familyHistory } = state;
+  return {
+    value: familyHistory && familyHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const FamilyHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(FamilyHistory);
+
+export default FamilyHistoryCont;

+ 31 - 0
src/components/BlockEmrCont/MenstruationHistory.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class MenstruationHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='月经史' boxMark='17' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { menstruationHistory } = state;
+  return {
+    value: menstruationHistory && menstruationHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const MenstruationHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(MenstruationHistory);
+
+export default MenstruationHistoryCont;

+ 31 - 0
src/components/BlockEmrCont/PastHistory.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class PastHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='既往史' boxMark='13' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { pastHistory } = state;
+  return {
+    value: pastHistory && pastHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const PastHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(PastHistory);
+
+export default PastHistoryCont;

+ 31 - 0
src/components/BlockEmrCont/PersonalHistory.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class PersonalHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='个人史' boxMark='14' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { personalHistory } = state;
+  return {
+    value: personalHistory && personalHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const PersonalHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(PersonalHistory);
+
+export default PersonalHistoryCont;

+ 17 - 2
src/components/BlockEmrCont/index.jsx

@@ -9,7 +9,12 @@ import InfoTitle from '@components/InfoTitle'
 import ScrollArea from 'react-scrollbar';
 import MainSuit from './MainSuit';
 import CurrentIll from './CurrentIll';
-import OtherHistory from './OtherHistory';
+import PastHistory from './PastHistory'
+import PersonalHistory from './PersonalHistory'
+import FamilyHistory from './FamilyHistory'
+import MarriageHistory from './MarriageHistory'
+import MenstruationHistory from './MenstruationHistory'
+// import OtherHistory from './OtherHistory';
 import CheckBody from './CheckBody';
 import {getWindowInnerHeight,getWindowInnerWidth,windowEventHandler} from '@utils/tools';
 
@@ -62,7 +67,17 @@ class BlockEMRCont extends Component {
         <div className={style['inner']} id="EmrBlockContainer" ref={this.$div}>
           <MainSuit></MainSuit>
           <CurrentIll></CurrentIll>
-          <OtherHistory></OtherHistory>
+          {/* 既往史 */}
+          <PastHistory></PastHistory>
+          {/* 个人史 */}
+          <PersonalHistory></PersonalHistory>
+          {/* 家族史 */}
+          <FamilyHistory></FamilyHistory>
+          {/* 婚育史 */}
+          <MarriageHistory></MarriageHistory>
+          {/* 月经史 */}
+          <MenstruationHistory></MenstruationHistory>
+          {/* <OtherHistory></OtherHistory> */}
           <CheckBody></CheckBody>
           <Inspect setHighter={this.setHighter}></Inspect>
           <AssistCheck setHighter={this.setHighter}></AssistCheck>

+ 32 - 0
src/components/BlockEmrCont/marriageHistory.jsx

@@ -0,0 +1,32 @@
+
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class MarriageHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='婚育史' boxMark='16' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { marriageHistory } = state;
+  return {
+    value: marriageHistory && marriageHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const MarriageHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(MarriageHistory);
+
+export default MarriageHistoryCont;

+ 181 - 26
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -14,7 +14,8 @@ import {showHistory} from "@store/actions/historyTemplates";
 import { SET_READ_MODE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
 import {getHistempDetail} from '@store/async-actions/historyTemplates';
-
+import del from '../../../common/images/delete_no.png';
+import edit from '../../../common/images/check.png';
 
 class HistoryCaseContainer extends React.Component {
     constructor(props){
@@ -24,38 +25,69 @@ class HistoryCaseContainer extends React.Component {
           activeId:'0',
           dataStr:[],
           dataJson:{},
-          visible:false
+          visible:false,
+          delVisible: false,
+          editVisible: false,
+          templateName: '',
+          historyCase: [],
+          currentIndex:0
         }
         this.handleCaseClick=this.handleCaseClick.bind(this)
         this.handleQuoteClick=this.handleQuoteClick.bind(this)
+        this.handleDelQuoteClick = this.handleDelQuoteClick.bind(this)
+        this.handleEditQuoteClick = this.handleEditQuoteClick.bind(this)
         this.close = this.close.bind(this);
+        this.closeDel = this.closeDel.bind(this);
+        this.closeEdit = this.closeEdit.bind(this);
         this.makeSure = this.makeSure.bind(this);
+        this.makeSureDel = this.makeSureDel.bind(this);
+        this.makeSureEdit = this.makeSureEdit.bind(this);
+        this.handleChange = this.handleChange.bind(this);
+      this.handleSortClick = this.handleSortClick.bind(this);
     }
     componentDidMount(){
+      // const {items} = this.props
+      // items.forEach(item=>{
+      //   item.editShow = false
+      // })
+      // items[0].editShow = true
       dragBox('hisWrapMove','closeHis','add')
-      this.handleCaseClick(0)
+      setTimeout(() => {
+        this.handleCaseClick(0)
+      }, 50);      
       this.setState({
-        visible:false
+        visible:false,
+        // historyCase: items
+      })
+    }
+
+    componentWillReceiveProps(nextProps){
+      const { items } = nextProps
+      this.setState({
+        // historyCase: items
       })
     }
-    handleCaseClick(idx){
-      const {items} = this.props;
+
+    // 点击当前的历史病历
+    handleCaseClick(idx) {
+      const { items } = this.props;
       let tmpItems = []
       $("#hislistLeft li").eq(idx).css({
-        background:'#fff'
+        background: '#fff'
       }).siblings().css({
-        background:'#d2d1d1'
+        background: '#d2d1d1'
       })
-      if(items.length == 0){
+      if (items.length == 0) {
         return
-      }else{
-        tmpItems=items[idx]
+      } else {
+        tmpItems = items[idx]
       }
       this.setState({
-        activeId:idx,
-        activeHis:tmpItems,
-        dataStr:tmpItems.detailList||[],
+        activeId: idx,
+        activeHis: tmpItems,
+        dataStr: tmpItems.detailList || [],
         // dataJson:JSON.parse(tmpItems.dataJson)||{},
+        currentIndex: idx
       })
     }
     makeSure(){
@@ -69,6 +101,43 @@ class HistoryCaseContainer extends React.Component {
         handleQuoteClick&&handleQuoteClick();
         dragBox('hisWrapMove','closeHis','del');
     }
+    //确认删除病历
+    makeSureDel(){
+      console.log('确认删除');
+    }
+
+    // 取消删除病历
+    closeDel(){
+      this.setState({
+        delVisible: false
+      })
+    }
+    // 显示删除确认框
+    handleDelQuoteClick(e, val, idx) {
+      this.setState({
+        delVisible: true,
+      })
+    }
+
+    // 确认编辑病历
+    makeSureEdit(){
+      console.log('确认编辑病历');
+      console.log(this.state.templateName,'======');
+    }
+
+    // 取消编辑病历
+    closeEdit() {
+      this.setState({
+        editVisible: false
+      })
+    }
+    // 显示编辑确认框
+    handleEditQuoteClick(e, val, idx) {
+      this.setState({
+        editVisible: true,
+      })
+    }
+
     close(){
       this.setState({
         visible:false
@@ -83,10 +152,37 @@ class HistoryCaseContainer extends React.Component {
         // dataJson:JSON.parse(val.dataJson)||{},
       })
     }
+    // 修改模板名称 input的值
+    handleChange(e){
+      this.setState({
+        templateName: e.target.value
+      })
+    }
+
+    // 处理鼠标移入
+    handleMouseEnter(){
+      // console.log('处理鼠标移入');
+    }
+
+    // 处理鼠标移除
+    handleMouseLeave(){
+      // console.log('处理鼠标移除');
+    }
+
+    // 排序
+    handleSortClick(){
+      const { items } = this.props;
+      let length = items &&  items.length
+      let index = length - this.state.currentIndex -1
+      this.props.handleSortClick()
+      this.setState({
+        currentIndex: index
+      })
+    }
+
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
-        const { activeHis,visible,dataJson,dataStr } = this.state;
-        
+        const { activeHis, visible, dataJson, dataStr, delVisible, editVisible, historyCase, currentIndex } = this.state;
         const getAllDataStringList = () =>{           //获取所有模块文本的数据
             let jsonDataString = {};
             jsonDataString.lis = {};
@@ -107,25 +203,36 @@ class HistoryCaseContainer extends React.Component {
                 <div className={styles.mainHistoryLeft}>
                     <div className={styles.title}>
                         <span className={styles.his}>历史病历</span>
-                        <span className={styles.sort} onClick={handleSortClick}>排序 <img src={sort} alt="排序"/></span>
+                        <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span>
                     </div>
                     <div className={styles.lists}>
                         <ul id="hislistLeft">
-                            {
-                                (items && items.length > 0)? items.map((val,idx)=>{
+                            {(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)}}>
-                                    return <li key={val.id} onClick={()=>{this.handleCaseClick(idx)}}>
-                                        <span title={val.diagnose}>{val.diagnose}</span>
+                                  return <li key={val.id} onClick={() => { this.handleCaseClick(idx) }} onMouseEnter={() => this.handleMouseEnter()} onMouseLeave={() => this.handleMouseLeave()}>
+                                        <div class={styles.itemLeft}>
+                                          <span title={val.diagnose}>{val.diagnose}</span>
+                                      { currentIndex === idx && (<div className={styles.edit} onClick={(e) => { this.handleEditQuoteClick(e, val, idx) }}>
+                                            <img src={edit} />
+                                          </div>)}
+                                        </div>
+                                        <div class={styles.itemRight}>
+                                          <div className={styles.del} onClick={(e) => { this.handleDelQuoteClick(e, val, idx) }}>
+                                            <img src={del} />
+                                          </div>
+                                          <button
+                                            className={styles.quote}
+                                            onClick={(e) => { this.handleQuoteClick(e, val, idx) }}
+                                          >引 用</button>
+                                        </div>
+                                        
                                         {/* <span className={val.id == activeHistory.id?`${styles.time} ${styles.quoteHide}`:styles.time}>{val.inquiryDate}</span>
                                         <button 
                                             className={val.id == activeHistory.id?`${styles.quote} ${styles.quoteShow}`:styles.quote} 
                                             onClick={(e)=>{handleQuoteClick(e,val)}}
                                         >引 用</button> */}
-                                        <button 
-                                            className={styles.quote} 
-                                            onClick={(e)=>{this.handleQuoteClick(e,val,idx)}}
-                                        >引 用</button>
-                                        <span className={styles.time}>{val.inquiryDate}</span>
+                                        
+                                        {/* <span className={styles.time}>{val.inquiryDate}</span> */}
                                     </li>
                                 }):<Empty message={'无历史病历'}></Empty>
                             }
@@ -160,6 +267,54 @@ class HistoryCaseContainer extends React.Component {
                 >
                     <p className={styles['center']}>确认引用该病历?</p>
                 </ConfirmModal>
+
+                <ConfirmModal
+                  visible={delVisible}
+                  confirm={this.makeSureDel}
+                  close={this.closeDel}
+                  cancel={this.closeDel}
+                  okText={"删除"}
+                  okBorderColor={'#3B9ED0'}
+                  okColor={'#fff'}
+                  oKBg={'#3B9ED0'}
+                    
+                >
+                    <p className={styles['center']}>确定删除病历?</p>
+                </ConfirmModal>
+
+                <ConfirmModal
+                  visible={editVisible}
+                  confirm={this.makeSureEdit}
+                  close={this.closeEdit}
+                  cancel={this.closeEdit}
+                  okText={"保存"}
+                  okBorderColor={'#3B9ED0'}
+                  okColor={'#fff'}
+                  oKBg={'#3B9ED0'}
+                  title={'修改模板'}
+                  height={200}
+                >
+                  {/* <div className={style.name}>
+                    <span className={style.leftName}>模板名称:</span>
+                    <input className={style['ipt']}
+                      autocomplete="off"
+                      placeholder="请输入模板名称"
+                      type="text"
+                      maxLength='20'
+                      onInput={(e) => {
+                        this.handleInput(e)
+                      }}
+                      onPropertyChange={(e) => {  // 兼容ie
+                        this.handleInput(e)
+                      }}
+                      onKeyPress={e => this.keypress(e)}
+                    />
+                  </div> */}
+                    <div className={styles.outBox}>
+                      <span>模板名称:</span>
+                      <input type="text" placeholder="请输入模板名称" value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>
+                    </div>
+                </ConfirmModal>
             </div>
         )
     }

+ 60 - 12
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -52,13 +52,7 @@
             box-sizing: border-box;
             overflow-y: auto;
             height: 100%;
-            span {
-                display: inline-block;
-                max-width: 120px;
-                overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
-            }
+           
             li {
                 height: 54px;
                 line-height: 54px;
@@ -66,14 +60,60 @@
                 font-size: 14px;
                 cursor: pointer;
                 border: 1px solid transparent;
+                display: flex;
+                align-items: center;
+                .itemLeft{
+                    flex: 1;
+                    display: flex;
+                    align-items: center;
+                    span {
+                        display: inline-block;
+                        max-width: 120px;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                    }
+                    .edit{
+                        width: 30px;
+                        height: 30px;
+                        // background-color: pink;
+                        img{
+                            width: 20px;
+                            height: 20px;
+                            position: relative;
+                            top: -7px;
+                            left: 3px;
+                        }     
+                    }
+                }
+                .itemRight{
+                    width: 106px;
+                    display: flex;
+                    align-items: center;
+                    .del {
+                        // background-color: red;
+                        width: 30px;
+                        height:30px;
+                        img{
+                            width: 20px;
+                            height: 20px;
+                            position: relative;
+                            top: -7px;
+                            left: 3px;
+                        }            
+                    }
+                }
+                
+               
             }
             li:hover {
                 border: 1px solid #66afe9;
                 border: 1px solid #66afe9\0;
             }
-            .time {
-                float: right;
-            }
+            // .time {
+            //     float: right;
+            // }
+           
             .bgc {
                 background-color: #fff;
             }
@@ -86,11 +126,11 @@
                 color: #fff;
                 background-color: @template-color;
                 float: right;
-                margin-top: 16px;
+                // margin-top: 16px;
                 font-size: 12px;
                 // display: none;
                 outline: none;
-                margin-left: 10px;
+                // margin-left: 10px;
             }
             .quoteShow {
                 display: block;
@@ -126,3 +166,11 @@
   padding-top: 10px;
   padding-bottom: 50px;
 }
+
+.outBox{
+    padding-left: 18px;
+    height: 100px;
+    width: 100%;
+    display: flex;
+    align-items: center;
+}

+ 8 - 9
src/components/InfoTitle/index.jsx

@@ -50,18 +50,17 @@ class InfoTitle extends Component {
         }
     }
     render() {
-        const {loading,loadingText,loadingType,hideHistory} = this.props;
+        const {loading,loadingText,loadingType} = this.props;
         const {le} = this.state;
-        return <div className={style['title-wrapper']}  style={{left:le,paddingRight:hideHistory?'0':'122px'}}>
+        return <div className={style['title-wrapper']}  style={{left:le,paddingRight:'122px'}}>
             <PatInfoContainer />
-          {hideHistory?"":<div className={style['activeWrap']}>
-                <div className={style["operations"]} onClick={this.showHistoryBox}>
-                    <span><img src={historyCase} />&nbsp;历史病历</span>
+             {
+                <div className={style['activeWrap']}>
+                    <div className={style["operations"]} onClick={this.showHistoryBox}>
+                        <span><img src={historyCase} />&nbsp;历史病历</span>
+                    </div>
                 </div>
-                <div className={style["health"]} >
-                    <span><img src={health} />&nbsp;健康档案</span>
-                </div>
-            </div>}
+             }
             <HistoryCases></HistoryCases>
             <Loading show={loading} text={loadingText} type={loadingType}/>
         </div>;

+ 2 - 2
src/components/InfoTitle/index.less

@@ -32,8 +32,8 @@
   span{
     cursor: pointer;
     display: inline-block;
-    height: 20px;
-    line-height: 20px;
+    height: 60px;
+    line-height: 60px;
   }
   img {
     width: 20px;

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

@@ -31,7 +31,7 @@ class Operation extends Component {
       okColor: '',
       oKBg: '',
       msg: '',
-      type: '',
+      type: '',   // type  1: 保存病历
       zIndex:40,
       sex:'3',
       le:'',

+ 107 - 14
src/components/PatInfo/index.jsx

@@ -4,28 +4,121 @@ import style from "./index.less";
 class PatInfo extends Component {
   constructor(props){
     super(props)
+    this.state ={
+      patientInfo: [
+        {
+          label: 'patientIdNo',
+          id: 'patientIdNo',
+          value: '',
+          title: '卡号'
+        },
+        {
+          label: 'patientName',
+          id: 'patientName',
+          value: '',
+          title: '姓名'
+        },
+        {
+          label: 'patientAge',
+          id: 'patientAge',
+          value: '',
+          title: '年龄'
+        },
+        {
+          label: 'patientSex',
+          id: 'patientSex',
+          value: '',
+          title: '性别'
+        },
+        {
+          label: 'systemTime',
+          id: 'systemTime',
+          value: '',
+          title: '就诊时间'
+        },
+        {
+          label: 'hospitalDeptName',
+          id: 'hospitalDeptName',
+          value: '',
+          title: '科室'
+        },
+        {
+          label: 'doctorName',
+          id: 'doctorName',
+          value: '',
+          title: '医生'
+        },
+        {
+          label: 'recordId',
+          id: 'recordId',
+          value: '',
+          title: '门诊号'
+        }
+
+      ]
+    }
+    this.handleChange = this.handleChange.bind(this)
   }
   componentWillMount() {
     const { getMessage } = this.props;
     getMessage && getMessage()
   }
+  componentWillReceiveProps(nextProps){
+    const {message} = nextProps.patInfo
+    let { patientInfo} = this.state
+    if (Object.keys(message).legnth !== 0){     
+      patientInfo.forEach(item =>{
+        item.value = message[item.label]
+      })
+      this.setState({
+        patientInfo
+      })
+    }
+  }
+
+  handleChange(e){
+    let { patientInfo } = this.state
+    let patientItem = patientInfo.find(item =>{
+      return item.id === e.target.id
+    })
+    patientItem.value = e.target.value;
+    this.setState({
+      patientInfo
+    })
+  }
 
   render(){
     const {message} = this.props.patInfo;
-     return <table className={style["table"]}>
-      <tr>
-        <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'卡号:' + (message.patientIdNo||'')}>卡号:{message.patientIdNo}</td>
-        <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'姓名:' + (message.patientName||'')}>姓名:{message.patientName}</td>
-        <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'年龄:'+(message.patientAge||'')}>年龄:{message.patientAge}</td>
-        <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'性别:'+(message.patientSex||'')}>性别:{message.patientSex}</td>
-      </tr>
-      <tr>
-        <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}} title={'就诊时间:'+(message.systemTime&&message.systemTime.substring(0, 10)||'')}>就诊时间:{message.systemTime&&message.systemTime.substring(0, 10)}</td>
-        <td key='6' className={`${style.tdBorderR}`} title={'科室:'+(message.hospitalDeptName||'')}>科室:{message.hospitalDeptName}</td>
-        <td key='7' className={`${style.tdBorderR}`} title={'医生:'+(message.doctorName||'')}>医生:{message.doctorName}</td>
-        <td key='8' className={`${style.tdBorderR}`} title={'门诊号:'+(message.recordId||'')}>门诊号:{message.recordId}</td>
-      </tr>
-    </table>;
+
+     return (
+      //  <table className={style["table"]}>
+      //    <tr>
+      //      <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'卡号:' + (message.patientIdNo || '')}>卡号:{message.patientIdNo}</td>
+      //      <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'姓名:' + (message.patientName || '')}>姓名:{message.patientName}</td>
+      //      <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'年龄:' + (message.patientAge || '')}>年龄:{message.patientAge}</td>
+      //      <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'性别:' + (message.patientSex || '')}>性别:{message.patientSex}</td>
+      //    </tr>
+      //    <tr>
+      //      <td key='5' className={`${style.tdBorderR}`} style={{ whiteSpace: 'nowrap' }} title={'就诊时间:' + (message.systemTime && message.systemTime.substring(0, 10) || '')}>就诊时间:{message.systemTime && message.systemTime.substring(0, 10)}</td>
+      //      <td key='6' className={`${style.tdBorderR}`} title={'科室:' + (message.hospitalDeptName || '')}>科室:{message.hospitalDeptName}</td>
+      //      <td key='7' className={`${style.tdBorderR}`} title={'医生:' + (message.doctorName || '')}>医生:{message.doctorName}</td>
+      //      <td key='8' className={`${style.tdBorderR}`} title={'门诊号:' + (message.recordId || '')}>门诊号:{message.recordId}</td>
+      //    </tr>
+      //  </table>
+       <div className={style["infoContainer"]}>         
+         {
+            this.state.patientInfo.map((item, index) => {
+              return (
+                <div className={style["infoItem"]} key={item.id}>
+                  <label for={item.label}>{item.title}:</label>
+                  <input id={item.id} type="text" autocomplete="off"  value={item.value} onChange={this.handleChange}/>
+                </div>
+              )
+            })
+         }
+       </div>
+
+     );
   }
 }
 

+ 37 - 0
src/components/PatInfo/index.less

@@ -1,6 +1,43 @@
 @import "~@less/variables.less";
+.infoContainer{
+  width: 100%;
+  // min-width: 930px;
+  height: 60px;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  .infoItem{
+    width: 25%;
+    min-width: 25%;
+    // min-width: 230px;
+    float: left;
+    flex: 1;
+    height: 30px;
+    border-right: 1px solid @person-table-color;   
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    label{
+      // min-width: 70px;
+      text-align: center;
+    }
+    input{
+      flex:1;    
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+    }
+  }
+  .infoItem:nth-child(-n+4){
+    border-bottom: 1px solid @person-table-color;
+  }
+}
+
+
+
 .table{
   width: 100%;
+  // display: none;
 //   border:1px @border-color solid;
   float: left;
   td{

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

@@ -101,7 +101,12 @@ class PreviewBody extends Component {
         <table className={style['infos']}>
           <ItemPart dataStr={dataStr.chief} title={'主诉:'} type={1}></ItemPart>
           <ItemPart dataStr={dataStr.present} title={'现病史:'} type={1}></ItemPart>
-          <ItemPart dataStr={dataStr.present} title={'其他史:'} dataJson={come?dataJson:other_data} other_yjs={other_yjs} type={3}></ItemPart>
+          <ItemPart dataStr={dataStr.present} title={'既往史:'} type={1}></ItemPart>
+          <ItemPart dataStr={dataStr.present} title={'个人史:'} type={1}></ItemPart>
+          <ItemPart dataStr={dataStr.present} title={'家族史:'} type={1}></ItemPart>
+          <ItemPart dataStr={dataStr.present} title={'婚育史:'} type={1}></ItemPart>
+          <ItemPart dataStr={dataStr.present} title={'月经史:'} type={1}></ItemPart>
+          {/* <ItemPart dataStr={dataStr.present} title={'其他史:'} dataJson={come?dataJson:other_data} other_yjs={other_yjs} type={3}></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>
           <ItemPart dataStr={dataStr.pacs} title={'辅检:'} type={2}></ItemPart>
@@ -120,7 +125,7 @@ class PreviewBody extends Component {
               {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.scheme && adviceData.scheme.map((item0, index0) => {
+                adviceData&& adviceData.scheme && adviceData.scheme.map((item0, index0) => {
                   return <p>
                     {item0.treatment.map((item1, index1) => {
                       return item1.meditionDetails.map((item2, index2) => {

+ 11 - 0
src/containers/BlockInpContainer.js

@@ -4,6 +4,12 @@ import {SETTEXTMODEVALUE} from '@store/types/mainSuit';
 import {SETCURRENTTEXTMODEVALUE} from '@store/types/currentIll';
 import {SETOTHERTEXTMODEVALUE} from '@store/types/otherHistory';
 import {SETCHECKTEXTMODEVALUE} from '@store/types/checkBody';
+import { SETPASTTEXTMODEVALUE } from '@store/types/pastHistory'
+import { SETPERSONALTEXTMODEVALUE } from '@store/types/personalHistory'
+import { SETFAMILYTEXTMODEVALUE } from '@store/types/familyHistory'
+import { SETMARRIAGETEXTMODEVALUE } from '@store/types/marriageHistory'
+import { SETMENSTRUATIONTEXTMODEVALUE } from '@store/types/menstruationHistory'
+
 import BlockInp from '@common/components/BlockInp';
 import {didPushParamChange,isAllPartClear,getAllDataList,getAllDataStringList,isAllClear} from '@utils/tools';
 import {embedPush} from '@store/async-actions/pushMessage';
@@ -20,6 +26,11 @@ const actionsType={
   '2':SETCURRENTTEXTMODEVALUE,
   '3':SETOTHERTEXTMODEVALUE,
   '4':SETCHECKTEXTMODEVALUE,
+  '13': SETPASTTEXTMODEVALUE, // 设置既往史
+  '14': SETPERSONALTEXTMODEVALUE, // 设置个人史
+  '15': SETFAMILYTEXTMODEVALUE, // 设置家族史
+  '16': SETMARRIAGETEXTMODEVALUE, // 设置婚育史
+  '17': SETMENSTRUATIONTEXTMODEVALUE, // 设置月经史
 };
 function mapDispatchToProps(dispatch){
   return {

+ 1 - 0
src/containers/OperationContainer.js

@@ -84,6 +84,7 @@ function mapDispatchToProps(dispatch) {
       });
     },
     save: () => {
+      // 埋点事件,点击保存时调用
       dispatch(saveClickNum);
       dispatch(() => saveMessage())
     },

+ 11 - 0
src/store/actions/familyHistory.js

@@ -0,0 +1,11 @@
+import config from '@config/index.js';
+import { formatContinueDots, getLabelIndex, fullfillText, getIds, resetTagtype, handleLocalDelTag, shiftLocalDelTag } from '@utils/tools';
+import { Notify } from '@commonComp';
+
+
+//文本模式下值保存
+export const setTextModeValue = (state, action) => {
+  const res = Object.assign({}, state);
+  res.saveText[0] = action.text;
+  return res;
+};

+ 11 - 0
src/store/actions/marriageHistory.js

@@ -0,0 +1,11 @@
+import config from '@config/index.js';
+import { formatContinueDots, getLabelIndex, fullfillText, getIds, resetTagtype, handleLocalDelTag, shiftLocalDelTag } from '@utils/tools';
+import { Notify } from '@commonComp';
+
+
+//文本模式下值保存
+export const setTextModeValue = (state, action) => {
+  const res = Object.assign({}, state);
+  res.saveText[0] = action.text;
+  return res;
+};

+ 11 - 0
src/store/actions/menstruationHistory.js

@@ -0,0 +1,11 @@
+import config from '@config/index.js';
+import { formatContinueDots, getLabelIndex, fullfillText, getIds, resetTagtype, handleLocalDelTag, shiftLocalDelTag } from '@utils/tools';
+import { Notify } from '@commonComp';
+
+
+//文本模式下值保存
+export const setTextModeValue = (state, action) => {
+  const res = Object.assign({}, state);
+  res.saveText[0] = action.text;
+  return res;
+};

+ 11 - 0
src/store/actions/pastHistory.js

@@ -0,0 +1,11 @@
+import config from '@config/index.js';
+import { formatContinueDots, getLabelIndex, fullfillText, getIds, resetTagtype, handleLocalDelTag, shiftLocalDelTag } from '@utils/tools';
+import { Notify } from '@commonComp';
+
+
+//文本模式下值保存
+export const setTextModeValue = (state, action) => {
+  const res = Object.assign({}, state);
+  res.saveText[0] = action.text;
+  return res;
+};

+ 11 - 0
src/store/actions/personalHistory.js

@@ -0,0 +1,11 @@
+import config from '@config/index.js';
+import { formatContinueDots, getLabelIndex, fullfillText, getIds, resetTagtype, handleLocalDelTag, shiftLocalDelTag } from '@utils/tools';
+import { Notify } from '@commonComp';
+
+
+//文本模式下值保存
+export const setTextModeValue = (state, action) => {
+  const res = Object.assign({}, state);
+  res.saveText[0] = action.text;
+  return res;
+};

+ 6 - 0
src/store/async-actions/print.js

@@ -27,6 +27,7 @@ export const getConceptDetails = (bool) => {
         obj.position = 3
         tmpLis.push(obj)
     }
+    // 诊断信息
     json('/conceptDetail/getConceptDetails', {
         "conceptIntorduces": tmpLis
     }).then((res)=>{//conceptIntroduceDTO
@@ -46,8 +47,13 @@ export const saveMessage=(bool)=>{
     store.dispatch({type:MODI_LOADING,flag:true});
     getConceptDetails(bool)
 }
+
+// 保存病历信息
 export const realSaveData = (bool,list) => {
+    console.log(bool,'==============');
+    console.log(list,'==============');
     let baseList = store.getState();
+    console.log(baseList,'baseList=========');
     const dConfig = baseList.typeConfig;
     const readMode = dConfig.readMode;          //回读模式
     let state = baseList.patInfo.message;

+ 10 - 0
src/store/index.js

@@ -33,6 +33,11 @@ import emergencyHis from './reducers/emergencyHis';
 import wrapModalBody from './reducers/wrapModalBody';
 import wrapModalBodyPac from './reducers/wrapModalBodyPac';
 import preIcss from './reducers/preIcss';
+import pastHistory from './reducers/pastHistory'
+import personalHistory from './reducers/personalHistory'
+import familyHistory from './reducers/familyHistory'
+import marriageHistory from './reducers/marriageHistory'
+import menstruationHistory from './reducers/menstruationHistory'
 
 
 const composeEnhancers =
@@ -72,6 +77,11 @@ const rootReducer = combineReducers({
     wrapModalBody,
     wrapModalBodyPac,
     preIcss,
+    pastHistory,
+    personalHistory,
+    familyHistory,
+    marriageHistory,
+    menstruationHistory,
 });
 
 export default createStore(rootReducer, enhancer);

+ 26 - 0
src/store/reducers/familyHistory.js

@@ -0,0 +1,26 @@
+import {
+  SETFAMILYTEXTMODEVALUE
+} from '../types/familyHistory';
+import {
+  setTextModeValue
+} from '../actions/familyHistory';
+import config from '@config/index';
+const block = Object.assign(JSON.parse(config.textLabel), { full: true });//空白时保留一个自由文本标签
+const initState = {
+  data: [block],
+  isEmpty: true,
+  saveText: [],
+  deledTags: {},
+  focusIndex: '',
+  editClear: true
+};
+
+export default function (state = initState, action) {//console.log(state)
+  const res = Object.assign({}, state);
+  switch (action.type) {
+    case SETFAMILYTEXTMODEVALUE:
+      return setTextModeValue(state, action);
+    default:
+      return res;
+  }
+}

+ 26 - 0
src/store/reducers/marriageHistory.js

@@ -0,0 +1,26 @@
+import {
+  SETMARRIAGETEXTMODEVALUE
+} from '../types/marriageHistory';
+import {
+  setTextModeValue
+} from '../actions/marriageHistory';
+import config from '@config/index';
+const block = Object.assign(JSON.parse(config.textLabel), { full: true });//空白时保留一个自由文本标签
+const initState = {
+  data: [block],
+  isEmpty: true,
+  saveText: [],
+  deledTags: {},
+  focusIndex: '',
+  editClear: true
+};
+
+export default function (state = initState, action) {//console.log(state)
+  const res = Object.assign({}, state);
+  switch (action.type) {
+    case SETMARRIAGETEXTMODEVALUE:
+      return setTextModeValue(state, action);
+    default:
+      return res;
+  }
+}

+ 26 - 0
src/store/reducers/menstruationHistory.js

@@ -0,0 +1,26 @@
+import {
+  SETMENSTRUATIONTEXTMODEVALUE
+} from '../types/menstruationHistory';
+import {
+  setTextModeValue
+} from '../actions/menstruationHistory';
+import config from '@config/index';
+const block = Object.assign(JSON.parse(config.textLabel), { full: true });//空白时保留一个自由文本标签
+const initState = {
+  data: [block],
+  isEmpty: true,
+  saveText: [],
+  deledTags: {},
+  focusIndex: '',
+  editClear: true
+};
+
+export default function (state = initState, action) {//console.log(state)
+  const res = Object.assign({}, state);
+  switch (action.type) {
+    case SETMENSTRUATIONTEXTMODEVALUE:
+      return setTextModeValue(state, action);
+    default:
+      return res;
+  }
+}

+ 26 - 0
src/store/reducers/pastHistory.js

@@ -0,0 +1,26 @@
+import {
+  SETPASTTEXTMODEVALUE
+} from '../types/pastHistory';
+import {
+  setTextModeValue
+} from '../actions/pastHistory';
+import config from '@config/index';
+const block = Object.assign(JSON.parse(config.textLabel), { full: true });//空白时保留一个自由文本标签
+const initState = {
+  data: [block],
+  isEmpty: true,
+  saveText: [],
+  deledTags: {},
+  focusIndex: '',
+  editClear: true
+};
+
+export default function (state = initState, action) {//console.log(state)
+  const res = Object.assign({}, state);
+  switch (action.type) {     
+    case SETPASTTEXTMODEVALUE:
+      return setTextModeValue(state, action);
+    default:
+      return res;
+  }
+}

+ 26 - 0
src/store/reducers/personalHistory.js

@@ -0,0 +1,26 @@
+import {
+  SETPERSONALTEXTMODEVALUE
+} from '../types/personalHistory';
+import {
+  setTextModeValue
+} from '../actions/personalHistory';
+import config from '@config/index';
+const block = Object.assign(JSON.parse(config.textLabel), { full: true });//空白时保留一个自由文本标签
+const initState = {
+  data: [block],
+  isEmpty: true,
+  saveText: [],
+  deledTags: {},
+  focusIndex: '',
+  editClear: true
+};
+
+export default function (state = initState, action) {//console.log(state)
+  const res = Object.assign({}, state);
+  switch (action.type) {
+    case SETPERSONALTEXTMODEVALUE:
+      return setTextModeValue(state, action);
+    default:
+      return res;
+  }
+}

+ 1 - 0
src/store/types/familyHistory.js

@@ -0,0 +1 @@
+export const SETFAMILYTEXTMODEVALUE = 'SET_FAMILY_TEXT_MODE_VALUE';  //文本模式下输入值

+ 1 - 0
src/store/types/marriageHistory.js

@@ -0,0 +1 @@
+export const SETMARRIAGETEXTMODEVALUE = 'SET_MARRIAGE_TEXT_MODE_VALUE';  //文本模式下输入值 

+ 1 - 0
src/store/types/menstruationHistory.js

@@ -0,0 +1 @@
+export const SETMENSTRUATIONTEXTMODEVALUE = 'SET_MENSTRUATION_TEXT_MODE_VALUE';  //文本模式下输入值

+ 1 - 0
src/store/types/pastHistory.js

@@ -0,0 +1 @@
+export const SETPASTTEXTMODEVALUE = 'SET_PAST_TEXT_MODE_VALUE';  //文本模式下输入值

+ 1 - 0
src/store/types/personalHistory.js

@@ -0,0 +1 @@
+export const SETPERSONALTEXTMODEVALUE = 'SET_PERSONAL_TEXT_MODE_VALUE';  //文本模式下输入值