فهرست منبع

Merge branch 'dev/new1' into dev/byll

Luolei 6 سال پیش
والد
کامیت
d01d40bd96
62فایلهای تغییر یافته به همراه636 افزوده شده و 231 حذف شده
  1. 13 9
      src/common/components/EditableSpan/index.jsx
  2. 19 2
      src/common/components/ItemBox/index.jsx
  3. 2 2
      src/common/components/Notify/index.js
  4. 3 1
      src/common/components/NumberPan/index.jsx
  5. 4 1
      src/common/components/NumberPan/index.less
  6. 3 1
      src/common/components/NumberUnitPan/index.jsx
  7. 4 1
      src/common/components/NumberUnitPan/index.less
  8. 6 3
      src/common/components/SearchOption/index.jsx
  9. BIN
      src/common/images/Printing.png
  10. BIN
      src/common/images/printing.png
  11. 5 5
      src/common/less/variables.less
  12. 15 1
      src/components/AddAssistCheck/Textarea/index.jsx
  13. 7 6
      src/components/AddAssistCheck/index.jsx
  14. 6 4
      src/components/AddInspect/index.jsx
  15. 3 2
      src/components/AddInspect/index.less
  16. 2 1
      src/components/AssistCheck/index.jsx
  17. 2 2
      src/components/CommonSymptom/index.jsx
  18. 0 1
      src/components/CopyRight/index.jsx
  19. 4 2
      src/components/CopyRight/index.less
  20. BIN
      src/components/DiagnosticList/img/delete.png
  21. BIN
      src/components/DiagnosticList/img/diagDown.png
  22. BIN
      src/components/DiagnosticList/img/diagUp.png
  23. 8 3
      src/components/DiagnosticList/index.jsx
  24. 4 0
      src/components/DiagnosticList/index.less
  25. 25 8
      src/components/Inspect/index.jsx
  26. 46 28
      src/components/MainSuit/index.jsx
  27. 2 2
      src/components/MultSpread/index.jsx
  28. 7 7
      src/components/NumberDrop/index.jsx
  29. 34 19
      src/components/NumberUnitDrop/index.jsx
  30. 3 1
      src/components/PushContainer/index.jsx
  31. 6 5
      src/components/PushItems/index.jsx
  32. 9 1
      src/components/PushItems/index.less
  33. 8 2
      src/components/RadioDrop/index.jsx
  34. 43 23
      src/components/SpreadDrop/index.jsx
  35. 1 1
      src/components/SpreadDrop/index.less
  36. 2 2
      src/components/TemplateItems/index.jsx
  37. 2 1
      src/components/TreatDesc/DrugInfo/index.jsx
  38. 26 1
      src/components/TreatDesc/DrugInfo/index.less
  39. 6 0
      src/containers/AssistCheck.js
  40. 9 9
      src/containers/DiagnosticItem.js
  41. 1 0
      src/containers/EditableSpan.js
  42. 6 1
      src/containers/Inspect.js
  43. 6 0
      src/containers/MainSuit.js
  44. 12 8
      src/containers/NumberDrop.js
  45. 7 1
      src/containers/NumberUnitDrop.js
  46. 5 1
      src/containers/RadioDrop.js
  47. 4 0
      src/containers/SpreadDrop.js
  48. 31 4
      src/store/actions/checkBody.js
  49. 48 16
      src/store/actions/currentIll.js
  50. 50 25
      src/store/actions/mainSuit.js
  51. 34 2
      src/store/actions/otherHistory.js
  52. 0 1
      src/store/async-actions/inspect.js
  53. 69 3
      src/store/async-actions/treat.js
  54. 4 2
      src/store/reducers/checkBody.js
  55. 4 2
      src/store/reducers/currentIll.js
  56. 4 2
      src/store/reducers/mainSuit.js
  57. 4 2
      src/store/reducers/otherHistory.js
  58. 2 1
      src/store/types/checkBody.js
  59. 1 0
      src/store/types/currentIll.js
  60. 2 1
      src/store/types/mainSuit.js
  61. 2 1
      src/store/types/otherHistory.js
  62. 1 1
      src/utils/ajax.js

+ 13 - 9
src/common/components/EditableSpan/index.jsx

@@ -1,7 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
 import config from "@config/index";
-import {filterArr,handleEnter,isIE} from '@utils/tools.js';
+import {filterArr,isIE} from '@utils/tools.js';
 import Notify from '../Notify/index.js';
 
 import $ from 'jquery';
