morphone1995 4 лет назад
Родитель
Сommit
4ae7a04fa0

BIN
src/common/images/icon_del_default@2x.png


BIN
src/common/images/icon_del_hover@2x.png


BIN
src/common/images/icon_edit_default@2x.png


BIN
src/common/images/icon_edit_hover@2x.png


+ 120 - 82
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -9,14 +9,17 @@ import Empty from '@components/Empty'
 import { pushAllDataList,didPushParamChange } from '@utils/tools';
 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 { initItemList, setInitHistory } from '@store/async-actions/historyTemplates';
+import HistoryCases from '@containers/HistoryCases';
 import $ from 'jquery';
 import $ from 'jquery';
 import { ConfirmModal } from '@commonComp';
 import { ConfirmModal } from '@commonComp';
 import {showHistory} from "@store/actions/historyTemplates";
 import {showHistory} from "@store/actions/historyTemplates";
 import { SET_READ_MODE } from "@store/types/typeConfig";
 import { SET_READ_MODE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
 import {billing} from '@store/async-actions/pushMessage';
 import { getHistempDetail, asyncUpdateByIdUsNames, asyncCancelTemplateInfos} from '@store/async-actions/historyTemplates';
 import { getHistempDetail, asyncUpdateByIdUsNames, asyncCancelTemplateInfos} from '@store/async-actions/historyTemplates';
-import del from '../../../common/images/delete_no.png';
-import edit from '../../../common/images/check.png';
+import edit from '../../../common/images/icon_edit_default@2x.png';
+import editHover from '../../../common/images/icon_edit_hover@2x.png';
+import del from '../../../common/images/icon_del_default@2x.png';
+import delHover from '../../../common/images/icon_del_hover@2x.png';
 import Notify from '@commonComp/Notify';
 import Notify from '@commonComp/Notify';
 
 
 class HistoryCaseContainer extends React.Component {
 class HistoryCaseContainer extends React.Component {
@@ -32,9 +35,12 @@ class HistoryCaseContainer extends React.Component {
           editVisible: false,
           editVisible: false,
           templateName: '', // 病历名称
           templateName: '', // 病历名称
           historyCase: [],
           historyCase: [],
-          currentIndex:0,
+          currentIndex:-1,
           delId: '', //删除病历id
           delId: '', //删除病历id
           editId: '', //编辑病历id
           editId: '', //编辑病历id
+          activeIndex: 0,
+          showEditIcon: false,
+          showDelIcon: false,
         }
         }
         this.handleCaseClick=this.handleCaseClick.bind(this)
         this.handleCaseClick=this.handleCaseClick.bind(this)
         this.handleQuoteClick=this.handleQuoteClick.bind(this)
         this.handleQuoteClick=this.handleQuoteClick.bind(this)
@@ -51,36 +57,28 @@ class HistoryCaseContainer extends React.Component {
     }
     }
     componentDidMount(){
     componentDidMount(){
       const {items} = this.props
       const {items} = this.props
-      // items.forEach(item=>{
-      //   item.editShow = false
-      // })
-      // items[0].editShow = true
       dragBox('hisWrapMove','closeHis','add')
       dragBox('hisWrapMove','closeHis','add')
       setTimeout(() => {
       setTimeout(() => {
         this.handleCaseClick(0, items[0])
         this.handleCaseClick(0, items[0])
       }, 50);      
       }, 50);      
       this.setState({
       this.setState({
         visible:false,
         visible:false,
-        // historyCase: items
       })
       })
     }
     }
 
 
     componentWillReceiveProps(nextProps){
     componentWillReceiveProps(nextProps){
-      const { items } = nextProps
-      this.setState({
-        // historyCase: items
-      })
     }
     }
 
 
-    // 获取列表数据
+    // 操作后获取获取列表数据
     getTemplatePageAlls() {
     getTemplatePageAlls() {
-      initItemList().then(res => {
-        const result = res.data
-        if (result.code == 0 && result.data) {
-          store.dispatch(setInitHistory(result.data));
-        } else {
-          Notify.info("暂无历史病历");
-        }
+      return new Promise((resolve,reject)=>{
+        initItemList().then(res => {
+          const result = res.data
+          if (result.code == 0 && result.data) {
+            store.dispatch(setInitHistory(result.data));
+            resolve('ok')
+          }
+        })
       })
       })
     }
     }
 
 
@@ -102,18 +100,20 @@ class HistoryCaseContainer extends React.Component {
       this.setState({
       this.setState({
         activeId: idx,
         activeId: idx,
         activeHis: tmpItems,
         activeHis: tmpItems,
-        dataStr: tmpItems.detailList || [],
+        // dataStr: tmpItems.preview || {},
         // dataJson:JSON.parse(tmpItems.dataJson)||{},
         // dataJson:JSON.parse(tmpItems.dataJson)||{},
-        currentIndex: idx
+        dataStr: JSON.parse(tmpItems.preview)||[],
+        activeIndex: idx
       })
       })
     }
     }
+    // 确认引用选中病历
     makeSure(){
     makeSure(){
         const {activeHis} = this.state;
         const {activeHis} = this.state;
         this.setState({visible:false});
         this.setState({visible:false});
         store.dispatch(showHistory(false));
         store.dispatch(showHistory(false));
         //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
         //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
         //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
         //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
-        store.dispatch(getHistempDetail(activeHis));
+        store.dispatch(getHistempDetail(activeHis));  // 获取引用数据
         const {handleQuoteClick} = this.props;
         const {handleQuoteClick} = this.props;
         handleQuoteClick&&handleQuoteClick();
         handleQuoteClick&&handleQuoteClick();
         dragBox('hisWrapMove','closeHis','del');
         dragBox('hisWrapMove','closeHis','del');
@@ -128,7 +128,19 @@ class HistoryCaseContainer extends React.Component {
             delVisible: false
             delVisible: false
           })
           })
           // 重新渲染列表
           // 重新渲染列表
