Просмотр исходного кода

Merge branch 'masterCdss' into referMasterCdss

luolei 4 лет назад
Родитель
Сommit
6305360659
39 измененных файлов с 463 добавлено и 112 удалено
  1. 1 0
      src/common/components/BlockInp/index.jsx
  2. BIN
      src/common/images/bannerDown.png
  3. BIN
      src/common/images/left3.png
  4. 5 2
      src/components/AddAssistCheck/index.jsx
  5. 9 7
      src/components/AddInspect/SlidePic/index.jsx
  6. 5 6
      src/components/AddNewInspect/SlidePic/index.jsx
  7. 4 1
      src/components/AddNewInspect/index.jsx
  8. 128 16
      src/components/Banner/index.jsx
  9. 73 3
      src/components/Banner/index.less
  10. 5 1
      src/components/DiagnosticList/index.jsx
  11. 1 1
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  12. 1 1
      src/components/InfoTitle/index.jsx
  13. 2 1
      src/components/NewAdvice/index.jsx
  14. 1 1
      src/components/NewAdvice/index.less
  15. 1 1
      src/components/Operation/index.jsx
  16. 18 14
      src/components/PatInfo/Select/index.jsx
  17. 8 7
      src/components/PreviewBody/Inspect/index.jsx
  18. 1 0
      src/components/PreviewBody/ItemPart/index.jsx
  19. 1 0
      src/components/PreviewBody/MedicalAdvice/index.jsx
  20. 3 0
      src/components/PreviewBody/index.less
  21. 1 1
      src/components/PushData/index.jsx
  22. 1 1
      src/containers/BlockInpContainer.js
  23. 6 0
      src/containers/DiagnosticList.js
  24. 2 1
      src/containers/NewAdvice.js
  25. 2 2
      src/containers/PushDataContainer.js
  26. 2 1
      src/modules/HomePage/index.jsx
  27. 13 0
      src/store/actions/homePage.js
  28. 4 2
      src/store/actions/patInfo.js
  29. 2 1
      src/store/async-actions/assistCheck.js
  30. 1 0
      src/store/async-actions/diagnosticSearch.js
  31. 15 5
      src/store/async-actions/historyTemplates.js
  32. 17 1
      src/store/async-actions/homePage.js
  33. 2 0
      src/store/async-actions/inspect.js
  34. 6 2
      src/store/async-actions/newAdvice.js
  35. 4 3
      src/store/async-actions/print.js
  36. 16 3
      src/store/reducers/homePage.js
  37. 2 0
      src/store/types/homePage.js
  38. 1 1
      src/utils/config.js
  39. 99 26
      src/utils/tools.js

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