@@ -111,11 +111,13 @@ class EditableSpan extends Component{
   }
 
   handleKeydown(e){
-    let innerVal = e.target.innerText;
+    const ev = e||window.event;
+    const target = ev.target||ev.srcElement;
+    let innerVal = target.innerText;
     //禁止回车事件
-    if(e.keyCode==13){return false;}
+    if(ev.keyCode==13){return false;}
     //backspace事件
-    if(e.keyCode==8){
+    if(ev.keyCode==8){
       //用于对比backspace前后的值
       this.setState({
         preVal:innerVal
@@ -125,9 +127,11 @@ class EditableSpan extends Component{
   }
   handleKeyup(e){
      const {boxMark,handleKeydown,i,value} = this.props;
-     const {preVal,index} = this.state;console.log(22,i,index);
-    let innerVal = e.target.innerText;
-    if(e.keyCode==8){
+     const {preVal,index} = this.state;
+    const ev = e||window.event;
+    const target = ev.target||ev.srcElement;
+    let innerVal = target.innerText;
+    if(ev.keyCode==8){
       if(innerVal !==preVal){return}
       let data = innerVal.trim();
       //判断是否为空、中英文:, 。、;,且不是第一位
@@ -136,11 +140,11 @@ class EditableSpan extends Component{
       if(index!==0 && pattern.test(data)){
         handleKeydown&&handleKeydown({boxMark,i:index});
         this.setState({
-          index:index-1
+          // index:index-1 //连续往前删除,体验不佳
+          index: null
         })
       }
     }
-    
   }
   /*shouldComponentUpdate(next){
     if(JSON.stringify(next) == JSON.stringify(this.props)){

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

@@ -1,5 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
+import {isIE} from '@utils/tools.js';
+import $ from 'jquery';
 /***
  * author:zn@2018-11-13
  * 电子病历项内容框
@@ -16,7 +18,9 @@ import style from './index.less';
 class ItemBox extends Component {
   constructor(props){
     super(props);
+    this.$div = React.createRef();
     this.handleClick = this.handleClick.bind(this);
+    this.handleInput = this.handleInput.bind(this);
   }
   getBoxStyle(){
     const {boxHeight,boxWidth,boxLineHeight,marginTop,backgroundColor} = this.props;
@@ -27,13 +31,26 @@ class ItemBox extends Component {
     const {handleClick} = this.props;
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
   }
+  handleInput(e){
+    const {onchange,data} = this.props;
+    if(data&&data.length==0){//避免结构化下触发onchange,导致下拉要点两下
+      onchange&&onchange(e)
+    }
+  }
+
+  componentDidMount(){
+    if(isIE()){
+      $(this.$div.current).onIe8Input(function(e){
+        this.handleInput(e)
+      },this);
+    }
+  }
 
   render(){
     const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop,backgroundColor} = 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["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={handleFocus} onInput={onchange} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur}>
+      <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={handleFocus} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur}>
         {fuzhen?children||fuzhen:children}
       </div>
     </div>

+ 2 - 2
src/common/components/Notify/index.js

@@ -8,7 +8,7 @@ import Notify from './notify'
  * 接收参数:
  * type: 信息提示框类型, 包括success、error、info。
  * content: 信息提示框文本内容
- * duration: 自动关闭的延时,单位毫秒。默认3000毫秒,设为 0 时不自动关闭。
+ * duration: 自动关闭的延时,单位毫秒。默认2000毫秒,设为 0 时不自动关闭。
  * 用法如下:
  * Notify.success('删除成功')
 ***/
@@ -29,7 +29,7 @@ function createNotification() {
 }
 
 let notification
-const notice = (type, content, duration=3000, onClose) => {
+const notice = (type, content, duration=2000, onClose) => {
     if (!notification) notification = createNotification()
     return notification.addNotice({ type, content, duration, onClose })
 }

+ 3 - 1
src/common/components/NumberPan/index.jsx

@@ -49,7 +49,8 @@ class NumberPan extends Component{
   render(){
     const select = this.handleSelect.bind(this);
     const {show} = this.props;      //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
-    return <table className={style['pan']} onBlur={(e)=>e.stopPropagation()} style={{display:show?'table':'none'}}>
+    return <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} style={{display:show?'table':'none'}}>
+    <table className={style['pan']} >
       <tr>
         <td><button onClick={select}>1</button></td>
         <td><button onClick={select}>2</button></td>
@@ -75,6 +76,7 @@ class NumberPan extends Component{
         <td><button onClick={this.handleClose.bind(this)}>确定</button></td>
       </tr>
     </table>
+    </div>
   }
 }
 

+ 4 - 1
src/common/components/NumberPan/index.less

@@ -1,7 +1,10 @@
 @import "~@less/variables.less";
+.panBox{
+  .pop;
+}
 .pan{
   width: 280px;
-  .pop;
+  
   td{
     width: 68px;
     height:44px;

+ 3 - 1
src/common/components/NumberUnitPan/index.jsx

@@ -58,7 +58,8 @@ class NumberUnitPan extends Component{
   render(){
     // const select = this.handleSelect.bind(this);
     const {show} = this.props;      //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
-    return <table className={style['pan']} onBlur={(e)=>e.stopPropagation()} style={{display:show?'table':'none'}}>
+    return <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} style={{display:show?'table':'none'}}>
+      <table className={style['pan']} >
       <tr>
         <td><span onClick={this.handleSelect}>1</span></td>
         <td><span onClick={this.handleSelect}>2</span></td>
@@ -94,6 +95,7 @@ class NumberUnitPan extends Component{
         <td><span onClick={this.handleSelect}>{config.timeUnit.year}</span></td>
       </tr>
     </table>
+    </div>
   }
 }
 

+ 4 - 1
src/common/components/NumberUnitPan/index.less

@@ -1,7 +1,10 @@
 @import "~@less/variables.less";
+.panBox{
+  .pop;
+}
 .pan{
   width: 280px;
-  .pop;
+  
   td{
     width: 68px;
     height:44px;

+ 6 - 3
src/common/components/SearchOption/index.jsx

@@ -20,8 +20,8 @@ class SearchOption extends React.Component {
         this.handleClearVal = this.handleClearVal.bind(this);
     }
     
-    componentWillReceiveProps(nextProps){
-        if(nextProps.visible !== this.props.visible) {
+    /*componentWillReceiveProps(nextProps){
+        if(nextProps.visible != this.props.visible) {
             if(!nextProps.visible) {
                 this.props.handleChangeValue('');
                 this.textInput.current.value = '';
@@ -31,8 +31,11 @@ class SearchOption extends React.Component {
                 this.textInput.current.focus();
             }, 0);
         }
+    }*/
+    componentDidMount(){
+      this.props.handleChangeValue('');
+      this.textInput.current.focus();
     }
-    
     handleClearVal(){
         const { handleChangeValue } = this.props;
         this.textInput.current.value = '';

BIN
src/common/images/Printing.png


BIN
src/common/images/printing.png


+ 5 - 5
src/common/less/variables.less

@@ -62,13 +62,13 @@
 }
 .mult-li{
   // width: 200px;
-  height: 44px;
-  line-height: 44px;
+  height: 32px;
+  line-height: 32px;
   padding-right: 8px;
 }
 .select-li{
-  height: 44px;
-  line-height: 44px;
+  height: 32px;
+  line-height: 32px;
   width: 100%;
   font-size: 14px;
   text-align: left;
@@ -79,7 +79,7 @@
   background: rgba(59,158,208,0.1);
   background-image: url(../images/first.png);
   background-repeat: no-repeat;
-  background-position: 20px 15px;
+  background-position: 20px 10px;
 }
 .clear{
   width: 88px;

+ 15 - 1
src/components/AddAssistCheck/Textarea/index.jsx

@@ -1,16 +1,30 @@
 import React, { Component } from "react";
 import style from "./index.less";
+import config from '@config/index';
 
 class Textarea extends Component {
   constructor(props) {
     super(props);
+    this.state = {
+      timer:null
+    };
     this.$dom = React.createRef();
     this.handleInput = this.handleInput.bind(this);
   }
   handleInput(e){
-    const {handleChangeAssistValue,idx} = this.props;
+    const {handleChangeAssistValue,idx,handlePush} = this.props;
     const text = e.target.innerText;
+    const stimer = this.state.timer;
     handleChangeAssistValue&&handleChangeAssistValue(text,idx);
+    //右侧推送--延时推送
+    clearTimeout(stimer);
+    let timer = setTimeout(function(){
+      handlePush&&handlePush();
+      clearTimeout(stimer);
+    },config.delayPushTime);
+    this.setState({
+      timer
+    });
   }
   shouldComponentUpdate(next){
     if(JSON.stringify(next) == JSON.stringify(this.props)){

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

@@ -33,9 +33,10 @@ class AddAssistCheck extends React.Component {
     }
 
     delConfirm(){
-        const {handleDelAssist} = this.props;
+        const {handleDelAssist,handlePush} = this.props;
         const {id} = this.state;
-        handleDelAssist&&handleDelAssist(id)
+        handleDelAssist&&handleDelAssist(id);
+        handlePush&&handlePush();           //右侧推送
         this.setState({
             visible:false,
             id:null
@@ -103,7 +104,7 @@ class AddAssistCheck extends React.Component {
     </ul>
     }
     getAssistLabel(){
-        const {assistLabel,handleChangeAssistValue,handleChangeDate,isRead} = this.props;
+        const {assistLabel,handleChangeAssistValue,handleChangeDate,isRead,handlePush} = this.props;
         return <ul className={styles.labelWrap} id="datePick">
             {
                 assistLabel.map((item,idx) => {
@@ -125,7 +126,7 @@ class AddAssistCheck extends React.Component {
                                 onKeyUp={(e)=>{handleChangeAssistValue(e.target.value,idx,e)}} 
                                 placeholder="报告描述或意见"
                             ></textarea> */}
-                            <Textarea value={item.value} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+                            <Textarea value={item.value} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                         </p>
                         <div className={styles.pointerFinger}>
                             <p onClick={()=>this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
@@ -152,9 +153,9 @@ class AddAssistCheck extends React.Component {
                 {this.getAssistLabel()}
                 <div id="searchWrapAssist" style={{position:"relative"}}>
                     <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck"/>
-                    <SearchOption handleChangeValue={handleChangeValue} visible={this.state.show}>
+                  {this.state.show?<SearchOption handleChangeValue={handleChangeValue} visible={true}>
                         {this.getSearchList(list)}
-                    </SearchOption>
+                    </SearchOption>:''}
                 </div>
                 <ConfirmModal 
                     visible={visible}

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

@@ -37,7 +37,7 @@ class Inspect extends React.Component {
         this.handleSearchShow = this.handleSearchShow.bind(this)
     }
     delConfirm(){//弹窗确定
-        const{delPartItem,handleCloseExcel} = this.props;
+        const{delPartItem,handleCloseExcel,handlePush} = this.props;
         const{type,id} = this.state;
         if(type==1){
             delPartItem(id)
@@ -50,6 +50,7 @@ class Inspect extends React.Component {
             id:null,
         })
         Notify.success("删除成功");
+        handlePush&&handlePush();       //右侧推送
     }
     handleDelClick(type,idx){
         this.setState({
@@ -259,7 +260,7 @@ class Inspect extends React.Component {
         }
     }
     render() {
-        const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel } = this.props;
+        const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel,handlePush } = this.props;
         const {toastText,visible} = this.state;
         return (
             <div className={styles.wrapper}>
@@ -350,6 +351,7 @@ class Inspect extends React.Component {
                                                             handleConfirm(e,idx,this.state.dateTime,this.state.currentData);
                                                         }
                                                         this.setState({showFill:false})
+                                                        handlePush&&handlePush();     //右侧推送
                                                     }}
                                                 >
                                                     <div className={styles.searchResultT}>
@@ -378,9 +380,9 @@ class Inspect extends React.Component {
                 </div>
                 <div style={{position:"relative"}}>
                     <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap"/>
-                    <SearchOption handleChangeValue={handleChangeValue} visible={this.state.show}>
+                  {this.state.show?<SearchOption handleChangeValue={handleChangeValue} visible={true}>
                         {this.getSearchList(list)}
-                    </SearchOption>
+                    </SearchOption>:''}
                 </div>
                 <ConfirmModal 
                     visible={visible}

+ 3 - 2
src/components/AddInspect/index.less

@@ -119,10 +119,11 @@
 }
 .itemPart {
     height: 28px;
-    line-height: 28px;
+    // line-height: 28px;
     overflow: hidden;
     padding-top: 0 !important;
-    width: 292px;
+    // width: 292px;
+    width: 290px;
     float: left;
     padding: 0 15px;
     box-sizing: border-box;

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

@@ -10,7 +10,7 @@ class AssistCheck extends React.Component {
     }
 
     render(){
-        const {list,assistLabel,handleChangeValue,handleSign,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead} = this.props;
+        const {list,assistLabel,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead} = this.props;
         return (
             <div className={styles.wrapper}>
                 <div className={styles.top}>
@@ -31,6 +31,7 @@ class AssistCheck extends React.Component {
                             handleSign={handleSign}
                             assistLabel={assistLabel}
                             handleDelAssist={handleDelAssist}
+                            handlePush={fetchPushInfos}
                             handleChangeAssistValue={handleChangeAssistValue}
                             handleChangeDate={handleChangeDate}
                             isRead={isRead}

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

@@ -35,7 +35,6 @@ class CommonSymptom extends Component{
     return classNames(style['list'],name,isHide);
   }
 
-
   handleSelect(e,item){
     e.stopPropagation();
     const {onSelect,onShow} = this.props;
@@ -43,9 +42,10 @@ class CommonSymptom extends Component{
     // onShow&&onShow(e,false);
   }
   render(){  
+    const {data} = this.props;
     return <div className={this.getClass()} contenteditable="false">
       <ul>
-        {this.props.data&&this.props.data.map((it)=>{
+        {data&&data.map((it)=>{
           return <li onClick={(e)=>this.handleSelect(e,it)}>{it.name}</li>
         })}
       </ul>

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

@@ -79,7 +79,6 @@ class CopyRight extends Component {
 
     return (
       <div className={style["container"]}>
-        {disContent.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: disContent.data.data[1].description}}></div>}
         <div className={style["copy"]}>
           版本信息:{" "}
           <a href="javascript:;" onClick={showCopyModal}>

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

@@ -30,7 +30,7 @@
     
     .disclaimer{
       font-size: 12px;
-      color: #000000;
+      color: #00e;
       float: right;
       cursor: pointer;
     }
@@ -76,6 +76,8 @@
         }
         .content {
           padding: 10px;
+          max-height: 400px;
+          overflow-y: auto;
         }
       }
     }
@@ -144,7 +146,7 @@
     }
     .message{
       font-size: 12px;
-      line-height: 20 px;
+      line-height: 20px;
       div{
         font-size: 12px;
         line-height: 20px;

BIN
src/components/DiagnosticList/img/delete.png


BIN
src/components/DiagnosticList/img/diagDown.png


BIN
src/components/DiagnosticList/img/diagUp.png


+ 8 - 3
src/components/DiagnosticList/index.jsx

@@ -80,13 +80,18 @@ class DiagnosticList extends Component {
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
+                        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>}
+                                    {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
+                                    {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '主' : index+1}</span>
                                     <span className={style['diag-name']} onClick={()=>{this.handleClickDiag(item)}}>{item.name}<span></span></span> 
                                     {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
-                                    <span className={style['treat']} onClick={() =>{this.showTreat(item)}}>治疗方案</span>
+                                    <span className={style['treat']}
+                                          style ={{ color: hasTreat ?'' : 'gray', border: hasTreat ?'' : '1px solid gray'}}
+                                          onClick={() =>{hasTreat && this.showTreat(item)}}>
+                                          治疗方案
+                                    </span>
                                     <img className={style['diag-del']} src={del_icon} onClick={()=>{this.handleDeleteItem(item.id)}}/>
                         </div>)
                     })}

+ 4 - 0
src/components/DiagnosticList/index.less

@@ -97,4 +97,8 @@
     font-size: 16px;
     color: #000000;
     line-height: 16px;
+}
+.diag-up, .diag-down, .diag-del {
+    width: 20px;
+    margin-bottom: 4px;
 }

+ 25 - 8
src/components/Inspect/index.jsx

@@ -26,8 +26,10 @@ import {isIE} from '@utils/tools.js';
 
 import "./dists/FileAPI.js";
 
+const isLocal = window.location.hostname.indexOf('localhost')!=-1;
+const qhost = isLocal?host:'';
 const api = {
-    upload: host+'/api/icss/lisExcelRes/lisExcelAnalysis'
+    upload: qhost+'/api/icss/lisExcelRes/lisExcelAnalysis'
 };
 
 class Inspect extends React.Component {
@@ -37,14 +39,24 @@ class Inspect extends React.Component {
             val: '',
             visible:false,
             dom:[],
-            isIE:isIE()
+            isIE:isIE(),
+            ieVersion:null
         }
         this.handleImportExcel = this.handleImportExcel.bind(this)
         this.cancel = this.cancel.bind(this)
         this.getWarings = this.getWarings.bind(this)
     }
-    componentDidMount(){
+    componentDidMount(){ 
+        var ua = navigator.userAgent;  
+        var _isIE = ua.indexOf("MSIE")>-1;
+        if(_isIE){  
+            let version =  ua.match(/MSIE ([\d.]+)/)[1];
+            this.setState({
+                ieVersion:version
+            })
+        }      
         $('iframe').bind( 'load', function(){} )
+      const {fetchPushInfos} = this.props;
         // FileAPI.debug = true
         $.support.cors = true;
         const that = this;
@@ -65,7 +77,7 @@ class Inspect extends React.Component {
             },
             function (files, rejected){
                 if( files.length ){
-                    console.log(files[0])
+                    // console.log(files[0])
                     FileAPI.upload({
                         // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
                         url: api.upload,
@@ -83,6 +95,7 @@ class Inspect extends React.Component {
                                 let res = JSON.parse(xhr.response);
                                 let message = res.data.messages;
                                 store.dispatch(getExcelList(res.data));
+                                fetchPushInfos&&fetchPushInfos();
                                 if (message.length != 0) {
                                     that.setState({
                                         visible:true,
@@ -106,7 +119,8 @@ class Inspect extends React.Component {
         this.setState({visible:false})
     }
   getStyle(){
-        if(this.state.isIE){
+    const {ieVersion} = this.state;
+        if(ieVersion&&ieVersion<=9){
             return styles.disabledBtn;
         }else{
             return styles.button;
@@ -124,15 +138,17 @@ class Inspect extends React.Component {
         </ul>
     }
     render() {
-        const { handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem } = this.props;
+        const {fetchPushInfos, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem } = this.props;
+        const {ieVersion,isIE} = this.state;
         return (
             <div className={styles.wrapper} >
                 {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
 
                 <div className={styles.top}>
                     <span>化验结果数据</span>
-                    <div className={this.getStyle()} onClick={this.state.isIE?null:this.handleImportExcel}>
-                        <button disabled={this.state.isIE?true:false}>导入化验结果</button>
+                    <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}>
+                       {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button>*/}
+                        <button>导入化验结果</button>
                         <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
                     </div>
                 </div>
@@ -148,6 +164,7 @@ class Inspect extends React.Component {
                             handleSign={handleSign}
                             handleChangeValue={handleChangeValue}
                             list={list}
+                            handlePush={fetchPushInfos}
                             labelList={labelList}
                             handleLabelSub={handleLabelSub}
                             fillActive={fillActive}

+ 46 - 28
src/components/MainSuit/index.jsx

@@ -6,6 +6,7 @@ import SearchDrop from '@components/SearchDrop';
 import CommonSymptom from '@components/CommonSymptom';
 import chooseType from '@containers/eleType.js';
 import config from "@config/index";
+import {isIE} from "@utils/tools.js"
 
 class MainSuit extends Component{
   constructor(props){
@@ -58,29 +59,38 @@ class MainSuit extends Component{
 
   handleFocus(e){
     e.stopPropagation();
-    const {getCommonSymptoms} = this.props;
+    const {getCommonSymptoms,datas} = this.props;
     let innerText = e.target.innerText;
-    if(!innerText.trim()){//有内容就走搜索接口
-      getCommonSymptoms && getCommonSymptoms();
-      this.setState({
-        symptom:true
-      })    
+    if(!isIE()){//IE会触发onfocus和onblur事件
+      if(!innerText.trim()){//有内容就走搜索接口
+        getCommonSymptoms && getCommonSymptoms();
+        this.setState({
+          symptom:true
+        })    
+      }else{
+        this.setState({
+          symptom:false,
+          inpText:innerText
+        }) 
+      }
     }else{
-      this.setState({
-        symptom:false,
-        inpText:innerText
-      }) 
+      if(datas.length==0 && !innerText.trim()){
+        getCommonSymptoms && getCommonSymptoms();
+        this.setState({
+          symptom:true
+        })  
+      }
     }
-
+    
   }
 
 
-  handleShow(e,show){
+  /*handleShow(e,show){
     e.stopPropagation();
     if(e.target.tagName=="INPUT"){
       return ;
     }
-  }
+  }*/
 
   handleSelect(item){//选中的常见症状
     const {clearCommS,insertMain,getData} = this.props;
@@ -186,18 +196,25 @@ class MainSuit extends Component{
     const {freeText,saveText,datas} = this.props;
     const that = this;
     let data = this.state.inpText;
-    e.target.innerText="";
-    freeText && freeText(data.trim());
-    // 延时关闭常见症状下拉,不延时会影响选中
-    clearTimeout(this.state.clearTimer);
-    const clearTimer = setTimeout(function(){
-      that.setState({
-        symptom:false
-      })
-    },config.delayTime-200);
-    this.setState({
-      clearTimer
-    });
+    if(!isIE()){
+      e.target.innerText="";
+      freeText && freeText(data.trim());
+      // 延时关闭常见症状下拉,不延时会影响选中
+      clearTimeout(this.state.clearTimer);
+      const clearTimer = setTimeout(function(){
+        that.setState({
+          symptom:false
+        })
+      },config.delayTime-200);
+      this.setState({
+        clearTimer
+      });
+    }else{
+      if(datas.length==0){
+        freeText && freeText(data.trim());
+      }
+    }
+    
   }
 
 
@@ -206,7 +223,7 @@ class MainSuit extends Component{
     const {showModule,boxLeft,boxTop,show,symptom,search} = this.state;
     const symptomFlag = CommonSymptoms.length>0 ? true : false;
     const searchFlag = searchData.length>0 ? true : false;
-
+    
     if(+type===1){      //文本模式
       return <Textarea title='主诉' boxMark='1' isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
     }
@@ -219,11 +236,12 @@ class MainSuit extends Component{
       handleFocus={this.handleFocus} 
       onchange={(e)=>{this.handleChange(e)}} 
       handleClick={this.handleClick} 
-      handleBlur={this.handleBlur}>
+      handleBlur={this.handleBlur}
+      data={datas}>
         {datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
       </ItemBox>
       {/*没有推送结果就不显示*/}
-      {symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onShow={(e)=>this.handleShow(e)} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onShow={(e)=>this.handleShow(e)} onSelect={this.handleSearchSelect} left={boxLeft} top={boxTop} />:"")}
+      {symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft} top={boxTop} />:"")}
     </div>
   }
 }

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

@@ -130,12 +130,12 @@ class MultSpread extends Component{
                  onBlur={this.handleEdit}>
       {textPrefix?<span>{textPrefix}</span>:''}
       <div className={this.getClass()}>
-      {this.getLabels()} 
+      {this.getLabels()}
+      {textSuffix?<span>{textSuffix}</span>:''}
       {showAdd?<img src={addIcon} alt="添加血压项"
                     className={style['add-icon']}
                     onClick={()=>addLabelItem({ikey,copyId})}/>:''}
     </div>
-    {textSuffix?<span>{textSuffix}</span>:''}
     </div>)
   }
 }

+ 7 - 7
src/components/NumberDrop/index.jsx

@@ -38,7 +38,7 @@ class NumberDrop extends Component{
     });
     handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
   }
-  handleNumFocus(e){        //数字框可编辑状态下聚集事件,处理是否显示下拉等
+  handleNumFocus(e){console.log(1);        //数字框可编辑状态下聚集事件,处理是否显示下拉等
     e.stopPropagation();
     const {show,handleShow,ikey,id,patId,handleHide,value} = this.props;
     const that = this;
@@ -58,7 +58,7 @@ class NumberDrop extends Component{
       timer
     });
   }
-  handleNumClick(e){      //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
+  handleNumClick(e){console.log(2);      //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
     e.stopPropagation();
     const {show,handleShow,ikey,id,patId,handleHide,value} = this.props;
     const {hasSelect} = this.state;
@@ -74,7 +74,7 @@ class NumberDrop extends Component{
       });
     }
   }
-  numInpBlur(e){        //数字框失焦,保存值到store中
+  numInpBlur(e){console.log(3);        //数字框失焦,保存值到store中
     e.stopPropagation();
     this.setState({
       isClosed:false,
@@ -85,7 +85,7 @@ class NumberDrop extends Component{
     const text = e.target.innerText===placeholder?'':e.target.innerText;
     handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
   }
-  handleSpanInp(e){      //数字框输入事件
+  handleSpanInp(e){ console.log(4);     //数字框输入事件
     e.stopPropagation();
     //const {value} = this.props;
   }
@@ -108,7 +108,7 @@ class NumberDrop extends Component{
       handleDbclick && handleDbclick({id:patId||id});
     }
   }
-  handleBlur(e){     //双击编辑blur
+  handleBlur(e){console.log(5);     //双击编辑blur
     const {handleLabelChange,ikey,boxMark} = this.props;
     //if(!this.state.editable) return;
     this.setState({
@@ -130,7 +130,7 @@ class NumberDrop extends Component{
                 onDoubleClick={this.changeToEdit}
                 onBlur={this.handleBlur} contentEditable={editable}
                 onkeydown={handleEnter}>
-      <span>{prefix}</span>
+      <span>&nbsp;{prefix}</span>
       <span onFocus={this.handleNumFocus}
             onClick={this.handleNumClick}
             contentEditable={numEditable}
@@ -140,7 +140,7 @@ class NumberDrop extends Component{
             onInput={this.handleSpanInp}
             className={this.getSpanClass()}
             onkeydown={handleEnter}>{value||placeholder}</span>
-      <span>{suffix}</span>
+      <span>&nbsp;{suffix}</span>
       <NumberPan handleSelect={(text)=>this.select(text)}
                  onClose={handleHide}
                  show={show} toClear={!hasSelect}/>

+ 34 - 19
src/components/NumberUnitDrop/index.jsx

@@ -3,8 +3,9 @@ import className from 'classnames';
 import {NumberUnitPan} from '@commonComp';
 import style from './index.less';
 import config from '@config/index.js';
-import {filterArr,handleEnter} from '@utils/tools.js';
+import {filterArr,handleEnter,isIE} from '@utils/tools.js';
 import {Notify} from '@commonComp';
+import $ from 'jquery';
 /***
  * 带单位数字组件
  * 接收参数:
@@ -69,37 +70,44 @@ class NumberUnitDrop extends Component{
   //数字框失焦,保存值到store中
   numInpBlur(e){
     e.stopPropagation();
+    const {handleSelect,ikey,suffix,prefix,mainSaveText} = this.props;
+    const {editable} = this.state;
+    if(editable){
+      const text = e.target.innerText;
+      // this.$span.current.innerText='';      //修改生成文字变成输入的2倍bug 
+      handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+      
+    }
     this.setState({
       isClosed:false,
       numEditable:true,
       hasSelect:false,
       editable:false
     });
-    const text = e.target.innerText;
-    this.$span.current.innerText='';      //修改生成文字变成输入的2倍bug
-    const {handleSelect,ikey,suffix,prefix,mainSaveText} = this.props;
-    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+    
   }
 
   handleSpanInp(e){ //数字框输入事件
     e.stopPropagation();
     // 主诉字数达到上限时不允许输入
     const {mainSaveText,ikey,type,handleSelect,suffix,prefix,boxMark} = this.props;
-    const {labelVal} = this.state;
+    const {labelVal,editable} = this.state;
     let mainText = filterArr(mainSaveText);//主诉字数
-    let val = e.target.innerText;
-    if(+boxMark==1){
-      if(mainText.length >= config.limited){
-        if(val.length > labelVal.length){
-          e.target.innerText = labelVal;
-          Notify.info(config.limitText);
-          return
-        }else if(val.length == labelVal.length){
-          this.setState({
-            labelVal:val
-          });
-        }else{
-          handleSelect&&handleSelect({ikey,text:val,suffix,prefix,mainSaveText});
+    if(editable){//避免IE中点击标签也会触发
+      let val = e.target.innerText;
+      if(+boxMark==1){
+        if(mainText.length >= config.limited){
+          if(val.length > labelVal.length){
+            e.target.innerText = labelVal;
+            Notify.info(config.limitText);
+            return
+          }else if(val.length == labelVal.length){
+            this.setState({
+              labelVal:val
+            });
+          }else{
+            handleSelect&&handleSelect({ikey,text:val,suffix,prefix,mainSaveText});
+          }
         }
       }
     }
@@ -126,6 +134,13 @@ class NumberUnitDrop extends Component{
       handleDbclick && handleDbclick({id:patId||id});
     }
   }
+  componentDidMount(){
+    if(isIE()){
+      $(this.$span.current).onIe8Input(function(e){
+        this.handleSpanInp(e)
+      },this);
+    }
+  }
 
   render(){
     const {placeholder,prefix,suffix,show,value,handleHide} = this.props;

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

@@ -13,6 +13,7 @@ import TemplateItems from '@components/TemplateItems';
 import {getWindowInnerHeight} from '@common/js/func';
 import PushItemsContainer from '@containers/PushItemsContainer';
 import { pushAllDataList } from '@utils/tools';
+import CopyRightContainer from "@containers/CopyRightContainer";
 class PushContainer extends Component {
     constructor(props) {
         super(props);
@@ -245,7 +246,8 @@ class PushContainer extends Component {
             >
                 {this.state.message}
             </ConfirmModal>
-        </div>
+            <CopyRightContainer />
+        </div>  
     }
 }
 

+ 6 - 5
src/components/PushItems/index.jsx

@@ -7,7 +7,7 @@ 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 CopyRightContainer from "@containers/CopyRightContainer";
+
 import PushDiag from "./PushDiag";
 import DiagnosticItem from "@containers/DiagnosticItem";
 import $ from "jquery";
@@ -95,7 +95,7 @@ class PushItems extends Component {
       showAdd,
       showTips
     } = this;
-
+    // console.log('tipsDiscalimer', tipsDiscalimer)
     let assayNum = 0;
     let assayHide = assay.map((item, index) => {
       assayNum = assayNum + item.name.length + 2;
@@ -219,7 +219,7 @@ class PushItems extends Component {
             <div className={style["recommend"]}>
               <h1>
                 <img src={recommendImg} />
-                推荐检验检查<div onClick={billing}>开单</div>
+                推荐检验检查<div className={style["billing"]}  onClick={billing}>开单</div>
               </h1>
               <div>
                 {assay.length === 0 && check.length === 0 ? (
@@ -355,8 +355,9 @@ class PushItems extends Component {
             </div>
           </div>
         </div>
-
-        <CopyRightContainer />
+        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data[1].description}}></div>}
+        
+        
       </div>
     );
   }

+ 9 - 1
src/components/PushItems/index.less

@@ -337,4 +337,12 @@
   display: inline-block;
   padding: 0px 10px 0px 0px;
 }
-
+.billing {
+  color: #3B9ED0;
+}
+.disTips {
+  padding: 10px 20px 0;
+  font-size: 10px;
+  color: #979797;
+  text-align: center;
+}

+ 8 - 2
src/components/RadioDrop/index.jsx

@@ -88,10 +88,16 @@ class RadioDrop extends Component{
   handleEditLabel(e){
     e.stopPropagation();
     const {ikey,boxMark,handleLabelEdit} = this.props;
+    /*const {editable} = this.state;
+    if(editable){
+      // 更改标签的value值
+      let changeVal = e.target.innerText;
+      handleLabelEdit && handleLabelEdit({ikey,changeVal,type:boxMark});
+    }*/
     this.setState({
       editable:false
-    });
-    // 更改标签的value值
+    });  
+   // 更改标签的value值
     let changeVal = e.target.innerText;
     handleLabelEdit && handleLabelEdit({ikey,changeVal,type:boxMark});
   }

+ 43 - 23
src/components/SpreadDrop/index.jsx

@@ -2,9 +2,10 @@ import React,{Component} from 'react';
 import classNames from 'classnames';
 import config from '@config/index.js';
 import style from './index.less';
-import {deepClone,filterArr,handleEnter} from '@utils/tools.js';
+import {deepClone,filterArr,handleEnter,isIE} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import {getIds} from '@common/js/func.js';
+import $ from 'jquery';
 /****
  * 标签组合下拉,选中的项目展开
  * author:zn@2018-11-21
@@ -35,6 +36,7 @@ class SpreadDrop extends Component{
       editable:false,      //双击编辑
       labelVal:'',  //存放标签原有的值--主诉字数限制用
     };
+    this.$div = React.createRef();
     this.handleSelect = this.handleSelect.bind(this);
     this.clearState = this.clearState.bind(this);
     this.handleClear = this.handleClear.bind(this);
@@ -50,7 +52,7 @@ class SpreadDrop extends Component{
   handleShow(e){//单击
     e&&e.stopPropagation();
     // window.event? window.event.cancelBubble = true : e.stopPropagation();
-    this.setStateInit();      //恢复初始选中状态
+    // this.setStateInit();      //恢复初始选中状态
     const {ikey,handleShow,placeholder,flag,id,value,tagType,type} = this.props;
     const that = this;
     this.btnClickFlag = false;
@@ -70,7 +72,6 @@ class SpreadDrop extends Component{
     let text = e.target.innerText;
     // clearTimeout(this.state.timer);//取消延时的单击事件
     e.stopPropagation();
-    // e.preventDefault();
     if(value&&value.trim()){//有选中值的标签才能双击编辑
       this.setState({
         labelVal:text,
@@ -83,21 +84,23 @@ class SpreadDrop extends Component{
 
   onChange(e){  
     const {mainSaveText,ikey,type,handleLabelChange} = this.props;
-    const {labelVal} = this.state;
+    const {labelVal,editable} = this.state;
     let mainText = filterArr(mainSaveText);//主诉字数
-    let val = e.target.innerText;
-    if(+type==1){// 主诉字数达到上限时不允许输入
-      if(mainText.length >= config.limited){
-        if(val.length > labelVal.length){
-          e.target.innerText = labelVal;
-          Notify.info(config.limitText);
-          return
-        }else if(val.length == labelVal.length){
-          this.setState({
-            labelVal:val
-          });
-        }else{
-          handleLabelChange && handleLabelChange({ikey,changeVal:val,type});
+    if(editable){//避免IE中点击标签也会触发
+      let val = e.target.innerText;
+      if(+type==1){// 主诉字数达到上限时不允许输入
+        if(mainText.length >= config.limited){
+          if(val.length > labelVal.length){
+            e.target.innerText = labelVal;
+            Notify.info(config.limitText);
+            return
+          }else if(val.length == labelVal.length){
+            this.setState({
+              labelVal:val
+            });
+          }else{
+            handleLabelChange && handleLabelChange({ikey,changeVal:val,type});
+          }
         }
       }
     }
@@ -106,12 +109,16 @@ class SpreadDrop extends Component{
   handleBlur(e){
     e.stopPropagation();
     const {ikey,type,handleLabelChange} = this.props;
+    const {editable} = this.state;
+    if(editable){
+      // 更改标签的value值
+      let changeVal = e.target.innerText;
+      handleLabelChange && handleLabelChange({ikey,changeVal,type});
+    }
     this.setState({
       editable:false
     });
-    // 更改标签的value值
-    let changeVal = e.target.innerText;
-    handleLabelChange && handleLabelChange({ikey,changeVal,type});
+    
 
   }
   setStateInit(){
@@ -293,18 +300,31 @@ class SpreadDrop extends Component{
     });
     return list;
   }
+  componentDidMount(){
+    if(isIE()){
+      $(this.$div.current).onIe8Input(function(e){
+        this.onChange(e)
+      },this);
+    }
+  }
+
   render(){
     const {placeholder,value,show} = this.props;
     const {editable} = this.state;
-    return <div className={style['container']}>
+    return <div className={style['container']}
+            onFocus={(e)=>e.stopPropagation()}
+            onBlur={(e)=>e.stopPropagation()}
+            onInput={(e)=>e.stopPropagation()}>
       <div
+      ref={this.$div}
       onClick={this.handleShow}
       className={this.getClass()}
       contentEditable={editable}
       onDoubleClick={this.changeToEdit}
       onBlur={this.handleBlur}
       onInput={this.onChange}
-      onkeydown={handleEnter}>{value||placeholder}</div>
+      onkeydown={handleEnter}
+      >{value||placeholder}</div>
       <div className={style["drop-list"]} style={{display:show?'block':'none'}} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
         {this.getLabels()}
         <div className="oper">
@@ -367,7 +387,7 @@ class ListItem extends Component{
   render(){
     const {data,isSpecialPos} = this.props;
     const pos = isSpecialPos?style['independent']:'';
-    return <ul className={classNames(style['row'],pos)}>
+    return <ul className={classNames(style['row'],pos)} onBlur={(e)=>e.stopPropagation()}>
       {data&&data.map((it,i)=>{
         return <li onClick={(e)=>this.handleClick(e,it,i)}
                    className={this.getClass(it.id)}>{it.labelPrefix}{it.name}{it.labelSuffix}</li>

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

@@ -12,7 +12,7 @@
     // width: 200px;
     vertical-align: top;
     margin-left: 8px;
-    max-height: 200px;
+    max-height: 326px;
     overflow-y: auto;
   }
   .independent{

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

@@ -16,10 +16,10 @@ class TemplateItems extends React.Component {
         this.genItems = this.genItems.bind(this);
     }  
     componentDidMount(){
-        const height = getWindowInnerHeight()-172;
+        const height = getWindowInnerHeight()-216;
         this.$cont.current.style.height = height+"px";
         windowEventHandler('resize', ()=>{
-            const height = getWindowInnerHeight()-172;
+            const height = getWindowInnerHeight()-216;
             this.$cont.current.style.height = height+"px";
         });
     }

+ 2 - 1
src/components/TreatDesc/DrugInfo/index.jsx

@@ -12,8 +12,9 @@ class DrugInfo extends Component {
         return (<div className={style['drug-info-wrapper']}>
                 <h3 className={style['drug-title']}>{drugInfo.title}说明书  <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/> </h3>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']}>
+                    <div className={style['drug-title1']}>{drugInfo.title}说明书</div>
                     {drugInfo.drugDesc.map((item, index) =>{
-                        return <div className={style['drug-desc-item']}>{item.title}: <span dangerouslySetInnerHTML ={{__html: item.content}}></span> </div>
+                        return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{item.title}</span> <span className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></span> </div>
                     })}
                 </div> }
 

+ 26 - 1
src/components/TreatDesc/DrugInfo/index.less

@@ -20,9 +20,34 @@
     height: 40px;
     line-height: 40px;
     padding: 0 40px;
+    border-bottom: 1px solid #979797;
 }
 .close-drug-desc {
     position: absolute;
     right: 0;
     width: 30px;
-}
+}
+.drug-desc-item {
+    padding: 5px 0;
+}
+.drug-desc-title {
+    display: inline-block;
+    font-weight: bold;
+    font-size: 14px;
+    height: 100%;
+    float: left;
+}
+.drug-desc-title::before {
+    content: '【'
+}
+.drug-desc-title::after {
+    content: '】'
+}
+.drug-title1 {
+    height: 60px;
+    line-height: 60px;
+    font-size: 32px;
+    color: #000000;
+    text-align: center;
+}
+.drug-desc-content {}

+ 6 - 0
src/containers/AssistCheck.js

@@ -5,6 +5,7 @@ import {
 import AssistCheck from '@components/AssistCheck';
 import { assistLable,delAssistLabel,changeAssistVal,changeDate } from '@store/actions/assistCheck';
 import { getSearchList } from '@store/async-actions/assistCheck';
+import {billing} from '@store/async-actions/pushMessage';
 
 function mapStateToProps(state) {  
     return {
@@ -31,6 +32,11 @@ function mapDispatchToProps(dispatch, store) {
         handleChangeDate(info,idx){
             let date = info.year+'-'+(info.month<10?'0'+info.month:info.month)+'-'+(info.day<10?'0'+info.day:info.day);
             dispatch(changeDate(date,idx))
+        },
+        //右侧推送
+        fetchPushInfos(){
+          //调右侧推送
+          dispatch(billing);
         }
     }
 }

+ 9 - 9
src/containers/DiagnosticItem.js

@@ -3,8 +3,8 @@ import { connect } from 'react-redux';
 import DiagnosticItem from '@components/DiagnosticItem';
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList'; 
 import {  SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE } from '@store/types/diagnosticSearch';
+import { addDiagnostic } from '@store/async-actions/treat';
 import { getSearchResult } from '@store/async-actions/diagnosticSearch';
-import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import {billing, getTips} from '../store/async-actions/pushMessage';
 
 
@@ -17,14 +17,14 @@ function mapStateToProps(state) {
 function mapDispatchToProps(dispatch) {
     return{
         addDiagnostic: (item) => {
-            dispatch({
-                type: ADD_DIAGNOSTIC,
-                item: item
-            });
-            dispatch({
-                type: GET_DIAGNOSTIC_STR
-            });
-            dispatch(isAddMainSuit())
+            dispatch(addDiagnostic(item))
+            // dispatch({
+            //     type: ADD_DIAGNOSTIC,
+            //     item: item
+            // });
+            // dispatch({
+            //     type: GET_DIAGNOSTIC_STR
+            // });
         },
         showSearch:()=>{
             dispatch({

+ 1 - 0
src/containers/EditableSpan.js

@@ -210,6 +210,7 @@ function mapDispatchToProps(dispatch,state) {
       }
     },
     handleKeydown(obj){//backspace删除
+      if(obj.i==null){return}
       switch (+obj.boxMark){
         case 1:
           dispatch({type:DEL_MAIN,delIndex:obj.i});

+ 6 - 1
src/containers/Inspect.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import Inspect from '@components/Inspect';
 import {getSearchList,getSublableList} from '@store/async-actions/inspect';
 import {setLabel,fillActived,fillActiveDetail,checkValueIsChange,delExcelLis,clearLabel,delPartItem} from '@store/actions/inspect';
-
+import {billing} from '@store/async-actions/pushMessage';
 function mapStateToProps(state) {
     return {
         list:state.inspect.list,
@@ -44,6 +44,11 @@ function mapDispatchToProps(dispatch, store) {
         },
         delPartItem(idx){
             dispatch(delPartItem(idx))
+        },
+        //右侧推送
+        fetchPushInfos(){
+          //调右侧推送
+          dispatch(billing);
         }
     }
 }

+ 6 - 0
src/containers/MainSuit.js

@@ -126,6 +126,12 @@ function mapDispatchToProps(dispatch) {
           type: SAVE_FREE,
           data:item
         })
+        //右侧推送
+          setTimeout(function(){ 
+            if(didPushParamChange()){
+              dispatch(billing);
+            }
+          },500);
       },
       fetchPushInfos(){//文本模式下推送
         //调右侧推送

+ 12 - 8
src/containers/NumberDrop.js

@@ -1,12 +1,12 @@
 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,CHANGEOTHERTEXTLABEL,CHANGEOTHERTEXTLABEL_NUMBER} from '@types/otherHistory';
+import {SETNUMBER4,CHANGECHECKTEXTLABEL,CHANGECHECKTEXTLABEL_NUMBER} 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 {NUMBER_SELECT,CHANGE_LABELVAL,CHANGE_LABELVAL_NUMBER} from '@store/types/mainSuit.js';
 import {getLabelIndex} from '@common/js/func.js';
-import {CURRENT_NUMBER,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
+import {CURRENT_NUMBER,CURRENT_TEXT_LABEL,CURRENT_TEXT_LABEL_NUMBER} from '@store/types/currentIll.js';
 import {billing} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
 import {filterArr,didPushParamChange} from '@utils/tools.js';
@@ -77,7 +77,8 @@ function mainSuitLabel(dispatch,params){
   let ikey = getLabelIndex(index);
   const {changeVal,totalVal} = params;
   dispatch({
-    type:CHANGE_LABELVAL,
+    // type:CHANGE_LABELVAL,
+    type:CHANGE_LABELVAL_NUMBER,
     data:{changeVal:changeVal,ikey:ikey,totalVal}
   })
 }
@@ -86,7 +87,8 @@ function currentLabel(dispatch,params){
   const index = params.ikey;
   let ikey = getLabelIndex(index);
   dispatch({
-    type:CURRENT_TEXT_LABEL,
+    // type:CURRENT_TEXT_LABEL,
+    type:CURRENT_TEXT_LABEL_NUMBER,
     data:{changeVal:params.changeVal,ikey:ikey}
   })
 }
@@ -97,7 +99,8 @@ function otherHisLabelEdit(dispatch,params){
   const {changeVal,totalVal} = params;
   let ikey = getLabelIndex(index);
   dispatch({
-    type:CHANGEOTHERTEXTLABEL,
+    // type:CHANGEOTHERTEXTLABEL,
+    type:CHANGEOTHERTEXTLABEL_NUMBER,
     data:{changeVal:changeVal,ikey:ikey,totalVal}
   })
 }
@@ -108,7 +111,8 @@ function checkBodyLabelEdit(dispatch,params){
   let ikey = getLabelIndex(index);
   const {changeVal,totalVal} = params;
   dispatch({
-    type:CHANGECHECKTEXTLABEL,
+    // type:CHANGECHECKTEXTLABEL,
+    type:CHANGECHECKTEXTLABEL_NUMBER,
     data:{changeVal:changeVal,ikey:ikey,totalVal}
   })
 }

+ 7 - 1
src/containers/NumberUnitDrop.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import NumberUnitDrop from "@components/NumberUnitDrop";
 import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {SETNUMBER4,CHANGECHECKTEXTLABEL} from '@types/checkBody.js';
-import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP} from '@types/homePage.js';
+import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD} 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';
@@ -124,6 +124,12 @@ function mapDispatchToProps(dispatch,store){
           clearTimeout(timer);
         }
       },config.delayPushTime);
+      if(!params.text.trim()){
+        dispatch({
+          type:ISREAD
+        })
+      }
+      
     },
     handleDbclick(obj){
       dispatch({

+ 5 - 1
src/containers/RadioDrop.js

@@ -3,7 +3,7 @@ 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 {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT} from '@types/homePage.js';
+import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD} 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';
@@ -127,6 +127,10 @@ function mapDispatchToProps(dispatch,store){
         type:dbEditActions[+type],
         data:{changeVal:params.changeVal,ikey:ikey}
       });
+      dispatch(billing);
+      dispatch({
+        type:ISREAD
+      })
     },
     handleShow(obj) {
       dispatch({

+ 4 - 0
src/containers/SpreadDrop.js

@@ -330,6 +330,10 @@ function handleLabel(dispatch,params){
       break;
     default:
   }
+  dispatch(billing);
+  dispatch({
+    type:ISREAD
+  })
 }
 
 function mapDispatchToProps(dispatch,store){

+ 31 - 4
src/store/actions/checkBody.js

@@ -35,7 +35,7 @@ export function setNumberValue(state,action){
 }
 
 //查体单选下拉选中
-export function setRadioValue(state,action){
+export function setRadioValue(state,action){console.log(221)
   let res = Object.assign({},state);
   const {ikey,id,text} = action;
   let labelInx = getLabelIndex(ikey);
@@ -87,6 +87,7 @@ export function addLabelItem(state,action){
   if(!data) return res;
   res.data.splice(+i+2,0,JSON.parse(data),textLabel);
   res.saveText.splice(+i+2,0,'','');
+  res.selecteds.splice(+i+2,0,null,null);
   res.update = Math.random();
   return res;
 }
@@ -107,8 +108,14 @@ export function setCheckText(state,action) {
 export function setCheckBoxValue(state,action) {
   let res = Object.assign({},state);
   const {labelInx,excluName,existsName,nones,withsName} = action.data;
-  res.data[labelInx].value = (excluName||'')+(existsName||'')+(nones||'')+(withsName||'');
-  res.saveText[labelInx] = (excluName||'')+(existsName||'')+(nones||'')+(withsName||'');
+  let showText = (excluName||'')+(existsName||'')+(nones||'')+(withsName||'');
+  // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
+  let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
+  if(pattern.test(showText)){
+    showText = showText.substr(0,showText.length-1);
+  }
+  res.data[labelInx].value = showText;
+  res.saveText[labelInx] = showText;
   res.selecteds[labelInx] = action.data;
   res.update = Math.random();
   return res;
@@ -156,10 +163,30 @@ export const changeLabelVal = (state,action)=>{//双击标签输入改变值
   const newVal = action.data.changeVal;     //下拉修改的内容
   const totalVal = action.data.totalVal;    //包含前后缀修改的内容
   let item = res.data[index];
+  if(newVal.trim()){
+    if(item){
+      item.value = newVal;
+      res.saveText[index] = totalVal;
+    }
+  }else{//删除完标签内容则删除该标签
+    res.data.splice(index,1);
+    res.saveText = fullfillText(res.data).saveText;
+  } 
+  
+  res.update = Math.random();
+  return res;
+}
+
+// 数字键盘较特殊,有直接输入
+export const changeNumLabelVal = (state,action)=>{
+  const res = Object.assign({},state);
+  const index = action.data.ikey;
+  const newVal = action.data.changeVal;
+  let item = res.data[index];
   if(item){
     item.value = newVal;
   }
-  res.saveText[index] = totalVal;
+  res.saveText[index] = newVal;
   res.update = Math.random();
   return res;
 }

+ 48 - 16
src/store/actions/currentIll.js

@@ -254,9 +254,15 @@ export const confirm = (state,action) =>{
 export const setCheckBox = (state,action)=>{
   const res = Object.assign({},state);
   const {exists,labelInx,existsName} = action.data;
+  // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
+  let names=existsName;
+  let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
+  if(pattern.test(existsName)){
+    names = existsName.substr(0,existsName.length-1);
+  }
   let arr = res.data;
-  arr[labelInx].value = existsName;
-  res.saveText[labelInx] = existsName;
+  arr[labelInx].value = names;
+  res.saveText[labelInx] = names;
   res.selecteds[labelInx] = action.data;
   res.update=Math.random();
   return res;
@@ -271,20 +277,27 @@ export function setNumberValue(state,action){
   let labelInx = getLabelIndex(index);
   const subInx = index.substr(index.length-1);
   let item = res.data[labelInx];
-  if(+item.tagType===1){
-    item.value = param.text;
-    res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
-  }else{
-    item.questionMapping[subInx].value = param.text;
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-  }
+  // if(param.text.trim()){
+    if(+item.tagType===1){
+      item.value = param.text;
+      res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
+    }else{
+      item.questionMapping[subInx].value = param.text;
+      let hasValue = false;
+      const sub = item.questionMapping.map((it)=>{
+        if(it.value){     //至少有一个子值才黑显
+          hasValue = true;
+        }
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      });
+      // res.saveText[labelInx] = sub.join(',');
+      res.saveText[labelInx] = hasValue?sub.join(''):'';
+      item.value = sub.join('');
+    }
+  /*}else{//删除完标签内容则删除该标签
+    res.data.splice(labelInx,1);
+    res.saveText = fullfillText(res.data).saveText;
+  }*/
   res.update = Math.random();
   return res;
 }
@@ -342,6 +355,25 @@ export function setRadioValue(state,action){
 
 //双击标签输入改变值
 export const changeLabelVal = (state,action)=>{
+  const res = Object.assign({},state);
+  const index = action.data.ikey;
+  const newVal = action.data.changeVal;
+  let item = res.data[index];
+  if(newVal.trim()){
+    if(item){
+      item.value = newVal;
+      res.saveText[index] = newVal;
+    }
+  }else{//删除完标签内容则删除该标签
+    res.data.splice(index,1);
+    res.saveText = fullfillText(res.data).saveText;
+  } 
+  res.update = Math.random();
+  return res;
+}
+
+// 数字键盘较特殊,有直接输入
+export const changeNumLabelVal = (state,action)=>{
   const res = Object.assign({},state);
   const index = action.data.ikey;
   const newVal = action.data.changeVal;

+ 50 - 25
src/store/actions/mainSuit.js

@@ -92,24 +92,19 @@ export const handleTailClick = (state,action)=>{
 //将选择的常见症状插入
 export const insertMain = (state,action) => {
   const res = Object.assign({},state);
-  res.showDrop = !res.showDrop;//防止不更新
   const item = action.item.name;
   const id = action.item.questionId;
   // 将选中的id存起,现病史时获取模板
-  // let data = res.data;
   let data = JSON.parse(JSON.stringify(res.moduleData));
-  // const text = {id:id,name:item,tagType:config.tagType,controlType:3,exist:1};
   const text = {id:id,name:item,value:item,tagType:config.tagType,exist:1};
-  const emptySpan = JSON.parse(config.textLabel);
   let inserIndx = null;
   data.map((it,i)=>{
     if(it.flag == 1){//在此处插入主诉数据
       inserIndx = i;
     }
   })
-  // data.splice(inserIndx,0,text,emptySpan);
-  // data.splice(inserIndx,0,text);
-  data[inserIndx-1] = text;//替换空标签
+  data.splice(inserIndx-1,1,text);
+  // data[inserIndx-1] = text;//替换空标签
   res.data = data;
   res.saveText = [];//将手动输入的值清掉
   // res.saveText[inserIndx] = text.name;
@@ -190,9 +185,15 @@ export const confirm = (state,action) =>{
 export const commConfirm=(state,action)=>{
   const res = Object.assign({},state);
   const {exists,ikey,existsName} = action.data;
+  // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
+  let names=existsName;
+  let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
+  if(pattern.test(existsName)){
+    names = existsName.substr(0,existsName.length-1);
+  }
   let arr = res.data;
-  arr[ikey].value = existsName;
-  res.saveText[ikey] = existsName;
+  arr[ikey].value = names;
+  res.saveText[ikey] = names;
   res.selecteds[ikey] = action.data;
   res.update=Math.random();
   return res;
@@ -279,22 +280,27 @@ export function setNumberValue(state,action){
   let labelInx = getLabelIndex(index);
   const subInx = index.substr(index.length-1);
   let item = res.data[labelInx];
-  if(+item.tagType===1){
-    item.value = param.text;
-    res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
-  }else{
-    item.questionMapping[subInx].value = param.text;
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    // res.saveText[labelInx] = sub.join(',');
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-    item.value = sub.join('');
-  }
+  // if(param.text.trim()){
+    if(+item.tagType===1){
+      item.value = param.text;
+      res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
+    }else{
+      item.questionMapping[subInx].value = param.text;
+      let hasValue = false;
+      const sub = item.questionMapping.map((it)=>{
+        if(it.value){     //至少有一个子值才黑显
+          hasValue = true;
+        }
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      });
+      // res.saveText[labelInx] = sub.join(',');
+      res.saveText[labelInx] = hasValue?sub.join(''):'';
+      item.value = sub.join('');
+    }
+  /*}else{//删除完标签内容则删除该标签
+    res.data.splice(labelInx,1);
+    res.saveText = fullfillText(res.data).saveText;
+  }*/
   res.update = Math.random();
   return res;
 }
@@ -349,6 +355,25 @@ export function setRadioValue(state,action){
 
 //双击标签输入改变值
 export const changeLabelVal = (state,action)=>{
+  const res = Object.assign({},state);
+  const index = action.data.ikey;
+  const newVal = action.data.changeVal;
+  let item = res.data[index];
+  if(newVal.trim()){
+    if(item){
+      item.value = newVal;
+      res.saveText[index] = newVal;
+    }
+  }else{//删除完标签内容则删除该标签
+    res.data.splice(index,1);
+    res.saveText = fullfillText(res.data).saveText;
+  }  
+  res.update = Math.random();
+  return res;
+}
+
+// 数字键盘较特殊,有直接输入
+export const changeNumLabelVal = (state,action)=>{
   const res = Object.assign({},state);
   const index = action.data.ikey;
   const newVal = action.data.changeVal;

+ 34 - 2
src/store/actions/otherHistory.js

@@ -6,6 +6,13 @@ export const confirm = (state,action) =>{
   let res = Object.assign({},state);
   let arr = res.data;
   const {nones,exists,withs,ikey,exclusion,excluName,copyType} = action.data;
+  if((!exists||!withs||[...exists,...withs].length==0)&&!nones&&!exclusion){       //取消无殊的选中,空白提交
+    arr[ikey].value = '';
+    res.saveText[ikey] = '';
+    res.selecteds.splice(ikey,1);
+    res.update=Math.random();
+    return res;
+  }
   //选中互斥项
   if(exclusion){
     arr[ikey].value = excluName;
@@ -37,7 +44,8 @@ export const confirm = (state,action) =>{
     }
     arr.splice(ikey-1,0,...exists,...withs);
     arr[ikey-1].value = text;
-    res.saveText[ikey-1] = text;
+    // res.saveText[ikey-1] = text;
+    res.saveText = fullfillText(arr).saveText;
     res.update=Math.random();         //用于触发组件更新(data变化了因在对象中无法被组件检测到)
     return res;
 };
@@ -143,7 +151,12 @@ export function setOtherInput(state,action){
 export function setCheckBoxValue(state,action) {
   let res = Object.assign({},state);
   const {labelInx,excluName,existsName,nones,withsName} = action.data;
-  const showText = (excluName||'')+(existsName||'')+(nones||'')+(withsName||'');
+  let showText = (excluName||'')+(existsName||'')+(nones||'')+(withsName||'');
+  // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
+  let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
+  if(pattern.test(showText)){
+    showText = showText.substr(0,showText.length-1);
+  }
   res.data[labelInx].value = showText;
   res.saveText[labelInx] = showText;
   res.selecteds[labelInx] = action.data;
@@ -185,6 +198,25 @@ export function insertLabelData(state,action){
 }
 
 export function changeTextLabel(state,action) {
+  const res = Object.assign({},state);
+  const index = action.data.ikey;
+  const newVal = action.data.changeVal;
+  let item = res.data[index];
+  if(newVal.trim()){
+    if(item){
+      item.value = newVal;
+      res.saveText[index] = newVal;
+    }
+  }else{//删除完标签内容则删除该标签
+    res.data.splice(index,1);
+    res.saveText = fullfillText(res.data).saveText;
+  } 
+  res.update = Math.random();
+  return res;
+}
+
+// 数字键盘较特殊,有直接输入
+export const changeNumLabelVal = (state,action)=>{
   const res = Object.assign({},state);
   const index = action.data.ikey;
   const newVal = action.data.changeVal;

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

@@ -19,7 +19,6 @@ export const getSearchList = (val) => {
             sexType:sex == '男'?'1' : sex == '女'?'2':'3'
         })
         .then((res)=>{
-            console.log(res.data.data)
             const data = res.data.data;
             dispatch(searchList(data));
         })

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

@@ -1,12 +1,79 @@
 import { json } from "@utils/ajax";
 import { SET_TREAT } from '@store/types/diagnosticList';
+import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR} from '@store/types/diagnosticList';
 import { SET_DRUG_INFO, SET_TREATMENT, SET_RECOMMEND_BASIC } from '@store/types/treat';
-import {getEMRParams} from  '@utils/tools';
+import {storageLocal,getEMRParams} from '@utils/tools';
+import { isAddMainSuit } from '@store/async-actions/diagnosticList';
+
 const api={
     push:'/api/icss/push/pushInner',
     textPush:'/api/icss/push/pushText'
 }
 
+export const addDiagnostic = (item) => {
+        return (dispatch, getState) => {
+            const state = getState();
+            let url = api.push;
+            if(+state.typeConfig.confirmType===1){
+                url=api.textPush;
+            }
+            const emrData = getEMRParams();
+            const diagnosticList = state.diagnosticList.diagnosticList;
+            let diag = '';
+            if(diagnosticList) {
+                for (let i = 0; i < diagnosticList.length; i++ ) {
+                    if(i ===0 ) {
+                        diag = diag + diagnosticList[i].name;
+                    } else {
+                        diag = diag + ',' + diagnosticList[i].name;
+                    }
+
+                }
+            }
+            if (item.type === 1) {
+                diag = diag + ',' + item.name
+            } else {
+                diag = diag + ',' + item.name
+            }
+            const params = {
+                "age": emrData.age,
+                "featureType": "8",
+                "diag": diag,
+                "diseaseId":  item.id,
+                "lis": emrData.lis,
+                "other": emrData.other,
+                "pacs": emrData.pacs,
+                "sex": emrData.sex,
+                "symptom": emrData.current + emrData.main,
+                "vital": emrData.vital
+            };
+
+            json(url, params).then((data) =>{
+                if (data.data.data) {
+                    item.treat = data.data.data.treat
+                    dispatch({
+                        type: ADD_DIAGNOSTIC,
+                        item: item
+                    })
+                } else {
+                    item.treat = null
+                    dispatch({
+                        type: ADD_DIAGNOSTIC,
+                        item: item
+                    })
+                }
+                dispatch({
+                    type: GET_DIAGNOSTIC_STR
+                });
+                dispatch(isAddMainSuit())
+
+            }).catch((e) =>{
+                console.log(e)
+            })
+        }
+
+}
+
 export const getTreatResult = (item) =>{
     return (dispatch, getState) => {
         const state = getState();
@@ -49,7 +116,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
         };
         
@@ -146,7 +213,6 @@ export const getTreatResult = (item) =>{
     
 } 
 export const getInstroduce = (item)=>{
-    // const instroduce = '<p>药品说明1</p><p>药品说明2</p><p>药品说明3</p>'
 
     return (dispatch, getState) =>{
         const url = '/api/icss/introduceInfo/getByQuestionId';

+ 4 - 2
src/store/reducers/checkBody.js

@@ -1,6 +1,6 @@
 import {SET,SETNUMBER4,SETSELECTED4,SETCHECKBOX,ADDLABELITEM,SETCHECKTEXT,SETSEARCHDATA,
-  SELECTSEARCHDATA,CHANGECHECKTEXTLABEL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,SETCHECKINPUT,DEL_CHECKBODY} from '../types/checkBody.js';
-import {set,setNumberValue,setRadioValue,setCheckBoxValue,addLabelItem,setCheckText,setSearchData,insertLabelData,changeLabelVal,clearCheckBody,setInputLabel,backspaceText} from '../actions/checkBody.js';
+  SELECTSEARCHDATA,CHANGECHECKTEXTLABEL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,SETCHECKINPUT,DEL_CHECKBODY,CHANGECHECKTEXTLABEL_NUMBER} from '../types/checkBody.js';
+import {set,setNumberValue,setRadioValue,setCheckBoxValue,addLabelItem,setCheckText,setSearchData,insertLabelData,changeLabelVal,clearCheckBody,setInputLabel,backspaceText,changeNumLabelVal} from '../actions/checkBody.js';
 import config from '@config/index.js';
 
 const block = Object.assign(JSON.parse(config.textLabel),{full:true});
@@ -33,6 +33,8 @@ export default function(state=initState,action){
       return clearCheckBody(state,action);
     case CHANGECHECKTEXTLABEL://改变标签值
       return changeLabelVal(state,action);
+    case CHANGECHECKTEXTLABEL_NUMBER://数字键盘
+      return changeNumLabelVal(state,action);
     case CHECK_FOCUS_INDEX:
       res.focusIndex = action.index;
       res.span = action.$span;

+ 4 - 2
src/store/reducers/currentIll.js

@@ -1,9 +1,9 @@
 // 现病史
 import {SET_CURRENT,CURRENT_CONFIRM,INSERT_PROCESS,SET_CURRENT_DATA,SET_LABEL_MODULE,SETMAINCHECKBOX,
   CURRENT_RADIO,CURRENT_NUMBER,CURRENT_TEXT_LABEL,CLEAR_CURRENT_ILL,SETTEXTMODEVALUE,CURRENT_GET_BIGDATAPUSH,CURRENT_CLEAR,
-  SET_CURRENT_SEARCH,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,CURRENTADDLABELITEM,SETCURRENTINPUT,DEL_CURRENT} from '../types/currentIll';
+  SET_CURRENT_SEARCH,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,CURRENTADDLABELITEM,SETCURRENTINPUT,DEL_CURRENT,CURRENT_TEXT_LABEL_NUMBER} from '../types/currentIll';
 import {confirm,insertProcess,setData,setCheckBox,setRadioValue,setNumberValue,changeLabelVal,clearCurrentIll,
-  setTextModeValue,setModule,bigDataSymptom,setCheckText,insertLabelData,clearCurrentEdit,addLabelItem,setInputLabel,backspaceText} from '../actions/currentIll';
+  setTextModeValue,setModule,bigDataSymptom,setCheckText,insertLabelData,clearCurrentEdit,addLabelItem,setInputLabel,backspaceText,changeNumLabelVal} from '../actions/currentIll';
 
 const initState = {
   moduleData:[],
@@ -42,6 +42,8 @@ export default function(state=initState,action){
       return setNumberValue(state,action);
     case CURRENT_TEXT_LABEL://标签双击编辑
       return changeLabelVal(state,action);
+    case CURRENT_TEXT_LABEL_NUMBER://数字键盘
+      return changeNumLabelVal(state,action);
     case CURRENT_GET_BIGDATAPUSH://标签双击编辑
       return bigDataSymptom(state,action);
     case SET_CURRENT_SEARCH://搜索结果

+ 4 - 2
src/store/reducers/mainSuit.js

@@ -1,9 +1,9 @@
 import {COMM_SYMPTOMS,CLEAR_COMSYMPTOMS,SHOW_TAIL,INSERT_MAIN,
   SET_SEARCH,CLEAR_SEARCH,GET_BIGDATAPUSH,SET_MAINSUIT,MIX_CONFIRM,NUMBER_SELECT,
   RADIO_SELECT,COMM_CONFIRM,CHANGE_LABELVAL,SAVE_FREE,CLEAR_MAIN_SUIT,SET_DATA,
-  INSERT_SEARCH,MAIN_FOCUS_INDEX,SETTEXTMODEVALUE,SETMAINTEXT,MAINADDLABELITEM,SETMAININPUT,DEL_MAIN} from '../types/mainSuit'
+  INSERT_SEARCH,MAIN_FOCUS_INDEX,SETTEXTMODEVALUE,SETMAINTEXT,MAINADDLABELITEM,SETMAININPUT,DEL_MAIN,CHANGE_LABELVAL_NUMBER} from '../types/mainSuit'
 import {getCommSymptoms,handleTailClick,insertMain,setSearch,getBigSymptom,setMainMoudle,confirm,
-  setNumberValue,setRadioValue,commConfirm,changeLabelVal,saveFreeVal,clearMainSuit,insertSearch,setTextModeValue,setCheckText,changeEditClear,addLabelItem,setInputLabel,backspaceText} from '../actions/mainSuit'
+  setNumberValue,setRadioValue,commConfirm,changeLabelVal,saveFreeVal,clearMainSuit,insertSearch,setTextModeValue,setCheckText,changeEditClear,addLabelItem,setInputLabel,backspaceText,changeNumLabelVal} from '../actions/mainSuit'
 
 
 const initState = {
@@ -62,6 +62,8 @@ export default function(state=initState,action){
       return setRadioValue(state,action);
     case CHANGE_LABELVAL://改变标签值
       return changeLabelVal(state,action);
+    case CHANGE_LABELVAL_NUMBER://数字标签输入值
+      return changeNumLabelVal(state,action);
     case SAVE_FREE://自由输入
       return saveFreeVal(state,action);
     case MAIN_FOCUS_INDEX:

+ 4 - 2
src/store/reducers/otherHistory.js

@@ -1,6 +1,6 @@
 import {SETDATA,CONFIRMSELECTED,SETRADIO,SETNUMBER,SETOTHERCHECKBOX,SETOTHERTEXT,SETOTHERSEARCHDATA,
-  SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS} from '../types/otherHistory';
-import {confirm,setRadioValue,setNumberValue,setCheckBoxValue,setCheckText,setSearchData,insertLabelData,clearOtherHistory,changeTextLabel,setOtherInput,setTextModeValue,addLabelItem,otherEditClear,backspaceText} from '../actions/otherHistory';
+  SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,CHANGEOTHERTEXTLABEL_NUMBER} from '../types/otherHistory';
+import {confirm,setRadioValue,setNumberValue,setCheckBoxValue,setCheckText,setSearchData,insertLabelData,clearOtherHistory,changeTextLabel,setOtherInput,setTextModeValue,addLabelItem,otherEditClear,backspaceText,changeNumLabelVal} from '../actions/otherHistory';
 
 const initState = {data:[],saveText:[],selecteds:[],focusIndex:'',editClear:true};/*mockData.OtherHis.moduleDetailDTOList;[
     mockData.radioData,
@@ -35,6 +35,8 @@ export default function(state=initState,action){//console.log(state)
       return clearOtherHistory(state,action);
     case CHANGEOTHERTEXTLABEL:
       return changeTextLabel(state,action);
+    case CHANGEOTHERTEXTLABEL_NUMBER:
+      return changeNumLabelVal(state,action);
     case SETOTHERINPUT:
       return setOtherInput(state,action);
     case SETTEXTMODEVALUE:

+ 2 - 1
src/store/types/checkBody.js

@@ -12,4 +12,5 @@ export const CLEARCHECKBODY = 'clear_check_body';
 export const CHECK_FOCUS_INDEX = 'check_focus_text_index';
 export const CHECKBODY_CLEAR = 'clear_search_check_body';
 export const SETCHECKINPUT = 'set_check_body_input_label';
-export const DEL_CHECKBODY = 'DEL_CHECKBODY';//backspace
+export const DEL_CHECKBODY = 'DEL_CHECKBODY';//backspace
+export const CHANGECHECKTEXTLABEL_NUMBER = 'CHANGECHECKTEXTLABEL_NUMBER';//数字键盘

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

@@ -21,4 +21,5 @@ export const CLEAR_CURRENT_EDIT = 'CLEAR_CURRENT_EDIT' ;
 export const CURRENTADDLABELITEM = 'current_add_label_item';    //带加号的标签复制
 export const SETCURRENTINPUT = 'SET_CURRENT_ILL_INPUT_LABEL';     //文本输入标签存值
 export const DEL_CURRENT = 'DEL_CURRENT';     //backspace删除
+export const CURRENT_TEXT_LABEL_NUMBER = 'CURRENT_TEXT_LABEL_NUMBER';     //数字键盘输入
 

+ 2 - 1
src/store/types/mainSuit.js

@@ -21,4 +21,5 @@ export const SETTEXTMODEVALUE = 'SET_TEXT_MODE_VALUE';  //文本模式下输入
 export const SETMAINTEXT = 'SETMAINTEXT';  //模板下输入值
 export const MAINADDLABELITEM = 'MAIN_ADD_LABEL_ITEM';      //带加号的标签复制
 export const SETMAININPUT = 'SET_MAIN_INPUT_LABEL';     //文本输入标签存值
-export const DEL_MAIN = 'DEL_MAIN';     //文本输入标签存值
+export const DEL_MAIN = 'DEL_MAIN';     //删除标签
+export const CHANGE_LABELVAL_NUMBER = 'CHANGE_LABELVAL_NUMBER';     //数字键盘输入存值

+ 2 - 1
src/store/types/otherHistory.js

@@ -16,4 +16,5 @@ export const OTHER_FOCUS_INDEX = 'other_focus_text_index';
 export const OTHERHIS_CLEAR = 'OTHERHIS_CLEAR';  //清空搜索值
 export const OTHERADDLABELITEM = 'other_add_label_item';    //带加号的标签复制
 export const OTHEREDICLEAR = 'OTHEREDICLEAR';    //文本框是否可以编辑
-export const DEL_OTHERHIS = 'DEL_OTHERHIS';    //backspace
+export const DEL_OTHERHIS = 'DEL_OTHERHIS';    //backspace
+export const CHANGEOTHERTEXTLABEL_NUMBER = 'CHANGEOTHERTEXTLABEL_NUMBER';    //数字键盘

+ 1 - 1
src/utils/ajax.js

@@ -7,7 +7,7 @@ const qs=require('querystring');
 const isLocal = window.location.hostname.indexOf('localhost')!=-1;
 const qhost = isLocal?host:'';
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
-axios.defaults.baseURL = host;       //默认地址
+//axios.defaults.baseURL = host;       //默认地址
 // axios.defaults.timeout = 60000;       //请求超时