-          this.getTemplatePageAlls()
+          this.getTemplatePageAlls().then(res=>{
+            if(res === 'ok'){
+              const { items } = this.props;
+              if(items.length ===0) {
+                this.setState({
+                  activeHis: {}
+                })
+                store.dispatch(showHistory(false));
+                return
+              }
+              this.handleCaseClick(0, items[0])
+            }
+          })
         }
         }
       }).catch(err => {
       }).catch(err => {
         Notify.info(err.msg);
         Notify.info(err.msg);
@@ -144,6 +156,7 @@ class HistoryCaseContainer extends React.Component {
     }
     }
     // 显示删除确认框
     // 显示删除确认框
     handleDelQuoteClick(e, val, idx) {
     handleDelQuoteClick(e, val, idx) {
+      e.stopPropagation()
       this.setState({
       this.setState({
         delVisible: true,
         delVisible: true,
         delId: val.id
         delId: val.id
@@ -176,6 +189,7 @@ class HistoryCaseContainer extends React.Component {
     }
     }
     // 显示编辑确认框
     // 显示编辑确认框
     handleEditQuoteClick(e, val, idx) {
     handleEditQuoteClick(e, val, idx) {
+      e.stopPropagation()
       this.setState({
       this.setState({
         editVisible: true,
         editVisible: true,
         editId: val.id,
         editId: val.id,
@@ -188,13 +202,16 @@ class HistoryCaseContainer extends React.Component {
         visible:false
         visible:false
       })
       })
     }
     }
+
+    // 引用,右侧文本数据同步渲染
     handleQuoteClick(e,val,idx){
     handleQuoteClick(e,val,idx){
       this.setState({
       this.setState({
         visible:true,
         visible:true,
         activeId:idx,
         activeId:idx,
         activeHis:val,
         activeHis:val,
-        dataStr:val.detailList||[],
+        // dataStr: val.preview||{},
         // dataJson:JSON.parse(val.dataJson)||{},
         // dataJson:JSON.parse(val.dataJson)||{},
+        dataStr: JSON.parse(val.preview) || [],
       })
       })
     }
     }
     // 修改模板名称 input的值
     // 修改模板名称 input的值
@@ -205,15 +222,50 @@ class HistoryCaseContainer extends React.Component {
     }
     }
 
 
     // 处理鼠标移入
     // 处理鼠标移入
-    handleMouseEnter(){
-      // console.log('处理鼠标移入');
+    handleMouseEnterLi(idx){
+      // console.log('处理鼠标移入li');
+      this.setState({
+        currentIndex: idx
+      })
     }
     }
 
 
     // 处理鼠标移除
     // 处理鼠标移除
-    handleMouseLeave(){
-      // console.log('处理鼠标移除');
+    handleMouseLeaveLi(idx){
+      // console.log('处理鼠标移除li');
+
+    }
+
+      // 处理鼠标移入编辑按钮
+    handleMouseEnterEdit(idx) {
+
+        this.setState({
+          showEditIcon: true
+        })
+      }
+
+      // 处理鼠标移出编辑按钮
+    handleMouseLeaveEdit(idx) {
+
+      this.setState({
+        showEditIcon: false
+      })
     }
     }
 
 
+  // 处理鼠标移入删除按钮
+  handleMouseEnterDel(idx) {
+
+    this.setState({
+      showDelIcon: true
+    })
+  }
+
+  // 处理鼠标移出删除按钮
+  handleMouseLeaveDel(idx) {
+    this.setState({
+      showDelIcon: false
+    })
+  }
+
     // 排序
     // 排序
     handleSortClick(){
     handleSortClick(){
       const { items } = this.props;
       const { items } = this.props;
@@ -227,22 +279,24 @@ class HistoryCaseContainer extends React.Component {
 
 
     render(){
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
+      const { activeHis, visible, dataJson, dataStr, delVisible, editVisible, historyCase, currentIndex, activeIndex } = this.state;
 
 
-        const { activeHis, visible, dataJson, dataStr, delVisible, editVisible, historyCase, currentIndex } = this.state;
-
-       console.log(dataStr,'dataStr');
-
-        const getAllDataStringList = () =>{           //获取所有模块文本的数据
+     
+        const getAllDataStringList = (dataStr) =>{           //获取所有模块文本的数据
             let jsonDataString = {};
             let jsonDataString = {};
             jsonDataString.lis = {};
             jsonDataString.lis = {};
-            jsonDataString.chief = dataStr[0].content || '';      //主诉
-            jsonDataString.present = dataStr[1].content || '';     //现病史
-            jsonDataString.other = dataStr[2].content || '';      //其他史
-            jsonDataString.vital = dataStr[3].content || '';    //查体
-            jsonDataString.lis = dataStr[4].content || '';      //化验导入填写
-            jsonDataString.pacs = dataStr[5].content || '';     //辅检
-            jsonDataString.diag = dataStr[6].content || '';      //诊断
-            jsonDataString.advice = dataStr[7].content || '';       //医嘱
+            jsonDataString.chief = dataStr[0] && dataStr[0].content || '';      //主诉
+            jsonDataString.present = dataStr[1] &&dataStr[1].content || '';     //现病史
+            jsonDataString.pastHistory = dataStr[2] &&dataStr[2].content || '';     
+            jsonDataString.personalHistory = dataStr[3] &&dataStr[3].content || '';    
+            jsonDataString.familyHistory = dataStr[4] &&dataStr[4].content || '';  
+            jsonDataString.marriageHistory = dataStr[5] &&dataStr[5].content || '';   
+            jsonDataString.menstruationHistory = dataStr[6] && dataStr[6].content || '';      
+            jsonDataString.vital = dataStr[7] && dataStr[7].content || '';    //查体
+            // jsonDataString.lis = dataStr[4].content || '';      //化验导入填写
+            // jsonDataString.pacs = dataStr[5].content || '';     //辅检
+            // jsonDataString.diag = dataStr[6].content || '';      //诊断
+            // jsonDataString.advice = dataStr[7].content || '';       //医嘱
             return jsonDataString;
             return jsonDataString;
         }
         }
         return (
         return (
@@ -252,43 +306,43 @@ class HistoryCaseContainer extends React.Component {
                 <div className={styles.mainHistoryLeft}>
                 <div className={styles.mainHistoryLeft}>
                     <div className={styles.title}>
                     <div className={styles.title}>
                         <span className={styles.his}>历史病历</span>
                         <span className={styles.his}>历史病历</span>
-                        {/* <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span> */}
+                        <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span>
                     </div>
                     </div>
                     <div className={styles.lists}>
                     <div className={styles.lists}>
                         <ul id="hislistLeft">
                         <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} className={val.id == activeHistory.id?styles.bgc:''} onClick={(e)=>{this.handleCaseClick(e,idx)}}>
-                              return <li key={val.id} onClick={() => { this.handleCaseClick(idx, val) }} onMouseEnter={() => this.handleMouseEnter()} onMouseLeave={() => this.handleMouseLeave()}>
-                                        <div class={styles.itemLeft}>
-                                        <span title={val.name}>{val.name}</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>
+                              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}>
+                                        <span title={val.name} className={activeIndex === idx ? styles.itemNameActive :styles.itemName}>{val.name}</span>
+                                    {currentIndex === idx && (<div className={styles.edit} onClick={(e) => { this.handleEditQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterEdit(idx)} onMouseLeave={() => this.handleMouseLeaveEdit(idx)}>
+                                      <img src={ this.state.showEditIcon ? editHover :edit} />
+                                              </div>)}
+                                           </div>
+                                  <div className={activeIndex === idx ? styles.timeActive : styles.time}>{val.inquiryDate}</div>
+                                          
+                                         </div>
+                                         <div className={styles.itemRight}>
+                                                                                   
                                           <button
                                           <button
                                             className={styles.quote}
                                             className={styles.quote}
                                             onClick={(e) => { this.handleQuoteClick(e, val, idx) }}
                                             onClick={(e) => { this.handleQuoteClick(e, val, idx) }}
                                           >引 用</button>
                                           >引 用</button>
+
+                                          {currentIndex === idx && (
+                                      <div className={styles.del} onClick={(e) => { this.handleDelQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterDel(idx)} onMouseLeave={() => this.handleMouseLeaveDel(idx)}>
+                                      <img src={this.state.showDelIcon?delHover :del} />
+                                            </div>
+                                          )} 
                                         </div>
                                         </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> */}
-                                        
-                                        {/* <span className={styles.time}>{val.inquiryDate}</span> */}
                                     </li>
                                     </li>
                                 }):<Empty message={'无历史病历'}></Empty>
                                 }):<Empty message={'无历史病历'}></Empty>
                             }
                             }
                         </ul>
                         </ul>
                     </div>
                     </div>
                 </div>
                 </div>
-                {/* <div className={styles.mainHistoryRight}>
+                <div className={styles.mainHistoryRight}>
                     {
                     {
                         activeHis == undefined || JSON.stringify(activeHis) == "{}" ? null :
                         activeHis == undefined || JSON.stringify(activeHis) == "{}" ? null :
                         <PreviewBody
                         <PreviewBody
@@ -296,13 +350,13 @@ class HistoryCaseContainer extends React.Component {
                             showHistoryCases={this.props.showHistoryCases}
                             showHistoryCases={this.props.showHistoryCases}
                             dataJson={dataJson}
                             dataJson={dataJson}
                             baseObj={activeHis}
                             baseObj={activeHis}
-                            dataStr={dataStr.length > 0?getAllDataStringList(dataStr):[]}
+                            dataStr={dataStr.length > 0 ? getAllDataStringList(dataStr) : []}
                             show={false}
                             show={false}
                             flg={true}
                             flg={true}
                             showAssessBtn={true}
                             showAssessBtn={true}
                         ></PreviewBody>
                         ></PreviewBody>
                     }
                     }
-                </div> */}
+                </div>
                 
                 
                 <ConfirmModal
                 <ConfirmModal
                     visible={visible}
                     visible={visible}
@@ -342,23 +396,7 @@ class HistoryCaseContainer extends React.Component {
                   oKBg={'#3B9ED0'}
                   oKBg={'#3B9ED0'}
                   title={'编辑病历名称'}
                   title={'编辑病历名称'}
                   height={200}
                   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}>
                     <div className={styles.outBox}>
                       <span>病历名称:</span>
                       <span>病历名称:</span>
                       <input type="text" placeholder="请输入病历名称" value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>
                       <input type="text" placeholder="请输入病历名称" value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>

+ 61 - 23
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -62,36 +62,74 @@
                 border: 1px solid transparent;
                 border: 1px solid transparent;
                 display: flex;
                 display: flex;
                 align-items: center;
                 align-items: center;
+                .activeColor {
+                      color: '#3B9ED0';
+                    }
                 .itemLeft{
                 .itemLeft{
                     flex: 1;
                     flex: 1;
+
                     display: flex;
                     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;
-                        }     
+                    // align-items: center;
+                    justify-content: start;
+                    flex-direction: column;
+
+                    .historyTop{
+                        display: flex;
+                        height:34px;
+                        .itemName {
+                            // display: inline-block;
+                            max-width: 120px;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;    
+                            font-size: 14px;  
+                            line-height: 34px;   
+                            color: #1E1E1E;                      
+                        }  
+                        .itemNameActive {
+                            // display: inline-block;
+                            max-width: 120px;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;    
+                            font-size: 14px;  
+                            line-height: 34px;   
+                            color: #3B9ED0;                      
+                        }                   
+                        .edit{
+
+                            width: 30px;
+                            height: 30px;
+                            // background-color: pink;
+                            img{
+                                width: 14px;
+                                height: 14px;
+                                position: relative;
+                                top: -8px;
+                                left: 8px;
+                            }     
+                        }
                     }
                     }
+                    .time {
+                        font-size:10px;
+                        height:20px;
+                        line-height: 20px;
+                        color: #777;
+                    }    
+                    .timeActive {
+                        font-size:10px;
+                        height:20px;
+                        line-height: 20px;
+                        color: #3B9ED0;
+                    }                
                 }
                 }
                 .itemRight{
                 .itemRight{
-                    width: 106px;
+                    width: 88px;
                     display: flex;
                     display: flex;
                     align-items: center;
                     align-items: center;
                     .del {
                     .del {
                         // background-color: red;
                         // background-color: red;
+                        margin-left: 8px;
                         width: 30px;
                         width: 30px;
                         height:30px;
                         height:30px;
                         img{
                         img{
@@ -110,9 +148,7 @@
                 border: 1px solid #66afe9;
                 border: 1px solid #66afe9;
                 border: 1px solid #66afe9\0;
                 border: 1px solid #66afe9\0;
             }
             }
-            // .time {
-            //     float: right;
-            // }
+ 
            
            
             .bgc {
             .bgc {
                 background-color: #fff;
                 background-color: #fff;
@@ -174,3 +210,5 @@
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
 }
 }
+
+

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

@@ -38,7 +38,7 @@ class InfoTitle extends Component {
         // })
         // })
         initItemList().then(res=>{           
         initItemList().then(res=>{           
             const result = res.data
             const result = res.data
-            if (result.code == 0 && result.data) {
+            if (result.code === '0' && result.data.records.length !== 0) {
                 hideLoading();
                 hideLoading();
                 store.dispatch(setInitHistory(result.data));
                 store.dispatch(setInitHistory(result.data));
                 store.dispatch(showHistory(true));
                 store.dispatch(showHistory(true));
@@ -47,7 +47,7 @@ class InfoTitle extends Component {
                 Notify.info("暂无历史病历");
                 Notify.info("暂无历史病历");
             }
             }
         })
         })
-        getHospitalInfo()
+        store.dispatch(getHospitalInfo())
     }
     }
     componentWillReceiveProps(next){
     componentWillReceiveProps(next){
         const that = this;
         const that = this;

+ 3 - 3
src/components/Information/index.jsx

@@ -14,12 +14,12 @@ class Information extends Component {
     $(this.$content.current)[0].scrollIntoView(true);
     $(this.$content.current)[0].scrollIntoView(true);
   }
   }
   render() {
   render() {
-    const { baseObj } = this.props;
+    const { baseObj} = this.props;
     let baseData = store.getState()
     let baseData = store.getState()
-    let preInfo = baseData.patInfo.message;
+    let preInfo = baseData.historyTemplates.HospitalInfo.name
     const noData = JSON.stringify(preInfo) == '{}';
     const noData = JSON.stringify(preInfo) == '{}';
     return <div className={style['information']}>
     return <div className={style['information']}>
-        <div ref={this.$content} className={style['title']}>{preInfo.hospitalName}</div>
+        <div ref={this.$content} className={style['title']}>{preInfo}</div>
         <table className={style['patInfo']}>
         <table className={style['patInfo']}>
           <tr>
           <tr>
             <td>姓名:{baseObj ? baseObj.patName : noData ? '' : preInfo.patientName}</td>
             <td>姓名:{baseObj ? baseObj.patName : noData ? '' : preInfo.patientName}</td>

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

@@ -9,7 +9,7 @@
   margin: 0px 0px 15px 0px;
   margin: 0px 0px 15px 0px;
   td {
   td {
     border: 1px solid #aaa;
     border: 1px solid #aaa;
-    padding: 4px 8px;
+    padding: 14px 8px;
     font-size: 14px;
     font-size: 14px;
   }
   }
   tr td{
   tr td{

+ 32 - 34
src/components/PreviewBody/index.jsx

@@ -32,17 +32,17 @@ class PreviewBody extends Component {
   }
   }
 
 
   surePrint(jsonStr) {
   surePrint(jsonStr) {
-    if (filterDataArr(JSON.parse(jsonStr.chief)) == '') {
-      Notify.info('主诉不能为空');
-      return false;
-    } else if (!jsonStr.diag || jsonStr.diag.trim().length < 1) {
-      Notify.info('诊断不能为空');
-      return false;
-    } else {
-      this.onPrint();
-      dragBox('previewPrintWrapper','previewPrintStatic','del')
-      this.props.save(true)
-    }
+    // if (filterDataArr(JSON.parse(jsonStr.chief)) == '') {
+    //   Notify.info('主诉不能为空');
+    //   return false;
+    // } else if (!jsonStr.diag || jsonStr.diag.trim().length < 1) {
+    //   Notify.info('诊断不能为空');
+    //   return false;
+    // } else {
+    //   this.onPrint();
+    //   dragBox('previewPrintWrapper','previewPrintStatic','del')
+    //   this.props.save(true)
+    // }
   }
   }
   getCurrentDate() {
   getCurrentDate() {
     let myDate = new Date();
     let myDate = new Date();
@@ -81,42 +81,40 @@ class PreviewBody extends Component {
   render() {
   render() {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;
     let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
     let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
-    if(!come){
-      other_data = JSON.parse(baseObj.detailList[2].contentJson)
-      lis_data = JSON.parse(baseObj.detailList[4].contentJson)
-      pas_data = JSON.parse(baseObj.detailList[5].contentJson)
-      adviceData = JSON.parse(baseObj.detailList[7].contentJson)
-      other_yjs = other_data&&other_data.pfix;
-      access = other_data&&other_data.haveAssess
-    }else{
-      other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
-      access = dataJson.haveAssess
-      adviceData=dataJson.advice
-    }
-    //const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
-    const noData = JSON.stringify(preInfo) == '{}';
+    // if(!come){
+    //   other_data = JSON.parse(baseObj.detailList[2].contentJson)
+    //   lis_data = JSON.parse(baseObj.detailList[4].contentJson)
+    //   pas_data = JSON.parse(baseObj.detailList[5].contentJson)
+    //   adviceData = JSON.parse(baseObj.detailList[7].contentJson)
+    //   other_yjs = other_data&&other_data.pfix;
+    //   access = other_data&&other_data.haveAssess
+    // }else{
+    //   other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
+    //   access = dataJson.haveAssess
+    //   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: flg ? '700' : '820' }}>
       <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>
       <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>
         <Information baseObj={baseObj} preInfo={preInfo}></Information>
         <Information baseObj={baseObj} preInfo={preInfo}></Information>
         <table className={style['infos']}>
         <table className={style['infos']}>
           <ItemPart dataStr={dataStr.chief} title={'主诉:'} type={1}></ItemPart>
           <ItemPart dataStr={dataStr.chief} 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={'家族史:'} 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.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>
+          <ItemPart dataStr={dataStr.menstruationHistory} title={'月经史:'} type={1}></ItemPart>
           <ItemPart dataStr={dataStr.vital} 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>
+          {/* <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>
           <ItemPart dataStr={dataStr.pacs} title={'辅检:'} type={2}></ItemPart>
-          <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2} lastDot={true}></ItemPart>
+          <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2} lastDot={true}></ItemPart> */}
           <tr className={style['patInfoFst']}>
           <tr className={style['patInfoFst']}>
             <td className={style['patInfoSec']}>医嘱:</td>
             <td className={style['patInfoSec']}>医嘱:</td>
             <td className={`${style['patInfoSec']} ${style['pushMessage']} ${style['font14']}`}>
             <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))) && <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.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 && adviceData.commontreatment.length > 0 && <p  className={style.pushMessageTitle}><span>一般治疗</span></p>}
               {
               {

+ 2 - 1
src/containers/HistoryCases.js

@@ -11,7 +11,8 @@ function mapStateToProps(state) {
         activeHistory:state.historyTemplates.activeHistory,
         activeHistory:state.historyTemplates.activeHistory,
         items:state.historyTemplates.items,
         items:state.historyTemplates.items,
         visible:state.historyTemplates.visible,
         visible:state.historyTemplates.visible,
-        preInfo : state.patInfo.message
+        // preInfo: { ...state.patInfo.message, hispitalName: state.historyTemplates.HospitalInfo.name},
+        preInfo: { hispitalName: state.historyTemplates.HospitalInfo.name}
     }
     }
 }
 }
 
 

+ 8 - 2
src/store/actions/historyTemplates.js

@@ -1,4 +1,4 @@
-import { HISTORY_TEMPLATES, HISTORY_TEMPLATES_SORT, HISTORY_INIT, HISTORY_ACTIVE, HISTORY_VISIBLE, HISTORY_UPDATEBYIDUSNAMES } from '@store/types/historyTemplates';
+import { HISTORY_TEMPLATES, HISTORY_TEMPLATES_SORT, HISTORY_INIT, HISTORY_ACTIVE, HISTORY_VISIBLE, HISTORY_UPDATEBYIDUSNAMES, HISTORY_GETHOSPITALINFO } from '@store/types/historyTemplates';
 
 
 export const showHistory=(bool) => ({   //显示隐藏历史病历
 export const showHistory=(bool) => ({   //显示隐藏历史病历
     type:HISTORY_TEMPLATES,
     type:HISTORY_TEMPLATES,
@@ -22,4 +22,10 @@ export const visibleHistory=(bool) => ({   //历史病历弹窗
 
 
 export const updateByIdUsNamesHistory = () => ({   //修改病历名称
 export const updateByIdUsNamesHistory = () => ({   //修改病历名称
     type: HISTORY_UPDATEBYIDUSNAMES,
     type: HISTORY_UPDATEBYIDUSNAMES,
-});
+});
+
+
+// export const getInitHospitalInfo = (val) => ({   //获取医院信息
+//     type: HISTORY_GETHOSPITALINFO,
+//     val
+// });

+ 21 - 11
src/store/async-actions/historyTemplates.js

@@ -1,6 +1,7 @@
 import axios from '@utils/ajax';
 import axios from '@utils/ajax';
 import { pushAllDataList,didPushParamChange } from '@utils/tools';
 import { pushAllDataList,didPushParamChange } from '@utils/tools';
 import { initHistory } from '@store/actions/historyTemplates';
 import { initHistory } from '@store/actions/historyTemplates';
+import { HISTORY_GETHOSPITALINFO } from '@store/types/historyTemplates';
 import Notify from '@commonComp/Notify';
 import Notify from '@commonComp/Notify';
 import store from '@store';
 import store from '@store';
 import { billing, getMRAnalyse} from '@store/async-actions/pushMessage';
 import { billing, getMRAnalyse} from '@store/async-actions/pushMessage';
@@ -27,18 +28,20 @@ export const initItemList = (item) => {
 };
 };
 export const getHistempDetail = (item) => {
 export const getHistempDetail = (item) => {
   const param = {
   const param = {
-      "inquiryId": item.id
+      "id": item.id
     }
     }
     return (dispatch) => {
     return (dispatch) => {
-        axios.json('/inquiryInfo/getInquiryDetail',param).then((res)=>{
+       axios.json('/demo/templateInfo/getTemplatebyId',param).then((res)=>{        
             const data =res.data;
             const data =res.data;
             if(data.code == 0){
             if(data.code == 0){
                 let tmpData = data.data
                 let tmpData = data.data
-                pushAllDataList(item.sign,'push',tmpData,'history')       //引用
-                if(didPushParamChange()) {
-                  dispatch(billing());
-                }
-                dispatch(getMRAnalyse())
+                // pushAllDataList(item.sign,'push',tmpData,'history')       //引用
+                // if(didPushParamChange()) {
+                //   dispatch(billing());
+                // }
+                // dispatch(getMRAnalyse())
+
+                
             }else{
             }else{
                 Notify.error(data.msg);
                 Notify.error(data.msg);
             }
             }
@@ -75,7 +78,6 @@ export const asyncUpdateByIdUsNames = (editId, templateName) => {
 export const asyncCancelTemplateInfos = (delId) => {
 export const asyncCancelTemplateInfos = (delId) => {
   return (dispatch) => {
   return (dispatch) => {
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
-      console.log(delId,'delId');
       let param = {
       let param = {
         ids: delId
         ids: delId
       }
       }
@@ -93,8 +95,16 @@ export const asyncCancelTemplateInfos = (delId) => {
 
 
 // 获取医院信息
 // 获取医院信息
 export const getHospitalInfo = () =>{
 export const getHospitalInfo = () =>{
-  axios.json('/tran/hospitalInfo/getHospitalInfoById',{id:1}).then(res=>{
-    // console.log(res,'医院信息');
-  })
+  return (dispatch) =>{
+    axios.json('/tran/hospitalInfo/getHospitalInfoById', { id: 1 }).then(res => {
+      if (res.data.code === '0') {
+        dispatch({
+          type: HISTORY_GETHOSPITALINFO,
+          data: res.data.data
+        })
+      }
+    })
+  }
+  
 }
 }
 
 

+ 79 - 3
src/store/async-actions/print.js

@@ -11,7 +11,8 @@ import {
     pushAllDataList,
     pushAllDataList,
     filterDataArr,
     filterDataArr,
     filterOtherDataArr,
     filterOtherDataArr,
-    timestampToTime
+    timestampToTime,
+    formatTextInfo
 } from '@utils/tools';
 } from '@utils/tools';
 export const getConceptDetails = (bool) => {
 export const getConceptDetails = (bool) => {
     let baseList = store.getState();
     let baseList = store.getState();
@@ -66,7 +67,82 @@ export const saveMedicalData = () =>{
     let inquiryDate = timestampToTime(new Date().getTime())  // 获取当前时间  
     let inquiryDate = timestampToTime(new Date().getTime())  // 获取当前时间  
     let modeName = baseList.patInfo.medicalName   //病历名称
     let modeName = baseList.patInfo.medicalName   //病历名称
     let jsonData = getAllDataList(baseList);
     let jsonData = getAllDataList(baseList);
-    // if (!modeName) return 
+    // let preview = getAllDataList(preview);
+    let tempPreview = formatTextInfo(baseList);
+    let preview = [
+        {
+            "content": tempPreview.chief,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.chief)),
+            "contentJson": '',
+            "type": 1
+        },
+        {
+            "content": tempPreview.present,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.present)),
+            "contentJson": '',
+            "type": 2
+        },
+        {
+            "content": tempPreview.pastHistory,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.pastHistory)),
+            "contentJson": '',
+            "type": 3
+        },
+        {
+            "content": tempPreview.personalHistory,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.personalHistory)),
+            "contentJson": '',
+            "type": 4
+        },
+        {
+            "content": tempPreview.familyHistory,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.familyHistory)),
+            "contentJson": '',
+            "type": 5
+        },
+        {
+            "content": tempPreview.marriageHistory,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.marriageHistory)),
+            "contentJson": '',
+            "type": 6
+        },
+        {
+            "content": tempPreview.menstruationHistory,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.menstruationHistory)),
+            "contentJson": '',
+            "type": 7
+        },
+        {
+            "content": tempPreview.vital,
+            "contentValue": filterDataArr(JSON.parse(tempPreview.vital)),
+            "contentJson": '',
+            "type": 8
+        },
+        // {
+        //     "content": tempPreview.lis,
+        //     "contentValue": filterDataArr(JSON.parse(tempPreview.lis)),
+        //     "contentJson": '',
+        //     "type": 9
+        // },
+        // {
+        //     "content": tempPreview.pacs,
+        //     "contentValue": filterDataArr(JSON.parse(tempPreview.pacs)),
+        //     "contentJson": '',
+        //     "type": 10
+        // },
+        // {
+        //     "content": tempPreview.diag,
+        //     "contentValue": filterDataArr(JSON.parse(tempPreview.diag)),
+        //     "contentJson": '',
+        //     "type": 11
+        // },
+        // {
+        //     "content": tempPreview.advice,
+        //     "contentValue": filterDataArr(JSON.parse(tempPreview.advice)),
+        //     "contentJson": '',
+        //     "type": 12
+        // }
+    ]
     let params = {
     let params = {
         "age": formatFormParmas('patientAge', patInfoData),
         "age": formatFormParmas('patientAge', patInfoData),
         "cardNo": formatFormParmas('patientIdNo', patInfoData),
         "cardNo": formatFormParmas('patientIdNo', patInfoData),
@@ -77,7 +153,7 @@ export const saveMedicalData = () =>{
         "inquiryDate": inquiryDate,
         "inquiryDate": inquiryDate,
         "modeName": modeName,
         "modeName": modeName,
         "patName": formatFormParmas('patientName', patInfoData),
         "patName": formatFormParmas('patientName', patInfoData),
-        "preview": '', 
+        "preview": JSON.stringify(preview),  // 左侧病历预览信息
         "sex": formatFormParmas('patientSex', patInfoData),
         "sex": formatFormParmas('patientSex', patInfoData),
     }
     }
     json('/demo/templateInfo/saveTemplateInfo', params).then(res=>{
     json('/demo/templateInfo/saveTemplateInfo', params).then(res=>{

+ 11 - 3
src/store/reducers/historyTemplates.js

@@ -4,7 +4,8 @@ import {
     HISTORY_INIT,
     HISTORY_INIT,
     HISTORY_ACTIVE,
     HISTORY_ACTIVE,
     HISTORY_VISIBLE,
     HISTORY_VISIBLE,
-    HISTORY_UPDATEBYIDUSNAMES
+    HISTORY_UPDATEBYIDUSNAMES,
+    HISTORY_GETHOSPITALINFO
 } from '../types/historyTemplates';
 } from '../types/historyTemplates';
 
 
 
 
@@ -12,7 +13,8 @@ const initHistoryList = {
     showHistoryCases: false,//历史病历显示隐藏
     showHistoryCases: false,//历史病历显示隐藏
     visible:false,
     visible:false,
     activeHistory:{},//需要显示的病例
     activeHistory:{},//需要显示的病例
-    items: []
+    items: [],
+    HospitalInfo: {}, // 医院信息
 }
 }
 
 
 export default (state = initHistoryList, action) => {
 export default (state = initHistoryList, action) => {
@@ -47,7 +49,13 @@ export default (state = initHistoryList, action) => {
     }
     }
     if (action.type === HISTORY_UPDATEBYIDUSNAMES) {
     if (action.type === HISTORY_UPDATEBYIDUSNAMES) {
         const newState = Object.assign({}, state);
         const newState = Object.assign({}, state);
-        console.log(newState,'newState');
+        // console.log(newState,'newState');
+        return newState;
+    }
+
+    if (action.type === HISTORY_GETHOSPITALINFO) {
+        const newState = Object.assign({}, state);
+        newState.HospitalInfo = action.data
         return newState;
         return newState;
     }
     }
     return state;
     return state;

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

@@ -6,3 +6,4 @@ export const HISTORY_VISIBLE = 'HISTORY_VISIBLE';
 
 
 
 
 export const HISTORY_UPDATEBYIDUSNAMES = 'HISTORY_UPDATEBYIDUSNAMES';  //修改病历名称
 export const HISTORY_UPDATEBYIDUSNAMES = 'HISTORY_UPDATEBYIDUSNAMES';  //修改病历名称
+export const HISTORY_GETHOSPITALINFO = 'HISTORY_GETHOSPITALINFO';  //获取医院信息

+ 60 - 30
src/utils/tools.js

@@ -74,35 +74,45 @@ const getUrlArgObject = (parm) => {
     return args[parm];//返回对象  
     return args[parm];//返回对象  
 } 
 } 
 const getAllDataList =(baseList) =>{           //获取所有模块结构化的数据
 const getAllDataList =(baseList) =>{           //获取所有模块结构化的数据
-    let jsonData = {};//console.log(111,baseList)
+    let jsonData = {};
+    // console.log(baseList,'=======================');
+    jsonData.chief = baseList.mainSuit.saveText&&baseList.mainSuit.saveText[0];   // 主诉
+    jsonData.currentIll = baseList.currentIll.saveText && baseList.currentIll.saveText[0];   //现病史
+    jsonData.pastHistory = baseList.pastHistory.saveText && baseList.pastHistory.saveText[0];   //既往史
+    jsonData.personalHistory = baseList.personalHistory.saveText && baseList.personalHistory.saveText[0];   //个人史
+    jsonData.familyHistory = baseList.familyHistory.saveText && baseList.familyHistory.saveText[0];   //家族史
+    jsonData.marriageHistory = baseList.marriageHistory.saveText && baseList.marriageHistory.saveText[0];   //婚育史
+    jsonData.menstruationHistory = baseList.menstruationHistory.saveText && baseList.menstruationHistory.saveText[0];   //月经史
+    jsonData.checkBody = baseList.checkBody.saveText && baseList.checkBody.saveText[0];   //查体
+
+
     //月经史公式
     //月经史公式
-    const other = baseList.otherHistory;
-    jsonData.lis = {};
-    jsonData.chief = baseList.mainSuit.data;      //主诉
-    jsonData.present = baseList.currentIll.data;    //现病史
-    jsonData.other = other.data;      //其他史
-    jsonData.otherHistoryIsEmpty = other.isEmpty;
-    jsonData['yjs_1'] = other['yjs_1'];
-    jsonData['yjs_2'] = other['yjs_2'];
-    jsonData['yjs_3'] = other['yjs_3'];
-    jsonData['yjs_4'] = other['yjs_4'];
-    jsonData.vital = baseList.checkBody.data;    //查体
-    jsonData.checkBodyIsEmpty = baseList.checkBody.isEmpty;
-    jsonData.lis.labelList = baseList.inspect.labelList;      //化验
-    jsonData.lis.getExcelDataList =  baseList.inspect.getExcelDataList;      //化验导入
-    jsonData.checkedListImport = baseList.assistCheck.checkedListImport;     //辅检导入
-    jsonData.pacs = baseList.assistCheck.assistLabel;     //辅检
-    jsonData.diag = baseList.diagnosticList.diagnosticList;      //诊断
-    jsonData.advice = baseList.pushMessage.advice;       //医嘱
-    jsonData.addItems = baseList.homePage.addItems||{};
-    jsonData.mainsuitIds = baseList.mainSuit.mainIds;      //主诉去重
-    jsonData.mainChronicDesease = baseList.mainSuit.chronicDesease;      //主诉慢病{}
-    jsonData.diagChronicMagItem = baseList.diagnosticList.chronicMagItem;      //诊断慢病{}
-    jsonData.currentIds = baseList.currentIll.symptomIds;      //现病史去重
-    jsonData.isFirstMainDiag = baseList.treat.isFirstMainDiag;      //治疗方案
-    jsonData.mainReadSonM = baseList.mainSuit.addSmoduleData;      //主诉-子模板
-    jsonData.currReadSonM = baseList.currentIll.useEmpty?baseList.currentIll.currentEmptySon:baseList.currentIll.processModule;      //现病史-子模板
-    // console.log(jsonData,'结构化数据获取')
+    // const other = baseList.otherHistory;
+    // jsonData.lis = {};
+    // jsonData.chief = baseList.mainSuit.data;      //主诉
+    // jsonData.present = baseList.currentIll.data;    //现病史
+    // jsonData.other = other.data;      //其他史
+    // jsonData.otherHistoryIsEmpty = other.isEmpty;
+    // jsonData['yjs_1'] = other['yjs_1'];
+    // jsonData['yjs_2'] = other['yjs_2'];
+    // jsonData['yjs_3'] = other['yjs_3'];
+    // jsonData['yjs_4'] = other['yjs_4'];
+    // jsonData.vital = baseList.checkBody.data;    //查体
+    // jsonData.checkBodyIsEmpty = baseList.checkBody.isEmpty;
+    // jsonData.lis.labelList = baseList.inspect.labelList;      //化验
+    // jsonData.lis.getExcelDataList =  baseList.inspect.getExcelDataList;      //化验导入
+    // jsonData.checkedListImport = baseList.assistCheck.checkedListImport;     //辅检导入
+    // jsonData.pacs = baseList.assistCheck.assistLabel;     //辅检
+    // jsonData.diag = baseList.diagnosticList.diagnosticList;      //诊断
+    // jsonData.advice = baseList.pushMessage.advice;       //医嘱
+    // jsonData.addItems = baseList.homePage.addItems||{};
+    // jsonData.mainsuitIds = baseList.mainSuit.mainIds;      //主诉去重
+    // jsonData.mainChronicDesease = baseList.mainSuit.chronicDesease;      //主诉慢病{}
+    // jsonData.diagChronicMagItem = baseList.diagnosticList.chronicMagItem;      //诊断慢病{}
+    // jsonData.currentIds = baseList.currentIll.symptomIds;      //现病史去重
+    // jsonData.isFirstMainDiag = baseList.treat.isFirstMainDiag;      //治疗方案
+    // jsonData.mainReadSonM = baseList.mainSuit.addSmoduleData;      //主诉-子模板
+    // jsonData.currReadSonM = baseList.currentIll.useEmpty?baseList.currentIll.currentEmptySon:baseList.currentIll.processModule;      //现病史-子模板
     return jsonData;
     return jsonData;
 }
 }
 const getAllDataStringList =(baseList) =>{           //获取所有模块文本的数据
 const getAllDataStringList =(baseList) =>{           //获取所有模块文本的数据
@@ -141,9 +151,28 @@ const getAllDataStringList =(baseList) =>{           //获取所有模块文本
       'diag' : baseList.diagnosticList.diagnosticStr,
       'diag' : baseList.diagnosticList.diagnosticStr,
       'advice' : baseList.pushMessage.AdviceStr
       'advice' : baseList.pushMessage.AdviceStr
     }
     }
-    // console.log(JSON.stringify(chiefData),chiefData,'文本模式数据获取')
     return jsonDataString;
     return jsonDataString;
 }
 }
+
+ // 返回文本信息  _lcq
+const formatTextInfo = (baseList) =>{
+  return {
+       'chief': JSON.stringify(baseList.mainSuit.saveText),
+      'present': JSON.stringify(baseList.currentIll.saveText),
+       'pastHistory': JSON.stringify(baseList.pastHistory.saveText),
+       'personalHistory': JSON.stringify(baseList.personalHistory.saveText),
+       'familyHistory': JSON.stringify(baseList.familyHistory.saveText),
+       'marriageHistory': JSON.stringify(baseList.marriageHistory.saveText),
+       'menstruationHistory': JSON.stringify(baseList.menstruationHistory.saveText),
+       'vital': JSON.stringify(baseList.checkBody.saveText),
+//        'lis': baseList.inspect.inspectStrPlus,
+//        'pacs': baseList.assistCheck.dataString,
+//        'diag': baseList.diagnosticList.diagnosticStr,
+//        'advice': baseList.pushMessage.AdviceStr
+  }
+}
+
+
 /**
 /**
  * 
  * 
  * @param {回读数据} reData 
  * @param {回读数据} reData 
@@ -1803,5 +1832,6 @@ module.exports = {
     getValuedLabels,
     getValuedLabels,
     removeRepeat,
     removeRepeat,
     handleMouseUp,
     handleMouseUp,
-    checkDeptContent
+    checkDeptContent,
+    formatTextInfo
 };
 };