瀏覽代碼

Merge remote-tracking branch 'origin/dev/luolei' into dev/new1

# Conflicts:
#	src/common/components/TailInlineTag/index.less
#	src/common/components/Textarea/index.jsx
#	src/components/AddAssistCheck/index.jsx
#	src/containers/OtherHistory.js
#	src/store/actions/otherHistory.js
zhouna 6 年之前
父節點
當前提交
ef1f67f9a0
共有 54 個文件被更改,包括 348 次插入486 次删除
  1. 1 1
      src/common/components/EditableSpan/index.less
  2. 1 0
      src/common/components/InspectCommon/index.less
  3. 1 1
      src/common/components/ItemBox/index.less
  4. 0 1
      src/common/components/SearchOption/index.jsx
  5. 1 0
      src/common/components/SearchOption/index.less
  6. 1 1
      src/common/components/Textarea/index.less
  7. 二進制
      src/common/images/icon_print_blue.png
  8. 4 2
      src/components/AddAssistCheck/Textarea/index.less
  9. 7 6
      src/components/AddAssistCheck/index.jsx
  10. 21 8
      src/components/AddAssistCheck/index.less
  11. 10 6
      src/components/AddInspect/index.jsx
  12. 8 7
      src/components/AddInspect/index.less
  13. 12 4
      src/components/Banner/index.jsx
  14. 1 0
      src/components/CopyRight/index.jsx
  15. 2 0
      src/components/CopyRight/index.less
  16. 1 0
      src/components/DiagResultSearch/index.less
  17. 1 1
      src/components/DiagnosticList/index.jsx
  18. 1 1
      src/components/EMRContainer/index.less
  19. 1 1
      src/components/HistoryCaseContainer/HistoryList/index.less
  20. 1 1
      src/components/HistoryCaseContainer/index.jsx
  21. 1 1
      src/components/HistoryCaseContainer/index.less
  22. 1 3
      src/components/Inspect/index.jsx
  23. 2 2
      src/components/Inspect/index.less
  24. 17 25
      src/components/MainSuit/index.jsx
  25. 23 5
      src/components/Operation/index.jsx
  26. 1 1
      src/components/PreviewBody/index.jsx
  27. 13 24
      src/components/PrintPreview/index.jsx
  28. 146 206
      src/components/PushItems/index.jsx
  29. 4 8
      src/components/PushItems/index.less
  30. 3 3
      src/components/SpreadDrop/index.jsx
  31. 1 2
      src/components/TemplateItems/index.jsx
  32. 2 1
      src/containers/CheckBody.js
  33. 2 11
      src/containers/CurrentIll.js
  34. 1 1
      src/containers/EditableSpan.js
  35. 1 1
      src/containers/InlineTag.js
  36. 4 13
      src/containers/MainSuit.js
  37. 1 1
      src/containers/MultSpread.js
  38. 2 12
      src/containers/NumberDrop.js
  39. 2 11
      src/containers/NumberUnitDrop.js
  40. 2 10
      src/containers/RadioDrop.js
  41. 6 23
      src/containers/SpreadDrop.js
  42. 1 2
      src/containers/eleType.js
  43. 2 2
      src/store/actions/checkBody.js
  44. 2 2
      src/store/actions/mainSuit.js
  45. 1 1
      src/store/actions/pushMessage.js
  46. 1 1
      src/store/async-actions/copyRight.js
  47. 19 2
      src/store/async-actions/fetchModules.js
  48. 1 1
      src/store/async-actions/mainSuit.js
  49. 1 5
      src/store/async-actions/patInfo.js
  50. 1 2
      src/store/async-actions/pushMessage.js
  51. 3 3
      src/store/async-actions/treat.js
  52. 3 4
      src/store/types/checkBody.js
  53. 2 55
      src/utils/tools.js
  54. 1 1
      static/pages/hisLib/infomation.js

+ 1 - 1
src/common/components/EditableSpan/index.less

@@ -6,7 +6,7 @@
   // line-height: 2;
   /*height: 20px;*/
   line-height: 16px;