@@ -52,6 +52,7 @@ class BlockInp extends PureComponent {
   handleInput(e){
     const {handleInput,handlePush,boxMark} = this.props;
     const text = e.target.innerText || e.target.innerHTML.replace(/&nbsp;+/g,' ').replace(/<br>$/,'');
+    // console.log(text,999999999999)
     const stimer = this.state.timer;//console.log(e.target,text)
     this.setState({
       inpText:text,

BIN
src/common/images/bannerDown.png


BIN
src/common/images/left3.png


+ 5 - 2
src/components/AddAssistCheck/index.jsx

@@ -259,7 +259,9 @@ class AddAssistCheck extends React.Component {
                 </ScrollArea>
               </div>
               <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
-                <p>报告日期:<span>
+                {/* <p>报告日期: */}
+                <p>
+                  <span>
                   <input type="text" 
                       class="canEdit"
                       // onDoubleClick={(e)=>this.setEdit(e)}
@@ -271,7 +273,8 @@ class AddAssistCheck extends React.Component {
                       onInput={(e)=>{this.handleInput(e,item,idx)}}
                       // onBlur={()=>{this.handleBlur()}}
                       />
-                </span></p>
+                </span>
+                </p>
                 <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
               </div>
               <DelToast show={idx==id&&item.name==activeName?visible:false}

+ 9 - 7
src/components/AddInspect/SlidePic/index.jsx

@@ -72,7 +72,7 @@ class SlideSelect extends Component {
     const {handleDelClick,item} = this.props;
     this.setState({
       activeInd:true,
-      activeName:item.uniqueName,
+      activeName:item.detailName,
     })
     handleDelClick&&handleDelClick(1,part,idx);
   }
@@ -161,15 +161,16 @@ class SlideSelect extends Component {
     const {item,idx,activeIdx,activeSign} = this.props;
     const {canEdit,activeInd,activeName,value,style} = this.state;
     return (
-      item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
+      item.flg == 1?<li key={item.detailName+idx} className={`${styles.slideLi} clearfix`}> 
           <table>
             <tr>
               <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item,idx)} alt=""/>
-              <span className={styles.bigname}>{item.uniqueName}</span>
+              <span className={styles.bigname}>{item.name}</span>
               <span className={styles.smallname}></span>
               <span className={styles.edit}></span>
               <span className={styles.maxmin}></span>
-              <span className={styles.pass}>检验时间:
+              {/* <span className={styles.pass}>检验时间: */}
+              <span className={styles.pass}>
                 <input type="text" 
                     class="canEdit" 
                     // onDoubleClick={(e)=>this.setEdit(e)}
@@ -191,10 +192,10 @@ class SlideSelect extends Component {
                     top={'30px'}
                     cancel={this.handleCancel}
                     confirm={()=>{this.delConfirm(item,idx)}}/>
-      </li>:<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
+      </li>:<li key={item.detailName+idx} className={`${styles.slideLi} clearfix`}> 
           <span style={{width:'22px'}}></span>
           <span className={styles.bigname}>{item.name}</span>
-          <span className={styles.smallname}>{item.uniqueName}</span>
+          <span className={styles.smallname}>{item.detailName}</span>
           <span className={styles.edit}>
             <input type="text" 
               class="canEdit"
@@ -209,7 +210,8 @@ class SlideSelect extends Component {
               /><img style={{display:style==1||style==2?'inline-block':'none'}} src={style==1?down:style==2?up:''} />{item.units}
           </span>
           <span className={styles.maxmin}>{normalVal(item.minValue,item.maxValue)}</span>
-          <span className={styles.pass}>检验时间:
+          <span className={styles.pass}>
+          {/* <span className={styles.pass}>检验时间: */}
             <input type="text" 
                 class="canEdit" 
                 // onDoubleClick={(e)=>this.setEdit(e)}

+ 5 - 6
src/components/AddNewInspect/SlidePic/index.jsx

@@ -47,7 +47,7 @@ class SlidePic extends Component {
     const {handleDelClick,item} = this.props;
     this.setState({
       activeInd:true,
-      activeName:item.uniqueName,
+      activeName:item.detailName,
     })
     handleDelClick&&handleDelClick(1,time);
   }
@@ -114,21 +114,20 @@ class SlidePic extends Component {
     handlePush&&handlePush({mode:8});
   }
   render() {
-    const {item,time,setTipValue,idx,handlePush,staticData,activeIdx} = this.props;
+    const {item,time,setTipValue,idx,handlePush,staticData,activeIdx,hosId} = this.props;
     const {selectShow,activeInd,activeName,value,style} = this.state;
-    // console.log(item)
     return (
       <li key={item.time} className={`${styles.slideLi} clearfix`}> 
           <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item,idx)} alt=""/>
-          <span className={styles.bigname} title={item.uniqueName}>{item.uniqueName}</span>
+          <span className={styles.bigname} title={item.detailName}>{item.detailName}</span>
           <span className={styles.smallname}>{item.flg == 5?'药品':item.flg == 6?'手术/操作':'输血'}</span>
           <span className={styles.medType}>
-            <a style={{display:item.flg == 5?'block':'none',color:item.form=='选择剂型'||!item.form?"#AAAAAA":"#333"}} id="selectJiTypeWrap" onClick={()=>this.handleSelectShow(idx)}>
+            <a style={{display:item.flg == 5&&hosId==-1?'block':'none',color:item.form=='选择剂型'||!item.form?"#AAAAAA":"#333"}} id="selectJiTypeWrap" onClick={()=>this.handleSelectShow(idx)}>
               {item.form||'选择剂型'}
               <img src={dowm} alt=""/>
             </a>
               {
-                item.flg == 5&&item.selectShow&&activeIdx==idx?<ul className={styles.selectLis} id="selectJiType">
+                hosId==-1&&item.flg == 5&&item.selectShow&&activeIdx==idx?<ul className={styles.selectLis} id="selectJiType">
                   {
                     staticData&&staticData.map((part)=>{
                       return <li onClick={()=>this.handleSelect(part,idx)}>{part.name||'选择剂型'}</li>

+ 4 - 1
src/components/AddNewInspect/index.jsx

@@ -122,7 +122,7 @@ class AddNewInspect extends React.Component {
       </ul>;
   }
   render() {
-    const {activeIdx,labelListBlood,handleSuiFang,handleSelectShow,selectJiType,setHighter,staticData,refreshScroller,checkOnOff, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
+    const {activeIdx,hosId,labelListBlood,handleSuiFang,handleSelectShow,selectJiType,setHighter,staticData,refreshScroller,checkOnOff, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
     const { tmpId, tmpIdx, time, pageTop, impId } = this.state;
     const contStyle={
       opacity:'0.4',
@@ -139,6 +139,7 @@ class AddNewInspect extends React.Component {
             {
               labelListBig && labelListBig.map((item, idx) => {
                 return <SlidePic
+                  hosId={hosId}
                   item={item}
                   handleSelectShow={handleSelectShow}
                   activeIdx={activeIdx}
@@ -158,6 +159,7 @@ class AddNewInspect extends React.Component {
             {
               labelListSmall && labelListSmall.map((item, idx) => {
                 return <SlidePic
+                  hosId={hosId}
                   item={item}
                   checkOnOff={checkOnOff}
                   time={time}
@@ -173,6 +175,7 @@ class AddNewInspect extends React.Component {
             {
               labelListBlood && labelListBlood.map((item, idx) => {
                 return <SlidePic
+                  hosId={hosId}
                   item={item}
                   checkOnOff={checkOnOff}
                   time={time}

+ 128 - 16
src/components/Banner/index.jsx

@@ -3,9 +3,10 @@ import { connect } from "react-redux";
 import style from "./index.less";
 import ReactDom from "react-dom";
 import logo from "../../common/images/logoa.png";
-import prec from "../../common/images/prec.png";
+import bannerDown from "../../common/images/bannerDown.png";
 import setup from "../../common/images/setup.png";
 import emergIcon from '../../common/images/emergency.png'
+import left3 from '../../common/images/left3.png'
 import {Notify} from '@commonComp';
 import Emergency from '@containers/Emergency';
 import PreInIcss from '@containers/PreInIcss';
@@ -14,10 +15,14 @@ import {timestampToTime,getCurrentDate} from '@utils/tools.js';
 import {dragBox} from '@utils/drag';
 import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
 import { GET_PREC_LIST,SET_PREC_SHOW } from "@store/types/preIcss";
+import { CHANGEHOSPITAL } from "@store/types/homePage";
 import {getPreMsg} from '@store/async-actions/preIcss';
 import ModeChange from './ModeChange'
+import {ConfirmModal} from '@commonComp';
 import { embedPush} from '../../store/async-actions/pushMessage'
+import { clearMessages } from "../../store/async-actions/print";
 import {debounce} from '../../utils/tools'
+import $ from 'jquery';
 import store from '@store';
 class Banner extends Component {
   constructor(props){
@@ -29,15 +34,38 @@ class Banner extends Component {
       config2:conf[2],      //其他史默认
       config3:conf[3],    //字体大小
       config4:conf[4],       //字体颜色
-      emergencyBox:false
+      emergencyBox:false,
+      showHos:false,
+      showM:false,
+      hosName:"杭州朗通信息技术有限公司",
+      hosId:"-1",
+      hosNameTmp:"",
+      hosIdTmp:"-1",
     };
     this.showConfigModal = this.showConfigModal.bind(this);
     this.changeType = this.changeType.bind(this);
     this.confirmType = this.confirmType.bind(this);
     this.showHisModal = this.showHisModal.bind(this);
     this.handleHisClose = this.handleHisClose.bind(this);
+    this.showHospitalLis = this.showHospitalLis.bind(this);
     this.setInitConfig = this.setInitConfig.bind(this);
     this.handleEmbedPush = this.handleEmbedPush.bind(this);
+    this.deleteItem = this.deleteItem.bind(this);
+    this.cancel = this.cancel.bind(this);
+    this.close = this.close.bind(this);
+    this.showCheckModal  = this.showCheckModal.bind(this);
+    this.showConnect  = this.showConnect.bind(this);
+  }
+
+  componentDidMount(){
+    $(document).click((e) => {
+      let showHospitalLis = document.getElementById("showHospitalLis");         // 公共填写单
+      if(!$.contains(showHospitalLis, e.target)){
+        this.setState({
+          showHos:false
+        })
+      }
+    })
   }
 
   showConfigModal(){
@@ -107,10 +135,8 @@ class Banner extends Component {
     this.setState({
       emergencyBox:false,
     });
-    dragBox('previewWrapper','previewStatic','del')    
+    dragBox('previewWrapper','previewStatic','del')
   }
-
-
   // 处理点击的默认推送
   handleEmbedPush(){
     store.dispatch(embedPush({
@@ -118,17 +144,66 @@ class Banner extends Component {
       mode: 1
     }))
   }
-
+  showHospitalLis(){
+    let tmpshow = this.state.showHos
+    this.setState({
+      showHos:!tmpshow
+    })
+  }
+  showCheckModal(id,name,connect){
+    this.setState({
+      hosIdTmp:id,
+      hosNameTmp:name,
+      connectTmp:connect,
+      showM:true,
+    })
+  }
+  deleteItem() {
+      const {changeHospital,clearAll} = this.props
+      this.setState({
+          showM: false,
+          hosName:this.state.hosNameTmp,
+          hosId:this.state.hosIdTmp,
+          connect:this.state.connect
+      })
+      changeHospital({
+        hosName:this.state.hosNameTmp,
+        hosId:this.state.hosIdTmp,
+        connect:this.state.connectTmp
+      })
+      clearAll()
+      store.dispatch(embedPush({
+        action: "patientia",
+        mode: 1
+      }))
+      Notify.success('切换成功')
+  }
+  cancel() {
+      this.setState({
+        showM: false
+      })
+  }
+  close() {
+      this.setState({
+        showM: false
+      })
+  }
+  showConnect(e){
+    this.setState({
+      showHos: false
+    })
+    e.stopPropagation()
+  }
   render() {
-    const {visible,pre,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
-    const {emergencyBox} = this.state;
-    const {showConfigModal, changeType, confirmType} = this;
+    const {visible,pre,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show,hospitalMsg,curHos} = this.props;
+    const {emergencyBox,showHos,showM,hosName,hosNameTmp} = this.state;
+    const {showConfigModal, changeType, showHospitalLis,showCheckModal,showConnect} = this;
     const domNode = document.getElementById('root');
     const disabled = !(hasMain||hasCurrent||hasOther);
     return (
-      <div className={style["logo"]} onClick={this.handleEmbedPush}>
-        <img src={logo} />
-        <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
+      <div className={style["logo"]}>
+        <img src={logo} onClick={this.handleEmbedPush}/>
+        <span className={style["logo-name"]} onClick={this.handleEmbedPush}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]}>
           {ifShow==1&&deptName=='急诊科'?<div className={`${style["buon1"]} ${style["buon2"]}`} onClick={this.showHisModal}>
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
@@ -138,10 +213,24 @@ class Banner extends Component {
             <img className={style["st"]} src={prec} alt="预问诊"/>
             <i> 预问诊信息</i>
           </div>:null} */}
-          {/*<div className={style["buon1"]} onClick={showConfigModal}>
+          <div className={style["showHospitalLis"]} onClick={showHospitalLis} id="showHospitalLis">
+            <p className={`${style["selectedHos"]}`}>
+              <span className={style["ellipsis"]} title={curHos.hosName}>{curHos.hosName}</span>
+              <i style={{color:curHos.connect==1?'#3B9ED0':'#FF545B'}} onClick={(e)=>{showConnect(e)}}><img src={left3}/>{curHos.connect==1?'术语已关联':'术语未关联'}</i>
+              <img className={style['bannerDown']} src={bannerDown} />
+            </p>
+            <ul className={`${style["hospitalLis"]}`} style={{"display":showHos?"block":"none"}}>
+              {
+                hospitalMsg&&hospitalMsg.map((item)=>{
+                  return <li className={style['ellipsis']} key={item.id} title={item.name} onClick={()=>showCheckModal(item.id,item.name,item.connect)}>{item.name}</li>
+                })
+              }
+            </ul>
+          </div>
+          {/* <div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
             <i> 设置</i>
-          </div>*/}
+          </div> */}
         </div>
         {/*{visible&& <ModeChange
           {...this.state}
@@ -159,19 +248,33 @@ class Banner extends Component {
           </React.Fragment>
           , domNode):''}
         {show?<PreInIcss></PreInIcss>:null}
+        <ConfirmModal visible={showM} 
+            okText='确定' 
+            cancelText='取消' 
+            confirm={this.deleteItem}  
+            cancel={this.cancel}
+            close={this.close}
+            okBorderColor={'#3B9ED0'}
+            okColor={'#fff'}
+            oKBg={'#3B9ED0'}
+            >
+            <div className={style['changeHos']}>确定要切换至{hosNameTmp}吗?医院切换后将清空当前页面。</div> 
+        </ConfirmModal>
       </div>
     );
   }
 }
 
 const mapStateToProps = function(state){
-  const {sysConfig} = state.homePage;
+  const {sysConfig,hospitalMsg,curHos} = state.homePage;
   const {message} = state.patInfo;
   return {
     ifShow:sysConfig.general_show,
     deptName:message.selfDeptName,
     show:state.preIcss.preShow,
-    pre:sysConfig.connect_prec
+    pre:sysConfig.connect_prec,
+    curHos:curHos,
+    hospitalMsg:hospitalMsg,
   }
 }
 
@@ -187,6 +290,15 @@ const mapDispatchToProps = function(dispatch){
     },
     preShow(show){
       show?dispatch({type:SET_PREC_SHOW}):getPreMsg()
+    },
+    clearAll(){
+      clearMessages()
+    },
+    changeHospital(obj){
+      dispatch({
+        type: CHANGEHOSPITAL,
+        data:obj
+      })
     }
   }
 }

+ 73 - 3
src/components/Banner/index.less

@@ -5,17 +5,14 @@
     background: linear-gradient(-90deg, #93CEE3 7%,#3B9ED0 98%);
     background-image: url("../../common/images/bar.png");
     height: 50px;
-
     border-bottom: 10px solid #e4e6e7;
     position: fixed;          //页面布局调整
     width: 1200px;
     top: 0;
-    // z-index: 202;
     img{
       vertical-align: middle;
       margin: 0 10px 2px 18px;
     }
-    // span{
     .logo-name{
         display: inline-block;
         line-height: 40px;
@@ -57,6 +54,69 @@
       width: 20px;
       height: 20px;
     }
+    .showHospitalLis {
+      float: right;
+      margin-right: 114px;
+      height: 22px;
+      line-height: 22px;
+      width: 120px;
+      margin-top: 6px;
+      cursor: pointer;
+      .selectedHos {
+        box-shadow: 0px 1px 3px 3px #45A3D2 inset;
+        background-color: #65B5D9;
+        padding-left: 10px;
+        i {
+          position: absolute;
+          right: 20px;
+          top: 7px;
+          height: 26px;
+          line-height: 26px;
+          font-weight: normal;
+          background-color: #EDF8FF;
+          border-radius: 3px;
+          padding: 0 10px;
+          cursor: default;
+          img {
+            position: absolute;
+            left: -27px;
+            top: 5px;
+          }
+        }
+        span {
+          width: 90px;
+          top: 3px;
+          position: relative;
+          box-sizing: border-box;
+          display: inline-block;
+          font-size: 12px;
+        }
+        img.bannerDown {
+          position: absolute;
+          right: 124px;
+          top: 11px;
+        }
+      }
+      .hospitalLis {
+        background-color: #fff;
+        color: #1E1E1E;
+        border-radius: 5px;
+        box-shadow: 0px 6px 16px 0px #ccc;
+        max-height: 150px;
+        overflow: auto;
+        li {
+          cursor: pointer;
+          height: 30px;
+          line-height: 30px;
+          padding: 0 10px;
+          font-size: 12px;
+          &:hover {
+            background-color: #8DCBE2;
+            color: #fff;
+          }
+        }
+      }
+    }
 }
 .title{
   font-size: 16px;
@@ -66,6 +126,11 @@
     color: red;
   }
 }
+.ellipsis{
+  white-space: nowrap;/*强制在一行显示*/
+  text-overflow:ellipsis;/*设置超出内容显示...*/
+  overflow: hidden;/*一定不能少 超出的内容进行隐藏*/
+}
 .shade {
   .maskZIndex;
   position: fixed;
@@ -77,4 +142,9 @@
   opacity: 0.6;
   filter:alpha(opacity=60);
   -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+}
+.changeHos {
+  height: 84px;
+  line-height: 20px;
+  padding: 10px 18px;
 }

+ 5 - 1
src/components/DiagnosticList/index.jsx

@@ -289,6 +289,10 @@ class DiagnosticList extends Component {
         hasEnterImg: false
       })
     }
+    handleFocus(){
+      const {getBilling} = this.props;
+      getBilling&&getBilling({mode:10});
+    }
     handleInput(e,index){
       const {editDiagName,getBilling} = this.props;
       let name = (e.target.value).trim()
@@ -327,7 +331,7 @@ class DiagnosticList extends Component {
                                        onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                                     >
                                       <span title={item.name} className={style['diag-name-box']} style={{'max-width': '300px'}}>
-                                        <input type="text" value={item.name} onBlur={(e)=>{this.handleBlur(e,item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
+                                        <input type="text" value={item.name} onFocus={(e)=>{this.handleFocus()}} onBlur={(e)=>{this.handleBlur(e,item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
                                       </span>
                                       {/* <img className={`${style['info-img']}`}
                                           title='点击i图标可查看详细说明'

+ 1 - 1
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -458,7 +458,7 @@ class HistoryCaseContainer extends React.Component {
                 >                  
                     <div className={styles.outBox}>
                       <span>病历名称:</span>
-                      <input type="text" className={styles.innerInput} placeholder="请输入病历名称" value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>
+                <input type="text" className={styles.innerInput} placeholder="请输入病历名称" maxlength={30} value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>
                     </div>
                 </ConfirmModal>
             </div>

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

@@ -24,7 +24,6 @@ class InfoTitle extends Component {
         const {showLoading,hideLoading}=this.props;
         showLoading();
         // 底部页面禁止滚动
-        document.body.style.overflow = 'hidden';
 
         // store.dispatch(initItemList());
         // store.dispatch(showHistory(true))
@@ -45,6 +44,7 @@ class InfoTitle extends Component {
                 hideLoading();
                 store.dispatch(setInitHistory(result.data));
                 store.dispatch(showHistory(true));
+                document.body.style.overflow = 'hidden';
             }else{
                 hideLoading();
                 Notify.info("暂无历史病历");

+ 2 - 1
src/components/NewAdvice/index.jsx

@@ -52,7 +52,7 @@ class NewAdvice extends React.Component {
 
   }
   render() {
-    const {handleSuiFang,hideAllDrop,staticData,activeIdx,selectJiType,handleSelectShow,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm,checkOnOff ,labelListBlood} = this.props;
+    const {handleSuiFang,hosId,hideAllDrop,staticData,activeIdx,selectJiType,handleSelectShow,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm,checkOnOff ,labelListBlood} = this.props;
 
     return (
       <div className={styles.wrapper}>
@@ -71,6 +71,7 @@ class NewAdvice extends React.Component {
           <div style={{ padding: '0px 10px 10px 10px', boxSizing: 'border-box',color:'#000' }} >
             <AddNewInspect
               activeIdx={activeIdx}
+              hosId={hosId}
               handleSuiFang={handleSuiFang}
               handleSelectShow={handleSelectShow}
               selectJiType={selectJiType}

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

@@ -5,7 +5,7 @@
 }
 .top {
     position: relative;
-    margin: 20px 20px -21px 20px;
+    margin: 5px 20px -21px 20px;
     span {
         margin-left: 60px;
         border: 1px dashed @part-border-color;

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

@@ -590,7 +590,7 @@ class Operation extends Component {
         <div className={style.outBox}>
           <div className={style.innerInp}>
             <span>病历名称:</span>
-            <input type="text" className={style.innerInput} placeholder="请输入病历名称" value={this.state.medicalName} onChange={this.handleMedicalChange} autocomplete="off" /> 
+            <input type="text" className={style.innerInput} placeholder="请输入病历名称" value={this.state.medicalName} maxlength={30} onChange={this.handleMedicalChange} autocomplete="off" /> 
           </div>
           {this.state.showValit ? (<div className={style.valit}>请输入病历名称</div>) : null}
         </div>

+ 18 - 14
src/components/PatInfo/Select/index.jsx

@@ -8,8 +8,8 @@ import { embedPush } from '../../../store/async-actions/pushMessage'
 export default class Select extends Component {
   constructor(props) {
     super(props);
-    this.state = { 
-      isOpen: false, 
+    this.state = {
+      isOpen: false,
       value: "",
       options: [
         {
@@ -47,7 +47,8 @@ export default class Select extends Component {
     window.removeEventListener("click", this.onClickOutsideHandler);
   }
 
-  componentWillReceiveProps(nextProps){
+  componentWillReceiveProps(nextProps) {
+    // console.log(nextProps, '================nextProps');
     if (nextProps.default.value !== this.state.value.value) {
       this.setState({
         value: nextProps.default
@@ -70,7 +71,7 @@ export default class Select extends Component {
     }
   };
 
-  onChange(e,val) {
+  onChange(e, val) {
     const state = store.getState();
     e.stopPropagation()
     this.setState({
@@ -87,21 +88,22 @@ export default class Select extends Component {
       mode: 1
     }))
   };
-  handleMouseEnter(){
+  handleMouseEnter() {
     // console.log('鼠标进入');
     this.setState({
       isEnter: true
     })
   }
-  handleMouseLeave(){
+  handleMouseLeave() {
     // console.log('鼠标进入');
     this.setState({
       isEnter: false
     })
   }
   render() {
-    const { isOpen, value, options} = this.state;
-    const { label,  placeholder } = this.props;
+    const { isOpen, value, options } = this.state;
+    const { label, placeholder } = this.props;
+    // console.log(options, '===============options');
     return (
       <div className={style.selectBox}>
         {label && <label className={style.label}>{label}:</label>}
@@ -110,15 +112,15 @@ export default class Select extends Component {
           <input
             className={[style.selfInput, isOpen ? style.selfInput : ''].join('')}
             readonly=""
-            value={value.value=== 2? '女' : '男'}
+            value={value.value == 2 ? '女' : '男'}
             onClick={this.onClickHandler}
             placeholder={placeholder}
           />
           <div className={this.state.isEnter ? style.downActive : style.down} onClick={this.onClickHandler} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>
-            <img src={selectSex} alt=""/>
+            <img src={selectSex} alt="" />
           </div>
-          <div  className={[isOpen ? '' : style.optionsHidden, isOpen ? style.options :''].join('')}>
-            {options &&
+          <div className={[isOpen ? '' : style.optionsHidden, isOpen ? style.options : ''].join('')}>
+            {/* {options &&
               options.map((item) => {
                 return (
                   <div
@@ -126,10 +128,12 @@ export default class Select extends Component {
                     className={style.item}
                     onClick={(e)=>this.onChange( e, item)}
                   >
-                    {item.value === 2 ? '女' : '男'}
+                    {+item.value == 2 ? '女' : '男'}
                   </div>
                 );
-              })}
+              })} */}
+            <div className={style.item} onClick={(e) => this.onChange(e, options[0])}>男</div>
+            <div className={style.item} onClick={(e) => this.onChange(e, options[1])}>女</div>
           </div>
         </div>
       </div>

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

@@ -3,7 +3,7 @@ import { normalVal,getStatusImg } from '@utils/tools';
 
 const PreviewInspect = (props) => {
   const { dataJson, toTime ,dateTime,showDetails  } = props;
-  // console.log(dataJson.labelListSmall,'dataJson.labelListSmall');
+  // console.log(dateTime,'dateTime');
     return <tr className={style['patInfoFst']}>
       <td className={style['patInfoSec']}>检验:</td>
       <td className={style['patInfoSec']}>
@@ -16,7 +16,7 @@ const PreviewInspect = (props) => {
             // console.log(item, item,'=====');
               return (               
                   <tr className={style.assistTableTrSec}>
-                    <td className={style.assistTableTdFst}>{item.uniqueName}</td>
+                    <td className={style.assistTableTdFst}>{item.detailName}</td>
                     <td className={style.assistTableTdSec}>
                       {/* {getStatusImg(value.type, value.value, 1)}
                       {value.unit} */}
@@ -31,8 +31,8 @@ const PreviewInspect = (props) => {
                       {/* {normalVal(3.9, 6.1)} */}
                     </td>
                     {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
-                  <td className={style.assistTableTdFor}>{item.time == '' ?  + dateTime  :  item.time
-                    }</td>
+                  {/* <td className={style.assistTableTdFor}>{item.time == '' ?   dateTime  :  item.time}</td> */}
+                  <td className={style.assistTableTdFor}>{item.time }</td>
                   </tr>
                 // </table>
               )
@@ -44,11 +44,12 @@ const PreviewInspect = (props) => {
             return (
               // <table style={style.assistTable}>
                 <tr className={style.assistTableTrSec}>
-                  <td className={style.assistTableTdFst}>{item.uniqueName}</td>  
+                  <td className={style.assistTableTdFst}>{item.name}</td>  
                   <td className={style.assistTableTdSec}></td>
                   <td className={style.assistTableTdTrd}></td>                                             
-                  <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time)
-                  }</td>
+                  {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
+                  {/* <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : toTime(item.time) */}
+                  <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : toTime(item.time)}</td>
                 </tr>
               // </table>
             )

+ 1 - 0
src/components/PreviewBody/ItemPart/index.jsx

@@ -3,6 +3,7 @@ import { filterDataArr } from '@utils/tools';
 
 const ItemPart = (props) => {
   let {dataStr,title,type,dataJson,other_yjs,lastDot} = props;
+  // console.log(dataStr,'dataStr===============');
   if(lastDot){
     dataStr=dataStr.trim().replace(/;$/g,'');
   }

+ 1 - 0
src/components/PreviewBody/MedicalAdvice/index.jsx

@@ -36,6 +36,7 @@ class MedicalAdvice extends Component {
                       <td className={style.adviceTableTdFst}>{item.name}</td>
                       {/* <td className={style.assistTableTdSec}></td> */}
                       <td className={style.assistTableTdTrd}>手术/操作</td>
+                      <td className={style.assistTableTdSec}></td>
                       <td className={style.assistTableTdSec}>{item.value}</td>
                       <td className={style.assistTableTdFor}>{item.time}</td>
                     </tr>

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

@@ -115,6 +115,9 @@ table{
     top: 6px !important;
   }
 }
+// .assistTableTdSix {
+//   width:3%;
+// }
 .assistTableTdTrd {
   width:18%;
 }

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

@@ -44,7 +44,7 @@ class PushData extends Component{
                 朗通智能提醒 
                 <img class={style['arrowIcon']} src={arrowIcon} alt=""/>
             </div>}
-            {showPushData&&<div id="dragModalWrap" className={style['pushWrapper']} style={{right:(windowWidth-1200)/2+20+'px'}} onWheel={this.handleScroll.bind(this)}>
+            {showPushData&&<div id="dragModalWrap" className={style['pushWrapper']} style={{right:(windowWidth-1200)/2+'px'}} onWheel={this.handleScroll.bind(this)}>
                 {/* <div id="dragModalTitle"  className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>收起</span></div> */}
                 <div className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>    <img class={style['hideConfirm']} src={hideConfirm} alt=""/></span></div>
                 {hospitalId&&<iframe id='embedPage'  src={url} frameborder="0" width="348" height="507" onWheel={this.handleScroll.bind(this)}></iframe>}

+ 1 - 1
src/containers/BlockInpContainer.js

@@ -14,7 +14,7 @@ import BlockInp from '@common/components/BlockInp';
 import {didPushParamChange,isAllPartClear,getAllDataList,getAllDataStringList,isAllClear} from '@utils/tools';
 import {embedPush} from '@store/async-actions/pushMessage';
 
-function mapStateToProps(state){
+function mapStateToProps(state){//console.log(state,999999999)
   const {homePage} = state;
   return {
     isRead:homePage.isRead,

+ 6 - 0
src/containers/DiagnosticList.js

@@ -42,6 +42,9 @@ function mapDispatchToProps(dispatch) {
           idx:idx,
           name:name
         });
+        dispatch({
+            type: GET_DIAGNOSTIC_STR
+        });
       },
       setAssess(data,disName){        //获取评估内容数据
         dispatch({
@@ -49,6 +52,9 @@ function mapDispatchToProps(dispatch) {
           data:data,
           name:disName
         });
+        dispatch({
+            type: GET_DIAGNOSTIC_STR
+        });
       },
         delDiagnostic: (item,idx) => {
             dispatch({

+ 2 - 1
src/containers/NewAdvice.js

@@ -52,7 +52,8 @@ function mapStateToProps(state) {//console.log(state)
     labelListBlood: state.newAdvice.labelListBlood,
     hospitalMsg: state.homePage.sysConfig || {},
     typeConfig: state.typeConfig,
-    staticData:state.homePage.staticData['9']
+    staticData:state.homePage.staticData['9'],
+    hosId:state.homePage.curHos.hosId
   }
 }
 

+ 2 - 2
src/containers/PushDataContainer.js

@@ -4,7 +4,7 @@ import PushData from '@components/PushData';
 import { TOGGLE_PUSH_DATA } from '@store/types/homePage.js';
 function mapStateToProps(state){
     // console.log('state',state.print.mrInfo)
-    const {showPushData } = state.homePage;
+    const {showPushData,curHos } = state.homePage;
     const {mrInfo } = state.print;
 
     return {
@@ -13,7 +13,7 @@ function mapStateToProps(state){
         planCode:mrInfo.mode,
         windowHeight:state.homePage.windowHeight,
         windowWidth:state.homePage.windowWidth,
-        hospitalId:state.historyTemplates.HospitalInfo.id
+        hospitalId:curHos.hosId
     }
 }
 

+ 2 - 1
src/modules/HomePage/index.jsx

@@ -13,7 +13,7 @@ import {CURRENT_CLEAR,DELETE_CURRENT_SELECTED_TAGS} from '@types/currentIll';
 import {OTHERHIS_CLEAR,DELETE_OTHER_SELECTED_TAGS} from '@types/otherHistory';
 import {CHECKBODY_CLEAR,DELETE_CHECK_SELECTED_TAGS} from '@types/checkBody';
 import style from './index.less';
-import {getInitModules,getChronic,getSystemConfig,getCommonData} from '@store/async-actions/homePage.js';
+import {getInitModules,getChronic,getSystemConfig,getCommonData,getHosData} from '@store/async-actions/homePage.js';
 import {getPreMsg} from '@store/async-actions/patInfo.js';
 import { getUrlArgObject,parseNameVal,pushAllDataList } from "@utils/tools";
 import $ from 'jquery';
@@ -167,6 +167,7 @@ const mapDispatchToProps = function (dispatch) {
         },
         getCommon(){
           dispatch(getCommonData())
+          dispatch(getHosData())
         },
       deleteLabels(){   //选中删除标签
         const state = store.getState();

+ 13 - 0
src/store/actions/homePage.js

@@ -146,3 +146,16 @@ export const getStaticData = (state,action)=>{
   return res;
 }
 
+export const setHospitalMsg = (state,action)=>{
+  let res = Object.assign({},state);
+  res.hospitalMsg = action.data;
+  return res;
+}
+
+
+export const changeHospital = (state,action)=>{
+  let res = Object.assign({},state);
+  res.curHos = action.data;
+  return res;
+}
+

+ 4 - 2
src/store/actions/patInfo.js

@@ -1,3 +1,4 @@
+import { timesYMDTime } from '@utils/tools';
 export const updatePatientMessage=(state,action)=>{
     const res=Object.assign({},state);
     // const mock = {
@@ -75,12 +76,13 @@ export const clearMedicalName = (state, action) => {
 // reInitPatInfo
 export const reInitPatInfo = (state, action) => {
   const res = Object.assign({}, state);
-  // console.log(action.params, 'action.params');
+  console.log(action.params, 'action.params');
   res.patInfoData[0].value = action.params && action.params.cardNo;
   res.patInfoData[1].value = action.params && action.params.patName;
   res.patInfoData[2].value = action.params && action.params.age;
   res.patInfoData[3].value = action.params && action.params.sex;
-  res.patInfoData[4].value = action.params && action.params.inquiryDate;   //2020/9/14
+  // res.patInfoData[4].value = action.params && action.params.inquiryDate;   //2020/9/14
+  res.patInfoData[4].value = timesYMDTime(new Date().getTime());  
   res.patInfoData[5].value = action.params && action.params.deptName;
   res.patInfoData[6].value = action.params && action.params.doctorName;
   res.patInfoData[7].value = action.params && action.params.inquiryCode;

+ 2 - 1
src/store/async-actions/assistCheck.js

@@ -16,7 +16,8 @@ export const getSearchList = (val) => {
             "age": formatFormParmas('patientAge',baseList.patInfo.patInfoData),
             "inputStr": val,
             "sex": formatFormParmas('patientSex',baseList.patInfo.patInfoData),
-            "type": '3'
+            "type": '3',
+            "hospitalId":baseList.homePage.curHos.hosId
         })
         .then((res)=>{
             if(res.data.code==0){

+ 1 - 0
src/store/async-actions/diagnosticSearch.js

@@ -35,6 +35,7 @@ export const getSearchList = (val,flag) => {
             "age": formatFormParmas('patientAge',state.patInfo.patInfoData),
             "inputStr": val,
             "sex": formatFormParmas('patientSex',state.patInfo.patInfoData),
+            "hospitalId":baseList.homePage.curHos.hosId
         })
         .then((res)=>{
             if(res.data.code==0){

+ 15 - 5
src/store/async-actions/historyTemplates.js

@@ -12,12 +12,15 @@ import Notify from '@commonComp/Notify';
 import store from '@store';
 
 export const initItemList = (item) => {
+    let baseList = store.getState();
+    const { homePage:{curHos}} = baseList
     let params = {
       sex: '',
       name: '',
       current: 1,
       size: 9999,
-      desc : ['gmt_create']
+      desc : ['gmt_create'],
+      hospitalId:curHos.hosId
     }; 
     if (item === 'up') {
       params.desc = ['gmt_create'];
@@ -60,12 +63,15 @@ export function setInitHistory(data){
 
 
 export const asyncUpdateByIdUsNames = (editId, templateName) => {
+  let baseList = store.getState();
+  const { homePage:{curHos}} = baseList
   return (dispatch) => {
     return new Promise((resolve, reject)=>{
       let param = {
         id: editId,
         modeName: templateName,
-        doctorId: ''
+        doctorId: '',
+        hospitalId:curHos.hosId
       }
       axios.json('/demo/templateInfo/updateByIdUsNames', param).then(res=>{
         if (res.data.code === '0'){
@@ -79,10 +85,13 @@ export const asyncUpdateByIdUsNames = (editId, templateName) => {
 }
 
 export const asyncCancelTemplateInfos = (delId) => {
+  let baseList = store.getState();
+  const { homePage:{curHos}} = baseList
   return (dispatch) => {
     return new Promise((resolve, reject) => {
       let param = {
-        ids: delId
+        ids: delId,
+        hospitalId:curHos.hosId
       }
       axios.json('/demo/templateInfo/cancelTemplateInfos', param).then(res => {
         if (res.data.code === '0') {
@@ -99,8 +108,9 @@ export const asyncCancelTemplateInfos = (delId) => {
 // 获取医院信息
 export const getHospitalInfo = () =>{
   return (dispatch) =>{
-    let hospitalId = getUrlArgObject('hospitalId');
-    axios.json('/tran/hospitalInfo/getHospitalInfoById', { id: hospitalId }).then(res => {
+    let baseList = store.getState();
+    const { homePage:{curHos}} = baseList
+    axios.json('/tran/hospitalInfo/getHospitalInfoById', { id: curHos.hosId }).then(res => {
       if (res.data.code === '0') {
         dispatch({
           type: HISTORY_GETHOSPITALINFO,

+ 17 - 1
src/store/async-actions/homePage.js

@@ -1,5 +1,5 @@
 import {post,json} from '@utils/ajax.js';
-import {SETINITDATA,MODI_LOADING,GET_ASSIST_LIST,GET_INSPECT_LIST,SETALLMODULES,GETSTATICDATA} from '@store/types/homePage.js';
+import {SETINITDATA,MODI_LOADING,GET_ASSIST_LIST,GET_INSPECT_LIST,SETALLMODULES,GETSTATICDATA,HOSPITALMSG} from '@store/types/homePage.js';
 import {SET_CURRENT} from '@store/types/currentIll';
 import {SET_MAINSUIT} from '@store/types/mainSuit';
 import config from '@config/index.js';
@@ -14,6 +14,7 @@ const api = {
   getQuestionUsual:'/questionUsual/getQuestionUsual', //检验常用标签
   getSystemConfig:'/sysSet/getSysSetInfoDatas',     //获取系统配置
   getStaticData:'/sys/dictionaryInfo/getList',     //获取字典信息
+  getAllEnableHospitalInfo:'/tran/hospitalInfo/getAllEnableHospitalInfo',     //获取医院列表
 };
 
 //获取系统配置
@@ -176,3 +177,18 @@ export const getCommonData = (dispatch) => {
       })
   }
 };
+
+// 医院列表
+export const getHosData = (dispatch) => {
+  return (dispatch) => {
+      json(api.getAllEnableHospitalInfo,{}).then((res)=>{
+          const data = res.data;
+          if(data.code == '0'){
+            dispatch({
+              type:HOSPITALMSG,
+              data:data.data
+            })
+          }
+      })
+  }
+};

+ 2 - 0
src/store/async-actions/inspect.js

@@ -17,6 +17,7 @@ export const getSearchList = (val) => {
             "age": formatFormParmas('patientAge',baseList.patInfo.patInfoData),
             "inputStr": val,
             "sex": formatFormParmas('patientSex',baseList.patInfo.patInfoData),
+            "hospitalId":baseList.homePage.curHos.hosId,
             "type": type
         })
         .then((res)=>{
@@ -33,6 +34,7 @@ export const getSearchList = (val) => {
                     for (var key in arr) {
                         let obj = {}
                         obj['uniqueName'] = arr[key];
+                        obj['detailName'] = arr[key];
                         obj['value'] = '';
                         obj['otherValue']='';
                         obj['name'] = arr[key];

+ 6 - 2
src/store/async-actions/newAdvice.js

@@ -13,10 +13,12 @@ export const getSearchList = (val) => {
     let type = baseList.newAdvice.shType;
     return (dispatch) => {
         axios.json('/demo/retrieval/index',{
-            "age": formatFormParmas('patientAge',baseList.patInfo.patInfoData),
             "inputStr": val,
+            "hospitalId": 2,
+            "age": formatFormParmas('patientAge',baseList.patInfo.patInfoData),
             "sex": formatFormParmas('patientSex',baseList.patInfo.patInfoData),
-            "type": type
+            "type": type,
+            "hospitalId":baseList.homePage.curHos.hosId
         })
         .then((res)=>{
             if(res.data.code==0){
@@ -28,9 +30,11 @@ export const getSearchList = (val) => {
                     if(type==8){
                         obj['uniqueName'] = arr[i];
                         obj['name'] = arr[i];
+                        obj['detailName'] = arr[i];
                         obj['flg'] = type;
                     }else{
                         obj['uniqueName'] = arr[i].name;
+                        obj['detailName'] = arr[i].name;
                         obj['name'] = arr[i].name;
                         obj['flg'] = type;
                     }

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

@@ -71,7 +71,7 @@ function formatFormParmas(val,arr){
 // 保存病历_lcq_new_重写
 export const saveMedicalData = () =>{
     let baseList = store.getState();
-    const { patInfo: { patInfoData } } = baseList
+    const { patInfo: { patInfoData },homePage:{curHos}} = baseList
     let inquiryDate = timestampToTime(new Date().getTime())  // 获取当前时间  
     let modeName = baseList.patInfo.medicalName   //病历名称
     let jsonData = getAllDataList(baseList);
@@ -162,12 +162,13 @@ export const saveMedicalData = () =>{
         "deptName": formatFormParmas('hospitalDeptName', patInfoData),
         "doctorName": formatFormParmas('doctorName', patInfoData),
         "inquiryCode": formatFormParmas('recordId', patInfoData), 
-        "inquiryDate": formatFormParmas('systemTime', patInfoData),   // 2020/9/14 编辑状态保存原有时间 _lcq
-        // "inquiryDate": inquiryDate,
+        // "inquiryDate": formatFormParmas('systemTime', patInfoData),   // 2020/9/14 编辑状态保存原有时间 _lcq
+        "inquiryDate": inquiryDate,
         "modeName": modeName,
         "patName": formatFormParmas('patientName', patInfoData),
         "preview": JSON.stringify(preview),  // 左侧病历预览信息
         "sex": formatFormParmas('patientSex', patInfoData),
+        "hospitalId":curHos.hosId
     }
     return new Promise((resolve,reject) =>{
       json('/demo/templateInfo/saveTemplateInfo', params).then(res => {

+ 16 - 3
src/store/reducers/homePage.js

@@ -1,7 +1,7 @@
 import {HIDE,RESET,SETINITDATA,SETDROPSHOW,SETADDITEMINIT,SETT0EDIT,SETREADDITEMS,SETPREDATA,
   HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,
-  SETALLMODULES,SETSYSTEMCONFIG,SETPRE,RESET_SELECT_TAG,SET_SELECTED_AREA,SETADMIN,SET_CURRENT_MODULE,TOGGLE_PUSH_DATA,GETSTATICDATA} from '../types/homePage.js';
-import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList,setSelectArea,resetSelectArea, setCurrentModule,getStaticData} from '../actions/homePage.js';
+  SETALLMODULES,SETSYSTEMCONFIG,SETPRE,RESET_SELECT_TAG,SET_SELECTED_AREA,SETADMIN,SET_CURRENT_MODULE,TOGGLE_PUSH_DATA,GETSTATICDATA,CHANGEHOSPITAL,HOSPITALMSG} from '../types/homePage.js';
+import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList,setSelectArea,resetSelectArea, changeHospital,getStaticData,setHospitalMsg} from '../actions/homePage.js';
 import {getMRAnalyse} from '@store/async-actions/pushMessage';
 
 const initState = {
@@ -33,7 +33,16 @@ const initState = {
     "3": "其他史",
     "4": "查体"
   },
-  staticData:{}
+  staticData:{},
+  hospitalMsg:[{
+    hospitalId:-1
+  }],
+  curHos:{
+    hosId:-1,
+    hosName:'杭州朗通信息技术有限公司',
+    connect:1
+  }
+
 };
 
 export default function (state=initState,action) {
@@ -46,6 +55,10 @@ export default function (state=initState,action) {
       res.totalHide = false;
       res.commSymHide = false;
       return res;
+    case HOSPITALMSG:
+      return setHospitalMsg(state,action);
+    case CHANGEHOSPITAL:
+      return changeHospital(state,action);
     case SETDROPSHOW:
       return showDrop(state,action);
     case HIDEDROP:

+ 2 - 0
src/store/types/homePage.js

@@ -24,3 +24,5 @@ export const SET_SELECTED_AREA='SET_SELECTED_AREA';
 export const SET_CURRENT_MODULE = 'SET_CURRENT_MODULE'
 export const TOGGLE_PUSH_DATA = 'TOGGLE_PUSH_DATA' //切换推送框
 export const GETSTATICDATA = 'GETSTATICDATA' //字典信息
+export const HOSPITALMSG = 'HOSPITALMSG' //医院列表
+export const CHANGEHOSPITAL = 'CHANGEHOSPITAL' //更改医院

+ 1 - 1
src/utils/config.js

@@ -17,7 +17,7 @@ const imageUrlPrefix = 'http://192.168.2.241:82';
 function geturl(){
     if(window.location.href.indexOf('localhost')>-1){
         return {
-            gourl:'http://localhost:8080/cdss.html',
+            gourl:'http://localhost:8083/cdss.html',
             imgurl:host.replace('6060','22')
         }
     }else if(window.location.href.indexOf('192.168.2.236')>-1){

+ 99 - 26
src/utils/tools.js

@@ -801,6 +801,7 @@ function filterDataArr(arrTmp){   //数据处理
           return '';
       }
       return it.replace(config.punReg,function(word){
+        console.log(9898)
         return word.substr(0,1);
       });
     });
@@ -904,9 +905,8 @@ function formatFormParmas(val,arr){
 //获取病例输入的内容
 function getEMRParams(){
   const state = store.getState();
-  const {id} =  state.historyTemplates && state.historyTemplates.HospitalInfo 
-  const {message} = state.patInfo;
-  const { patInfoData } = state.patInfo;
+  const { curHos } = state.homePage;
+  const {message,patInfoData} = state.patInfo;
   const {
     mainSuit,
     currentIll,
@@ -926,44 +926,117 @@ function getEMRParams(){
   for(let i = 0; i < diagnosticList.diagnosticList.length; i++) {
     diag.push({"dateValue": "","name": diagnosticList.diagnosticList[i].name,"uniqueName": ""})
   }
-  if(diagnosticList.length>0)diagnosticList.diseaseName.uniqueName = ''
+  if(diagnosticList.diagnosticList.length>0)diagnosticList.diseaseName.uniqueName = ''
   let templis = (inspect.labelListSmall).concat(inspect.labelListBig)
-  templis = templis.filter((item)=>!item.check)
+  templis = templis.filter((item)=>{
+    if(!item.check){
+      if(item.flg == 1){
+        item.detailName = ""
+      }
+      if(curHos.hosId != -1){
+        item.uniqueName = ''
+      }
+      return item
+    }
+  })
+  let tempLisOrder = inspect.totalOrder
+  tempLisOrder = tempLisOrder.filter((item)=>{
+    if(item.flg == 1){
+      item.detailName = ""
+    }
+    if(curHos.hosId != -1){
+      item.uniqueName = ''
+    }
+    return item
+  })
   let temppacs = assistCheck.assistLabel
-  temppacs = temppacs.filter((item)=>!item.check)
+  temppacs = temppacs.filter((item)=>{
+    if(!item.check){
+      if(curHos.hosId != -1){
+        item.uniqueName = ''
+      }
+      return item
+    }
+  })
+  let tempPacOrder = assistCheck.totalOrder
+  tempPacOrder = tempPacOrder.filter((item)=>{
+    if(curHos.hosId != -1){
+      item.uniqueName = ''
+    }
+    return item
+  })
   let tempdrug = newAdvice.labelListBig
   tempdrug = tempdrug.filter((item)=>{
     if(!item.check){
-      item.name = (item.uniqueName+(item.form||''))
+      if(curHos.hosId != -1){
+        item.uniqueName = ''
+      }
+      item.name = (item.name+(item.form||''))
       return item
     }
   })
   let tempdrugorder = newAdvice.drugOrder
   tempdrugorder = tempdrugorder.filter((item)=>{
-      item.name = (item.uniqueName+(item.form||''))
+      if(curHos.hosId != -1){
+        item.uniqueName = ''
+      }
+      item.name = (item.name+(item.form||''))
       return item
   })
   let tempoperation = newAdvice.labelListSmall
-  tempoperation = tempoperation.filter((item)=>!item.check)
+  tempoperation = tempoperation.filter((item)=>{
+    if(!item.check){
+      if(curHos.hosId != -1){
+        item.uniqueName = ''
+      }
+      return item
+    }
+  })
+  let tempOperationOrder = newAdvice.operationOrder
+  tempOperationOrder = tempOperationOrder.filter((item)=>{
+    if(curHos.hosId != -1){
+      item.uniqueName = ''
+    }
+    return item
+  })
+  let tempOperationName = newAdvice.operationName
+  if(curHos.hosId != -1&&tempOperationName.name){
+    tempOperationName.uniqueName = ''
+  }
   let tempblood = newAdvice.labelListBlood||[]
-  tempblood = tempblood.filter((item)=>!item.check)
+  tempblood = tempblood.filter((item)=>{
+    if(!item.check){
+      if(curHos.hosId != -1){
+        item.uniqueName = ''
+      }
+      return item
+    }
+  })  
+  let tempTransfusionOrder = newAdvice.transfusionOrder||[]
+  tempTransfusionOrder = tempTransfusionOrder.filter((item)=>{
+    if(curHos.hosId != -1){
+      item.uniqueName = ''
+    }
+    return item
+  })
   let sex = formatFormParmas('patientSex', patInfoData);
   const obj = {
-    "hospitalId": id || '',
+    "hospitalId": curHos.hosId || '',
     "age": formatFormParmas('patientAge', patInfoData),
     "sex": sex,
     "deptName": formatFormParmas('hospitalDeptName', patInfoData),
-    "chief": filterDataArr(mainSuit.saveText)||'',    //主诉
-    "symptom": filterDataArr(currentIll.saveText)||'',  //现病史
-    "vital": filterDataArr(checkBody.saveText)||'',  //查体
-    "pasts": filterDataArr(pastHistory.saveText)||'',  //既往史
+    "chief": mainSuit.saveText[0]||'',    //主诉
+    "symptom": currentIll.saveText[0]||'',  //现病史
+    "vital": checkBody.saveText[0]||'',  //查体
+    "pasts": pastHistory.saveText[0]||'',  //既往史
+    // "pasts": filterDataArr(pastHistory.saveText)||'',  //既往史
     "marriage": '',
-    "personal": filterDataArr(personalHistory.saveText)||'',  //个人史
-    "family": filterDataArr(familyHistory.saveText)||'',  //家族史
-    "marital": filterDataArr(marriageHistory.saveText)||'',  //婚育史
-    "menstrual": filterDataArr(menstruationHistory.saveText)||'',  //月经史
+    "personal": personalHistory.saveText[0]||'',  //个人史
+    "family": familyHistory.saveText[0]||'',  //家族史
+    "marital": marriageHistory.saveText[0]||'',  //婚育史
+    "menstrual": menstruationHistory.saveText[0]||'',  //月经史
     "diseaseName":diagnosticList.diseaseName,
-    "operationName":newAdvice.operationName,
+    "operationName":tempOperationName,
     "infectious": "",
     "operation": tempoperation,
     "allergy": "",
@@ -976,17 +1049,16 @@ function getEMRParams(){
     "lis": templis,
     "pacs": temppacs||[],
     "diag": diag,
-    "lisOrder": inspect.totalOrder,
-    "pacsOrder": assistCheck.totalOrder,
+    "lisOrder": tempLisOrder,
+    "pacsOrder": tempPacOrder,
     "diagOrder": [],
     "drugOrder": tempdrugorder,
-    "operationOrder": newAdvice.operationOrder,
+    "operationOrder": tempOperationOrder,
     "otherOrder": [],
     "patientId": message.patientId,
     "drug": tempdrug,
-    "hospitalId": id || '',
     'transfusion':tempblood,//输血
-    'transfusionOrder':newAdvice.transfusionOrder
+    'transfusionOrder':tempTransfusionOrder
   }
   if(sex !== 2){
     // 不是女性时,去除月经史
@@ -1808,7 +1880,8 @@ function getAllString(checkedListImport,assistLabel,flg){
       "result": tempArr[i].value||"",
     }
     tmpArr.push(obj)
-    tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ':') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + '^;')
+    // tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ':') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + '^;')
+    tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ':') + (tempArr[i].time ? tempArr[i].time : '') + '^;')
   }
   return tmpObj = {
     arr:tmpArr,