Luolei vor 6 Jahren
Ursprung
Commit
2d40e6e0b4
64 geänderte Dateien mit 306 neuen und 921 gelöschten Zeilen
  1. 1 1
      index.html
  2. 5 6
      src/common/components/EditableSpan/index.jsx
  3. 1 1
      src/common/components/EditableSpan/index.less
  4. 2 2
      src/common/components/ItemBox/index.jsx
  5. 1 1
      src/common/components/ItemBox/index.less
  6. 0 1
      src/common/components/SearchOption/index.jsx
  7. 1 2
      src/common/components/TailInlineTag/index.less
  8. 2 17
      src/common/components/Textarea/index.jsx
  9. 1 1
      src/common/components/Textarea/index.less
  10. BIN
      src/common/images/icon_print_blue.png
  11. 3 47
      src/components/AddAssistCheck/index.jsx
  12. 1 7
      src/components/AddAssistCheck/index.less
  13. 6 63
      src/components/AddInspect/index.jsx
  14. 0 6
      src/components/AddInspect/index.less
  15. 6 20
      src/components/Banner/index.jsx
  16. 1 1
      src/components/Banner/index.less
  17. 1 0
      src/components/CopyRight/index.jsx
  18. 1 3
      src/components/CopyRight/index.less
  19. 6 9
      src/components/CurrentIll/index.jsx
  20. 1 1
      src/components/Diagnosis/index.jsx
  21. 2 2
      src/components/Diagnosis/index.less
  22. 1 1
      src/components/HistoryCaseContainer/HistoryList/index.less
  23. 1 1
      src/components/HistoryCaseContainer/index.less
  24. 1 2
      src/components/Inspect/index.jsx
  25. 17 26
      src/components/MainSuit/index.jsx
  26. 3 17
      src/components/Operation/index.jsx
  27. 1 1
      src/components/Operation/index.less
  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 12
      src/containers/EditableSpan.js
  35. 1 1
      src/containers/InlineTag.js
  36. 1 1
      src/containers/Inspect.js
  37. 4 13
      src/containers/MainSuit.js
  38. 1 1
      src/containers/MultSpread.js
  39. 2 12
      src/containers/NumberDrop.js
  40. 2 11
      src/containers/NumberUnitDrop.js
  41. 0 7
      src/containers/OtherHistory.js
  42. 2 10
      src/containers/RadioDrop.js
  43. 6 23
      src/containers/SpreadDrop.js
  44. 1 2
      src/containers/eleType.js
  45. 2 2
      src/store/actions/checkBody.js
  46. 10 15
      src/store/actions/currentIll.js
  47. 2 2
      src/store/actions/mainSuit.js
  48. 6 12
      src/store/actions/otherHistory.js
  49. 3 4
      src/store/actions/pushMessage.js
  50. 1 1
      src/store/async-actions/copyRight.js
  51. 18 1
      src/store/async-actions/fetchModules.js
  52. 1 1
      src/store/async-actions/mainSuit.js
  53. 1 5
      src/store/async-actions/patInfo.js
  54. 1 2
      src/store/async-actions/pushMessage.js
  55. 1 1
      src/store/async-actions/treat.js
  56. 5 5
      src/store/reducers/checkBody.js
  57. 3 4
      src/store/types/checkBody.js
  58. 1 1
      src/utils/ajax.js
  59. 1 1
      src/utils/config.js
  60. 2 55
      src/utils/tools.js
  61. 3 3
      static/pages/hisLib/infomation.js
  62. 0 119
      static/pages/test.html
  63. 0 75
      static/pages/test2.html
  64. 0 49
      static/pages/test3.html

+ 1 - 1
index.html

@@ -8,6 +8,6 @@
     <title>ICSS</title>
 </head>
 <body>
-<div id="root"></div> 
+<div id="root"></div>
 </body>
 </html>

+ 5 - 6
src/common/components/EditableSpan/index.jsx