-  /*vertical-align: middle;*/
+  vertical-align: middle;
   text-align: center;
 }
 .full{

+ 1 - 0
src/common/components/InspectCommon/index.less

@@ -9,6 +9,7 @@
     max-width: 600px;
     box-sizing: border-box;
     box-shadow: 0 6px 20px 0 #989DA3;
+    margin-bottom: 80px;
     // border: 1px solid #989DA3;
 }
 .btnWrap{

+ 1 - 1
src/common/components/ItemBox/index.less

@@ -16,7 +16,7 @@
   }
   .content{
     // height:120px;
-    min-height: 38px;
+    min-height: 44px;
     margin-left: 60px;
     position: relative;
     padding:5px;

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

@@ -54,7 +54,6 @@ class SearchOption extends React.Component {
                 <input
                     className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
                     type="text"
-                    maxLength="30"
                     ref={this.textInput}
                     onFocus={()=>{
                         if(this.state.val.trim() != ''){

+ 1 - 0
src/common/components/SearchOption/index.less

@@ -9,6 +9,7 @@
     z-index: 20;
     background-color: #fff;
     box-shadow: 0 6px 20px 0 #989DA3;
+    margin-bottom: 80px;
     .autoList {
         max-height: 266px;
         min-height: 80px;

+ 1 - 1
src/common/components/Textarea/index.less

@@ -16,7 +16,7 @@
   }
   .content{
     // height:120px;
-    min-height: 38px;
+    min-height: 44px;
     line-height: 22px;
     margin-left: 60px;
     position: relative;

二進制
src/common/images/icon_print_blue.png


+ 4 - 2
src/components/AddAssistCheck/Textarea/index.less

@@ -1,11 +1,13 @@
 .divTextarea {
   overflow-y: auto;
+  overflow-x: hidden;
   border-bottom: 1px dashed #333;
   box-sizing: border-box;
-  min-height: 18px;
+  min-height: 20px;
   width: 100%;
   outline: none;
-  line-height: 17px;
+  line-height: 20px;
   resize: none;
   font-family: inherit;
+  max-height: 100px;
 }

+ 7 - 6
src/components/AddAssistCheck/index.jsx

@@ -3,6 +3,7 @@ import { SearchOption, Calendar ,ConfirmModal,Notify,Add} from '@commonComp';
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
+import close from './img/close.png';
 
 class AddAssistCheck extends React.Component {
     constructor(props) {
@@ -65,7 +66,7 @@ class AddAssistCheck extends React.Component {
     handleSearchShow(e) {
         let tmpShow = this.state.show;
         this.setState({ show: !tmpShow })
-        // e.stopPropagation();
+        //e.stopPropagation();
     }
     handleShowDate(idx){
         this.setState({
@@ -126,10 +127,10 @@ class AddAssistCheck extends React.Component {
                             ></textarea> */}
                             <Textarea value={item.value} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                         </p>
-                        <div>
-                            <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                        <div className={styles.pointerFinger}>
+                            <p onClick={()=>this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                             <i onClick={()=>this.handleShowDate(idx)}></i>
-                            <a href="javascript:void(0);" onClick={()=>{this.handleDelClick(idx)}}></a>
+                            <a href="javascript:void(0);" onClick={()=>{handleDelAssist(idx)}}><img src={close} alt=""/></a>
                             <div style={{display:this.state.date && idx == this.state.active?"block":"none",position:"relative"}}>
                                 <Calendar isShow={true} handleChange={(info)=>{handleChangeDate(info,idx);this.setState({date:false})}}></Calendar>
                             </div>
@@ -150,12 +151,12 @@ class AddAssistCheck extends React.Component {
             <div className={styles.wrapper}>
                 {this.getAssistLabel()}
                 <div id="searchWrapAssist" style={{position:"relative"}}>
-                    <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck"/>
+                    <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck"/>
                     <SearchOption handleChangeValue={handleChangeValue} visible={this.state.show}>
                         {this.getSearchList(list)}
                     </SearchOption>
                 </div>
-                <ConfirmModal 
+                <ConfirmModal
                     visible={visible}
                     confirm={()=>{this.delConfirm()}}
                     close={this.handleCancel}

文件差異過大導致無法顯示
+ 21 - 8
src/components/AddAssistCheck/index.less


+ 10 - 6
src/components/AddInspect/index.jsx

@@ -37,8 +37,9 @@ class Inspect extends React.Component {
         this.handleSearchShow = this.handleSearchShow.bind(this)
     }
     delConfirm(){//弹窗确定
-        const{delPartItem,handleCloseExcel} = this.props;
-        const{type,id} = this.state;
+        const {delPartItem,handleCloseExcel} = this.props;
+        const {type,id} = this.state;
+        console.log(id)
         if(type==1){
             delPartItem(id)
         }else if(type==2){
@@ -57,6 +58,7 @@ class Inspect extends React.Component {
             id:idx,
             visible:true
         })
+        console.log(idx)
         if(type==1){//单项
             this.setState({
                 toastText:'是否删除该化验项?'
@@ -109,10 +111,12 @@ class Inspect extends React.Component {
     handleFillShow(e,idx) {
         let tmpShow = this.state.showFill;
         let baseList = store.getState().inspect.fillActive;
+        const tmpTime = this.state.dateTime
         this.setState({ 
             showFill: !tmpShow, 
             currentIdx:idx,
-            currentData:baseList
+            currentData:baseList,
+            dateTime:baseList.time?baseList.time:tmpTime
         })
         e.stopPropagation();
     }
@@ -128,7 +132,6 @@ class Inspect extends React.Component {
         let day = myDate.getDate();            //获取当前日(1-31)
         let date = year+'-'+(mon<10?'0'+mon:mon)+'-'+(day<10?'0'+day:day);
         this.setState({dateTime:date})
-        
     }
     changeActivePart(idx,val){
         let nums = this.state.num;
@@ -167,6 +170,7 @@ class Inspect extends React.Component {
         }else{
             fillActive = this.state.currentData;
         }
+        // this.setState({dataTime:fillActive.time})
         return <ul className={styles.searchLis}>
             {
                 fillActive && fillActive.details && fillActive.details.map((item,idx) => {
@@ -361,8 +365,8 @@ class Inspect extends React.Component {
                                                             <Calendar isShow={true} handleChange={this.handleChangeDate}></Calendar>
                                                         </div>
                                                     </div>
-                                                        {/* 填写单内容显示 */}
-                                                        { this.getItemList(idx) }
+                                                    {/* 填写单内容显示 */}
+                                                    { this.getItemList(idx) }
                                                 </InspectCommon>
                                             : null
                                         }

+ 8 - 7
src/components/AddInspect/index.less

@@ -32,7 +32,7 @@
         cursor: pointer;
         display: inline-block;
         position: absolute;
-        right: 0;
+        right: -4px;
         top: 12px;
     }
 }
@@ -72,7 +72,7 @@
             line-height: 18px;
             height: 18px;
             td {
-                width: 150px;
+                width: 180px;
             }
         }
     }
@@ -109,6 +109,7 @@
         }
     }
 }
+
 .searchLis {
     padding-top: 10px;
     margin-top: 5px;
@@ -130,7 +131,7 @@
         display: inline-block;
     }
     .itemPartL {
-        width: 100px;
+        // width: 100px;
         float: left;
     }
     .itemPartR {
@@ -192,8 +193,8 @@
     }
 }
 .center {
-    text-align: center;
-    font-size: 16px;
-    padding-top: 10px;
-    padding-bottom: 50px;
+  text-align: center;
+  font-size: 16px;
+  padding-top: 10px;
+  padding-bottom: 50px;
 }

+ 12 - 4
src/components/Banner/index.jsx

@@ -10,7 +10,8 @@ class Banner extends Component {
   constructor(props){
     super(props)
     this.state = {
-      mode: props.typeConfig
+      mode: props.typeConfig,
+      zIndex:40
     };
     this.showConfigModal = this.showConfigModal.bind(this);
     this.closeConfigModal = this.closeConfigModal.bind(this);
@@ -20,13 +21,17 @@ class Banner extends Component {
 
   showConfigModal(){
     this.setState({
-      mode:this.props.typeConfig
+      mode:this.props.typeConfig,
+      zIndex:202
     });
     this.props.showConfigModal()
   }
 
   closeConfigModal(){
     this.props.closeConfigModal();
+    this.setState({
+      zIndex:40
+    })
   }
 
   changeType(typeConfig){
@@ -44,6 +49,9 @@ class Banner extends Component {
     }
     confirmType&&confirmType(mode);
     this.closeConfigModal()
+    this.setState({
+      zIndex:40
+    })
   }
   /*componentDidUpdate(){
     const {failed} = this.props;
@@ -54,11 +62,11 @@ class Banner extends Component {
   }*/
   render() {
     const {visible} = this.props;
-    const {mode} = this.state;
+    const {mode,zIndex} = this.state;
     const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
 
     return (
-      <div className={style["logo"]} >
+      <div className={style["logo"]} style={{zIndex:zIndex}}>
         <img src={logo} />
         <span>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]} onClick={showConfigModal}>

+ 1 - 0
src/components/CopyRight/index.jsx

@@ -24,6 +24,7 @@ class CopyRight extends Component {
 
   showCopyModal() {
     this.props.showCopyModal();
+    console.log(this.props.copyRight.hasNewVersion)
     if(this.props.copyRight.hasNewVersion) {
       this.props.closeVersionTip()
     }

+ 2 - 0
src/components/CopyRight/index.less

@@ -76,6 +76,8 @@
         }
         .content {
           padding: 10px;
+          max-height: 500px;
+          overflow-y: auto;
         }
       }
     }

+ 1 - 0
src/components/DiagResultSearch/index.less

@@ -7,6 +7,7 @@
     box-shadow: 0 6px 20px 0 #989DA3;
     background: #fff;
     z-index: 99;
+    margin-bottom: 80px;
 }
 .search {
     width: 100%;

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

@@ -80,7 +80,7 @@ class DiagnosticList extends Component {
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
-                        const hasTreat = item.treat.commonTreatment && item.treat.surgeryTreatment && item.treat.treatment.length>0
+                        const hasTreat = item.treat&&item.treat.commonTreatment && item.treat.surgeryTreatment && item.treat.treatment.length>0
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.id} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img src={diagDown}/></span>}

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

@@ -11,7 +11,7 @@
 .inner{
 //   overflow-y: auto;
   padding-top:80px;
-  padding-bottom: 60px;
+  padding-bottom: 80px;
 }
 .keep {
     position: absolute;

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

@@ -10,7 +10,7 @@
     top: 70px;
     bottom: 70px;
     background-color: #fff;
-    z-index: 242;
+    z-index: 235;
     .close {
         position: absolute;
         top: 0;

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

@@ -29,7 +29,7 @@ class HistoryCaseContainer extends React.Component {
         const domNode = document.getElementById('root');
         return ReactDom.createPortal(
             <div className={styles.historyCaseWrap} style={{display:showHistoryCases?'block':'none'}}>
-                <div className={styles.maskHistory} onClick={showHistoryBox}></div>
+                <div className={styles.maskHistory}></div>
                 <HistoryList 
                     items={items}
                     activeHistory={activeHistory}

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

@@ -3,7 +3,7 @@
     position: fixed;
     left: 0;
     top: 0;
-    z-index: 241;
+    z-index: 230;
     width: 100%;
     height: 100%;
     background-color: #000;

+ 1 - 3
src/components/Inspect/index.jsx

@@ -67,7 +67,7 @@ class Inspect extends React.Component {
                 if( files.length ){
                     console.log(files[0])
                     FileAPI.upload({
-                        url: 'http://192.168.2.236/api/icss/lisExcelRes/lisExcelAnalysis',
+                        url: '/api/icss/lisExcelRes/lisExcelAnalysis',
                         data:{ hospitalCode:baseData == '{}'? '' : baseData.hospitalCode },
                         files: { uploadfile: files[0] },
                         headers:{
@@ -126,8 +126,6 @@ class Inspect extends React.Component {
         const { handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem } = this.props;
         return (
             <div className={styles.wrapper} >
-                {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
-
                 <div className={styles.top}>
                     <span>化验结果数据</span>
                     <div className={this.getStyle()} onClick={this.state.isIE?null:this.handleImportExcel}>

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

@@ -34,10 +34,10 @@
     button {
         outline: none;
         font-size: 12px;
-        width: 90px;
+        padding: 0 8px;
         background-color: #fff;
         height: 28px;
-        line-height: 28px;
+        line-height: 30px;
         border: 0 none;
         color: @template-color;
     }

+ 17 - 25
src/components/MainSuit/index.jsx

@@ -23,8 +23,7 @@ class MainSuit extends Component{
       timer:null,
       blurTimer:null,
       inpText:'',
-      clearTimer:null,
-      overFlag:false
+      clearTimer:null
     };
     this.toggleEditable = this.toggleEditable.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
@@ -58,8 +57,10 @@ class MainSuit extends Component{
 
   handleFocus(e){
     e.stopPropagation();
-    const {getCommonSymptoms} = this.props;
+    const {getCommonSymptoms,reTotalHide,pushMessage} = this.props;
     let innerText = e.target.innerText;
+    pushMessage&&pushMessage();//右侧推送
+    // reTotalHide && reTotalHide();//重置全局隐藏
     if(!innerText.trim()){//有内容就走搜索接口
       getCommonSymptoms && getCommonSymptoms();
       this.setState({
@@ -67,8 +68,7 @@ class MainSuit extends Component{
       })    
     }else{
       this.setState({
-        symptom:false,
-        inpText:innerText
+        symptom:false
       }) 
     }
 
@@ -132,29 +132,22 @@ class MainSuit extends Component{
     })
   }
 
-  handleChange(e){
+  handleChange(e){  
     const data = e.target.innerText;
-    const {getSearchData,searchData,datas,pushMessage,reTotalHide} = this.props;
-    const {overFlag,inpText} = this.state;
+    const {getSearchData,searchData,datas,freeText,saveText,reTotalHide} = this.props;
     reTotalHide && reTotalHide();//重置homePage中的控制项
     const that = this;
-    if(data.length > config.limited){
-      Notify.info(config.limitText);
-      e.target.innerText = text.substr(0,config.limited);  //输入法内输入多个字再按enter的情况
+    if(data.trim().length > config.limited){
+      e.target.innerText = data.substr(0,config.limited);
       e.target.blur();
-      if(overFlag){
-        e.target.innerText = inpText;
-        return
-      }
+      Notify.info(config.limitText);
       this.setState({
-        inpText:data.substr(0,config.limited),
-        overFlag:true
+        inpText:data.substr(0,config.limited),//输入法内输入多个字再按enter的情况
       })
       return false;
     }
     this.setState({
-      inpText:data,
-      overFlag:false
+      inpText:data
     })
     if(datas.length > 0){//使用模板
       return false;
@@ -174,17 +167,16 @@ class MainSuit extends Component{
     const timer = setTimeout(function(){
       //调搜索接口 使用模板走EditableSpan里的搜索方法
       getSearchData && getSearchData({inpStr:data,boxMark:1});
-    },config.delayTime);
+    },config.delayTime)
     this.setState({
       timer
-    });
-
+    });   
   }
 
   handleBlur(e){//隐藏常见症状下拉、存自由输入的值
-    const {freeText,saveText,datas} = this.props;
+    const {freeText,saveText} = this.props;
     const that = this;
-    let data = this.state.inpText;
+    let data = this.state.inpText;  
     e.target.innerText="";
     freeText && freeText(data.trim());
     // 延时关闭常见症状下拉,不延时会影响选中
@@ -214,7 +206,7 @@ class MainSuit extends Component{
       fuzhen={fuzhen} 
       title='主诉' 
       editable={editClear||datas.length==0?true:false} 
-      boxLineHeight="24px"
+      boxLineHeight="22px" 
       handleFocus={this.handleFocus} 
       onchange={(e)=>{this.handleChange(e)}} 
       handleClick={this.handleClick} 

+ 23 - 5
src/components/Operation/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import style from "./index.less";
-import printImg from '@common/images/icon_print_blue.png';
+import printImg from '@common/images/Printing.png';
 import preview from '@common/images/preview.png';
 import saveHistory from '@common/images/saveHistory.png';
 import PrintPreviewContainer from '@containers/PrintPreviewContainer';
@@ -22,7 +22,8 @@ class Operation extends Component {
       okColor: '',
       oKBg: '',
       msg: '',
-      type: ''
+      type: '',
+      zIndex:40
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -35,19 +36,31 @@ class Operation extends Component {
   }
 
   showPrint() {
+    this.setState({
+      zIndex:240
+    })
     this.props.showPrintPreview()
   }
 
   closePrint() {
+    this.setState({
+      zIndex:40
+    })
     this.props.closePrintPreview()
   }
 
 
   showPreview() {
+    this.setState({
+      zIndex:240
+    })
     this.props.showPreview()
   }
 
   closePreview() {
+    this.setState({
+      zIndex:40
+    })
     this.props.closePreview()
   }
 
@@ -158,8 +171,7 @@ class Operation extends Component {
     let whichSign = baseList.typeConfig.typeConfig;
     let activeItemData = baseList.tabTemplate.activeItem;
     // let preview = (activeItemData.preview).split('-').join('');
-    // console.log(activeItemData.dataJson,4545554)
-    // console.log(JSON.stringify(jsonData),4545554)
+
     if (whichSign == 0) {
       if (activeItemData && JSON.stringify(activeItemData) != '{}' && (activeItemData.dataJson == JSON.stringify(jsonData)) && (JSON.stringify(jsonStr) == JSON.stringify(JSON.parse(activeItemData.preview)))) {
         Notify.info('该模板已保存');
@@ -181,6 +193,11 @@ class Operation extends Component {
         return true;
       }
     } else if(whichSign == 1) {
+      console.log(JSON.parse(jsonStr.chief))
+      
+      if(activeItemData && JSON.stringify(activeItemData) != '{}'){
+        console.log(JSON.parse(JSON.parse(activeItemData.preview).chief))
+      }
       if (activeItemData && JSON.stringify(activeItemData) != '{}' && (JSON.stringify(jsonStr) == JSON.stringify(JSON.parse(activeItemData.preview)))) {
         Notify.info('该模板已保存');
         return false;
@@ -244,8 +261,9 @@ class Operation extends Component {
   render() {
     const { showPrint, closePrint, showPreview, closePreview } = this;
     const { visible, preVisible } = this.props.print;
+    const {zIndex} = this.state;
 
-    return <div className={style['container']} >
+    return <div className={style['container']} style={{zIndex:zIndex}}>
       <button className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</button>
       <button className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</button>
       <button className={style['preButton']} onClick={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</button>

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

@@ -219,7 +219,7 @@ class PreviewBody extends Component {
                     </td>
                 </tr>
                 <tr style={{ verticalAlign: 'top' }}>
-                    <td style={{ width: 70, textAlign: 'right', padding: '0px 5px 16px 0px', fontSize: '14px' }}>辅:</td>
+                    <td style={{ width: 70, textAlign: 'right', padding: '0px 5px 16px 0px', fontSize: '14px' }}>辅:</td>
                     <td style={{ fontSize: '14px', padding: '0px 0px 16px 0px',lineHeight:'18px' }}>
                         {
                             dataStr.pacs && dataStr.pacs != '' && dataStr.pacs.split(';').map((item)=>{

+ 13 - 24
src/components/PrintPreview/index.jsx

@@ -78,31 +78,20 @@ class PrintPreview extends Component {
         this.props.onClose()
     }
     surePrint(jsonData,jsonStr,whichSign){
-        if(whichSign == 0){
-            if(jsonData.chief.length < 1){
-                Notify.info('主诉不能为空');
-                return;
-            }else if(jsonData.diag.length < 1){
-                Notify.info('诊断不能为空');
-                return;
-            }else{
-                this.onPrint();
-                this.props.save(true)
-            }
+        console.log(jsonData)
+        console.log(jsonStr)
+        if(JSON.parse(jsonStr.chief).length == 1 && JSON.parse(jsonStr.chief)[0].trim() ==''){
+          Notify.info('主诉不能为空');
+            return false;
+        }else if(jsonStr.chief && JSON.parse(jsonStr.chief).length < 1){
+            Notify.info('主诉不能为空');
+            return false;
+        }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
+            Notify.info('诊断不能为空');
+            return false;
         }else{
-            if(JSON.parse(jsonStr.chief).length == 1 && JSON.parse(jsonStr.chief)[0] ==''){
-                Notify.info('主诉不能为空');
-                return;
-            }else if(JSON.parse(jsonStr.chief).length < 1){
-                Notify.info('主诉不能为空');
-                return;
-            }else if(jsonStr.diag.trim().length < 1){
-                Notify.info('诊断不能为空');
-                return;
-            }else{
-                this.onPrint();
-                this.props.save(true)
-            }
+          this.onPrint();
+          this.props.save(true)
         }
     }
     render() {

+ 146 - 206
src/components/PushItems/index.jsx

@@ -7,12 +7,11 @@ import tipsImg from "../../common/images/tips.png";
 import vigilantImg from "../../common/images/vigilant.png";
 import showImg from "../../common/images/show.png";
 import hideImg from "../../common/images/close.png";
+import closeImg from "./img/close.png";
 import CopyRightContainer from "@containers/CopyRightContainer";
 import PushDiag from "./PushDiag";
-import DiagnosticItem from "@containers/DiagnosticItem";
+import DiagnosticItem from '@containers/DiagnosticItem';
 import $ from "jquery";
-import { getWindowInnerHeight } from "@common/js/func";
-import {windowEventHandler} from '@utils/tools'
 
 class PushItems extends Component {
   constructor(props) {
@@ -20,7 +19,7 @@ class PushItems extends Component {
 
     this.state = {
       moreAssay: false,
-      moreCheck: false
+      moreCheck: false,
     };
 
     this.showMore = this.showMore.bind(this);
@@ -29,7 +28,6 @@ class PushItems extends Component {
     this.changeAssay = this.changeAssay.bind(this);
     this.changeCheck = this.changeCheck.bind(this);
     this.showTips = this.showTips.bind(this);
-    this.$cont = React.createRef();
   }
 
   showMore(type) {
@@ -45,11 +43,11 @@ class PushItems extends Component {
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
-    const Height = $(".src-components-BodyContainer-2SgEx").height();
-    const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
+    const Height = $('.src-components-BodyContainer-2SgEx').height()
+    const adviceHeight = $('.src-common-components-ItemBox-1Bpz3').height()
     const winHeight = window.innerHeight;
-    const scrollTop = Height;
-    document.documentElement.scrollTop = 10000;
+    const scrollTop = Height 
+    document.documentElement.scrollTop = scrollTop;
   }
 
   changeAssay(item) {
@@ -64,28 +62,23 @@ class PushItems extends Component {
     const { getTipsDetails } = this.props;
     getTipsDetails && getTipsDetails();
   }
-  componentDidMount() {
-    const height = getWindowInnerHeight() - 200;
-    this.$cont.current.style.height = height + "px";
 
-    windowEventHandler('resize', ()=>{
-      const height = getWindowInnerHeight() - 200;
-      this.$cont.current.style.height = height + "px";
-    });
-  }
 
   render() {
     const {
-      vigilant,
-      determine,
+	  vigilant,
+	  determine,
       doubt,
       possible,
       assay,
       check,
-      tips
+      tips,
     } = this.props.pushMessage;
     const { tipsDiscalimer } = this.props;
-    const { moreAssay, moreCheck } = this.state;
+    const {
+      moreAssay,
+      moreCheck,
+    } = this.state;
     const {
       showMore,
       closeMore,
@@ -105,7 +98,7 @@ class PushItems extends Component {
         return (
           <span>
             <input
-              id={item.id + item.name}
+              id = {item.id + item.name}
               onChange={() => changeAssay(item)}
               type="checkbox"
               checked={item.checked}
@@ -120,7 +113,7 @@ class PushItems extends Component {
       return (
         <span>
           <input
-            id={item.id + item.name}
+            id = {item.id + item.name}
             onChange={() => changeAssay(item)}
             type="checkbox"
             checked={item.checked}
@@ -139,7 +132,7 @@ class PushItems extends Component {
         return (
           <span>
             <input
-              id={item.id + item.name}
+              id = {item.id + item.name}
               onChange={() => changeCheck(item)}
               type="checkbox"
               checked={item.checked}
@@ -154,7 +147,7 @@ class PushItems extends Component {
       return (
         <span>
           <input
-            id={item.id + item.name}
+            id = {item.id + item.name}
             onChange={() => changeCheck(item)}
             type="checkbox"
             checked={item.checked}
@@ -165,199 +158,146 @@ class PushItems extends Component {
     });
 
     const vigilants = vigilant.map((item, index) => {
-      return <DiagnosticItem item={item} />;
+        return (
+          <DiagnosticItem item={item}/>
+        );
     });
 
     return (
-      <div className={style["push-content-wrapper"]}>
-        <div className={style["push-content"]} ref={this.$cont}>
-          <div style = {{width: '420px'}}>
-            {vigilant && vigilant.length > 0 && (
-              <div className={style["vigilant"]}>
-                <div className={style["title"]}>
-                  <img src={vigilantImg} />
-                  警惕
-                </div>
-                <div className={style["vigilantContent"]}>{vigilants}</div>
-              </div>
-            )}
-            {/* 不展示确诊 */}
-            {/* {determine && determine.length>0 && <PushDiag titleBg='#FAEBEC' icon={possibleImg} title='确诊' diagList={determine} maxShowNum={28}/>} */}
-            {doubt && doubt.length > 0 && (
-              <PushDiag
-                titleBg="#FAEBEC"
-                icon={doubtImg}
-                title="疑似诊断"
-                diagList={doubt}
-                maxShowNum={28}
-              />
-            )}
-            {possible && possible.length > 0 && (
-              <PushDiag
-                titleBg="#FAEBEC"
-                icon={possibleImg}
-                title="可能诊断"
-                diagList={possible}
-                maxShowNum={28}
-              />
-            )}
-            <div className={style["diagnose"]}>
-              {vigilant.length === 0 &&
-                determine.length === 0 &&
-                doubt.length === 0 &&
-                possible.length === 0 && (
-                  <div className={style["doubt"]}>
-                    <h1>
-                      <img src={doubtImg} />
-                      疑似诊断
-                    </h1>
-                    <div className={style["no-push"]}>无</div>
-                  </div>
-                )}
+      <div className={style["content"]}>
+        {vigilant && vigilant.length > 0 &&
+           (<div className={style["vigilant"]}>
+            <div className={style["title"]}>
+              <img src={vigilantImg} />
+              警惕
             </div>
-
-            <div className={style["recommend"]}>
-              <h1>
-                <img src={recommendImg} />
-                推荐检验检查<div onClick={billing}>开单</div>
-              </h1>
-              <div>
-                {assay.length === 0 && check.length === 0 ? (
-                  "无"
-                ) : (
-                  <ul>
-                    <li className={style["firstLi"]}>
-                      <div className={style["title"]}>化验:</div>
-                      <div className={style["content"]}>
-                        {assay.length === 0
-                          ? "无"
-                          : moreAssay
-                          ? assays
-                          : assayHide}
-                        {assayNum > 28 ? (
-                          <span
-                            style={
-                              moreAssay
-                                ? { display: "none" }
-                                : { display: "inline-block" }
-                            }
-                            className={style["show"]}
-                            onClick={() => showMore("moreAssay")}
-                          >
-                            更多
-                            <img src={showImg} />
-                          </span>
-                        ) : (
-                          ""
-                        )}
-                        <span
-                          style={
-                            moreAssay
-                              ? { display: "inline-block" }
-                              : { display: "none" }
-                          }
-                          className={style["close"]}
-                          onClick={() => closeMore("moreAssay")}
-                        >
-                          收起
-                          <img src={hideImg} />
-                        </span>
-                      </div>
-                    </li>
-                    <li className={style["lastLi"]}>
-                      <div className={style["title"]}>检查:</div>
-                      <div className={style["content"]}>
-                        {check.length === 0
-                          ? "无"
-                          : moreCheck
-                          ? checks
-                          : checkHide}
-                        {checkNum > 28 ? (
-                          <span
-                            style={
-                              moreCheck
-                                ? { display: "none" }
-                                : { display: "inline-block" }
-                            }
-                            className={style["show"]}
-                            onClick={() => showMore("moreCheck")}
-                          >
-                            更多
-                            <img src={showImg} />
-                          </span>
-                        ) : (
-                          ""
-                        )}
-                        <span
-                          style={
-                            moreCheck
-                              ? { display: "inline-block" }
-                              : { display: "none" }
-                          }
-                          className={style["close"]}
-                          onClick={() => closeMore("moreCheck")}
-                        >
-                          收起
-                          <img src={hideImg} />
-                        </span>
-                      </div>
-                    </li>
-                  </ul>
-                )}
-              </div>
-            </div>
-            <div className={style["tips"]}>
-              <h1>
-                <img src={tipsImg} />
-                提示信息
-              </h1>
-              <div className={style["content"]}>
-                {tips && tips.introduceDetailList ? (
-                  <div>
-                    <div className={style["title"]}>
-                      {tips.tagName}
+            <div className={style["vigilantContent"]}>{vigilants}</div>
+          </div>
+    )}
+    {/* 不展示确诊 */}
+		{/* {determine && determine.length>0 && <PushDiag titleBg='#FAEBEC' icon={possibleImg} title='确诊' diagList={determine} maxShowNum={28}/>} */}
+		{doubt && doubt.length>0 && <PushDiag titleBg='#FAEBEC' icon={doubtImg} title='疑似诊断' diagList={doubt} maxShowNum={28}/>}
+		{possible && possible.length>0 && <PushDiag titleBg='#FAEBEC' icon={possibleImg} title='可能诊断' diagList={possible} maxShowNum={28}/>}
+        <div className={style["diagnose"]}>
+			{ vigilant.length === 0 && determine.length === 0 && doubt.length === 0 && possible.length === 0 && (<div className={style["doubt"]}>
+				<h1>
+				<img src={doubtImg} />
+				疑似诊断
+				</h1>
+				<div className={style['no-push']}>无</div>
+			</div>)}
+        </div>
+        <div className={style["recommend"]}>
+          <h1>
+            <img src={recommendImg} />
+            推荐检验检查<div onClick={billing}>开单</div>
+          </h1>
+          <div>
+            {assay.length === 0 && check.length === 0 ? (
+              "无"
+            ) : (
+              <ul>
+                <li className={style["firstLi"]}>
+                  <div className={style["title"]}>化验:</div>
+                  <div className={style["content"]}>
+                    {assay.length === 0 ? "无" : moreAssay ? assays : assayHide}
+                    {assayNum > 28 ? (
                       <span
-                        className={style["tips-details"]}
-                        onClick={() => showTips(tips)}
+                        style={
+                          moreAssay ? { display: "none" } : { display: "inline-block" }
+                        }
+                        className={style["show"]}
+                        onClick={() => showMore("moreAssay")}
                       >
-                        详情
+                        更多
+                        <img src={showImg} />
                       </span>
-                    </div>
-                    {tips.introduceDetailList &&
-                      tips.introduceDetailList.map((item, index) => {
-                        return (
-                          item.position.indexOf("1") > -1 && (
-                            <div>
-                              <div
-                                dangerouslySetInnerHTML={{
-                                  __html: item.title
-                                }}
-                              />
-                              <div
-                                dangerouslySetInnerHTML={{
-                                  __html: item.content
-                                }}
-                              />
-                              {item.isReason === 1 && (
-                                <div className={style["warn"]}>
-                                  {tipsDiscalimer.data.data[0].description}
-                                </div>
-                              )}
-                            </div>
-                          )
-                        );
-                      })}
+                    ) : (
+                      ""
+					)}
+					<span  style={
+                        moreAssay ? { display: "inline-block" } : { display: "none" }
+                      }
+                      className={style["close"]}
+                      onClick={() => closeMore("moreAssay")}>收起
+                      <img src={hideImg} />
+					</span>
                   </div>
-                ) : (
-                  "无"
-                )}
+                </li>
+                <li className={style["lastLi"]}>
+                  <div className={style["title"]}>检查:</div>
+                  <div className={style["content"]}>
+                    {check.length === 0 ? "无" : moreCheck ? checks : checkHide}
+                    {checkNum > 28 ? (
+                      <span
+                        style={
+                          moreCheck ? { display: "none" } : { display: "inline-block" }
+                        }
+                        className={style["show"]}
+                        onClick={() => showMore("moreCheck")}
+                      >
+                        更多
+                        <img src={showImg} />
+                      </span>
+                    ) : (
+                      ""
+					)}
+					<span style={
+                        moreCheck ? { display: "inline-block" } : { display: "none" }
+                      }
+                      className={style["close"]}
+                      onClick={() => closeMore("moreCheck")}>
+						 收起
+                      <img src={hideImg} />
+					</span>
+                  </div>
+                </li>
+              </ul>
+            )}
+          </div>
+        </div>
+        <div className={style["tips"]}>
+          <h1>
+            <img src={tipsImg} />
+            提示信息
+          </h1>
+          <div className={style["content"]}>
+            {tips ? (
+              tips.introduceDetailList&&<div>
+                <div className={style["title"]}>
+                  {tips.name}
+                  <span
+                    className={style["tips-details"]}
+                    onClick={() => showTips(tips)}
+                  >
+                    详情
+                  </span>
+                </div>
+                {tips.introduceDetailList&&tips.introduceDetailList.map((item, index) => {
+                  return (
+                    item.position.indexOf("1") > -1 && (
+                      <div>
+                        <div dangerouslySetInnerHTML={{ __html: item.title }} />
+                        <div
+                          dangerouslySetInnerHTML={{ __html: item.content }}
+                        />
+                        {item.isReason === 1 && (
+                          <div className={style["warn"]}>
+                            {tipsDiscalimer.data.data[0].description}
+                          </div>
+                        )}
+                      </div>
+                    )
+                  );
+                })}
               </div>
-            </div>
+            ) : (
+              "无"
+            )}
           </div>
         </div>
-
         <CopyRightContainer />
-      </div>
+    </div>
     );
   }
 }

+ 4 - 8
src/components/PushItems/index.less

@@ -1,14 +1,8 @@
 @import "~@less/variables.less";
-.push-content-wrapper{
+.content{
   // padding-top: 50px;
   padding: 0px 20px;
-  line-height: 20px; 
-  width: 460px;
-  overflow: hidden;
-  .push-content {
-    width: 480px;
-    overflow-y: scroll;
-  }
+  line-height: 20px;
   .vigilant{
     background: #FF8D54;
     overflow: hidden;
@@ -185,6 +179,8 @@
     .content{
       font-size: 12px;
       padding:6px 15px;
+      max-height: 220px;
+      overflow: auto;
       .title {
         font-size: 14px;
         line-height: 18px;

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

@@ -152,8 +152,8 @@ class SpreadDrop extends Component{
   }
   handleConfirm(e){
     e.stopPropagation();
-    const {handleConfirm,ikey,type,tagType,order,mainSaveText,copyType} = this.props;
-    const params = Object.assign({},this.state,{ikey,type,tagType,order,mainSaveText,copyType});
+    const {handleConfirm,ikey,type,tagType,order,mainSaveText} = this.props;
+    const params = Object.assign({},this.state,{ikey,type,tagType,order,mainSaveText});
     handleConfirm&&handleConfirm(params);
 	this.btnClickFlag = true;
     //点确定后隐藏弹窗
@@ -231,7 +231,7 @@ class SpreadDrop extends Component{
       })
       exists = existsData;
     }else if(noneIds.includes(id)){
-      nones = nones.replace(name+'、','');
+      nones = nones.replace(name,'');
       noneIds.splice(noneIds.indexOf(id),1);
     }else if(withsIds.includes(id)){
       let withsData = withs;

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

@@ -6,7 +6,6 @@ import check_circle from './TemplateItem/img/check-circle.png';
 import check_right from './TemplateItem/img/check-right.png';
 import Empty from '@components/Empty';
 import {getWindowInnerHeight} from '@common/js/func';
-import {windowEventHandler} from '@utils/tools'
 
 
 class TemplateItems extends React.Component {
@@ -18,7 +17,7 @@ class TemplateItems extends React.Component {
     componentDidMount(){
         const height = getWindowInnerHeight()-172;
         this.$cont.current.style.height = height+"px";
-        windowEventHandler('resize', ()=>{
+        window.addEventListener('resize', ()=>{
             const height = getWindowInnerHeight()-172;
             this.$cont.current.style.height = height+"px";
         });

+ 2 - 1
src/containers/CheckBody.js

@@ -1,7 +1,8 @@
 import {connect} from 'react-redux';
 import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
-import {HIDE,RESET,SETDROPSHOW} from '@store/types/homePage.js';
+import {SETDROPSHOW} from '@types/homePage.js';
+import {HIDE,RESET} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
 import {billing} from '@store/async-actions/pushMessage';
 

+ 2 - 11
src/containers/CurrentIll.js

@@ -6,10 +6,9 @@ import {SET_CURRENT_ILL} from '@store/types/fillInfo'
 import {pushMessage} from '../store/async-actions/pushContainer';
 import {getModules} from '../store/async-actions/fetchModules.js';
 import {SETDROPSHOW} from '@types/homePage.js';
-import {HIDE,RESET,CLICKCOUNT,ISREAD} from '@store/types/homePage.js';
+import {HIDE,RESET,CLICKCOUNT} from '@store/types/homePage.js';
 import {billing} from '@store/async-actions/pushMessage';
 import {getModule} from '@store/async-actions/fetchModules.js';
-import {didPushParamChange} from '@utils/tools.js';
 
 
 function mapStateToProps(state) {//console.log(11,state);
@@ -55,12 +54,10 @@ function mapDispatchToProps(dispatch) {
         });
         dispatch({
           type:INSERT_PROCESS,
-        });
-        dispatch({
-          type:ISREAD
         })
        },
        async setData(info){//设置现病史使用模板
+        dispatch(billing);//右侧推送
         let idsArr = info.mainIds;
         let ids = idsArr.join(",");
         let labelModule = await getModules(ids);
@@ -74,12 +71,6 @@ function mapDispatchToProps(dispatch) {
           type:SET_CURRENT_DATA,
           info
         })
-         //右侧推送
-         setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-           if(didPushParamChange()){     //操作后内容有变化才推送
-             dispatch(billing);
-           }
-         },500);
        },
         setCurrentIll: value => {
           dispatch({type: SET_CURRENT_ILL, value})

+ 1 - 1
src/containers/EditableSpan.js

@@ -167,7 +167,7 @@ function mapDispatchToProps(dispatch,state) {
       //右侧推送
       clearTimeout(timer);
       let timer = setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
+        if(didPushParamChange&&didPushParamChange()){     //操作后内容有变化才推送
           dispatch(billing);
           clearTimeout(timer);
         }

+ 1 - 1
src/containers/InlineTag.js

@@ -25,7 +25,7 @@ function mapDispatchToProps(dispatch,store){
       const type = params.ikey.substr(0,1);    //当前所在的项目
       const {ikey,text,prefix,suffix} = params;
       const i = getLabelIndex(ikey);
-      const inner = params.ikey.substr(params.ikey.length-1);
+      const inner = params.ikey.substr(-1);
       dispatch({
         type:tagInpActions[+type],
         i,

+ 4 - 13
src/containers/MainSuit.js

@@ -2,12 +2,12 @@ import React from 'react';
 import { connect } from 'react-redux';
 import MainSuit from '@components/MainSuit';
 import {CLEAR_COMSYMPTOMS,SHOW_TAIL,INSERT_MAIN,CLEAR_SEARCH,SET_SEARCH,SAVE_FREE,SET_DATA,INSERT_SEARCH,SETTEXTMODEVALUE} from '@store/types/mainSuit';
-import {RESET,CLICKCOUNT,ISREAD} from '@store/types/homePage.js';
+import {RESET,CLICKCOUNT} from '@store/types/homePage.js';
 import {getCommSymptoms,getCommSymptomPush} from '@store/async-actions/mainSuit.js'
 import {SET_MAIN_SUIT} from '@store/types/fillInfo';
 import {getSearch} from '@store/async-actions/fetchModules';
 import {billing} from '@store/async-actions/pushMessage';
-import {filterArr,didPushParamChange} from '@utils/tools.js';
+import {filterArr} from '@utils/tools.js';
 import config from '@config/index.js';
 import {Notify} from '@commonComp';
 
@@ -67,21 +67,12 @@ function mapDispatchToProps(dispatch) {
             type: SHOW_TAIL,
             info:obj.questionMapping
           })
-          dispatch({
-            type:ISREAD
-          })
         },
         insertMain:(item)=>{//将选中的常见症状插入
           dispatch({
             type: INSERT_MAIN,
             item
-          });
-          //右侧推送
-          setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-            if(didPushParamChange()){     //操作后内容有变化才推送
-              dispatch(billing);
-            }
-          },500);
+          })
         },
         getData(){//主诉使用模板
           dispatch({
@@ -93,7 +84,7 @@ function mapDispatchToProps(dispatch) {
       },
       pushMessage() {//结构模式右侧推送
         console.log("右侧推送接口");
-        dispatch(billing);
+        // dispatch(billing);
       },
       getSearchData:(item)=>{
         getSearch(item).then((res)=>{

+ 1 - 1
src/containers/MultSpread.js

@@ -2,7 +2,7 @@ import React from 'react';
 import {connect} from 'react-redux';
 import MultSpread from "@components/MultSpread";
 import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,CHANGEOTHERTEXTLABEL,OTHERADDLABELITEM} from '@types/otherHistory';
-import {CHANGECHECKTEXTLABEL,ADDLABELITEM} from '@types/checkBody.js';
+import {CHANGE_LABELVAL as CHANGECHECKTEXTLABEL,ADDLABELITEM} from '@types/checkBody.js';
 import {CHANGE_LABELVAL,MAINADDLABELITEM} from '@store/types/mainSuit.js';
 import {CURRENTADDLABELITEM} from '@store/types/currentIll.js';
 import {HIDE,RESET,CLICKCOUNT,SETADDITEMINIT} from '@store/types/homePage.js';

+ 2 - 12
src/containers/NumberDrop.js

@@ -2,14 +2,13 @@ import React from 'react';
 import {connect} from 'react-redux';
 import NumberDrop from "@components/NumberDrop";
 import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
-import {SETNUMBER4,CHANGECHECKTEXTLABEL} from '@types/checkBody.js';
+import {SETNUMBER as SETNUMBER4,CHANGE_LABELVAL as CHANGECHECKTEXTLABEL} from '@types/checkBody.js';
 import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP} from '@types/homePage.js';
 import {NUMBER_SELECT,CHANGE_LABELVAL} from '@store/types/mainSuit.js';
 import {getLabelIndex} from '@common/js/func.js';
 import {CURRENT_NUMBER,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
-import {billing} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
-import {filterArr,didPushParamChange} from '@utils/tools.js';
+import {filterArr} from '@utils/tools.js';
 import config from '@config/index.js';
 
 function mapStateToProps(state){
@@ -116,15 +115,6 @@ function mapDispatchToProps(dispatch,store){
   return {
     handleSelect(params){
       handleModuleDiff(dispatch,params);
-
-      //右侧推送
-      clearTimeout(timer);
-      let timer = setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
-          dispatch(billing);
-          clearTimeout(timer);
-        }
-      },config.delayPushTime);
     },
     handleDbclick(obj){
       dispatch({

+ 2 - 11
src/containers/NumberUnitDrop.js

@@ -2,14 +2,13 @@ import React from 'react';
 import {connect} from 'react-redux';
 import NumberUnitDrop from "@components/NumberUnitDrop";
 import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
-import {SETNUMBER4,CHANGECHECKTEXTLABEL} from '@types/checkBody.js';
+import {SETNUMBER as SETNUMBER4,CHANGE_LABELVAL as CHANGECHECKTEXTLABEL} from '@types/checkBody.js';
 import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP} from '@types/homePage.js';
 import {NUMBER_SELECT,CHANGE_LABELVAL} from '@store/types/mainSuit.js';
 import {getLabelIndex} from '@common/js/func.js';
 import {CURRENT_NUMBER,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
-import {filterArr,didPushParamChange} from '@utils/tools.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {filterArr} from '@utils/tools.js';
 import config from '@config/index.js';
 
 function mapStateToProps(state){
@@ -116,14 +115,6 @@ function mapDispatchToProps(dispatch,store){
   return {
     handleSelect(params){
       handleModuleDiff(dispatch,params);
-      //右侧推送
-      clearTimeout(timer);
-      let timer = setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
-          dispatch(billing);
-          clearTimeout(timer);
-        }
-      },config.delayPushTime);
     },
     handleDbclick(obj){
       dispatch({

+ 2 - 10
src/containers/RadioDrop.js

@@ -2,13 +2,12 @@ import React from 'react';
 import {connect} from 'react-redux';
 import RadioDrop from "@components/RadioDrop";
 import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
-import {SETSELECTED4,CHANGECHECKTEXTLABEL} from '@types/checkBody';
+import {SETSELECTED as SETSELECTED4,CHANGE_LABELVAL as CHANGECHECKTEXTLABEL} from '@types/checkBody';
 import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT} from '@types/homePage.js';
 import {RADIO_SELECT,CHANGE_LABELVAL} from '@store/types/mainSuit.js';
 import {CURRENT_RADIO,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
-import {filterArr,didPushParamChange} from '@utils/tools.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {filterArr} from '@utils/tools.js';
 import {getLabelIndex,fullfillText} from '@common/js/func.js';
 import config from '@config/index.js';
 
@@ -103,13 +102,6 @@ function mapDispatchToProps(dispatch,store){
       dispatch({
         type: HIDEDROP
       });
-
-      //右侧推送
-      setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
-          dispatch(billing);
-        }
-      },500);
     },
     handleDbclick(obj){//双击统计
       dispatch({

+ 6 - 23
src/containers/SpreadDrop.js

@@ -7,12 +7,11 @@ import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,ISREAD} from '@store/types/homePag
 import {getModules as fetchModules} from '@store/async-actions/fetchModules.js';
 import {getCommSymptomPush} from '@store/async-actions/mainSuit.js'
 import {GET_BIGDATAPUSH,MIX_CONFIRM,COMM_CONFIRM,CHANGE_LABELVAL} from '@store/types/mainSuit';
-import {SETCHECKBOX,CHANGECHECKTEXTLABEL} from '@types/checkBody';
+import {SETCHECKBOX,CHANGE_LABELVAL as CHANGECHECKTEXTLABEL} from '@types/checkBody';
 import {CURRENT_CONFIRM,SETMAINCHECKBOX,CURRENT_TEXT_LABEL,CURRENT_GET_BIGDATAPUSH} from '@types/currentIll';
 import {getLabelIndex,fullfillText,getIds} from '@common/js/func.js';
-import {billing} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
-import {filterArr,didPushParamChange} from '@utils/tools.js';
+import {filterArr} from '@utils/tools.js';
 import config from '@config/index.js';
 
 function mapStateToProps(state) {
@@ -111,30 +110,20 @@ function currentIll(dispatch,store,params){
 
 //其他史多选标签确定事件
 function otherHisConfirm(dispatch,store,params){
-  const {nones,exists,withs,exclusion,excluName,copyType} = params;
+  const {nones,exists,withs,exclusion,excluName} = params;
   // const ikey = params.ikey.substr(1,1);
   const index = params.ikey;
   let ikey = getLabelIndex(index);
   if(params.exclusion){
     dispatch({
       type: CONFIRMSELECTED,
-      data:{exclusion,excluName,ikey,copyType}
+      data:{exclusion,excluName,ikey}
     });
     return ;
   }
   let existsId = getIds(exists);
   let withsId = getIds(withs);
   const ids = existsId.join(",")+withsId.join(",");
-  if(!ids&&nones){      //只有无的项目
-    dispatch({
-      type: CONFIRMSELECTED,
-      data: {exists:[],withs:[],nones:nones,ikey,copyType}
-    });
-    dispatch({
-      type:ISREAD
-    });
-    return;
-  }
   // const ids = exists.join(",")+withs.join(",");
   let has = [],wes=[];
   //获取选中项目模板
@@ -149,7 +138,7 @@ function otherHisConfirm(dispatch,store,params){
       });
       dispatch({
         type: CONFIRMSELECTED,
-        data: {exists:fullfillText(has,false,false).newArr,withs:fullfillText(wes,false,false).newArr,nones:nones,ikey,copyType}
+        data: {exists:fullfillText(has,true,false).newArr,withs:fullfillText(wes,true,false).newArr,nones:nones,ikey}
       });
       dispatch({
         type:ISREAD
@@ -339,13 +328,7 @@ function mapDispatchToProps(dispatch,store){
         handleModuleDiff(dispatch,store,obj);
       }else if(obj.tagType == 2){//普通多选
         handleCheckBox(dispatch,store,obj);
-      }
-      //右侧推送
-      setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
-          dispatch(billing);
-        }
-      },500);
+      }  
     },
     handleHide(){
       dispatch({

+ 1 - 2
src/containers/eleType.js

@@ -94,8 +94,7 @@ function multCheckLabels(params,tagType){
                      ikey={showInx}
                      placeholder={data.name}
                      value={data.value}
-                     copyType={data.copyType}
-                     selecteds={selecteds ?selecteds[i]:[]}
+                     selecteds={selecteds ?selecteds[i]:{}}
                      show={showArr&&showArr[showInx]}
                      order={data.textGenerate}
                      type={boxMark}

+ 2 - 2
src/store/actions/checkBody.js

@@ -14,7 +14,7 @@ export function setNumberValue(state,action){
   const param = action.params;
   const ikey = param.ikey;
   let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
+  const subInx = ikey.substr(-1,1);
   let item = res.data[labelInx];
   if(+item.tagType===1){
     item.value = param.text;
@@ -39,7 +39,7 @@ export function setRadioValue(state,action){
   let res = Object.assign({},state);
   const {ikey,id,text} = action;
   let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
+  const subInx = ikey.substr(-1,1);
   let item = res.data[labelInx];
   if(typeof text != 'string'){    //需要展开项--有无治疗类型
     const len = +item.copyType === 0?1:0;

+ 2 - 2
src/store/actions/mainSuit.js

@@ -277,7 +277,7 @@ export function setNumberValue(state,action){
   const param = action.params;
   const index = param.ikey;
   let labelInx = getLabelIndex(index);
-  const subInx = index.substr(index.length-1);
+  const subInx = index.substr(-1,1);
   let item = res.data[labelInx];
   if(+item.tagType===1){
     item.value = param.text;
@@ -304,7 +304,7 @@ export function setRadioValue(state,action){
   let res = Object.assign({},state);
   const {ikey,id,text} = action;
   let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
+  const subInx = ikey.substr(-1,1);
   let item = res.data[labelInx];
   if(typeof text != 'string'){    //需要展开项--有无治疗类型
     const len = +item.copyType === 0?1:0;

+ 1 - 1
src/store/actions/pushMessage.js

@@ -72,7 +72,7 @@ export const addScheme = (state, action) => {
 				treatmentStr = treatmentStr + treatment[i].medicitionsList[j].medicitionName + ', '
 			}
 	}
-	treatment[i].treatmentStr = treatmentStr.substring(0,treatmentStr.length-2)
+	treatment[i].treatmentStr = treatmentStr.substring(0,treatmentStr.length-1)
   }
   treatItem.treatment = treatment;
   for (let i = 0; i < scheme.length; i++) {

+ 1 - 1
src/store/async-actions/copyRight.js

@@ -5,7 +5,7 @@ import { storageLocal } from "@utils/tools"
 export const getMessage = (dispatch, getState) => {
     const state = getState();
     // 请求地址
-    post('http://192.168.2.236/api/icss/versionInfo/getVersionInfoAlls')
+    post('/api/icss/versionInfo/getVersionInfoAlls')
     .then((data) => {
         
         const versionInfo = JSON.parse(storageLocal.get('versionInfo'));

+ 19 - 2
src/store/async-actions/fetchModules.js

@@ -3,7 +3,6 @@ import {SET} from '@types/checkBody.js';
 import {fullfillText} from '@common/js/func';
 import {SETDATA} from '@store/types/otherHistory';
 import store from '@store';
-import {getEMRParams} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import {SETOTHERHISTORY} from "../types/homePage";
 
@@ -15,6 +14,24 @@ const api={
   getBigPush:'/api/icss/push/pushInner',
   saveMode:'/api/icss/doctorPageMode/saveDoctorPageModes',
 };
+//获取病例输入的内容
+export const getEMRParams = ()=>{
+  const state = store.getState();
+  const {message} = state.patInfo;
+  const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
+  const main = mainSuit.saveText.join(",")||'',
+    current=currentIll.saveText.join(",")||'',
+    other = otherHistory.saveText.join(",")||'',
+    vital = checkBody.saveText.join(",")||'',
+    lis = inspect.pushItem,    //化验推送所需数据
+    pacs = assistCheck.dataString||'',
+    dis=diagnosticList.diagnosticStr||'',
+    advice = '',
+    diseaeId = [];
+  const age = message.patientAge;
+  const sex = message.sex;
+    return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age};
+};
 
 //获取模板,多个
 export const getModules = (ids)=>{
@@ -97,7 +114,7 @@ export function getInitData(){
       pacs: emrData.pacs,
       sex: emrData.sex,
       vital:emrData.vital,
-      symptom: emrData.current||emrData.main
+      symptom: emrData.current + emrData.main
     };
     json(api.getBigPush,param).then((res)=>{
       if(+res.data.code === 0){

+ 1 - 1
src/store/async-actions/mainSuit.js

@@ -1,6 +1,6 @@
 import {json} from '@utils/ajax.js';
 import {COMM_SYMPTOMS,SET_SEARCH,GET_BIGDATAPUSH} from '../types/mainSuit'
-import {getEMRParams} from '@utils/tools';
+import {getEMRParams} from '@store/async-actions/fetchModules';
 
 const host = '/api/icss/';
 const api = {

+ 1 - 5
src/store/async-actions/patInfo.js

@@ -5,7 +5,6 @@ import {getInfos} from '@store/actions/getInfoByUuid';
 import {getUrlArgObject,pushAllDataList} from '@utils/tools';
 import {getInitModules} from '@store/async-actions/homePage.js';
 import store from '@store'
-import {ISREAD} from "../types/homePage";
 
 const api = {
     getPatInfo: '/api/icss/patientInfo/getTopPatientInfo',
@@ -42,10 +41,7 @@ export const initHistoryDetails = (dispatch) => {
             const data = res.data;
             if (data.code == 0) {
                 const detail = data.data;
-                pushAllDataList(detail.sign,'push',detail,'history');
-                dispatch({
-                  type:ISREAD
-                });
+                pushAllDataList(detail.sign,'push',detail,'history')
                 // 设置初始模式
                 if(detail.sign == 1){
                     dispatch({

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

@@ -1,7 +1,7 @@
 import { get, post, json } from "@utils/ajax";
 import { BILLING_ADVICE, SET_TIPS } from '../types/pushMessage';
 import { SET_CLICK_DIAG } from '../types/diagnosticList';
-import {storageLocal,getEMRParams} from '@utils/tools';
+import { getEMRParams } from '@store/async-actions/fetchModules';
 
 const api={
   push:'/api/icss/push/pushInner',
@@ -27,7 +27,6 @@ export const billing = (dispatch, getState) => {
     vital:emrData.vital,
     symptom: emrData.current + emrData.main
   };
-  storageLocal.set('emrParam',params);      //推送数据存储,用作推送前对比是否有变,有变才推送
     json(url, params).then((data) => {
         let {dis, lab, pacs} = data.data.data||{};
         lab = lab||[];

+ 3 - 3
src/store/async-actions/treat.js

@@ -2,7 +2,7 @@ import { json } from "@utils/ajax";
 import { SET_TREAT } from '@store/types/diagnosticList';
 import { ADD_DIAGNOSTIC} from '@store/types/diagnosticList'; 
 import { SET_DRUG_INFO, SET_TREATMENT, SET_RECOMMEND_BASIC } from '@store/types/treat';
-import {getEMRParams} from  '@utils/tools';
+import {getEMRParams} from '@store/async-actions/fetchModules';
 const api={
     push:'/api/icss/push/pushInner',
     textPush:'/api/icss/push/pushText'
@@ -42,7 +42,7 @@ export const addDiagnostic = (item) => {
                 "other": emrData.other,
                 "pacs": emrData.pacs,
                 "sex": emrData.sex,
-                "symptom": emrData.current||emrData.main,
+                "symptom": emrData.current + emrData.main,
                 "vital": emrData.vital
             };
             
@@ -102,7 +102,7 @@ export const getTreatResult = (item) =>{
             "other": emrData.other,
             "pacs": emrData.pacs,
             "sex": emrData.sex,
-            "symptom": emrData.current||emrData.main,
+            "symptom": emrData.current + emrData.main,
             "vital": emrData.vital
         };
         

+ 3 - 4
src/store/types/checkBody.js

@@ -1,13 +1,12 @@
 export const SET = 'set_check_data';
-export const SETSELECTED4 = 'check_body_select';
-export const SETNUMBER4 = 'set_check_number_drop';
+export const SETSELECTED = 'check_body_select';
+export const SETNUMBER = 'set_check_number_drop';
 export const ADDLABELITEM = 'add_check_item';
 export const SETCHECKTEXT = 'set_check_text';
 export const SETCHECKBOX = 'set_check_checkbox_drop';
 export const SETSEARCHDATA = 'set_check_search_data';
 export const SELECTSEARCHDATA = 'select_check_search_data';
-//export const CHANGE_LABELVAL = 'change_check_text';
-export const CHANGECHECKTEXTLABEL = 'change_check_text';
+export const CHANGE_LABELVAL = 'change_check_text';
 export const CLEARCHECKBODY = 'clear_check_body';
 export const CHECK_FOCUS_INDEX = 'check_focus_text_index';
 export const CHECKBODY_CLEAR = 'clear_search_check_body';

+ 2 - 55
src/utils/tools.js

@@ -8,6 +8,7 @@ import {clearAllLabel} from '@store/actions/inspect';
 import {CLEAR_ALL_DIAG} from '@store/types/diagnosticList';
 import {CLEAR_ALL_PUSH_MESSAGE, SET_TIPS} from '@store/types/pushMessage';
 import {ISREAD, SETREADDITEMS} from "../store/types/homePage";
+/*import {Notify} from '@commonComp';*/
 
 /***
  * 工具函数
@@ -501,62 +502,11 @@ function preventDefault(event) {
         event.returnValue = false;
     }
 }
-
-//ie8添加解除事件兼容
-function windowEventHandler(type,func){
-    if(window.addEventListener){
-      window.addEventListener(type, func);
-    }else{
-      window.attachEvent('on'+type,func);
-    }
-}
-
-
 //禁止回车事件
 function handleEnter(event){
-    event = event?event:window.event;
     if(event.keyCode==13){return false;}
 }
 
-//获取病例输入的内容
-function getEMRParams(){
-  const state = store.getState();
-  const {message} = state.patInfo;
-  const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
-  const main = filterDataArr(mainSuit.saveText)||'',
-    current=filterDataArr(currentIll.saveText)||'',
-    other = filterDataArr(otherHistory.saveText)||'',
-    vital = filterDataArr(checkBody.saveText)||'',
-    lis = inspect.pushItem,    //化验推送所需数据
-    pacs = assistCheck.dataString||'',
-    dis=diagnosticList.diagnosticStr||'',
-    advice = '',
-    diseaeId = [];
-  const age = message.patientAge;
-  const sex = message.sex;
-  return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age};
-};
-
-function didPushParamChange(){
-  const emrData = getEMRParams();
-  const oldParams = storageLocal.get('emrParam');
-  const newParams = JSON.stringify({
-    age: emrData.age,
-    featureType: "5,6,7",
-    diag: emrData.dis,
-    lis: emrData.lis,
-    other: emrData.other,
-    pacs: emrData.pacs,
-    sex: emrData.sex,
-    vital:emrData.vital,
-    symptom: emrData.current + emrData.main
-  });
-  if(newParams == oldParams){
-      return false;
-  }
-  return true;
-}
-
 module.exports = {
     checkType: Type.checkType,
     regexp,
@@ -575,8 +525,5 @@ module.exports = {
     filterArr,
     filterDataArr,
     preventDefault,
-    handleEnter,
-    didPushParamChange,
-    getEMRParams,
-    windowEventHandler
+    handleEnter
 };

+ 1 - 1
static/pages/hisLib/infomation.js

@@ -28,7 +28,7 @@
                     return;
                 }
                 var list  = res.data.introduceDetailList;
-                $("h1").html(res.data.tagName);
+                $("h1").html(res.data.name);
                 //list.map((item,i) =>{
                 for(var i=0;i<list.length;i++) {
                     item = list[i];