@@ -74,14 +74,13 @@ class EditableSpan extends Component{
       let temp = '';
       let search='';
       clearTimeout(that.state.timer);
-      // temp = newText.replace(oldText.replace(/(^\s*)|(\s*$)/g,''),'');
-      temp = newText.replace(labelVal.replace(/(^\s*)|(\s*$)/g,''),'');
+      temp = newText.replace(oldText.replace(/(^\s*)|(\s*$)/g,''),'');
       search = temp.replace(/(^\s*)|(\s*$)/g,'');
-      // console.log(111,labelVal,333,newText,444,search);
+      //console.log(111,oldText,333,newText,444,search);
       handleSearch&&handleSearch({text:search,boxMark,mainIds});
-      /*that.setState({
-        oldText:newText.replace(search,'')
-      })*/
+      that.setState({
+        oldText:newText
+      })
     },config.delayTime);
     this.setState({
       timer

+ 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{

+ 2 - 2
src/common/components/ItemBox/index.jsx

@@ -29,10 +29,10 @@ class ItemBox extends Component {
   }
 
   render(){
-    const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop} = this.props;
+    const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur} = this.props;
     // console.log(title,editable)
     return <div className={style["box"]+" "+"clearfix"} >
-      <div className={style["title"] + ' ' + className} style={{marginTop:titleTop?'22px':''}}>{title}</div>
+      <div className={style["title"] + ' ' + className}>{title}</div>
       <div className={`${style["content"]} ${border?style["border"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={handleFocus} onInput={onchange} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur}>
         {fuzhen?children||fuzhen:children}
       </div>

+ 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 - 2
src/common/components/TailInlineTag/index.less

@@ -5,11 +5,10 @@
   padding: 0 3px 3px;
 }
 .tag-container{
-  margin:5px 2px;
+  margin:5px 0;
   display: inline-block;
   position: relative;
   cursor: pointer;
-  line-height: 14px;
   /* span:hover{
     color: @blue;
   } */

+ 2 - 17
src/common/components/Textarea/index.jsx

@@ -8,9 +8,7 @@ class Textarea extends Component {
   constructor(props) {
     super(props);
     this.state = {
-      timer:null,
-      inpText:'',
-      overFlag:false
+      timer:null
     };
     this.$dom = React.createRef();
     this.handleInput = this.handleInput.bind(this);
@@ -29,31 +27,18 @@ class Textarea extends Component {
   }
   handleInput(e){
     const {handleInput,boxMark,handlePush,hasMain} = this.props;
-    const {inpText,overFlag} = this.state;
     const text = e.target.innerText;
     const stimer = this.state.timer;
     if(boxMark=='1'&&text.length>config.limited){           //主诉字符数限制
-      e.target.innerText = text.substr(0,config.limited); 
+      e.target.innerText = text.substr(0,config.limited);
       e.target.blur();
       Notify.error(config.limitText);
-      if(overFlag){
-        e.target.innerText = inpText;
-        return
-      }
-      this.setState({
-        inpText:text.substr(0,config.limited),
-        overFlag:true
-      })
       return;
     }
     if(boxMark=='3'&&!hasMain){
       e.target.innerText = '';
       return;
     }
-    this.setState({
-      inpText:text,
-      overFlag:false
-    })
 
     //存值到store
     handleInput&&handleInput({text});

+ 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;

BIN
src/common/images/icon_print_blue.png


+ 3 - 47
src/components/AddAssistCheck/index.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { SearchOption, Calendar ,ConfirmModal,Notify} from '@commonComp';
+import { SearchOption, Calendar } from '@commonComp';
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
@@ -12,41 +12,11 @@ class AddAssistCheck extends React.Component {
             date: false,
             dateTime:"",
             active:'',
-            visible:false,
-            id:null
         }
         this.handleShowDate = this.handleShowDate.bind(this)
         this.getCurrentDate = this.getCurrentDate.bind(this)
         this.getSearchList = this.getSearchList.bind(this)
         this.getAssistLabel = this.getAssistLabel.bind(this)
-        this.handleDelClick = this.handleDelClick.bind(this)
-        this.delConfirm = this.delConfirm.bind(this)
-        this.handleCancel = this.handleCancel.bind(this)
-    }
-
-    handleDelClick(id){
-        this.setState({
-            visible:true,
-            id:id
-        })
-    }
-
-    delConfirm(){
-        const {handleDelAssist} = this.props;
-        const {id} = this.state;
-        handleDelAssist&&handleDelAssist(id)
-        this.setState({
-            visible:false,
-            id:null
-        })
-        Notify.success("删除成功");
-    }
-
-    handleCancel(){
-        this.setState({
-            visible:false,
-            id:null
-        })
     }
 
     componentDidMount() {
@@ -66,7 +36,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({
@@ -130,7 +100,7 @@ class AddAssistCheck extends React.Component {
                         <div>
                             <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                             <i onClick={()=>this.handleShowDate(idx)}></i>
-                            <a href="javascript:void(0);" onClick={(idx)=>{this.handleDelClick(idx)}}></a>
+                            <a href="javascript:void(0);" onClick={()=>{handleDelAssist(idx)}}></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>
@@ -146,7 +116,6 @@ class AddAssistCheck extends React.Component {
     }
     render() {
         const { handleChangeValue, list } = this.props;
-        const { visible } = this.state;
         return (
             <div className={styles.wrapper}>
                 {this.getAssistLabel()}
@@ -156,19 +125,6 @@ class AddAssistCheck extends React.Component {
                         {this.getSearchList(list)}
                     </SearchOption>
                 </div>
-                <ConfirmModal 
-                    visible={visible}
-                    confirm={()=>{this.delConfirm()}}
-                    close={this.handleCancel}
-                    cancel={this.handleCancel}
-                    okText="删除"
-                    cancelText='取消'
-                    okBorderColor={'#3B9ED0'}
-                    okColor={'#fff'}
-                    oKBg={'#3B9ED0'}
-                >
-                    <p className={styles['center']}>是否删除该辅检项?</p>
-                </ConfirmModal>
             </div>
         )
     }

+ 1 - 7
src/components/AddAssistCheck/index.less

@@ -84,7 +84,7 @@
             display: inline-block;
             height: 18px;
             line-height: 18px;
-            // border-bottom: 1px solid #333;
+            border-bottom: 1px solid #333;
             box-sizing: border-box;
             // margin-right: 8px;
         }
@@ -101,10 +101,4 @@
         }
     }
 }
-.center {
-    text-align: center;
-    font-size: 16px;
-    padding-top: 10px;
-    padding-bottom: 50px;
-}
 

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

@@ -1,5 +1,5 @@
 import React from 'react';
-import { SearchOption, InspectCommon, Calendar ,Notify,ConfirmModal} from '@commonComp';
+import { SearchOption, InspectCommon, Calendar } from '@commonComp';
 import { deepClone } from '@utils/tools';
 import styles from './index.less';
 import date1 from './img/date1.png';
@@ -20,10 +20,6 @@ class Inspect extends React.Component {
             currentData:{},
             numPlus:0,     //判断是否所有的填写单都是空
             num:0,            //暂存数据,获取一次,不能每次都是新的数据
-            toastText:'',
-            visible:false,
-            type:null,
-            id:null
         }
         this.handleChangeDate = this.handleChangeDate.bind(this)
         this.handleShowDate = this.handleShowDate.bind(this)
@@ -33,47 +29,8 @@ class Inspect extends React.Component {
         this.changeActivePart = this.changeActivePart.bind(this)
         this.normalVal = this.normalVal.bind(this)
         this.showDetails = this.showDetails.bind(this)
-        this.delConfirm = this.delConfirm.bind(this)
-        this.handleCancel = this.handleCancel.bind(this)
-    }
-    delConfirm(){//弹窗确定
-        const{delPartItem,handleCloseExcel} = this.props;
-        const{type,id} = this.state;
-        if(type==1){
-            delPartItem(id)
-        }else if(type==2){
-            handleCloseExcel(id)
-        }
-        this.setState({
-            visible:false,
-            type:null,
-            id:null,
-        })
-        Notify.success("删除成功");
-    }
-    handleDelClick(type,idx){
-        this.setState({
-            type:type,
-            id:idx,
-            visible:true
-        })
-        if(type==1){//单项
-            this.setState({
-                toastText:'是否删除该化验项?'
-            })
-        }else if(type==2){//导入项
-            this.setState({
-                toastText:'是否删除导入项?'
-            })
-        }
-    }
-    handleCancel(){
-        this.setState({
-            visible:false,
-            type:null,
-            id:null,
-        })
     }
+
     componentDidMount() {
         $(document).click((event) => {
             let searchWrap = $('#searchWrap')[0];   // 搜索按钮
@@ -104,7 +61,7 @@ class Inspect extends React.Component {
     handleSearchShow(e) {
         let tmpShow = this.state.show;
         this.setState({ show: !tmpShow })
-        // e.stopPropagation();
+        e.stopPropagation();
     }
     handleFillShow(e,idx) {
         let tmpShow = this.state.showFill;
@@ -114,7 +71,7 @@ class Inspect extends React.Component {
             currentIdx:idx,
             currentData:baseList
         })
-        // e.stopPropagation();
+        e.stopPropagation();
     }
     handleShowDate(){
         this.setState({
@@ -259,7 +216,6 @@ class Inspect extends React.Component {
     }
     render() {
         const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel } = this.props;
-        const {toastText,visible} = this.state;
         return (
             <div className={styles.wrapper}>
                 <div className={styles.check}>
@@ -268,7 +224,7 @@ class Inspect extends React.Component {
                             return <div style={{marginTop:'10px'}}>
                                 {
                                     items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
-                                    <img className={styles.close} src={close} alt="关闭导入excel数据" onClick={(idx)=>{this.handleDelClick(2,idx)}}/>
+                                    <img className={styles.close} src={close} alt="关闭导入excel数据" onClick={()=>{handleCloseExcel(idx)}}/>
                                     {
                                         items.lisExcelRes.map((item,idx)=>{
                                             return <li className={styles.excelDataLis} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
@@ -367,7 +323,7 @@ class Inspect extends React.Component {
                                             : null
                                         }
                                     </div>
-                                    <img className={styles.partDel} src={close} alt="删除项" onClick={(idx)=>{this.handleDelClick(1,idx)}}/>
+                                    <img className={styles.partDel} src={close} alt="删除项" onClick={()=>{delPartItem(idx)}}/>
                                 </li>
                             })
                         }
@@ -379,19 +335,6 @@ class Inspect extends React.Component {
                         {this.getSearchList(list)}
                     </SearchOption>
                 </div>
-                <ConfirmModal 
-                    visible={visible}
-                    confirm={()=>{this.delConfirm()}}
-                    close={this.handleCancel}
-                    cancel={this.handleCancel}
-                    okText="删除"
-                    cancelText='取消'
-                    okBorderColor={'#3B9ED0'}
-                    okColor={'#fff'}
-                    oKBg={'#3B9ED0'}
-                >
-                    <p className={styles['center']}>{toastText}</p>
-                </ConfirmModal>
             </div>
         )
     }

+ 0 - 6
src/components/AddInspect/index.less

@@ -189,10 +189,4 @@
             }
         }
     }
-}
-.center {
-    text-align: center;
-    font-size: 16px;
-    padding-top: 10px;
-    padding-bottom: 50px;
 }

+ 6 - 20
src/components/Banner/index.jsx

@@ -10,8 +10,7 @@ class Banner extends Component {
   constructor(props){
     super(props)
     this.state = {
-      mode: props.typeConfig,
-      zIndex:40
+      mode: props.typeConfig
     };
     this.showConfigModal = this.showConfigModal.bind(this);
     this.closeConfigModal = this.closeConfigModal.bind(this);
@@ -21,17 +20,13 @@ class Banner extends Component {
 
   showConfigModal(){
     this.setState({
-      mode:this.props.typeConfig,
-      zIndex:202
+      mode:this.props.typeConfig
     });
     this.props.showConfigModal()
   }
 
   closeConfigModal(){
     this.props.closeConfigModal();
-    this.setState({
-      zIndex:40
-    })
   }
 
   changeType(typeConfig){
@@ -41,17 +36,8 @@ class Banner extends Component {
   }
 
   confirmType(){
-    const {typeConfig,confirmType} = this.props;
-    const mode = this.state.mode;
-    if(mode==typeConfig){
-      this.closeConfigModal()
-      return;
-    }
-    confirmType&&confirmType(mode);
+    this.props.confirmType(this.state.mode);
     this.closeConfigModal()
-    this.setState({
-      zIndex:40
-    })
   }
   /*componentDidUpdate(){
     const {failed} = this.props;
@@ -62,11 +48,11 @@ class Banner extends Component {
   }*/
   render() {
     const {visible} = this.props;
-    const {mode,zIndex} = this.state;
+    const {mode} = this.state;
     const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
 
     return (
-      <div className={style["logo"]} style={{zIndex:zIndex}}>
+      <div className={style["logo"]} >
         <img src={logo} />
         <span>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]} onClick={showConfigModal}>
@@ -77,7 +63,7 @@ class Banner extends Component {
           <div className={style['shade']}></div>
           <div className={style['content']}>
             <div className={style['close']}>设置<img src={close} onClick={closeConfigModal} /></div>
-            <p className={style['title']}>模式切换<i>(模式说明:切换模式会清空当前所有的数据)</i></p>
+            <p className={style['title']}>模式切换<i>(模式说明:切换模式会清空当前主诉、现病史、其他史填入的数据)</i></p>
             <ul>
               <li className={+mode===0?style['selected']:''} onClick={() => changeType(0)}><img src={ok} />智能推送模式</li>
               <li className={+mode===1?style['selected']:''} onClick={() => changeType(1)}><img src={ok} />纯文本模式</li>

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

@@ -9,7 +9,7 @@
     position: fixed;          //页面布局调整
     width: 100%;
     top: 0;
-    // z-index: 202;
+    z-index: 202;
 
     img{
       vertical-align: middle;

+ 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()
     }

+ 1 - 3
src/components/CopyRight/index.less

@@ -50,7 +50,7 @@
         left: 50%;
         margin-left: -410px;
         background: #fff;
-        top: 20%;
+        top: 65px;
        
         img{
           float: right;
@@ -74,8 +74,6 @@
         }
         .content {
           padding: 10px;
-          max-height: 400px;
-          overflow: auto;
         }
       }
     }

+ 6 - 9
src/components/CurrentIll/index.jsx

@@ -49,15 +49,12 @@ class CurrentIll extends Component{
       if(data.length==0){//第一次聚焦去设置现病史的data
         setData && setData({useEmpty,num,mainData,mainIds});//是否使用空模板 及数据处理
       }
-      const showTimer = setTimeout(function(){
-        that.setState({
-          showMoudle:true,
-          forbidInput:false,
-          boxEditable:false,
-        })
-        changeEditIll(false)
-      },150)
-      clearTimeout(showTimer);
+      this.setState({
+        showMoudle:true,
+        forbidInput:false,
+        boxEditable:false,
+      })
+      changeEditIll(false)
     }
 
   }

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

@@ -43,7 +43,7 @@ class Diagnosis extends Component {
         
         
         return (<div>
-            <ItemBox  id="diagnosis" title='诊断'  boxHeight='auto' titleTop='22px'>
+            <ItemBox  id="diagnosis" title='诊断'  boxHeight='auto'>
                 <DiagnosticList></DiagnosticList>
                 <div><span id='addDiag' className={style['add-diag']} onClick={this.handleshowSearch}>添加诊断结果</span></div>
                 <DiagResultSearch></DiagResultSearch>

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

@@ -1,6 +1,6 @@
 .add-diag {
-    height: 50px;
-    line-height: 50px;
+    height: 32px;
+    line-height: 32px;
     padding: 0 10px;
     color: #767676;
     cursor: pointer;

+ 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.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 - 2
src/components/Inspect/index.jsx

@@ -65,8 +65,7 @@ class Inspect extends React.Component {
                 if( files.length ){
                     console.log(files[0])
                     FileAPI.upload({
-                        // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
-                        url: api.upload,
+                        url: 'http://192.168.2.236/api/icss/lisExcelRes/lisExcelAnalysis',
                         data:{ hospitalCode:baseData == '{}'? '' : baseData.hospitalCode },
                         files: { uploadfile: files[0] },
                         headers:{

+ 17 - 26
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,30 +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);
-      if(overFlag){
-        e.target.innerText = inpText;
-        e.target.blur();
-        return
-      }
-      e.target.innerText = data.substr(0,config.limited);  //输入法内输入多个字再按enter的情况
+    if(data.trim().length > config.limited){
+      e.target.innerText = data.substr(0,config.limited);
       e.target.blur();
+      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;
@@ -175,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());
     // 延时关闭常见症状下拉,不延时会影响选中
@@ -215,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} 

+ 3 - 17
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,8 +22,7 @@ class Operation extends Component {
       okColor: '',
       oKBg: '',
       msg: '',
-      type: '',
-      zIndex:40
+      type: ''
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -36,31 +35,19 @@ 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()
   }
 
@@ -257,9 +244,8 @@ 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']} style={{zIndex:zIndex}}>
+    return <div className={style['container']} >
       <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/Operation/index.less

@@ -7,7 +7,7 @@
     left: 10px;
     right: 480px;
     background-color: #fff;
-    // z-index: 240;
+    z-index: 240;
     padding-bottom: 10px;
     border-bottom: 10px solid #e4e6e7;
     .button {

+ 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) {
@@ -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 - 12
src/containers/EditableSpan.js

@@ -5,11 +5,8 @@ import {SET_SEARCH,MAIN_FOCUS_INDEX,CLEAR_SEARCH,SETMAINTEXT} from '@types/mainS
 import {SETOTHERTEXT,SETOTHERSEARCHDATA,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR} from '@types/otherHistory';
 import {SET_CURRENT_SEARCH,CURRENT_CLEAR,SETCURRENTTEXT,CURRENT_FOCUS_INDEX} from '@types/currentIll';
 import {getSearch} from '@store/async-actions/fetchModules.js';
-import {billing} from '@store/async-actions/pushMessage';
-import {didPushParamChange} from '@utils/tools.js';
 import {SETTEXTFOCUS} from '@types/homePage';
 import {RESET,SETDROPSHOW} from "@store/types/homePage";
-import config from '@config/index.js';
 
 function mapStateToProps(state){//console.log(state)
   return {
@@ -52,7 +49,7 @@ function checkBodySearch(obj){
   return (dispatch)=>{
     const text = obj.text.replace(/\,/,'');
     getSearch({boxMark:4,inpStr:text}).then((res)=>{
-      if(res.data.code=='0'){
+      if(res.data.code=='0'){console.log(obj,text)
         dispatch({
           type:SETSEARCHDATA,
           data:res.data.data,
@@ -164,14 +161,6 @@ function mapDispatchToProps(dispatch,state) {
         default:
           break;
       }
-      //右侧推送
-      clearTimeout(timer);
-      let timer = setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
-          dispatch(billing);
-          clearTimeout(timer);
-        }
-      },config.delayPushTime);
     },
     handleSearch(obj){
       switch (+obj.boxMark){

+ 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,

+ 1 - 1
src/containers/Inspect.js

@@ -25,7 +25,7 @@ function mapDispatchToProps(dispatch, store) {
         },
         handleLabelSub(e,id,idx){
             dispatch(fillActived(id,idx))
-            // e.stopPropagation()
+            e.stopPropagation()
         },
         handleClear(e,idx){
             e.stopPropagation();

+ 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({

+ 0 - 7
src/containers/OtherHistory.js

@@ -6,7 +6,6 @@ import {HIDE,RESET} from '@store/types/homePage.js';
 import {getModule} from '@store/async-actions/fetchModules.js';
 import {billing} from '@store/async-actions/pushMessage';
 import {fullfillText} from '@common/js/func';
-import {didPushParamChange} from '@utils/tools.js';
 
 function mapStateToProps(state){
   const {otherHistory,homePage,typeConfig,mainSuit} = state;
@@ -45,12 +44,6 @@ function mapDispatchToProps(dispatch,store){
           save:listObj.saveText
         });
       });
-      //右侧推送
-      setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
-          dispatch(billing);
-        }
-      },500);
     },
     fetchModules(param){
       const {id,name,index,span} = param;

+ 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}
       });
     }
   });
@@ -336,13 +325,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;

+ 10 - 15
src/store/actions/currentIll.js

@@ -122,8 +122,7 @@ export const setData = (state,action) =>{
       let newMainCopy = JSON.parse(JSON.stringify(mainCopy));
       let ind = 0;
       let insertInd = 0;
-      // let preLength = 0;
-      let lengArr=[];
+      let preLength = 0;
       for(let k=0; k <mainCopy.length;k++){
           mainLabelModuleArr.map((v,i)=>{
             if(mainCopy[k].id==v.id){
@@ -131,15 +130,11 @@ export const setData = (state,action) =>{
               // newMainCopy.splice(k+1,0,...v.questionMapping);
               let items = v.questionMapping.filter((item)=>{
                               return item.symptomType==0||item.symptomType==1;
-                            })  
-              lengArr[k] = items.length;  //每一个主诉尾巴长度        
-              /*if(ind==1){
+                            })            
+              if(ind==1){
                 preLength = items.length;
               }else{
                 insertInd += preLength;
-              }*/
-              if(ind>1){
-                insertInd += lengArr[k-1];
               }
               newMainCopy.splice(k+insertInd+1,0,...items);
             }
@@ -228,11 +223,11 @@ export const confirm = (state,action) =>{
   
   // 无 不用展开
   let lengthN = withsArr.length - length1;
-  let noneArr = JSON.parse(JSON.stringify(withsArr));  
-  if(nones.length>1){//只点无不上去
-    const nonesName = nones.slice(0,nones.length-1)+',';
-    const noneObj = Object.assign({},JSON.parse(config.textLabel),{name:nonesName,value:nonesName});
-    const none = nones?noneObj:'';
+  let noneArr = JSON.parse(JSON.stringify(withsArr));
+  const nonesName = nones.slice(0,nones.length-1)+',';
+  const noneObj = Object.assign({},JSON.parse(config.textLabel),{name:nonesName,value:nonesName});
+  const none = nones?noneObj:'';
+  if(nones){
     noneArr.splice(parseInt(ikey)+lengthN,0,none);
   }
 
@@ -264,7 +259,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;
@@ -289,7 +284,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;

+ 6 - 12
src/store/actions/otherHistory.js

@@ -5,7 +5,7 @@ import {getLabelIndex,fullfillText} from '@common/js/func.js';
 export const confirm = (state,action) =>{
   let res = Object.assign({},state);
   let arr = res.data;
-  const {nones,exists,withs,ikey,exclusion,excluName,copyType} = action.data;
+  const {nones,exists,withs,ikey,exclusion,excluName} = action.data;
   //选中互斥项
   if(exclusion){
     arr[ikey].value = excluName;
@@ -17,8 +17,8 @@ export const confirm = (state,action) =>{
   //只有无的项目选中
   if(arr[ikey].value)  arr[ikey].value= '';
   if([...exists,...withs].length==0&&nones){
-    const newPreText = arr[ikey-1].name+nones;//console.log(arr[ikey-1],newPreText)
-    arr[ikey-1].value = newPreText;
+    const newPreText = arr[ikey-1].name+nones;
+    arr[ikey-1] = Object.assign({},arr[ikey-1],{name:newPreText});
     res.saveText[ikey-1] = newPreText;
     res.update=Math.random();
     return res;
@@ -30,13 +30,7 @@ export const confirm = (state,action) =>{
     withDatas[0].value=withs.length>0?"伴":'';
   }*/
   //const text = Object.assign({},JSON.parse(config.textLabel),{value:"伴"}):undefined;
-  if(+copyType===1){       //原标签保留
-    arr.splice(ikey-1,0,...exists,...withs);
-  }else{                 //替换原标签
-    arr.splice(ikey,1);
-    arr.splice(ikey-1,1,...exists,...withs);
-  }
-
+  arr.splice(ikey-1,0,...exists,...withs);
   res.update=Math.random();         //用于触发组件更新(data变化了因在对象中无法被组件检测到)
   return res;
 };
@@ -46,7 +40,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;
@@ -93,7 +87,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;

+ 3 - 4
src/store/actions/pushMessage.js

@@ -44,12 +44,11 @@ function getAdviceStr(advice) {
 			if(scheme[i].treatment[j].treatmentStr === '') {
 				AdviceStr = AdviceStr + scheme[i].treatment[j].treatmentStr
 			} else {
-				AdviceStr = AdviceStr + ', ' + scheme[i].treatment[j].treatmentStr
+				AdviceStr = AdviceStr.substring(1, AdviceStr.length) + ', ' + scheme[i].treatment[j].treatmentStr
 			}
 			
 		}
 	}
-	AdviceStr = AdviceStr.substring(1, AdviceStr.length)
 	if(assay || check)  { 
 		AdviceStr = assay + check +'; ' + AdviceStr;
 	}	
@@ -73,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++) {
@@ -93,7 +92,7 @@ export const addScheme = (state, action) => {
    //将同类药添加到一起
 	for (let i = 0; i < scheme[RepeatIndex].treatment.length; i++) {
 		for (let j = 0; j < treatment.length; j++) {
-			if (scheme[RepeatIndex].treatment[i].id === treatment[j].id && scheme[RepeatIndex].treatment[i].drugsName === treatment[j].drugsName) {
+			if (scheme[RepeatIndex].treatment[i].id === treatment[j].id) {
 				for(let z = 0; z < treatment[j].medicitionsList.length; z++) {
 					if(treatment[j].medicitionsList[z].selected) {
 						if(scheme[RepeatIndex].treatment[i].treatmentStr !== '') {

+ 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('/api/icss/versionInfo/getVersionInfoAlls')
+    post('http://192.168.2.236/api/icss/versionInfo/getVersionInfoAlls')
     .then((data) => {
         
         const versionInfo = JSON.parse(storageLocal.get('versionInfo'));

+ 18 - 1
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)=>{

+ 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||[];

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

@@ -1,7 +1,7 @@
 import { json } from "@utils/ajax";
 import { SET_TREAT } 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'

+ 5 - 5
src/store/reducers/checkBody.js

@@ -1,5 +1,5 @@
-import {SET,SETNUMBER4,SETSELECTED4,SETCHECKBOX,ADDLABELITEM,SETCHECKTEXT,SETSEARCHDATA,
-  SELECTSEARCHDATA,CHANGECHECKTEXTLABEL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,SETCHECKINPUT} from '../types/checkBody.js';
+import {SET,SETNUMBER,SETSELECTED,SETCHECKBOX,ADDLABELITEM,SETCHECKTEXT,SETSEARCHDATA,
+  SELECTSEARCHDATA,CHANGE_LABELVAL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,SETCHECKINPUT} from '../types/checkBody.js';
 import {set,setNumberValue,setRadioValue,setCheckBoxValue,addLabelItem,setCheckText,setSearchData,insertLabelData,changeLabelVal,clearCheckBody,setInputLabel} from '../actions/checkBody.js';
 import config from '@config/index.js';
 
@@ -15,9 +15,9 @@ export default function(state=initState,action){
   switch(action.type){
     case SET:
       return set(state,action);
-    case SETNUMBER4:
+    case SETNUMBER:
       return setNumberValue(state,action);
-    case SETSELECTED4:
+    case SETSELECTED:
       return setRadioValue(state,action);
     case ADDLABELITEM:
       return addLabelItem(state,action);
@@ -31,7 +31,7 @@ export default function(state=initState,action){
       return insertLabelData(state,action);
     case CLEARCHECKBODY:
       return clearCheckBody(state,action);
-    case CHANGECHECKTEXTLABEL://改变标签值
+    case CHANGE_LABELVAL://改变标签值
       return changeLabelVal(state,action);
     case CHECK_FOCUS_INDEX:
       res.focusIndex = action.index;

+ 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';

+ 1 - 1
src/utils/ajax.js

@@ -62,7 +62,7 @@ const json=(url,data)=>{
   return new Promise((resolve,reject)=>{
     $.ajax({
       method:'post',
-      url:url,
+      url:'http://192.168.2.236:5050'+url,
       data:JSON.stringify(data),
       contentType:"application/json; charset=UTF-8",
       success:function(res){

+ 1 - 1
src/utils/config.js

@@ -1,5 +1,5 @@
 // const host='http://192.168.3.100:5050';//王峰
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.236:5050';//后端接口访问地址
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:8080'; //周铁刚
 // const newIcssVisitUrl = '223.93.170.82:13000';    //icss服务访问地址(跳转目的地),不能加http://

+ 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
 };

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

@@ -3,8 +3,8 @@
     function getInfomation(){
         // var infoUrl ="http://" + window.location.host+'/icss-web/kl/introduce/get_by_itemidAndType';
         // var infoUrl ="http://" + window.location.host+'/api/icss/introduceInfo/getByQuestionId';
-        var infoUrl ='/api/icss/introduceInfo/getByQuestionId'
-        var imageUrlPrefix = 'http://192.168.2.241:82'
+        var infoUrl ='http://192.168.2.236:5050/api/icss/introduceInfo/getByQuestionId'
+        var imageUrlPrefix = 'http://192.168.2.236:82'
         var urlParam = parseUrlParams();
         console.log(urlParam)
         var param = {
@@ -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];

+ 0 - 119
static/pages/test.html

@@ -1,119 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>Document</title>
-    <style>
-        .upload-btn {
-            width: 130px;
-            height: 25px;
-            overflow: hidden;
-            position: relative;
-            border: 3px solid #06c;
-            border-radius: 5px;
-            background: #0cf;
-        
-        }
-            .upload-btn:hover {
-                background: #09f;
-            }
-            .upload-btn__txt {
-                z-index: 1;
-                position: relative;
-                color: #fff;
-                font-size: 18px;
-                font-family: "Helvetica Neue";
-                line-height: 24px;
-                text-align: center;
-                text-shadow: 0 1px 1px #000;
-            }
-            .upload-btn input {
-                top: -10px;
-                right: -40px;
-                z-index: 2;
-                position: absolute;
-                cursor: pointer;
-                opacity: 0;
-                filter: alpha(opacity=0);
-                font-size: 50px;
-            }
-        </style>
-        <script src="../dist/jQuery.js"></script>
-        <script>
-        
-          window.onload=function(){
-              document.documentElement.focus()
-            } 
-        </script>
-
-    <script>
-        var FileAPI = {
-            // @default: "./dist/"
-            staticPath: './dist/',
-
-            // @default: FileAPI.staticPath + "FileAPI.flash.swf"
-            flashUrl: './dist/FileAPI.flash.swf',
-
-            // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
-            flashImageUrl: './dist/FileAPI.flash.image.swf'
-        };
-    </script>
-    <script src="../dist/FileAPI.js"></script>
-
-</head>
-<body>
-    <div>
-        <div class="js-fileapi-wrapper upload-btn">
-            <div class="upload-btn__txt">Choose files</div>
-            <input id="choose" name="uploadfile" type="file" multiple />
-        </div>
-    </div>
-    
-    <script>
-        $(function(){
-            $('iframe').bind( 'load', function(){} )
-            FileAPI.debug = true
-            $.support.cors = true;
-            var choose = document.getElementById('choose');
-            FileAPI.event.on(choose, 'change', function (evt){
-                var files = FileAPI.getFiles(evt);
-                FileAPI.filterFiles(files, function (file, info){
-                    return	true;
-                }, 
-                function (files, rejected){
-                    if( files.length ){
-                        FileAPI.upload({
-                            dataType: 'string',
-                            url: 'http://192.168.2.236/api/icss/lisExcelRes/lisExcelAnalysis',
-                            files: { 
-                                // 'hospitalCode':'A001',
-                                'uploadfile': files[0]
-                            },
-                            headers:{
-                                // 'Content-Type':'Content-Type: multipart/form-data;'
-                                // 'Content-Type':'application/json;charset=UTF-8'
-                                // 'Content-type': "text/plain"
-                            },
-                            progress: function (evt){ 
-                                console.log(files,1111)
-                                alert(7)
-                            },
-                            complete: function (err, xhr){
-                                alert(9999)
-                                if( !err ){
-                                    var result = xhr.responseText;
-                                    alert(JSON.parse(result).code == 0?'成功':'失败')
-                                }else{
-                                    alert(9)
-                                }
-                            }
-                        });
-                    }
-                });
-            });
-        })
-    </script>
-</body>
-</html>

+ 0 - 75
static/pages/test2.html

@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta http-equiv="X-UA-Compatible" content="ie=8">
-    <title>Document</title>
-
-    <script src="./dist/jquery-1.9.1.min.js"></script>
-    <script src="./dist/jquery.form.js"></script>
-
-</head>
-<body>
-<div>
-    <form id="tForm" action='http://192.168.2.236:5050/api/icss/lisExcelRes/lisExcelAnalysis' enctype="multipart/form-data" method="post" name="fileForm">
-        <input type="hidden" value="A001" name="hospitalCode"/>
-        <label for="upload">
-            <input type="file" id="upload" class="file" name="uploadfile"/>
-        </label>
-        <input type="submit" value="Submit 1" name="uploadSubmitter1">
-    </form>
-</div>
-
-<script>
-  /*function subimtBtn() {
-    var form = $("form[name=fileForm]");console.log(111)
-    var options = {
-      url:'http://192.168.2.241:5050/api/icss/lisExcelRes/lisExcelAnalysis', //上传文件的路径
-      type:'post',
-      data:{hospitalCode:'A001',uploadfile:$("#upload").value},
-      success:function(data,a){
-        console.log(222,JSON.stringify(data));
-        //....       //异步上传成功之后的操作
-      },
-      complete:function(data,a){
-        console.log(111,JSON.stringify(data));
-        //....       //异步上传成功之后的操作
-      }
-    };
-    form.ajaxSubmit(options);
-  }*/
-  /*$(function(){
-    $('iframe').bind( 'load', function(){} )
-    FileAPI.debug = true
-    $.support.cors = true;
-    var choose = document.getElementById('upload');
-    FileAPI.event.on(choose, 'change', function (evt){
-      var files = FileAPI.getFiles(evt);console.log(files[0])
-      FileAPI.filterFiles(files, function (file, info){
-          return	true;
-        },
-        function (files, rejected){
-          if( files.length ){
-            var form = $("form[name=fileForm]");
-            var options = {
-              url:'http://192.168.3.98:5050/api/icss/lisExcelRes/lisExcelAnalysis', //上传文件的路径
-              type:'post',
-              data:{hospitalCode:'A001'},
-              files: { uploadfile: files[0] },
-              success:function(data){
-                console.log(JSON.stringify(data));
-                //....       //异步上传成功之后的操作
-              },
-              complete:function(s){
-                console.log(222,JSON.stringify(s));
-              }
-            };
-            form.ajaxSubmit(options);
-          }
-        });
-    });
-  })*/
-</script>
-</body>
-</html>

+ 0 - 49
static/pages/test3.html

@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head runat="server">
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title></title>
-    <script src="dist/jquery-1.7.1.js"></script>
-    <script src="dist/ajaxfileupload.js"></script>
-</head>
-<body>
-<p><input type="file" id="file1" name="file" /></p>
-<input type="button" value="上传" />
-<p><img id="img1" alt="上传成功" src="" /></p>
-
-<script>
-  $(function () {
-    //$.support.cors = true;
-    $(":button").click(function () {
-      ajaxFileUpload();
-    })
-  })
-  function ajaxFileUpload() {
-    $.ajaxFileUpload
-    (
-      {
-        url: 'http://192.168.2.236:5050/api/icss/lisExcelRes/lisExcelAnalysis', //用于文件上传的服务器端请求地址
-        fileElementId: 'file1', //文件上传空间的id属性  <input type="file" id="file" name="file" />
-        dataType: 'json', //返回值类型 一般设置为json
-        success: function (data, status)  //服务器成功响应处理函数
-        {
-          $("#img1").attr("src", data.imgurl);
-          if (typeof (data.error) != 'undefined') {
-            if (data.error != '') {
-              alert(data.error);
-            } else {
-              alert(data.msg);
-            }
-          }
-        },
-        error: function (data, status, e)//服务器响应失败处理函数
-        {
-          alert(e);
-        }
-      }
-    )
-    return false;
-  }
-</script>
-</body>
-</html>