Parcourir la source

merge from 'optimize'

zhangxc il y a 6 ans
Parent
commit
8cba5cdc9e
100 fichiers modifiés avec 22686 ajouts et 760 suppressions
  1. 1 1
      src/common/components/Calendar/Content/index.jsx
  2. 1 1
      src/common/components/Calendar/MonthItem/index.less
  3. 1 0
      src/common/components/Calendar/SelectList/index.less
  4. 6 1
      src/common/components/Calendar/Time/index.jsx
  5. 3 1
      src/common/components/Calendar/Time/index.less
  6. 4 3
      src/common/components/Calendar/YearItem/index.less
  7. 131 95
      src/common/components/Calendar/index.jsx
  8. 23 1
      src/common/components/Calendar/index.less
  9. 1 1
      src/common/components/ComplexModal/index.jsx
  10. 27 0
      src/common/components/WrapModalContainer/index.jsx
  11. 47 0
      src/common/components/WrapModalContainer/index.less
  12. 3 1
      src/common/components/index.js
  13. BIN
      src/common/images/check-circle.png
  14. BIN
      src/common/images/check-right.png
  15. BIN
      src/common/images/date1.png
  16. BIN
      src/common/images/down.png
  17. BIN
      src/common/images/emergency.png
  18. BIN
      src/common/images/up.png
  19. 26 4
      src/common/less/variables.less
  20. 4 4
      src/components/AddAssistCheck/index.jsx
  21. 11 3
      src/components/AddInspect/SlideExcel/index.jsx
  22. 6 0
      src/components/AddInspect/SlideExcel/index.less
  23. 1 1
      src/components/AddInspect/index.jsx
  24. BIN
      src/components/AssistCheck/dists/FileAPI.flash.camera.swf
  25. BIN
      src/components/AssistCheck/dists/FileAPI.flash.image.swf
  26. BIN
      src/components/AssistCheck/dists/FileAPI.flash.swf
  27. 3608 0
      src/components/AssistCheck/dists/FileAPI.html5.js
  28. 2 0
      src/components/AssistCheck/dists/FileAPI.html5.min.js
  29. 4418 0
      src/components/AssistCheck/dists/FileAPI.js
  30. 2 0
      src/components/AssistCheck/dists/FileAPI.min.js
  31. 11008 0
      src/components/AssistCheck/dists/jQuery.js
  32. 4 0
      src/components/AssistCheck/dists/jq.js
  33. 2 0
      src/components/AssistCheck/dists/jquery.fileapi.min.js
  34. 205 5
      src/components/AssistCheck/index.jsx
  35. 50 12
      src/components/AssistCheck/index.less
  36. 59 7
      src/components/Banner/index.jsx
  37. 12 2
      src/components/Banner/index.less
  38. 2 2
      src/components/BodyContainer/index.jsx
  39. 1 2
      src/components/CheckBody/index.jsx
  40. 25 12
      src/components/ChronicInfo/index.jsx
  41. 10 5
      src/components/ChronicInfo/index.less
  42. 191 0
      src/components/Emergency/HisList/index.jsx
  43. 113 0
      src/components/Emergency/HisList/index.less
  44. 196 0
      src/components/Emergency/index.jsx
  45. 117 0
      src/components/Emergency/index.less
  46. 4 5
      src/components/HistoryCaseContainer/index.jsx
  47. 2 2
      src/components/HistoryCaseContainer/index.less
  48. 270 184
      src/components/Inspect/index.jsx
  49. 37 1
      src/components/Inspect/index.less
  50. 59 36
      src/components/MedicalInfo/index.jsx
  51. 70 40
      src/components/MedicalInfo/index.less
  52. 11 4
      src/components/MultSpread/index.jsx
  53. 1 0
      src/components/NumberDrop/index.jsx
  54. 1 0
      src/components/NumberUnitDrop/index.jsx
  55. 1 2
      src/components/OtherHistory/index.jsx
  56. 1 1
      src/components/Preview/index.jsx
  57. 1 5
      src/components/PreviewBody/index.jsx
  58. 1 1
      src/components/PrintPreview/index.jsx
  59. 10 3
      src/components/PushContainer/index.jsx
  60. 1 0
      src/components/RadioDrop/index.jsx
  61. 91 0
      src/components/ScaleSearch/index.jsx
  62. 84 0
      src/components/ScaleSearch/index.less
  63. 12 1
      src/components/SpreadDrop/index.jsx
  64. 192 197
      src/components/TemplateItems/TemplateItem/index.jsx
  65. 127 0
      src/components/TimeInterval/index.jsx
  66. 14 0
      src/components/TimeInterval/index.less
  67. 105 0
      src/components/WrapModalBody/Item/index.jsx
  68. 37 0
      src/components/WrapModalBody/WrapModalRight/index.jsx
  69. 39 0
      src/components/WrapModalBody/WrapModalTable/index.jsx
  70. 75 0
      src/components/WrapModalBody/WrapModalTableSon/index.jsx
  71. 12 0
      src/components/WrapModalBody/WrapModalTitle/index.jsx
  72. BIN
      src/components/WrapModalBody/img/check-circle.png
  73. BIN
      src/components/WrapModalBody/img/check-right.png
  74. 36 0
      src/components/WrapModalBody/index.jsx
  75. 267 0
      src/components/WrapModalBody/index.less
  76. 105 0
      src/components/WrapModalBodyPac/Item/index.jsx
  77. 33 0
      src/components/WrapModalBodyPac/WrapModalRight/index.jsx
  78. 45 0
      src/components/WrapModalBodyPac/WrapModalTable/index.jsx
  79. 66 0
      src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx
  80. 12 0
      src/components/WrapModalBodyPac/WrapModalTitle/index.jsx
  81. BIN
      src/components/WrapModalBodyPac/img/check-circle.png
  82. BIN
      src/components/WrapModalBodyPac/img/check-right.png
  83. 37 0
      src/components/WrapModalBodyPac/index.jsx
  84. 275 0
      src/components/WrapModalBodyPac/index.less
  85. 1 0
      src/config/index.js
  86. 0 1
      src/containers/AssessResultHis.js
  87. 30 4
      src/containers/AssistCheck.js
  88. 0 36
      src/containers/BodyContainer.js
  89. 0 6
      src/containers/CheckBody.js
  90. 7 1
      src/containers/ChronicInfo.js
  91. 3 1
      src/containers/CurrentIll.js
  92. 50 0
      src/containers/Emergency.js
  93. 100 52
      src/containers/Inspect.js
  94. 6 5
      src/containers/MainSuit.js
  95. 0 1
      src/containers/MedicalInfoContainer.js
  96. 1 3
      src/containers/NumberDrop.js
  97. 3 1
      src/containers/OtherHistory.js
  98. 29 0
      src/containers/ScaleSearchContainer.js
  99. 1 3
      src/containers/eleType.js
  100. 0 0
      src/store/actions/assistCheck.js

+ 1 - 1
src/common/components/Calendar/Content/index.jsx

@@ -12,7 +12,7 @@ class Content extends React.Component {
     }
 
     genItems(){
-        let is_now_month=this.props.selectTime.year===this.props.year && this.props.selectTime.month===this.props.month;
+      let is_now_month=this.props.selectTime.year===this.props.year && this.props.selectTime.month===this.props.month;
         const Items=[];
         const first_day=new Date(this.props.year,this.props.month-1,1).getDay();
         let key=0;

+ 1 - 1
src/common/components/Calendar/MonthItem/index.less

@@ -1,13 +1,13 @@
 @import "~@less/mixin.less";
 
 .item{
-  display: inline-block;
   width: 42px;
   height: 24px;
   margin: 5px 0 0 5px;
   text-align: center;
   font-size: @font-size-h5;
   line-height: 24px;
+  float: left;
   cursor: pointer;
   vertical-align: middle;
   &.gray{

+ 1 - 0
src/common/components/Calendar/SelectList/index.less

@@ -98,6 +98,7 @@
     background-color: #fff;
     .items{
       font-size: 0;
+      overflow: hidden;
     }
   }
 }

+ 6 - 1
src/common/components/Calendar/Time/index.jsx

@@ -13,6 +13,7 @@ class Time extends React.Component {
         else if(value>=24) {value=23}
         else if(value<0) {value=0}
         this.props.handleChange({
+            day:this.props.day,
             hour:value,
             minute:this.props.minute,
             second:this.props.second,
@@ -24,6 +25,7 @@ class Time extends React.Component {
         else if(value>=60) {value=59}
         else if(value<0) {value=0}
         this.props.handleChange({
+            day:this.props.day,
             hour:this.props.hour,
             minute:value,
             second:this.props.second,
@@ -35,6 +37,7 @@ class Time extends React.Component {
         else if(value>=60) {value=59}
         else if(value<0) {value=0}
         this.props.handleChange({
+            day:this.props.day,
             hour:this.props.hour,
             minute:this.props.minute,
             second:value,
@@ -44,7 +47,9 @@ class Time extends React.Component {
     render() {
         return (
             <div className={styles.wrapper}>
-                <input value={this.props.hour} onInput={(e)=>this.handleHourChange(window.parseInt(e.target.value))} />&nbsp;{'时'}&nbsp;<input value={this.props.minute} onInput={(e)=>this.handleMinuteChange(window.parseInt(e.target.value))}/>&nbsp;{'分'}&nbsp;<input value={this.props.second} onInput={(e)=>this.handleSecondChange(window.parseInt(e.target.value))}/>&nbsp;{'秒'}
+                <input className={styles.input} value={this.props.hour} onInput={(e)=>this.handleHourChange(window.parseInt(e.target.value))} />&nbsp;{'时'}&nbsp;
+                <input className={styles.input} value={this.props.minute} onInput={(e)=>this.handleMinuteChange(window.parseInt(e.target.value))}/>&nbsp;{'分'}&nbsp;
+                <input className={styles.input} value={this.props.second} onInput={(e)=>this.handleSecondChange(window.parseInt(e.target.value))}/>&nbsp;{'秒'}
             </div>
         )
     }

+ 3 - 1
src/common/components/Calendar/Time/index.less

@@ -3,7 +3,9 @@
 .wrapper{
   margin-top: 5px;
   text-align: center;
-  input{
+  height: 34px;
+  line-height: 34px;
+  .input{
     width: 40px;
     border: 1px solid @border-color;
     height: 22px;

+ 4 - 3
src/common/components/Calendar/YearItem/index.less

@@ -1,12 +1,13 @@
 @import "~@less/mixin.less";
 
 .item{
-  display: inline-block;
+  float: left;
   width: 60px;
-  height: 15px;
+  height: 20px;
   text-align: center;
   font-size: @font-size-h5;
-  line-height: 15px;
+  line-height: 20px;
+  margin: 3px 0;
   cursor: pointer;
   &.gray{
     color:@gray;

+ 131 - 95
src/common/components/Calendar/index.jsx

@@ -1,7 +1,7 @@
 import React from 'react'
 import style from './index.less'
 import PropTypes from 'prop-types'
-import {YearList, MonthList} from './SelectList'
+import { YearList, MonthList } from './SelectList'
 import Content from './Content'
 import Time from './Time'
 
@@ -12,112 +12,148 @@ import Time from './Time'
  * needTime:是否显示下方时间输入控件  不显示则默认的时分秒为0
  */
 class Calendar extends React.Component {
-    constructor() {
-        super();
-        const date=new Date();
-        this.year=date.getFullYear();
-        this.month=date.getMonth()+1;
-        this.day=date.getDate();
-        this.inputing=false;
-        this.state = {
-            year:  this.year,
-            month:  this.month,
-            select:{
-                year:  this.year,
-                month:  this.month,
-                day: 0,//这里设置初始选中的值
-                hour:0,
-                minute:0,
-                second:0
-            }
-        }
+  constructor(props) {
+    super(props);
+    const date = new Date();
+    this.year = date.getFullYear();
+    this.month = date.getMonth() + 1;
+    this.day = date.getDate();
+    this.inputing = false;
+    this.state = {
+      year: this.year,
+      month: this.month,
+      day: this.day,
+      select: {
+        year: this.year,
+        month: this.month,
+        day:  0,
+        hour:0,
+        minute:0,
+        second:0
+      }
     }
-
-    handleYearSelect(year) {
-        if(year===this.year && this.state.month>this.month){
-            this.setState({
-                year: year,
-                month:this.month
-            });
-        }else{
-            this.setState({
-                year: year
-            });
-        }
+  }
+  componentDidMount(){
+    this.setState({
+      year: this.props.timeLis && this.props.timeLis.year || this.year,
+      month: this.props.timeLis && this.props.timeLis.month || this.month,
+      day: this.props.timeLis && this.props.timeLis.day || this.day,
+      select: {
+        year: this.props.timeLis && this.props.timeLis.year || this.year,
+        month: this.props.timeLis && this.props.timeLis.month || this.month,
+        day: this.props.timeLis && this.props.timeLis.day || this.day,//这里设置初始选中的值
+        hour: this.props.timeLis && this.props.timeLis.hour,
+        minute: this.props.timeLis && this.props.timeLis.minute,
+        second: this.props.timeLis && this.props.timeLis.second
+      }
+    })
+  }
+  handleYearSelect(year) {
+    if (year === this.year && this.state.month > this.month) {
+      this.setState({
+        year: year,
+        month: this.month
+      });
+    } else {
+      this.setState({
+        year: year
+      });
     }
+  }
 
-    handleMonthSelect(month) {
-        this.setState({
-            month: month
-        });
-    }
+  handleMonthSelect(month) {
+    this.setState({
+      month: month
+    });
+  }
 
-    handleChange(info){
-        if(this.inputing){
-            return;
-        }
-        this.inputing=true;
-        info.year=this.state.year;
-        info.month=this.state.month;
-        // info.day = this.day;//没选日就加上默认值
-        if(info.hour==null){
-            info.hour=this.state.select.hour;
-            info.minute=this.state.select.minute;
-            info.second=this.state.select.second;
-        }
-        this.props.handleChange(Object.assign({},info));
-        this.setState({
-            select:info
-        });
+  handleChange(info) {
+    if (this.inputing) {
+      return;
     }
-
-    handleTodayClick(){
-        const info={
-            year:this.year,
-            month:this.month,
-            day:this.day,
-            hour:this.state.select.hour,
-            minute:this.state.select.minute,
-            second:this.state.select.second
-        };
-        this.setState({
-            select:info
-        });
-        this.props.handleChange(info);
+    this.inputing = true;
+    info.year = this.state.year;
+    info.month = this.state.month;
+    // info.day = this.state.day;//没选日就加上默认值
+    if (info.hour == null) {
+      info.hour = this.state.select.hour;
+      info.minute = this.state.select.minute;
+      info.second = this.state.select.second;
     }
-
-    genTimeComponent(){
-        return this.props.needTime?<Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} handleChange={(info)=>{this.handleChange(info)}}/>:null;
+    this.props.handleChange(Object.assign({}, info));
+    this.setState({
+      select: info
+    });
+  }
+  timeSure() {
+    if (this.inputing) {
+      return;
     }
-    render() {
-        return (
-            <div className={style.wrapper}>
-                <div className={style.top}>
-                    <div className={style.year}>
-                        <YearList select={this.state.year} canSelectFuture={this.props.canSelectFuture} handleChange={(info) => this.handleYearSelect(info)}/>
-                    </div>
-                    <div className={style.month}>
-                        <MonthList year={this.state.year} canSelectFuture={this.props.canSelectFuture} select={this.state.month} handleChange={(info) => this.handleMonthSelect(info)}/>
-                    </div>
-                    <div className={style.button}>
-                        <button onClick={()=>this.handleTodayClick()}>{'今天'}</button>
-                    </div>
-                </div>
-                <Content selectTime={this.state.select} year={this.state.year} month={this.state.month} handleClick={(info)=>this.handleChange(info)} canSelectFuture={this.props.canSelectFuture}/>
-                {this.genTimeComponent()}
-            </div>
-        )
+    this.inputing = true;
+    let info = this.state.select
+    info.year = this.state.year;
+    info.month = this.state.month;
+    // info.day = this.state.day;//没选日就加上默认值
+    if (info.hour == null) {
+      info.hour = this.state.select.hour;
+      info.minute = this.state.select.minute;
+      info.second = this.state.select.second;
     }
+    this.props.timeSure(Object.assign({}, info))
+    this.setState({
+      select: info
+    });
+  }
+  handleTodayClick() {
+    const info = {
+      year: this.year,
+      month: this.month,
+      day: this.day,
+      hour: this.state.select.hour,
+      minute: this.state.select.minute,
+      second: this.state.select.second
+    };
+    this.setState({
+      select: info
+    });
+    // this.props.timeSure(Object.assign({}, info))
+    this.props.handleChange(info);
+  }
+  genTimeComponent() {
+    return this.props.needTime ? <Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} day={this.state.select.day} handleChange={(info) => { this.handleChange(info) }} /> : null;
+  }
+  render() {
+    return (
+      <div className={style.wrapper} id="calendarDate" style={{ top: this.props.top }}>
+        <div className={style.top}>
+          <div className={style.year}>
+            <YearList select={this.state.year} canSelectFuture={this.props.canSelectFuture} handleChange={(info) => this.handleYearSelect(info)} />
+          </div>
+          <div className={style.month}>
+            <MonthList year={this.state.year} canSelectFuture={this.props.canSelectFuture} select={this.state.month} handleChange={(info) => this.handleMonthSelect(info)} />
+          </div>
+          <div className={style.button}>
+            <button onClick={() => this.handleTodayClick()}>{'今天'}</button>
+          </div>
+        </div>
+        <Content selectTime={this.state.select} year={this.state.year} month={this.state.month} day={this.state.day} handleClick={(info) => this.handleChange(info)} canSelectFuture={this.props.canSelectFuture} />
+        {this.genTimeComponent()}
+        {
+          this.props.sure ? <div className={style.timeSure} onClick={() => this.timeSure({})}>确定</div> : ''
+        }
+      </div>
+    )
+  }
 
-    componentDidUpdate(){
-        this.inputing=false;
-    }
+  componentDidUpdate() {
+    this.inputing = false;
+  }
 }
 
 export default Calendar;
 
 Calendar.propTypes = {
-    handleChange: PropTypes.func,
-    needTime:PropTypes.bool,
-    canSelectFuture:PropTypes.bool
+  handleChange: PropTypes.func,
+  needTime: PropTypes.bool,
+  canSelectFuture: PropTypes.bool
 };

+ 23 - 1
src/common/components/Calendar/index.less

@@ -9,7 +9,7 @@
   border-radius: 3px;
   position: absolute;
   top: 10px;
-    right: 0;
+  right: 0;
   z-index: 100;
   border: 1px solid #ccc;
   box-sizing: border-box;
@@ -49,4 +49,26 @@
       }
     }
   }
+  
+  .timeSure{
+    width: 46px;
+    height: 26px;
+    line-height: 26px;
+    position: absolute;
+    right: 5px;
+    bottom: 10px;
+    box-sizing: border-box;
+    color:#1F547E;
+    border: 1px solid #b1d2ec;
+    background-color: #deecf8;
+    text-align: center;
+    cursor: pointer;
+    &:hover{
+      background-color: #ECF4FB;
+    }
+    &:active{
+      box-shadow: @active-box-shadow;
+      border-radius: 2px;
+    }
+  }
 }

+ 1 - 1
src/common/components/ComplexModal/index.jsx

@@ -25,7 +25,7 @@ class ComplexModal extends Component {
 
   render() {
     const { onclose,title,children,footer,shadeClose,icon,width,top,bottom} = this.props;
-    const marginLeft = width? -parseInt(width)/2 : '';
+    const marginLeft = width? - parseInt(width)/2 : '';
     //const marginTop = height? -parseInt(height)/2: '';
     const domNode = document.getElementById('root');
     return ReactDom.createPortal(<div className={style['container']}>

+ 27 - 0
src/common/components/WrapModalContainer/index.jsx

@@ -0,0 +1,27 @@
+import React from "react";
+import {dragBox} from '@utils/drag';
+import ReactDom from "react-dom";
+import style from "./index.less";
+import close from '@common/images/icon_close.png';
+
+class WrapModalContainer extends React.Component {
+  constructor(props) {
+    super(props)
+  }
+  componentDidMount(){
+    dragBox('previewWrapper','previewStatic','add')
+  }
+  render() {
+    const { onClose, children,title,width,height } = this.props;
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<div className={style['container']}>
+      <div className={style['shade']} onClick={onClose}></div>
+      <div className={style['modal']} id="previewWrapper" style={{width:width+'px',marginLeft:(-width/2)+'px',height:height,marginTop:(-height/2)+'px'}}>
+        <div id="previewStatic" className={`${style['close']} drag-title`}>{title}<img src={close} onClick={onClose} /></div>
+        {children}
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default WrapModalContainer;

+ 47 - 0
src/common/components/WrapModalContainer/index.less

@@ -0,0 +1,47 @@
+.container {
+  position: fixed;
+  z-index: 2000;
+  width: 100%;
+  height: 100%;
+  .shade {
+    position: fixed;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    background-color: #000;
+    opacity: 0.6;
+    filter:alpha(opacity=60);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  }
+  .modal {
+    width: 820px;
+    background: #fff;
+    position: fixed;
+    left: 50%;
+    top:50%;
+    margin-left: -410px;
+    // top: 7%;  
+    // bottom: 7%;
+    // height: 86%;
+    overflow: hidden;
+    padding-top: 40px;
+  }
+  .close { 
+    padding:  0 15px;
+    height: 40px;
+    line-height: 40px;
+    border-bottom: 1px solid #EAEDF1;
+    box-sizing: border-box;
+    position: absolute;
+    width: 100%;
+    top: 0;
+    background-color: #fff;
+    z-index: 10;
+    img{
+      float:right;
+      cursor: pointer;
+      margin-top: 10px;
+    }
+  }
+}

+ 3 - 1
src/common/components/index.js

@@ -24,6 +24,7 @@ import MiniToast from "./MiniToast";
 import DelToast from "./DelToast";
 import TailInlineTag from "./TailInlineTag";
 import Footer from "./Footer";
+import WrapModalContainer from "./WrapModalContainer";
 
 module.exports = {
     Banner,
@@ -52,5 +53,6 @@ module.exports = {
     DelToast,
     MiniToast,
     TailInlineTag,
-    Footer
+    Footer,
+    WrapModalContainer
 };

BIN
src/common/images/check-circle.png


BIN
src/common/images/check-right.png


BIN
src/common/images/date1.png


BIN
src/common/images/down.png


BIN
src/common/images/emergency.png


BIN
src/common/images/up.png


+ 26 - 4
src/common/less/variables.less

@@ -5,6 +5,10 @@
 @blue: #3B9ED0;
 @red:#ff0000;
 @tab-color:#3B9ED0;
+
+@ipt-color:#E9F5FA;
+@ipt-bg-color:#F0F0F0;
+@ipt-wrap-color:#e2e2e2;
 /***按钮hover***/
 @button-hover: #aaa;
 
@@ -203,6 +207,16 @@
   -ms-user-select: none;
   user-select: none;
 }
+:global(.clearfix) {
+  zoom: 1;
+}
+:global(.clearfix:after) {
+  content: "";
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
+}
 // 加入病历
 .add-record{
   float: right;
@@ -242,8 +256,16 @@
     opacity: .5;
   }
 }
-.ellipsis {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
+// 弹窗遮罩
+.mask{
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #000;
+  opacity: .6;
+  filter:alpha(opacity=60);
+  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  z-index: 999;
 }

+ 4 - 4
src/components/AddAssistCheck/index.jsx

@@ -140,7 +140,7 @@ class AddAssistCheck extends React.Component {
   }
   getAssistLabel() {
     const { assistLabel, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation } = this.props;
-    const { visible,activeName,id } = this.state;
+    const { visible,activeName,id,date } = this.state;
     return <ul className={styles.labelWrap} id="datePick">
       {
         assistLabel.map((item, idx) => {
@@ -159,9 +159,9 @@ class AddAssistCheck extends React.Component {
               <i onClick={() => this.handleShowDate(idx)}></i>
               {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
               <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
-              <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>
+              {
+                this.state.date && idx == this.state.active ?<Calendar handleChange={(info) => { handleChangeDate(info, idx); this.setState({ date: false }) }} top={30}></Calendar>:null
+              }
             </div>
           <DelToast show={idx==id?visible:false}
                     name={activeName} 

+ 11 - 3
src/components/AddInspect/SlideExcel/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal,timestampToTime } from '@utils/tools';
+import { normalVal,timestampToTime,getStatusImg } from '@utils/tools';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 class SlideExcel extends Component {
@@ -50,7 +50,11 @@ class SlideExcel extends Component {
                           <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
                         </span>
                       </td>
-                      <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
+                      <td style={{width:'20%'}}>
+                        {
+                          getStatusImg(value.type,value.value,0)
+                        }
+                        {value.unit}</td>
                       <td style={{width:'25%'}}>
                           {normalVal(value.min,value.max)}
                       </td>
@@ -65,7 +69,11 @@ class SlideExcel extends Component {
                             <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
                           </span>
                         </td>
-                        <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
+                        <td style={{width:'20%'}}>
+                          {
+                            getStatusImg(value.type,value.value,0)
+                          } 
+                          {value.unit}</td>
                         <td style={{width:'25%'}}>
                             {normalVal(value.min,value.max)}
                         </td>

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

@@ -164,6 +164,12 @@
   background: url('../img/info3.png') no-repeat center center;
   background-size: 100% auto; 
 }
+.excelDataTitle {
+  .tagSpan {
+    display: inline-block;
+    line-height: 28px;
+  }
+}
 .tagSpan {
   position: relative;
 }

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

@@ -360,7 +360,7 @@ class Inspect extends React.Component {
             }
           </ul>
         </div>
-        <div style={{ position: "relative", clear: "both" }}>
+        <div style={{ position: "relative", clear: "both",top:"5px" }}>
           <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
           {this.state.show ? <SearchOption windowHeight={windowHeight} height={280} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length>0?this.getSearchList(list):(inspectVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}

BIN
src/components/AssistCheck/dists/FileAPI.flash.camera.swf


BIN
src/components/AssistCheck/dists/FileAPI.flash.image.swf


BIN
src/components/AssistCheck/dists/FileAPI.flash.swf


Fichier diff supprimé car celui-ci est trop grand
+ 3608 - 0
src/components/AssistCheck/dists/FileAPI.html5.js


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.html5.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 4418 - 0
src/components/AssistCheck/dists/FileAPI.js


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 11008 - 0
src/components/AssistCheck/dists/jQuery.js


Fichier diff supprimé car celui-ci est trop grand
+ 4 - 0
src/components/AssistCheck/dists/jq.js


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 0
src/components/AssistCheck/dists/jquery.fileapi.min.js


+ 205 - 5
src/components/AssistCheck/index.jsx

@@ -1,21 +1,221 @@
 import React from 'react';
-import {ItemBox} from '@commonComp';
 import AddAssistCheck from '../AddAssistCheck';
+import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
+import styles from './index.less';
+import Notify from '@commonComp/Notify';
+import $ from 'jquery';
+import { isIE, getUrlArgObject } from '@utils/tools.js';
+import { dragBox } from '@utils/drag';
+import WrapModalBodyPac from '../WrapModalBodyPac';
+import { getExcelList } from '@store/actions/inspect';
+import store from '@store';
+import { host, prefix } from '@utils/config.js';
 
-import styles from './index.less'
+
+// (function ($) {
+//   var FileAPI = {
+//     // @default: "./dist/"
+//     staticPath: './dists/',
+
+//     // @default: FileAPI.staticPath + "FileAPI.flash.swf"
+//     flashUrl: './dists/FileAPI.flash.swf',
+
+//     // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
+//     flashImageUrl: './dists/FileAPI.flash.image.swf'
+//   };
+//   return FileAPI
+// })($)
+
+// import "./dists/FileAPI.js";
+
+// const isLocal = window.location.hostname.indexOf('localhost') != -1;
+// const qhost = isLocal ? host + prefix : prefix;
+// const api = {
+//   upload: qhost + '/lisExcelRes/lisExcelAnalysis'
+// };
+// let numFlg = 0;
 class AssistCheck extends React.Component {
     constructor(props){
         super(props);
-        
+        this.state={
+          val: '',
+          visible: false,
+          dom: [],
+          isIE: isIE(),
+          ieVersion: null,
+          height: '-1',
+          hide: false,
+          importLis:false
+        }
+        this.showSlideImport=this.showSlideImport.bind(this)
+        // this.handleBindFileApi=this.handleBindFileApi.bind(this)
+        this.checkSystemIpt=this.checkSystemIpt.bind(this)
+        this.showInIcss=this.showInIcss.bind(this)
+        this.onClose=this.onClose.bind(this)
+        this.handleImportExcel=this.handleImportExcel.bind(this)
+    } 
+    // componentDidMount() {
+    //   $(document).click((event) => {
+    //     let searchWrap = $('#importExcelBtns')[0];   // 导入按钮按钮
+    //     let searchOption = $('#importExcelLists')[0];   // 下拉列表
+    //     if (searchOption) {
+    //       if(searchWrap != event.target){
+    //         this.setState({ importLis: false });
+    //       }
+    //     }
+    //   });
+    // }
+    handleImportExcel() {
+      this.inputRef.click();
+    }
+    showSlideImport(){
+      let flg = this.state.importLis
+      this.setState({
+        importLis:!flg
+      })
     }
 
+    // handleBindFileApi(){
+    //   const {message} = this.props;
+    //   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;
+    //   var choose = document.getElementById('choose');
+    //   FileAPI.event.on(choose, 'change', function (evt) {
+    //     var files = FileAPI.getFiles(evt);
+    //     FileAPI.filterFiles(files, function (file, info) {
+    //       let name = file.name;
+    //       // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
+    //       //     Notify.error('请选择正确的excel表格')
+    //       //     return false;
+    //       // }else{
+    //       //     return true;
+    //       //   }
+    //         return true;
+    //     },
+    //       function (files, rejected) {
+    //         if (files.length) {
+    //           //console.log(files[0])
+    //           const securityCode = getUrlArgObject("code");
+    //           const appKeyId = getUrlArgObject("appI");
+    //           const appKeySecret = getUrlArgObject("appS");
+    //           FileAPI.upload({
+    //             // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
+    //             url: api.upload,
+    //             data: { hospitalCode: message == '{}' ? '' : message.hospitalCode },
+    //             files: { uploadfile: files[0] },
+    //             headers: {
+    //               appKeyId: appKeyId,
+    //               appKeySecret: appKeySecret,
+    //               securityCode: securityCode
+    //             },
+    //             complete: function (err, xhr) {
+    //               if (!err) {
+    //                 let res = JSON.parse(xhr.response);
+    //                 let message = res.data.messages;
+    //                 // store.dispatch(getExcelList(res.data));
+    //                 // fetchPushInfos && fetchPushInfos();
+    //                 // if (message && message.length != 0) {
+    //                 //   that.setState({
+    //                 //     visible: true,
+    //                 //     dom: message,
+    //                 //     height: message.length
+    //                 //   })
+    //                 // }
+    //                 // $("#choose").val("");
+    //               } else {
+    //                 let res = JSON.parse(xhr.response);
+    //                 Notify.error(res.msg)
+    //               }
+    //             }
+    //           });
+    //         }
+    //       });
+    //   });
+    // }
+    
+    onClose() {
+      this.setState({
+        hide: false
+      })
+      dragBox('previewWrapper', 'previewStatic', 'del')
+    }
+    checkSystemIpt() {
+      this.setState({
+        hide: true
+      })
+    }
+    showInIcss(){
+      const {showInIcss} = this.props
+      this.setState({
+        hide: false
+      })
+      showInIcss&&showInIcss();
+      dragBox('previewWrapper', 'previewStatic', 'del')
+    }
     render(){
-        const {list,getInfomation,windowHeight,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {checkedList,selectOneCheck,msgObj,selectGroupList,allCheckImport,hospitalSonInspect,handleSearchs,allCheck,message,hospitalPac, handleGetSonList,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {showSlideImport,checkSystemIpt,handleBindFileApi,showInIcss,onClose} = this;
+        const {importLis,ieVersion,hide} = this.state;
+        // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
+        //   ++numFlg
+        //   numFlg == 1?handleBindFileApi():null
+        // }
         return (
             <div className={styles.wrapper}>
                 <div className={styles.top}>
                     <span id="assistResultData">辅检结果数据</span>
-                    {/* <button>导入化验结果</button> */}
+                    <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                        <p id="importPacBtn" className={styles.importInspectBtn}>导入辅检结果</p>
+                    </div>
+                    {/* {
+                      hospitalMsg.importWayLis == 3 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
+                        导入化验结果
+                        <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+                      </div> : hospitalMsg.importWayLis == 22 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                        检查系统导入
+                      </div> : hospitalMsg.importWayLis == 2 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
+                        <p id="importExcelBtns" className={styles.importInspectBtn}>导入化验结果</p>
+                        {
+                          importLis?<ul className={styles.importSelect} id="importExcelLists">
+                            <li className={styles.excelIpt}>
+                              <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
+                              <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+                            </li>
+                            <li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>检查系统导入</li>
+                          </ul>:null
+                        }
+                          </div> : null
+                      } */}
+                    {
+                      hide ? <WrapModalContainer title={'导入辅检数据'} width={1000} height={650} onClose={onClose}>
+                        <WrapModalBodyPac
+                          hospitalSonInspect={hospitalSonInspect}
+                          hospitalPac={hospitalPac}
+                          handleGetSonList={handleGetSonList}
+                          handleSearch={handleSearchs}
+                          allCheckImport={allCheckImport}
+                          allCheck={allCheck}
+                          selectGroupList={selectGroupList}
+                          checkedList={checkedList}
+                          selectOneCheck={selectOneCheck}
+                          showInIcss={showInIcss}
+                          message={message}
+                          msgObj={msgObj}
+                          height={650}
+                        ></WrapModalBodyPac>
+                      </WrapModalContainer> : null
+                    }
                 </div>
                 <ItemBox 
                     className={styles.title}

+ 50 - 12
src/components/AssistCheck/index.less

@@ -18,19 +18,57 @@
         position: relative;
         z-index: 2;
     }
-    button {
-        float: right;
-        width: 90px;
-        height: 28px;
-        line-height: 28px;
-        border: 1px solid @template-color;
-        color: @template-color;
-        background-color: #fff;
-        border-radius: 5px;
-        font-size: 12px;
-        outline: none;
-    }
+}
+
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.pushButton {
+    float: right;
+    width: 90px;
+    height: 28px;
+    line-height: 28px;
+    border: 1px solid @template-color;
+    color: @template-color;
+    background-color: #fff;
+    border-radius: 5px;
+    font-size: 12px;
+    position: relative;
+    bottom: 3px;
+    cursor: pointer;
+    text-align: center;
+    box-sizing: content-box;
 }
 .title {
     margin-top: -23px !important;
+}
+.importInspect{
+  padding: 0 !important;
+}
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.importSelect {
+  position: absolute;
+  width: 120%;
+  top: 29px;
+  left: 0;
+  z-index: 99;
+  font-size: 12px;
+  box-shadow: 0 10px 20px 0 #989DA3;
+  border: 1px solid #dedede;
+  background-color: #fff;
+  // display: none;
+  li {
+    height: 34px;
+    line-height: 34px;
+    padding-left: 10px;
+    cursor: pointer;
+  }
+  li:hover {
+    background-color: @ipt-color;
+    color: #2A9BD5;
+  }
 }

+ 59 - 7
src/components/Banner/index.jsx

@@ -1,22 +1,32 @@
 import React, { Component } from "react";
+import { connect } from "react-redux";
 import style from "./index.less";
 import logo from "../../common/images/logoa.png";
 import setup from "../../common/images/setup.png";
 import close from '../../common/images/icon_close.png';
 import ok from '../../common/images/confirm.png'
+import emergIcon from '../../common/images/emergency.png'
 import {Notify} from '@commonComp';
+// import Emergency from '@components/Emergency';
+import Emergency from '@containers/Emergency';
+import {getAllHis} from '@store/async-actions/fetchModules.js';
+import {timestampToTime} from '@utils/tools.js';
 
 class Banner extends Component {
   constructor(props){
     super(props)
     this.state = {
       mode: props.typeConfig,
-      zIndex:204
+      zIndex:204,
+      emergency:true,
+      emergencyBox:false
     };
     this.showConfigModal = this.showConfigModal.bind(this);
     this.closeConfigModal = this.closeConfigModal.bind(this);
     this.changeType = this.changeType.bind(this);
     this.confirmType = this.confirmType.bind(this);
+    this.showHisModal = this.showHisModal.bind(this);
+    this.handleHisClose = this.handleHisClose.bind(this);
   }
 
   showConfigModal(){
@@ -60,18 +70,41 @@ class Banner extends Component {
       Notify.error("模式切换失败,请稍后再试");
     }
   }*/
+  showHisModal(){
+    const {getAllRecord} = this.props;
+    const item = {
+      current:1
+    }
+    getAllRecord&&getAllRecord(item);
+    this.setState({
+      emergencyBox:true,
+      zIndex:206
+    })
+  }
+  handleHisClose(){
+    this.setState({
+      emergencyBox:false,
+      zIndex:204
+    })
+  }
   render() {
     const {visible,disVisible,copyVisible} = this.props;
-    const {mode,zIndex} = this.state;
+    const {mode,zIndex,emergency,emergencyBox} = this.state;
     const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
 
     return (
       <div className={style["logo"]} style={{zIndex:disVisible||copyVisible?40:zIndex}}>
         <img src={logo} />
-        <span>|&nbsp;&nbsp;智能辅助临床决策系统</span>
-        <div className={style["buon"]} onClick={showConfigModal}>
-          <img className={style["st"]} src={setup} />
-          设置
+        <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
+        <div className={style["buon"]}>
+          {emergency?<div className={style["buon1"]} onClick={this.showHisModal}>
+                      <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
+                      本科室近期全部病历
+                    </div>:''}
+          <div className={style["buon1"]} onClick={showConfigModal}>
+            <img className={style["st"]} src={setup} />
+            设置
+          </div>
         </div>
         {visible?<div className={style['modal']}>
           <div className={style['shade']} onClick={closeConfigModal}></div>
@@ -85,9 +118,28 @@ class Banner extends Component {
             <div className={style['btn']} onClick={confirmType}>确认</div>
           </div>
         </div>:''}
+        {emergencyBox?<div className={style['modal']}>
+            <div className={style['shade']} onClick={this.handleHisClose}></div>
+            <Emergency show={emergencyBox} close={this.handleHisClose}/>
+          </div>:''}
+        
       </div>
     );
   }
 }
 
-export default Banner;
+const mapStateToProps = function(state){
+  return {
+
+  }
+}
+
+const mapDispatchToProps = function(dispatch){
+  return {
+    getAllRecord(item){
+      dispatch(getAllHis(item));
+    }
+  }
+}
+// export default Banner;
+export default connect(mapStateToProps,mapDispatchToProps)(Banner);

+ 12 - 2
src/components/Banner/index.less

@@ -15,7 +15,8 @@
       vertical-align: middle;
       margin: 0 10px 2px 18px;
     }
-    span{
+    // span{
+    .logo-name{
         display: inline-block;
         line-height: 40px;
         color: #FFFFFF;
@@ -27,13 +28,22 @@
         margin: 0px 15px 4px 10px;
         color: #FFFFFF;
         font-size: 16px;
-        cursor: pointer;
+        // cursor: pointer;
+        .buon1{
+          display: inline-block;
+          cursor: pointer;
+          margin-left: 10px;
+        }
     }
     .st{
         margin: 9px 2px 10px 10px;
         border: 0 solid #FFFFFF;
         text-align: center;
     }
+    .his{
+      width: 20px;
+      height: 20px;
+    }
     .modal {
       .shade {
         position: fixed;

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

@@ -1,4 +1,4 @@
-import SaveDataAll from "@containers/BodyContainer";
+import EMRContainer from "@components/EMRContainer";
 import PushContainer from '@components/PushContainer';
 
 import style from './index.less';
@@ -6,7 +6,7 @@ import style from './index.less';
 const BodyContainer = (props) =>{
   const { saveDateAll } = props;
   return <div className={style['container'] + ' clearfix'}>
-      <SaveDataAll saveDateAll={saveDateAll}></SaveDataAll>
+      <EMRContainer saveDateAll={saveDateAll}></EMRContainer>
       <PushContainer></PushContainer>
   </div>;
 }

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

@@ -53,8 +53,7 @@ class CheckBody extends Component{
   }
   handleClick(e){//让搜索框跟随鼠标点击移动
     // e.stopPropagation();
-    const {fetchPushInfos,totalHide,getSearchLocation} = this.props;
-    //fetchPushInfos&&fetchPushInfos();
+    const {totalHide,getSearchLocation} = this.props;
     this.getData();
     if(totalHide){
       return ;

+ 25 - 12
src/components/ChronicInfo/index.jsx

@@ -7,13 +7,15 @@ import allTableIcon from '@common/images/all-table.png';
 import add from '@common/images/add-result.png';
 import added from '@common/images/first.png';
 import checkIcon from '@common/images/check.png';
+import up from '@common/images/slide-up.png';
+import down from '@common/images/slide-down.png';
 import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn,Footer,Notify} from '@commonComp';
 import infoShow from '@common/images/info-show.png';
 import infoMove from '@common/images/info-move.png';
 import ScaleTable from '@containers/ScaleTable';
 import {deepClone} from '@utils/tools';
-import className from 'classnames';
 import $ from 'jquery';
+import config from '@config/index';
 
 /***
 慢病右侧推送模块规则:
@@ -44,6 +46,7 @@ class ChronicInfo extends React.Component{
       currentIndex: -1 //当前index
     };
 
+    this.$content = React.createRef();
     this.showInfo = this.showInfo.bind(this);
     this.closeInfo = this.closeInfo.bind(this);
     this.showOption = this.showOption.bind(this);
@@ -58,6 +61,7 @@ class ChronicInfo extends React.Component{
     this.handleForRadio = this.handleForRadio.bind(this);
     this.handleSaveCalcu = this.handleSaveCalcu.bind(this);     //保存评估修改的计算和可能结果
     this.getAddBtnState = this.getAddBtnState.bind(this);
+    this.slideToggle = this.slideToggle.bind(this);
   }
 
   onPrint() {
@@ -477,24 +481,30 @@ class ChronicInfo extends React.Component{
                   })
     return list;
   }
-  getSlideClass(){
-    const {slideUp} = this.props;console.log('slideUp',slideUp);
-    const cls =slideUp?className(style["content"],style["slide"]):style["content"];
-    return cls;
-  }
   componentWillReceiveProps(next){
     if(JSON.stringify(next.calcuValues)!=JSON.stringify(this.props.calcuValues)){
       this.setState({
         calcuValues:next.calcuValues
       })
     }
+    if(next.slideUp!=this.props.slideUp){
+      if(next.slideUp){
+        $(this.$content.current).slideUp(config.slideTime);
+      }else{
+        $(this.$content.current).slideDown(config.slideTime);
+      }
+    }
+  }
+  slideToggle(){
+    const {toggleSlide,slideUp} = this.props;
+    toggleSlide&&toggleSlide(!slideUp);
   }
   render(){
     const scaleFooter = <Footer print={true}
                                 footText="确定"
                                 handlePrint={this.onPrint}
                                 handleConfirm={this.closeTable}/>;
-    const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide} = this.props;
+    const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide,slideUp} = this.props;
     return <div className={style["tips"]} style={{marginBottom:'15px'}}>
               <div className={`${style["tips-title"]} ${style["chronic"]}`}>
                 <div className={style["tips-name"]}>
@@ -502,15 +512,18 @@ class ChronicInfo extends React.Component{
                   <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}</h2>
                   <span className={style["redTips"]}>(页面信息有更新可能影响评估结果)</span>
                 </div>
-                <div className={style["tips-btn"]} style={{display:chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name?'block':'none'}}>
+                <div className={style['toggle-btn']}>
+                  <img src={slideUp?down:up} alt="展开/收起" onClick={this.slideToggle}/>
+                </div>
+                {/*<div className={style["tips-btn"]} style={{display:chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name?'block':'none'}}>
                   <span className={style["tipsDetails"]} onClick={() => this.showTableList(chronicDesease&&chronicDesease.name||chronicMagItem&&chronicMagItem.name)}>量表
                   </span>
-                </div>
+                </div>*/}
               </div>
-              <div className={this.getSlideClass()}>
+              <div className={style["content"]} ref={this.$content}>
                   {this.getDetail()}
               </div>
-              <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={450} width={450}>
+              {/*<ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={450} width={450}>
                       <ul className={style['toast-cont']}>
                         {tableList&&tableList.map((v,i)=>{
                           return <li>
@@ -524,7 +537,7 @@ class ChronicInfo extends React.Component{
                           </li>
                         })}
                       </ul>
-              </ConfirmModal>
+              </ConfirmModal>*/}
               {showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
                       title={showHide.name}
                       icon={tableIcon}

+ 10 - 5
src/components/ChronicInfo/index.less

@@ -9,14 +9,14 @@
     background: #EAF7FA;
     font-weight: bold;
     background: rgba(242,150,91,0.1);
-    img {
-      float:left;
-      margin-top: 0px;
-      margin-right: 5px;
-    }
     .tips-name{
       width: 238px;
       display: inline-block;
+      img {
+        float:left;
+        margin-top: 0px;
+        margin-right: 5px;
+      }
     }
     h2{
       display: inline-block;
@@ -46,6 +46,11 @@
       margin: 0 0 -2px 10px;
       }
     }
+    .toggle-btn{
+      display: inline-block;
+      float: right;
+      cursor: pointer;
+    }
     .content{
       font-size: 14px;
       padding:6px 15px;

+ 191 - 0
src/components/Emergency/HisList/index.jsx

@@ -0,0 +1,191 @@
+import React,{Component} from 'react';
+import style from './index.less';
+import empty from '@common/images/check-circle.png';
+import check from '@common/images/check-right.png';
+import date from '@common/images/date1.png';
+import TimeInterval from '@components/TimeInterval';
+import {getCurrentDate} from "@utils/tools";
+/**
+  科室病历列表
+**/
+
+class HisList extends Component {
+  constructor(props){
+    super(props);
+    this.state = {
+      select:[], //选中ids
+      hasSecond:-1,
+      all:false,
+      index:0,
+      startTime:getCurrentDate(false)+' 00:00:00',
+      endTime:getCurrentDate(false)+' 23:59:59',
+    }
+    this.handleGetMore = this.handleGetMore.bind(this);
+    this.handleSelect = this.handleSelect.bind(this);
+    this.handleAll = this.handleAll.bind(this);
+    this.handleDownload = this.handleDownload.bind(this);
+    this.getStartTime = this.getStartTime.bind(this);
+    this.getEndTime = this.getEndTime.bind(this);
+  }
+  getStartTime(date){
+    this.setState({startTime:date});
+    const {handleFilter} = this.props;
+    const {endTime} = this.state;
+    const obj = {
+      startDate:date,
+      endDate:endTime,
+      flag:999 //自定义以区分筛选条件
+    }
+    handleFilter&&handleFilter(obj);
+  }
+  getEndTime(date){
+    this.setState({endTime:date});
+    const {handleFilter} = this.props;
+    const {startTime} = this.state;
+    const obj = {
+      startDate:startTime,
+      endDate:date,
+      flag:999 //自定义以区分筛选条件
+    }
+    handleFilter&&handleFilter(obj);
+  }
+  handleFilter(flag){
+    const {handleFilter} = this.props;
+    this.setState({
+      hasSecond:flag
+    })
+    const obj = {
+      flag:flag
+    }
+    handleFilter&&handleFilter(obj);
+  }
+
+  handleGetMore(){
+    const {getMore} = this.props;
+    getMore&&getMore();
+  }
+
+  getClassName(id,ind){
+    const {select,index} = this.state;
+    if(select.indexOf(id) !=-1 || ind==index){
+      return style['select-li']
+    }
+    return '';
+  }
+
+  handleSelect(e,id){
+    e.stopPropagation();
+    let {select} = this.state;
+    if(select.indexOf(id)==-1){
+      select.push(id);
+    }else{
+      select.splice(select.indexOf(id),1);
+    }
+    this.setState({
+      select
+    })
+  }
+
+  getIcon(id){
+    const {select} = this.state;
+    if(select.indexOf(id)==-1){
+      return empty;
+    }
+    return check;
+  }
+
+  getAllIcon(){
+    const {all,select} = this.state;
+    const {data} = this.props;
+    if(all || select.length==data.length&&select.length!=0){
+      return check;
+    }
+    return empty;
+  }
+
+  handleAll(){
+    const {data} = this.props;
+    let {all} = this.state;
+    let allIds = [];
+    if(!all){
+      data&&data.map((v,i)=>{
+        allIds.push(v.inquiryId);
+      })
+    }
+    this.setState({
+      all:!all,
+      select:allIds
+    })
+  }
+
+  handleDetail(index){
+    const {detail} = this.props;
+    detail&&detail(index);
+    this.setState({
+      index:index
+    })
+  }
+
+  handleDownload(){
+    const { handleDownload } = this.props;
+    const {select} = this.state;
+    if(select.length>0){
+      handleDownload&&handleDownload(select);
+    }
+  }
+
+  getExportStyle(){
+    const {select} = this.state;
+    if(select.length>0){
+      return `${style['export']} ${style['exp-select']}`
+    }
+    return style['export'];
+  }
+
+  getList(){
+    const { data } = this.props;
+    let list = data&&data.map((v,i)=>{
+      return <li className={this.getClassName(v.inquiryId,i)} key={v.inquiryId} onClick={this.handleDetail.bind(this,i)}>
+        <p>{v.diagnose}</p>
+        <p className={style['name']}>{v.doctorName} {'于'}{v.inquiryTime} {'保存病历'}</p>
+        {v.diagnoseSecond?<div className={style['second']}>
+          <p>{v.diagnoseSecond}{'(诊后添加)'}</p>
+          <p className={style['name']}>{v.doctorNameSecond} {'于'}{v.inquiryTimeSecond} {'添加'}</p>
+        </div>:''}
+        <img src={this.getIcon(v.inquiryId)} className={style['check-box']} onClick={(e)=>this.handleSelect(e,v.inquiryId)}/>
+      </li>
+    })
+    return list;
+  }
+
+  render(){
+    const { data,total } = this.props;
+    const { hasSecond } = this.state;
+    return <div className={style['list-Box']}>
+      <h2>本科室近期全部历史病历</h2>
+      <div className={style['list-time']}>
+        <img src={date} />
+        <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
+      </div>
+      <div className={style['filter-box']}>
+        <span className={style['filter']}>筛选:</span>
+        <span className={hasSecond==-1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,-1)}>默认</span>
+        <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有二次诊断</span>
+        <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有二次诊断</span>
+      </div>
+      <div className={style['list']}>
+        <ul>
+          {this.getList()}
+        </ul>
+        {total>data.length?<p className={style['more']} onClick={this.handleGetMore}>点击查看更多</p>:''}
+      </div>
+      <div className={style['all-box']}>
+        <img src={this.getAllIcon()} className={style['check-all']} onClick={this.handleAll}/>
+        <span onClick={this.handleAll}>全选</span>
+        <span className={this.getExportStyle()} onClick={this.handleDownload}>导出已选数据</span>
+      </div>
+    </div>
+  }
+}
+
+export default HisList;

+ 113 - 0
src/components/Emergency/HisList/index.less

@@ -0,0 +1,113 @@
+.list-Box{
+  width: 360px;
+  height: 700px;
+  padding-top: 30px;
+  h2{
+    font-weight: 700;
+    font-size: 18px;
+    color: #2A9BD5;
+    letter-spacing: 0;
+    // line-height: 18px;
+    margin: 0 0 10px 20px;
+  }
+  .list-time{
+    width: 320px;
+    height: 39px;
+    background: #E9F5FA;
+    margin: 0 20px 8px;
+    padding-top: 6px;
+    position: relative;
+  }
+  .filter-box{
+    font-size: 12px;
+    color: #767676;
+    height: 44px;
+    line-height: 44px;
+    background: #F8F9FB;
+    .filter{
+      font-size: 12px;
+      margin-left: 20px;
+    }
+    .condition{
+      font-size: 12px;
+      padding: 3px 10px;
+      border-radius: 12px;
+      margin-left: 3px;
+      cursor: pointer;
+    }
+    .select{
+      color: #2A9BD5;
+      background: #E2EFF6;
+    }
+  }
+  .list{
+    height: 480px;
+    overflow-y: auto;
+    padding-bottom: 20px;
+    li{
+      font-size: 13px;
+      color: #0E1932;
+      // height: 68px;
+      padding: 16px 20px 16px 44px;
+      position: relative;
+    }
+    .name{
+      font-size: 12px;
+      color: #7C828E;
+      margin-top: 8px;
+    }
+    .second{
+      margin-top: 15px;
+    }
+    .select-li{
+      color:#2A9BD5;
+      background: #E9F5FA;
+      .name{
+        color:#2A9BD5;
+      }
+    }
+    /* .select-name{
+      color:#2A9BD5;
+    } */
+    .check-box{
+      width: 14px;
+      // height: 14px;
+      position: absolute;
+      left: 0px;
+      top: 27px;
+    }
+    .more{
+      text-align: center;
+      color: #2A9BD5;
+      cursor: pointer;
+      margin-top: 15px;
+    }
+  }
+  .all-box{
+    color: #7C828E;
+    height: 69px;
+    line-height: 69px;
+    padding: 0 20px;
+    border-top: 1px solid #E9F5FA;
+    .check-all{
+      width: 14px;
+      margin: 0 8px 0 0;
+    }
+    .export{
+      color: #E2EFF6;
+      display: inline-block;
+      width: 92px;
+      height: 30px;
+      line-height: 30px;
+      text-align: center;
+      border: 1px solid #E2EFF6;
+      border-radius: 4px;
+      margin-left: 177px;
+      cursor: pointer;
+    }
+    .exp-select{
+      color: #2A9BD5;
+      border-color: #2A9BD5;
+    }
+  }
+}

+ 196 - 0
src/components/Emergency/index.jsx

@@ -0,0 +1,196 @@
+import React,{Component} from 'react';
+import style from './index.less';
+import closeIcon from '@common/images/close-icon.png';
+import HisList from './HisList';
+import PreviewBody from '@components/PreviewBody';
+import config from '@config/index';
+
+/**
+  急诊:全科历史病历
+*/
+
+class EmergencyHis extends Component{
+  constructor(props){
+    super(props);
+    this.state = {
+      index:0,
+      timer:null,
+      valChange:true,
+      chooseItem:''
+    }
+    this.searInp = React.createRef();
+    this.handleClose = this.handleClose.bind(this);
+    this.getMore = this.getMore.bind(this);
+    this.handleFilter = this.handleFilter.bind(this);
+    this.showDetail = this.showDetail.bind(this);
+    this.handleDownload = this.handleDownload.bind(this);
+    this.handleInput = this.handleInput.bind(this);
+    this.handleAdd = this.handleAdd.bind(this);
+  }
+
+  handleClose(){
+    const {close} = this.props;
+    close&&close();
+  }
+
+  getMore(){//点击更多
+    const {params,getNextPage} = this.props;
+    let current = params&&params.current + 1;
+    let param = Object.assign({},params,{current:current});
+    getNextPage&&getNextPage(param);
+  }
+
+  handleFilter(obj){//筛选
+    const {filterData} = this.props;
+    filterData&&filterData(obj);
+  }
+
+  showDetail(index){//病历详情
+    this.setState({
+      index:index
+    })
+  }
+
+  handleDownload(ids){//导出
+    const { getDownload } = this.props;
+    getDownload&&getDownload(ids)
+  }
+  //搜索框输入
+  handleInput(e){
+    const { handleChangeValue } = this.props;
+    clearTimeout(this.state.timer);
+    let timer = setTimeout(()=>{
+        clearTimeout(this.state.timer);
+        if(e.target.value.trim() == ''){
+          return  handleChangeValue('');
+        }
+        handleChangeValue(e.target.value);
+    },config.delayTime);
+    this.setState({
+        timer,
+        valChange:true,
+        chooseItem:''
+    });
+  }
+  //点击搜索结果
+  handleListClick(item){
+    const { handleChangeValue } = this.props;
+    this.searInp.current.value = item.name;
+    handleChangeValue('');
+    this.setState({
+      valChange:false,
+      chooseItem:item.name
+    });
+  }
+  getBtnStyle(){
+    const {valChange} = this.state;
+    if(!valChange){
+      return `${style['add-btn']} ${style['comfirn-btn']}`
+    }
+    return style['add-btn'];
+  }
+  // 确认添加
+  handleAdd(){
+    const {chooseItem,index} = this.state;
+    const {addSecond,data} = this.props;
+    console.log("添加成功")
+    if(chooseItem.trim()){
+      // 添加接口
+      const item = {
+        name:chooseItem,
+        id:data[index].inquiryId
+      }
+      addSecond&&addSecond(item)
+    }
+  }
+
+  componentWillUnmount(){
+    // 组件销毁时 清除病历数据,因为每点开一次都会去请求
+    const {clearHisRecord} = this.props;
+    clearHisRecord&&clearHisRecord();
+  }
+
+  render(){
+    const {show,data,total,preInfo,searchData} = this.props;
+    const {index,valChange} = this.state;
+    // const searchData = [];
+    let baseObj = data[index];
+    let dataJson,dataStr;
+    if(baseObj){
+        dataJson = JSON.stringify(baseObj) == "{}" ? {} : JSON.parse(baseObj.dataJson);
+        dataStr = JSON.stringify(baseObj) == "{}" ? [] : baseObj.detailList;
+    }
+    const getAllDataStringList = () =>{           //获取所有模块文本的数据
+        let jsonDataString = {};
+        jsonDataString.lis = {};
+        jsonDataString.chief = dataStr[0].content || '';      //主诉
+        jsonDataString.present = dataStr[1].content || '';     //现病史
+        jsonDataString.other = dataStr[2].content || '';      //其他史
+        jsonDataString.vital = dataStr[3].content || '';    //查体
+        jsonDataString.lis = dataStr[4].content || '';      //化验导入填写
+        jsonDataString.pacs = dataStr[5].content || '';     //辅检
+        jsonDataString.diag = dataStr[6].content || '';      //诊断
+        jsonDataString.advice = dataStr[7].content || '';       //医嘱
+        return jsonDataString;
+    }
+    if(show){
+    return <div className={style['emer-box']}>      
+            <div className={style['emer-content']}>
+              <img src={closeIcon} className={style['img']} onClick={this.handleClose}/>
+              <div className={style['emer-left']}>
+                <HisList data={data} 
+                        total={total} 
+                        getMore={this.getMore} 
+                        handleFilter={this.handleFilter}
+                        detail={this.showDetail}
+                        handleDownload={this.handleDownload}/>
+              </div>
+              <div className={style['emer-right']}>
+                {
+                    baseObj == undefined || JSON.stringify(baseObj) == "{}" ? <p className={style['no-data']}>暂无数据</p> :
+                    <PreviewBody
+                        preInfo={preInfo}
+                        dataJson={dataJson}
+                        baseObj={baseObj}
+                        dataStr={dataStr.length > 0?getAllDataStringList(dataStr):[]}
+                        show={false}
+                        flg={true}
+                    ></PreviewBody>
+                }
+                <div className={style['emer-right-footer']}>
+                  {baseObj&&baseObj.diagnoseSecond?<p className={style['diag-display']}>
+                    <span>{baseObj.doctorNameSecond} {'在'}{baseObj.inquiryTimeSecond} 添加</span>
+                    <span className={style['diag-cont']}>{baseObj.diagnoseSecond}{'(诊后添加)'}</span>
+                  </p>:''}
+                  <div className={style['add-diag']}>
+                    <div>
+                      <span>添加二次诊断:</span>
+                      <input className={style['add-inp']} 
+                            ref={this.searInp}
+                            onInput={(e) => { 
+                              this.handleInput(e)
+                             }}
+                            onPropertyChange={(e) => {  // 兼容ie
+                                this.handleInput(e)
+                            }}/>
+                      <span className={this.getBtnStyle()} onClick={!valChange?this.handleAdd:''}>确认添加</span>
+                    </div>
+                    <p className={style['add-tip']}>说明:二次诊断只会对导出数据有影响(只为AI建模使用)并不会对真实病历产生任何影响!</p>
+                  </div>
+                </div>
+              </div>
+                {searchData.length>0?<div className={style['search-list']}>
+                      <ul>
+                        {searchData.map((v,i)=>{
+                          return <li key={v.questionId} onClick={this.handleListClick.bind(this,v)}>{v.name}{v.retrievalName?'('+v.retrievalName+')':''}</li>
+                        })}
+                      </ul>
+                    </div>:''}
+            </div>
+          </div>
+    }
+    return ''
+  }
+}
+
+export default EmergencyHis;

+ 117 - 0
src/components/Emergency/index.less

@@ -0,0 +1,117 @@
+@import "~@less/mixin.less";
+.mask-box{
+  .mask;
+}
+.emer-box{
+  width: 1060px;
+  height: 700px;
+  position: fixed;
+  left: 110px;
+  top: 70px;
+  z-index: 2002;
+  background: #fff;
+  // overflow: hidden;
+  .emer-content{
+    position: relative;
+  }
+  .img{
+    width: 40px;
+    height: 40px;
+    position: absolute;
+    top: 5px;
+    right: 3px;
+    cursor: pointer;
+    z-index: 888;
+  }
+  .emer-left{
+    width: 360px;
+    display: inline-block;
+    border-right: 1px solid #E9F5FA;
+  }
+  .emer-right{
+    width: 700px;
+    height: 700px;
+    overflow-y: auto;
+    display: inline-block;
+    vertical-align: top;
+    position: relative;
+    .no-data{
+      font-size: 18px;
+      position: absolute;
+      top: 300px;
+      left: 288px;
+      color: #7C828E;
+    }
+    .emer-right-footer{
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      width: 100%;
+    }
+    .diag-display{
+      color: #7C828E;
+      width: 100%;
+      height: 44px;
+      line-height: 44px;
+      background: #E9F5FA;
+      padding-left: 20px;
+      .diag-cont{
+        color: #2A9BD5;
+        margin-left: 10px;
+      }
+    }
+    .add-diag{
+      height: 71px;
+      border-top: 1px solid #E9F5FA;
+      padding: 8px 20px;
+      position: relative;
+      background: #fff;
+      .add-inp{
+        width: 460px;
+        height: 30px;
+        line-height: 30px;
+        border: 1px solid #C9CCD4;
+        border-radius: 2px;
+        padding-left: 10px;
+        margin-left: 7px;
+      }
+      .add-btn{
+        display: inline-block;
+        width: 80px;
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        color: #2A9BD5;
+        border: 1px solid #2A9BD5;
+        border-radius: 4px;
+        margin-left: 10px;
+        cursor: pointer;
+      }
+      .comfirn-btn{
+        color: #fff;
+        background: #2A9BD5;
+      }
+      .add-tip{
+        font-size: 12px;
+        color: #7C828E;
+        margin-top: 5px;
+      }
+    }
+  }
+  .search-list{
+    width: 460px;
+    height: 136px;
+    position: absolute;
+    bottom: -105px;
+    right: 115px;
+    background:#fff;
+    li{
+      height: 34px;
+      line-height: 34px;
+      padding-left: 20px;
+    }
+    li:hover{
+      background: #E9F5FA;
+    }
+  }
+}

+ 4 - 5
src/components/HistoryCaseContainer/index.jsx

@@ -6,7 +6,7 @@ import {initItemList} from "@store/async-actions/historyTemplates";
 import {visibleHistory,showHistory} from "@store/actions/historyTemplates";
 import store from '@store';
 import { ConfirmModal } from '@commonComp';
-import { pushAllDataList } from '@utils/tools';
+import { pushAllDataList,didPushParamChange } from '@utils/tools';
 import { CONFIRM_TYPE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
 import { dragBox } from '@utils/drag';
@@ -16,9 +16,6 @@ class HistoryCaseContainer extends React.Component {
         super(props);
         this.close = this.close.bind(this);
     }
-    componentDidMount(){
-        // store.dispatch(initItemList());
-    }
     makeSure(){
         let baseList = store.getState();
         let baseObj = baseList.historyTemplates.activeHistory;
@@ -26,7 +23,9 @@ class HistoryCaseContainer extends React.Component {
         store.dispatch(showHistory(false))
         store.dispatch({type: CONFIRM_TYPE, confirmType: baseObj.sign});
         pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
-        store.dispatch(billing())
+        if(didPushParamChange()){
+          store.dispatch(billing())
+        }
         dragBox('hisWrapMove','closeHis','del')
     }
     close(){

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

@@ -1,6 +1,6 @@
 
 .maskHistory {
-    position: fixed;
+     position: fixed;
     left: 0;
     top: 0;
     z-index: 241;
@@ -9,7 +9,7 @@
     background-color: #000;
     opacity:0.6;
     filter:alpha(opacity=60);
-    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);"; 
 }
 .center {
     text-align: center;

+ 270 - 184
src/components/Inspect/index.jsx

@@ -1,217 +1,303 @@
 import React from 'react';
-import { ItemBox,ConfirmModal } from '@commonComp';
+import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
 import AddInspect from '../AddInspect';
 import styles from './index.less';
 import { getExcelList } from '@store/actions/inspect';
 import Notify from '@commonComp/Notify';
 import store from '@store';
 import $ from 'jquery';
-import { host,prefix } from '@utils/config.js';
-import {isIE,getUrlArgObject} from '@utils/tools.js';
+import { host, prefix } from '@utils/config.js';
+import { isIE, getUrlArgObject } from '@utils/tools.js';
+import { dragBox } from '@utils/drag';
+import WrapModalBody from '../WrapModalBody';
 
 
 (function ($) {
-    var FileAPI = {
-        // @default: "./dist/"
-        staticPath: './dists/',
+  var FileAPI = {
+    // @default: "./dist/"
+    staticPath: './dists/',
 
-        // @default: FileAPI.staticPath + "FileAPI.flash.swf"
-        flashUrl: './dists/FileAPI.flash.swf',
+    // @default: FileAPI.staticPath + "FileAPI.flash.swf"
+    flashUrl: './dists/FileAPI.flash.swf',
 
-        // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
-        flashImageUrl: './dists/FileAPI.flash.image.swf'
-    };
-    return FileAPI
+    // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
+    flashImageUrl: './dists/FileAPI.flash.image.swf'
+  };
+  return FileAPI
 })($)
 
 import "./dists/FileAPI.js";
 
-const isLocal = window.location.hostname.indexOf('localhost')!=-1;
-const qhost = isLocal?host+prefix:prefix;
+const isLocal = window.location.hostname.indexOf('localhost') != -1;
+const qhost = isLocal ? host + prefix : prefix;
 const api = {
-    upload: qhost+'/lisExcelRes/lisExcelAnalysis'
+  upload: qhost + '/lisExcelRes/lisExcelAnalysis'
 };
+let numFlg = 0;
 
 class Inspect extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            val: '',
-            visible:false,
-            dom:[],
-            isIE:isIE(),
-            ieVersion:null,
-            height:'-1'
-        }
-        this.handleImportExcel = this.handleImportExcel.bind(this)
-        this.cancel = this.cancel.bind(this)
-        this.getWarings = this.getWarings.bind(this)
+  constructor(props) {
+    super(props);
+    this.state = {
+      val: '',
+      visible: false,
+      dom: [],
+      isIE: isIE(),
+      ieVersion: null,
+      height: '-1',
+      hide: false,
+      importLis:false
     }
-    componentDidMount(){
-        var ua = navigator.userAgent;
-        var _isIE = ua.indexOf("MSIE")>-1;
-        if(_isIE){
-            let version =  ua.match(/MSIE ([\d.]+)/)[1];
-            this.setState({
-                ieVersion:version
-            })
+    this.handleImportExcel = this.handleImportExcel.bind(this)
+    this.cancel = this.cancel.bind(this)
+    this.getWarings = this.getWarings.bind(this)
+    this.checkSystemIpt = this.checkSystemIpt.bind(this)
+    this.onClose = this.onClose.bind(this)
+    this.handleBindFileApi = this.handleBindFileApi.bind(this)
+    this.showInIcss = this.showInIcss.bind(this)
+    this.showSlideImport = this.showSlideImport.bind(this)
+  }  
+  componentDidMount() {
+    $(document).click((event) => {
+      let searchWrap = $('#importInspectBtn')[0];   // 导入按钮按钮
+      let searchOption = $('#importList')[0];   // 下拉列表
+      if (searchOption) {
+        if(searchWrap != event.target){
+          this.setState({ importLis: false });
         }
-        $('iframe').bind( 'load', function(){} )
-      const {fetchPushInfos} = this.props;
-        // FileAPI.debug = true
-        $.support.cors = true;
-        const that = this;
-        var choose = document.getElementById('choose');
-        FileAPI.event.on(choose, 'change', function (evt){
-            var files = FileAPI.getFiles(evt);
-            var baseData = store.getState().patInfo.message;
-            FileAPI.filterFiles(files, function (file, info){
-                let name = file.name;
-                // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
-                //     Notify.error('请选择正确的excel表格')
-                //     return;
-                // }else{
-                //     alert(9)
-                //     return true;
-                // }
-                return true;
-            },
-            function (files, rejected){
-                if( files.length ){
-                    //console.log(files[0])
-                  const securityCode = getUrlArgObject("code");
-                  const appKeyId = getUrlArgObject("appI");
-                  const appKeySecret = getUrlArgObject("appS");
-                    FileAPI.upload({
-                        // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
-                        url: api.upload,
-                        data:{ hospitalCode:baseData == '{}'? '' : baseData.hospitalCode },
-                        files: { uploadfile: files[0] },
-                        headers:{
-                          appKeyId:appKeyId,
-                          appKeySecret:appKeySecret,
-                          securityCode:securityCode
-                            // 'Content-Type':'Content-Type: multipart/form-data'
-                            // 'Content-Type':'application/json;charset=UTF-8'
-                            // 'Content-type': "text/plain"
-                            // "Content-Type": 'multipart/form-data',
-                            // 'Accept':'application/json'
-                        },
-                        complete: function (err, xhr){
-                            if( !err ){
-                                let res = JSON.parse(xhr.response);
-                                let message = res.data.messages;
-                                store.dispatch(getExcelList(res.data));
-                                fetchPushInfos&&fetchPushInfos();
-                                if (message&&message.length != 0) {
-                                    that.setState({
-                                        visible:true,
-                                        dom:message,
-                                        height:message.length
-                                    })
-                                }
-                                $("#choose").val("");
-                            }else{
-                                let res = JSON.parse(xhr.response);
-                                Notify.error(res.msg)
-                            }
-                        }
-                    });
+      }
+    });
+  }
+  handleBindFileApi(){
+    const {message} = this.props;
+    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;
+    var choose = document.getElementById('choose');
+    FileAPI.event.on(choose, 'change', function (evt) {
+      var files = FileAPI.getFiles(evt);
+      FileAPI.filterFiles(files, function (file, info) {
+        let name = file.name;
+        // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
+        //     Notify.error('请选择正确的excel表格')
+        //     return false;
+        // }else{
+        //     return true;
+        //   }
+          return true;
+      },
+        function (files, rejected) {
+          if (files.length) {
+            //console.log(files[0])
+            const securityCode = getUrlArgObject("code");
+            const appKeyId = getUrlArgObject("appI");
+            const appKeySecret = getUrlArgObject("appS");
+            FileAPI.upload({
+              // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
+              url: api.upload,
+              data: { hospitalCode: message == '{}' ? '' : message.hospitalCode },
+              files: { uploadfile: files[0] },
+              headers: {
+                appKeyId: appKeyId,
+                appKeySecret: appKeySecret,
+                securityCode: securityCode
+              },
+              complete: function (err, xhr) {
+                if (!err) {
+                  let res = JSON.parse(xhr.response);
+                  let message = res.data.messages;
+                  store.dispatch(getExcelList(res.data));
+                  fetchPushInfos && fetchPushInfos();
+                  if (message && message.length != 0) {
+                    that.setState({
+                      visible: true,
+                      dom: message,
+                      height: message.length
+                    })
+                  }
+                  $("#choose").val("");
+                } else {
+                  let res = JSON.parse(xhr.response);
+                  Notify.error(res.msg)
                 }
+              }
             });
+          }
         });
+    });
+  }
+  handleImportExcel() {
+    this.inputRef.click();
+  }
+  cancel() {
+    this.setState({ visible: false })
+  }
+  getStyle() {
+    const { ieVersion } = this.state;
+    if (ieVersion && ieVersion <= 9) {
+      return styles.disabledBtn;
+    } else {
+      return styles.button;
     }
-    handleImportExcel() {
-        this.inputRef.click();
-    }
-    cancel(){
-        this.setState({visible:false})
-    }
-  getStyle(){
-    const {ieVersion} = this.state;
-        if(ieVersion&&ieVersion<=9){
-            return styles.disabledBtn;
-        }else{
-            return styles.button;
-        }
   }
-    getWarings(lis){
-        <ul>
+  getWarings(lis) {
+    <ul>
+      {
+        lis.length > 0 && lis.map((val) => {
+          return <li>
+            {val}
+          </li>
+        })
+      }
+    </ul>
+  }
+  checkSystemIpt() {
+    this.setState({
+      hide: true
+    })
+  }
+  onClose() {
+    this.setState({
+      hide: false
+    })
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  showInIcss(){
+    const {showInIcss} = this.props
+    this.setState({
+      hide: false
+    })
+    showInIcss&&showInIcss();
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  showSlideImport(){
+    let flg = this.state.importLis
+    this.setState({
+      importLis:!flg
+    })
+  }
+  render() {
+    const { fetchPushInfos, hospitalSonInspect, checkedList,selectWaring,message, selectOneCheck, selectGroupList, allCheckImport, allCheck, hospitalInspect, handleGetSonList, getInfomation, hospitalMsg, inspectVal, handleSearch, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const { ieVersion, isIE, hide,importLis } = this.state;
+    const { checkSystemIpt, onClose,handleBindFileApi,showInIcss,showSlideImport } = this;
+    if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
+      ++numFlg
+      numFlg == 1?handleBindFileApi():null
+    }
+    return (
+      <div className={styles.wrapper}>
+        {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
+        <div className={styles.top}>
+          <span id="inspectResultData">化验结果数据</span>
+          {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
+          <div className={this.getStyle()} style={{ display: hospitalMsg.importWayLis == 0 ? 'none' : 'block' }}>
+            {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button> */}
+            {/* <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
+
+            {/* {0没有,1本地,2医院,3本地和医院} */}
             {
-                lis.length>0 && lis.map((val)=>{
-                    return <li>
-                        {val}
+              hospitalMsg.importWayLis == 3 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
+                <p className={styles.importInspectBtn}>导入化验结果</p>
+                <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+              </div> : hospitalMsg.importWayLis == 22 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                <p className={styles.importInspectBtn}>导入化验结果</p>
+              </div> : hospitalMsg.importWayLis == 2 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
+                <p id="importInspectBtn" className={styles.importInspectBtn}>导入化验结果</p>
+                {
+                  importLis?<ul className={styles.importSelect} id="importList">
+                    <li className={styles.excelIpt}>
+                      <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
+                      <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
                     </li>
-                })
+                    <li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>检查系统导入</li>
+                  </ul>:null
+                }
+                  </div> : null
             }
-        </ul>
-    }
-    render() {
-        const {fetchPushInfos,getInfomation,inspectVal,windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem,inspectList } = this.props;
-        const {ieVersion,isIE} = this.state;
-        return (
-            <div className={styles.wrapper} >
-                {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
-                <div className={styles.top}>
-                    <span id="inspectResultData">化验结果数据</span>
-                    <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}>
-                       {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button>*/}
-                        <div className={styles.pushButton}>导入化验结果</div>
-                        <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
-                    </div>
-                </div>
-                <ItemBox
-                    className={styles.title}
-                    title={'化验'}
-                    editable={false}
-                    border={true}
-                    marginTop={'20px'}
-                >
-                    <div style={{ padding: '10px', boxSizing: 'border-box' }} >
-                        <AddInspect
-                            handleSign={handleSign}
-                            handleChangeValue={handleChangeValue}
-                            list={list}
-                            handlePush={fetchPushInfos}
-                            labelList={labelList}
-                            handleLabelSub={handleLabelSub}
-                            fillActive={fillActive}
-                            handleClear={handleClear}
-                            handleConfirm={handleConfirm}
-                            changeActivePart={changeActivePart}
-                            getExcelDataList={getExcelDataList}
-                            handleCloseExcel={handleCloseExcel}
-                            labelListActive={labelListActive}
-                            delPartItem={delPartItem}
-                            inspectList={inspectList}
-                            getInfomation={getInfomation}
-                            inspectVal={inspectVal}
-                            windowHeight={windowHeight}
-                        >
-                        </AddInspect>
-                    </div>
-                </ItemBox>
-                <ConfirmModal visible={this.state.visible} 
-                    okText='删除' 
-                    cancelText='确定' 
-                    width="450"
-                    height={(this.state.height > 2 && this.state.height < 8)?((this.state.height * 30 + 120)+'px') : this.state.height > 8 ? '350px' : '200px'}
-                    noFooter= {true}
-                    close={this.cancel}>
-                    <ul className={styles.excelList}>
-                        {
-                            this.state.dom.length>0 && this.state.dom.map((val)=>{
-                                return <li className={styles.excelListWaring}>
-                                    {val}
-                                </li>
-                            })
-                        }
-                    </ul>
-                    <div onClick={this.cancel} className={styles.confirmBtn}>确定</div>
-                </ConfirmModal>
-            </div>
-        )
-    }
+
+            {
+              hide ? <WrapModalContainer title={'导入化验数据'} width={1000} height={650} onClose={onClose}>
+                <WrapModalBody
+                  hospitalSonInspect={hospitalSonInspect}
+                  hospitalInspect={hospitalInspect}
+                  handleGetSonList={handleGetSonList}
+                  handleSearch={handleSearch}
+                  allCheckImport={allCheckImport}
+                  allCheck={allCheck}
+                  selectGroupList={selectGroupList}
+                  checkedList={checkedList}
+                  selectOneCheck={selectOneCheck}
+                  selectWaring={selectWaring}
+                  showInIcss={showInIcss}
+                  message={message}
+                  height={650}
+                ></WrapModalBody>
+              </WrapModalContainer> : null
+            }
+          </div>
+        </div>
+        <ItemBox
+          className={styles.title}
+          title={'化验'}
+          editable={false}
+          border={true}
+          marginTop={'20px'}
+        >
+          <div style={{ padding: '10px', boxSizing: 'border-box' }} >
+            <AddInspect
+              handleSign={handleSign}
+              handleChangeValue={handleChangeValue}
+              list={list}
+              handlePush={fetchPushInfos}
+              labelList={labelList}
+              handleLabelSub={handleLabelSub}
+              fillActive={fillActive}
+              handleClear={handleClear}
+              handleConfirm={handleConfirm}
+              changeActivePart={changeActivePart}
+              getExcelDataList={getExcelDataList}
+              handleCloseExcel={handleCloseExcel}
+              labelListActive={labelListActive}
+              delPartItem={delPartItem}
+              inspectList={inspectList}
+              getInfomation={getInfomation}
+              inspectVal={inspectVal}
+              windowHeight={windowHeight}
+            >
+            </AddInspect>
+          </div>
+        </ItemBox>
+        <ConfirmModal visible={this.state.visible}
+          okText='删除'
+          cancelText='确定'
+          width="450"
+          height={(this.state.height > 2 && this.state.height < 8) ? ((this.state.height * 30 + 120) + 'px') : this.state.height > 8 ? '350px' : '200px'}
+          noFooter={true}
+          close={this.cancel}>
+          <ul className={styles.excelList}>
+            {
+              this.state.dom.length > 0 && this.state.dom.map((val) => {
+                return <li className={styles.excelListWaring}>
+                  {val}
+                </li>
+              })
+            }
+          </ul>
+          <div onClick={this.cancel} className={styles.confirmBtn}>确定</div>
+        </ConfirmModal>
+      </div>
+    )
+  }
 }
 
 export default Inspect;

+ 37 - 1
src/components/Inspect/index.less

@@ -20,8 +20,10 @@
         float: right;
         border-radius: 5px;
         border: 1px solid @template-color;
-        overflow: hidden;
+        // overflow: hidden;
         margin-top: -3px;
+        position: relative;
+        z-index: 99;
     }
     .disabledBtn{
         float: right;
@@ -41,6 +43,11 @@
         border-radius: 5px;
         color: @template-color;
         cursor: pointer;
+        // &:hover {
+        //   .importSelect {
+        //     display: block !important;
+        //   }
+        // }
     }
 }
 .title {
@@ -68,4 +75,33 @@
     color: #fff;
     // cursor: pointer;
 }
+.importInspect{
+  padding: 0 !important;
+}
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.importSelect {
+  position: absolute;
+  width: 120%;
+  top: 29px;
+  left: 0;
+  z-index: 99;
+  font-size: 12px;
+  box-shadow: 0 10px 20px 0 #989DA3;
+  border: 1px solid #dedede;
+  background-color: #fff;
+  // display: none;
+  li {
+    height: 34px;
+    line-height: 34px;
+    padding-left: 10px;
+    cursor: pointer;
+  }
+  li:hover {
+    background-color: @ipt-color;
+    color: #2A9BD5;
+  }
+}
 

+ 59 - 36
src/components/MedicalInfo/index.jsx

@@ -1,52 +1,75 @@
 import React, { Component } from 'react';
 import style from './index.less';
-import { SearchOption } from '@commonComp';
+import delIcon from '@common/images/del_nor.png';
 import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
 
 class MedicalInfo extends Component {
     constructor(props) {
-        super(props)
+        super(props);
+        this.$inp = React.createRef();
         this.$cont = React.createRef();
+        this.state={
+          val:''
+        };
+        this.search = this.search.bind(this);
+        this.handleChange = this.handleChange.bind(this);
+        this.clear = this.clear.bind(this);
     }
-    
-    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";
-        });
+    getSearchList() {
+        const { getAllConceptDetail,searchResult } = this.props;
+        return searchResult && searchResult.map((item) => {
+                return <li key={item.conceptId} onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>
+                            <span>{item.name}</span>
+                            <i>( {item.libTypeName} )</i>
+                            <button>查看</button>
+                        </li>;
+            });
     }
-
-    getSearchList(searchResult) {
-        const { getAllConceptDetail } = this.props
-        return <div className={style['search-result']}>
-            {
-            searchResult && searchResult.map((item) => {
-                return (<div key={item.conceptId} className={style['search-result-item']} >
-                   <span className={style['search-result-item-box']} title={item.name + '('+ item.libTypeName + ')'}>
-                    <span className={style['search-result-item-name']}> {item.name} </span> 
-                    <span className={style['search-result-item-type']}> {'('+ item.libTypeName + ')'} </span>
-                   </span>
-                   <span className={style['search-result-item-btn']} onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>查看</span>
-                </div>)
-            })
-            }
-        </div>
+    search(){
+      const {handleChangeValue} = this.props;
+      const val = this.$inp.current.value;
+      handleChangeValue&&handleChangeValue(val);
     }
+  handleChange(){
+      this.setState({
+        val:this.$inp.current.value
+      });
+  }
+  clear(){
+    this.$inp.current.value = '';
+    this.setState({
+      val:''
+    });
+  }
+  componentDidMount(){
+    const height = getWindowInnerHeight()-170;
+    this.$cont.current.style.height = height+"px";
+    if(this.$cont.current){
+      windowEventHandler('resize', ()=>{
+        const height = getWindowInnerHeight()-170;
+        this.$cont.current.style.height = height+"px";
+      });
+    }
+  }
     render() {
-        const {searchResult, handleChangeValue,pageTop,windowHeight } = this.props
+        const {searchResult} = this.props;
+        const {val} = this.state;
         return (
-        <div className={style['mefical-info-wrapper']}> 
-            <div ref={this.$cont}>
-                <div className={style['mefical-info-search-box']}>
-                    <SearchOption handleChangeValue={handleChangeValue}  height={180} visible={true}>
-                        {this.getSearchList(searchResult)}
-                    </SearchOption>
-                </div>
+        <div className={style['mefical-info-wrapper']} ref={this.$cont}>
+            <div className={style['search-cont']}>
+                <p className={style['title']}>医学知识搜索</p>
+                <p className={style['cont']}>
+                  <input type="text" className={style['input']} ref={this.$inp} onChange={this.handleChange}/>
+                  {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                  <button onClick={this.search}>搜索</button>
+                </p>
+              {searchResult&&searchResult.length>0?<div className={style['result']}>
+                    <p className={style['title']}>查询内容</p>
+                    <ul>
+                      {this.getSearchList()}
+                    </ul>
+              </div>:<p className={style['no-data']}>暂无搜索结果!</p>}
              </div>
-
         </div>
         
         )

+ 70 - 40
src/components/MedicalInfo/index.less

@@ -6,44 +6,74 @@
     overflow: hidden;
     position: relative;
 }
-.mefical-info-search-box {
-    position: absolute;
-    left: 67px;
-}
-.search-result {
-    overflow-y: auto;
-    max-height: 225px;
-    min-height: 80px;
-}
-
-.search-result-item {
-    padding: 0 30px;
-    height: 36px;
-    line-height: 36px;
-    cursor: pointer;
-    position: relative;
-}
-
-.search-result-item:hover {
-    border: 1px solid @blue;
-}
-.search-result-item-box {
-    display: inline-block;
-    width: 200px;
-    .ellipsis
-}
-.search-result-item-type {
-    color: @blue;
-}
-.search-result-item-btn {
-    .btnCom;
-    display: inline-block;
-    border: 1px solid @blue;
-    color: @blue;
-    width: 40px;
-    height: 28px;
-    line-height: 28px;
-    position: absolute;
-    right: 15px;
-    top: 3px;
+.search-cont{
+    .cont{
+        position: relative;
+        img{
+            position: absolute;
+            width: 15px;
+            left: 266px;
+            top: 9px;
+            cursor: pointer;
+        }
+    }
+    .title{
+        font-size: 12px;
+        color:#979797;
+        margin-bottom: 10px;
+    }
+    .input{
+        display: inline-block;
+        width: 300px;
+        height: 34px;
+        padding: 5px;
+        border:1px #CECECE solid;
+        vertical-align: top
+    }
+    button{
+        display: inline-block;
+        width: 80px;
+        height: 34px;
+        line-height: 34px;
+        color: #fff;
+        background: #2A9BD5;
+        border:1px #2A9BD5 solid;
+        text-align: center;
+        border: none;
+    }
+    .result{
+        margin-top: 15px;
+        li{
+            border-bottom:1px #CECECE solid;
+            line-height: 42px;
+            cursor: pointer;
+            span{
+                font-size: 14px;
+                color: #000;
+            }
+            i{
+                font-size: 12px;
+                color: #2A9BD5;
+            }
+            button{
+                float: right;
+                border:1px #2A9BD5 solid;
+                text-align: center;
+                width: 56px;
+                height: 26px;
+                line-height: 26px;
+                color: #2A9BD5;
+                border-radius: 3px;
+                background: none;
+                margin-top: 8px;
+                outline: none;
+            }
+        }
+    }
+    .no-data{
+        width: 380px;
+        color:#979797;
+        text-align: center;
+        line-height: 40px;
+    }
 }

+ 11 - 4
src/components/MultSpread/index.jsx

@@ -14,11 +14,18 @@ import NumberUnitDrop from '@containers/NumberUnitDrop';
  * 多标签组合
  * author:zn@2018-11.26
  * 接收参数:
- * data:标签内容数据
- * showArr:显示下拉总对象
+ * data:展开标签数据
+ * showAdd:是否显示加号(复制)
+ * copyId:该标签id
+ * fullData:该标签完整数据
+ * showArr:是否显示下拉的总对象
  * ikey:当前组件唯一标识,由模块index+标签index+标签内index三个组成的字符串
- *
- *
+ * boxMark:当前所在的模块
+ * isImports:是否高亮(仅查体使用)
+ * selecteds:选中项数据(仅多选子组件用)
+ * saveText:该模块的预览数据
+ * textPrefix:前缀
+ * textSuffix:后缀
  *
  * ***/
 

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

@@ -214,6 +214,7 @@ class NumberDrop extends Component{
     return className(isSelected,noTag,blueBorder,orgBorder);
   }
   changeToEdit(e){        //整个标签双击编辑状态
+    window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
     const {value,id,handleDbclick,patId,handleHide,show} = this.props;
     clearTimeout(this.state.timer);//取消延时的单击事件
     e.preventDefault();

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

@@ -152,6 +152,7 @@ class NumberUnitDrop extends Component{
   }
   changeToEdit(e){        //整个标签双击编辑状态
     e.stopPropagation();
+    window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
     const {value,id,handleDbclick,patId,handleHide,show} = this.props;
     const text = e.target.innerText || e.target.innerHTML;
     clearTimeout(this.state.timer);//取消延时的单击事件

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

@@ -48,8 +48,7 @@ class OtherHistory extends Component{
   }
   handleClick(e){//让搜索框跟随鼠标点击移动
     //e.stopPropagation();
-    const {fetchPushInfos,getSearchLocation} = this.props;
-    //fetchPushInfos&&fetchPushInfos();
+    const {getSearchLocation} = this.props;
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
     this.getData();
     let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置

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

@@ -19,7 +19,7 @@ class Preview extends Component {
     const dataJson = getAllDataList(baseList);
     const dataStr = getAllDataStringList(baseList);
 
-    return <div className={style['container']} style={visible? {display: 'block'}: {display: 'none'}}>
+    return <div className={style['container']}>
       <div className={style['shade']} onClick={onClose}></div>
       <div className={style['modal']} id="previewWrapper">
         <div id="previewStatic" className={`${style['close']} drag-title`}>预览<img src={close} onClick={onClose} /></div>

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

@@ -76,7 +76,7 @@ class PreviewBody extends Component {
   }
   render() {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn,showHistoryCases} = this.props;
-    const other_yjs = filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other);
+    const other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
     const noData = JSON.stringify(preInfo) == '{}';
     const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
     return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
@@ -118,10 +118,6 @@ class PreviewBody extends Component {
           </tr>
         </table>
         <p className={style.docName}>医生签名:<span>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
-        {showAssessBtn?<AssessResultHis showHistoryCases={showHistoryCases} isChronic={isChronic?true:false} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
-        <div onClick={() => { this.surePrint(dataStr) }} className={style.printBtn} style={{
-          display: show ? 'inline-block' : 'none',
-        }}>打印</div>
       </div>
     </div>
   }

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

@@ -21,7 +21,7 @@ class PrintPreview extends Component {
         const dataJson = getAllDataList(baseList);
         const dataStr = getAllDataStringList(baseList);
 
-        return <div className={style['container']} style={visible ? { display: 'block' } : { display: 'none' }}>
+        return <div className={style['container']}>
             <div className={style['shade']} onClick={onClose}></div>
             <div className={style['modal']} id="previewPrintWrapper">
                 <div id="previewPrintStatic" className={`${style['close']} drag-title`}>打印<img src={close} onClick={onClose} /></div>

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

@@ -10,9 +10,10 @@ import {billing} from '@store/async-actions/pushMessage';
 import TemplateContainer from '@components/TemplateContainer';
 import TemplateItems from '@components/TemplateItems';
 import PushItemsContainer from '@containers/PushItemsContainer';
-import { pushAllDataList,getWindowInnerHeight } from '@utils/tools';
+import { pushAllDataList,getWindowInnerHeight,didPushParamChange } from '@utils/tools';
 import CopyRightContainer from "@containers/CopyRightContainer";
-import MedicalInfoContainer from '@containers/MedicalInfoContainer'
+import MedicalInfoContainer from '@containers/MedicalInfoContainer';
+import ScaleSearchContainer from '@containers/ScaleSearchContainer';
 class PushContainer extends Component {
     constructor(props) {
         super(props);
@@ -26,6 +27,9 @@ class PushContainer extends Component {
             },
             {
                 title: '医学知识',
+            },
+            {
+              title: '全部量表',
             }
             ],
             visible:false,
@@ -226,7 +230,9 @@ class PushContainer extends Component {
                     let typeConfig = part.type;
                     store.dispatch(keepPushData(part,'part'))                 //引用数据的存储,用于保存模板是判断数据是否变化
                     pushAllDataList(typeConfig,'push',part,'template')       //引用
-                    store.dispatch(billing())
+                    if(didPushParamChange()){
+                      store.dispatch(billing())
+                    }
                 }
             })
             store.dispatch(changeVisible(false))
@@ -256,6 +262,7 @@ class PushContainer extends Component {
                         handleAllCheckbox={this.handleAllCheckbox}
                     ></TemplateItems>
                     <MedicalInfoContainer></MedicalInfoContainer>
+                    <ScaleSearchContainer></ScaleSearchContainer>
                 </TemplateContainer>
             </Tab>
             <ConfirmModal 

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

@@ -129,6 +129,7 @@ class RadioDrop extends Component{
     handleLabelEdit && handleLabelEdit({ikey,changeVal,type:boxMark});
   }
   handledbClick(e){
+    window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
     const {value,id,handleDbclick,patId} = this.props;
     clearTimeout(this.state.timer);//取消延时的单击事件
     //e.preventDefault();

+ 91 - 0
src/components/ScaleSearch/index.jsx

@@ -0,0 +1,91 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import delIcon from '@common/images/del_nor.png';
+import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
+
+class ScaleSearch extends Component {
+  constructor(props) {
+    super(props);
+    this.$inp = React.createRef();
+    this.$cont = React.createRef();
+    this.state={
+      val:''
+    };
+    this.search = this.search.bind(this);
+    this.handleChange = this.handleChange.bind(this);
+    this.clear = this.clear.bind(this);
+  }
+  getResult(id){
+    const {formulaResult} = this.props;
+    const scale=formulaResult&&formulaResult[id];
+    let result = scale&&scale.calcalculate?scale.calcalculate.result:null;
+    if(result){
+      return <i>( 结果:{result.value} {result.text} )</i>;
+    }
+    return '';
+  }
+  getSearchList() {
+    const { searchResult,getScale } = this.props;
+    return searchResult && searchResult.map((item) => {
+      return <li key={item.conceptId} onClick={()=>getScale({id:item.conceptId,name:item.name})}>
+        <span className={style['scale-name']}>{item.name}</span>
+        {this.getResult(item.conceptId)}
+        <button>查看</button>
+      </li>;
+    });
+  }
+  search(){
+    const {handleChangeValue} = this.props;
+    const val = this.$inp.current.value;
+    handleChangeValue&&handleChangeValue(val);
+  }
+  handleChange(){
+    this.setState({
+      val:this.$inp.current.value
+    });
+  }
+  clear(){
+    this.$inp.current.value = '';
+    this.setState({
+      val:''
+    });
+  }
+  componentDidMount(){
+    const height = getWindowInnerHeight()-170;
+    this.$cont.current.style.height = height+"px";
+    if(this.$cont.current){
+      windowEventHandler('resize', ()=>{
+        const height = getWindowInnerHeight()-170;
+        this.$cont.current.style.height = height+"px";
+      });
+    }
+  }
+  render() {
+    const {searchResult} = this.props;
+    const {val} = this.state;
+    return (
+      <div className={style['mefical-info-wrapper']} ref={this.$cont}>
+        <div className={style['search-cont']}>
+          <p className={style['title']}>量表搜索</p>
+          <p className={style['cont']}>
+            <input type="text" className={style['input']} ref={this.$inp} onChange={this.handleChange}/>
+            {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+            <button onClick={this.search}>搜索</button>
+          </p>
+          {searchResult&&searchResult.length>0?<div className={style['result']}>
+            <p className={style['title']}>查询内容</p>
+            <ul>
+              {this.getSearchList()}
+            </ul>
+          </div>:<p className={style['no-data']}>暂无搜索结果!</p>}
+        </div>
+      </div>
+
+    )
+
+
+
+  }
+}
+
+export default ScaleSearch;

+ 84 - 0
src/components/ScaleSearch/index.less

@@ -0,0 +1,84 @@
+@import "~@less/variables.less";
+.mefical-info-wrapper {
+  padding: 0px 15px;
+  line-height: 20px;
+  width: @push-width;
+  overflow: hidden;
+  position: relative;
+}
+.search-cont{
+  .cont{
+    position: relative;
+    img{
+      position: absolute;
+      width: 15px;
+      left: 266px;
+      top: 9px;
+      cursor: pointer;
+    }
+  }
+  .title{
+    font-size: 12px;
+    color:#979797;
+    margin-bottom: 10px;
+  }
+  .input{
+    display: inline-block;
+    width: 300px;
+    height: 34px;
+    padding: 5px;
+    border:1px #CECECE solid;
+    vertical-align: top
+  }
+  button{
+    display: inline-block;
+    width: 80px;
+    height: 34px;
+    line-height: 34px;
+    color: #fff;
+    background: #2A9BD5;
+    border:1px #2A9BD5 solid;
+    text-align: center;
+    border: none;
+  }
+  .result{
+    margin-top: 15px;
+    li{
+      border-bottom:1px #CECECE solid;
+      line-height: 42px;
+      cursor: pointer;
+      span{
+        font-size: 14px;
+        color: #000;
+      }
+      i{
+        color: #2A9BD5;
+        font-size: 12px;
+      }
+      .scale-name{
+        display: inline-block;
+        max-width: 320px;
+        line-height: 22px;
+      }
+      button{
+        float: right;
+        border:1px #2A9BD5 solid;
+        text-align: center;
+        width: 56px;
+        height: 26px;
+        line-height: 26px;
+        color: #2A9BD5;
+        border-radius: 3px;
+        background: none;
+        margin-top: 8px;
+        outline: none;
+      }
+    }
+  }
+  .no-data{
+    width: 380px;
+    color:#979797;
+    text-align: center;
+    line-height: 40px;
+  }
+}

+ 12 - 1
src/components/SpreadDrop/index.jsx

@@ -10,9 +10,19 @@ import $ from 'jquery';
  * 标签组合下拉,选中的项目展开
  * author:zn@2018-11-21
  * 接收参数:
- * keepSelf:展开标签后是否保留原标签
  * data:下拉内容
+ * value:选中成文
  * placeholder:灰显文字
+ * ikey:当前标签的index
+ * copyType:选中后是否复制本身(仅展开类型使用)
+ * selecteds:选中选项(仅展开类型使用)
+ * show:是否显示下拉
+ * order:成文顺序,0点选顺序,1从上到下从左到右
+ * isImports:是否高亮显示(仅查体中使用)
+ * type:所在模块:现病史、查体等
+ * tagType:标签类型
+ * id:id
+ * flag:仅主诉中使用
  *
  * ***/
 
@@ -103,6 +113,7 @@ class SpreadDrop extends Component{
   }
 
   changeToEdit(e){//双击
+    window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
     const {value,id,placeholder,handleDbclick,handleHide} = this.props;
     let text = e.target.innerText || e.target.innerHTML;
     handleHide&&handleHide();       //展开情况下双击收起

+ 192 - 197
src/components/TemplateItems/TemplateItem/index.jsx

@@ -11,210 +11,205 @@ import editing_icon from './img/edit_blue.png';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
 import store from '@store'
-import {checkItems} from '@store/actions/tabTemplate';
+import { checkItems } from '@store/actions/tabTemplate';
 import $ from 'jquery';
 
 class TemplateItem extends React.Component {
-    constructor() {
-        super();
-        this.content = null;
-        this.state = {
-            delHover: false,
-            editHover: false,
-            checkBox:false,
-            bgColor:false,
-        };
-        this.isConfirmClick = false;
-        this.timer = null;
-        this.handleTitleClick = this.handleTitleClick.bind(this)
-    }
-
-    getArrow() {
-        return this.state.isOpen ? arrow_down_icon : arrow_icon;
-    }
-
-    handleContentClick(e,sex) {
-        e.stopPropagation();
-        this.props.handleContentClick(this.props.id,sex);
-    }
-
-    handleCheckboxClick(e,id){          //点击复选框
-        e.stopPropagation();
-        let tempCheck = this.state.checkBox;
-        this.setState({
-            checkBox:!tempCheck
-        })
-        store.dispatch(checkItems(id))
-    }
-
-    getCheckIcon() {
-        let tempCheckItems = this.props.checkItems;
-        if(tempCheckItems.indexOf(this.props.id) != -1){
-            return [check_right,'title-wrapper-bg']
-        }else{
-            return [check_circle,'']
-        }
-    }
-    getBgcColor() {
-        let tempCheckItems = this.props.checkItems;
-        if(tempCheckItems.indexOf(this.props.id) != -1){
-            return 'title-wrapper-bg'
-        }else{
-            return ''
-        }
-    }
-    getDelIcon() {
-        return this.state.delHover ? del_hover_icon : del_icon;
-    }
-
-    handleDelIconMouseEnter() {
-        this.setState({
-            delHover: true
-        });
-    }
-
-    handleDelIconMouseLeave() {
-        this.setState({
-            delHover: false
-        });
-    }
-
-    handleTemplateDel(e) {
-        e.stopPropagation();
-        this.props.handleTemplateDel(this.props.id);
-    }
-
-    getEditIcon() {
-        return this.state.editHover ? editing_icon : edit_icon;
-    }
-
-    handleEditIconMouseEnter() {
-        this.setState({
-            editHover: true
-        });
-    }
-
-    handleEditIconMouseLeave() {
-        this.setState({
-            editHover: false
-        });
-    }
-
-    handleEditIconClick(e,name) {
-        e.stopPropagation();
-        let currId = this.props.id
-        this.props.handleTitleChange(currId,name);
-    }
-
-    handleTitleClick(e) {
-      if(e.target.tagName == 'I'){
-        let tmpDomLis = $(e.target).parent().parent().siblings()
-        $(e.target).parent().next().slideToggle()
-        if($(e.target).parent().next().height() == 0){
-          $(e.target).next().attr('src',arrow_down_icon)
-        }else{
-          $(e.target).next().attr('src',arrow_icon)
-        }
-        for(let i = 0;i < tmpDomLis.length;i++){
-          let tmpDiv = tmpDomLis[i]
-          $(tmpDiv).children().eq(1).slideUp()
-          $(tmpDiv).children().eq(0).children('img').eq(0).attr('src',arrow_icon)
-        }
-      }else if($(e.target).attr('src')){
-        let tmpDomLis = $(e.target).parent().parent().siblings()
-        $(e.target).parent().next().slideToggle()
-        if($(e.target).parent().next().height() == 0){
-          $(e.target).attr('src',arrow_down_icon)
-        }else{
-          $(e.target).attr('src',arrow_icon)
-        }
-        for(let i = 0;i < tmpDomLis.length;i++){
-          let tmpDiv = tmpDomLis[i]
-          $(tmpDiv).children().eq(1).slideUp()
-          $(tmpDiv).children().eq(0).children('img').eq(0).attr('src',arrow_icon)
-        }
-      }else{
-        let tmpDomLis = $(e.target).parent().siblings()
-        $(e.target).next().slideToggle()
-        if($(e.target).next().height() == 0){
-          $(e.target).children('img').eq(0).attr('src',arrow_down_icon)
-        }else{
-          $(e.target).children('img').eq(0).attr('src',arrow_icon)
-        }
-        for(let i = 0;i < tmpDomLis.length;i++){
-          let tmpDiv = tmpDomLis[i]
-          $(tmpDiv).children().eq(1).slideUp()
-          $(tmpDiv).children().eq(0).children('img').eq(0).attr('src',arrow_icon)
-        }
+  constructor() {
+    super();
+    this.content = null;
+    this.state = {
+      delHover: false,
+      editHover: false,
+      checkBox: false,
+      bgColor: false,
+    };
+    this.isConfirmClick = false;
+    this.handleTitleClick = this.handleTitleClick.bind(this)
+  }
+
+  getArrow() {
+    return this.state.isOpen ? arrow_down_icon : arrow_icon;
+  }
+
+  handleContentClick(e, sex) {
+    e.stopPropagation();
+    this.props.handleContentClick(this.props.id, sex);
+  }
+
+  handleCheckboxClick(e, id) {          //点击复选框
+    e.stopPropagation();
+    let tempCheck = this.state.checkBox;
+    this.setState({
+      checkBox: !tempCheck
+    })
+    store.dispatch(checkItems(id))
+  }
+
+  getCheckIcon() {
+    let tempCheckItems = this.props.checkItems;
+    if (tempCheckItems.indexOf(this.props.id) != -1) {
+      return [check_right, 'title-wrapper-bg']
+    } else {
+      return [check_circle, '']
+    }
+  }
+  getBgcColor() {
+    let tempCheckItems = this.props.checkItems;
+    if (tempCheckItems.indexOf(this.props.id) != -1) {
+      return 'title-wrapper-bg'
+    } else {
+      return ''
+    }
+  }
+  getDelIcon() {
+    return this.state.delHover ? del_hover_icon : del_icon;
+  }
+
+  handleDelIconMouseEnter() {
+    this.setState({
+      delHover: true
+    });
+  }
+
+  handleDelIconMouseLeave() {
+    this.setState({
+      delHover: false
+    });
+  }
+
+  handleTemplateDel(e) {
+    e.stopPropagation();
+    this.props.handleTemplateDel(this.props.id);
+  }
+
+  getEditIcon() {
+    return this.state.editHover ? editing_icon : edit_icon;
+  }
+
+  handleEditIconMouseEnter() {
+    this.setState({
+      editHover: true
+    });
+  }
+
+  handleEditIconMouseLeave() {
+    this.setState({
+      editHover: false
+    });
+  }
+
+  handleEditIconClick(e, name) {
+    e.stopPropagation();
+    let currId = this.props.id
+    this.props.handleTitleChange(currId, name);
+  }
+
+  handleTitleClick(e) {
+    if (e.target.tagName == 'I') {
+      let tmpDomLis = $(e.target).parent().parent().siblings()
+      $(e.target).parent().next().slideToggle()
+      if ($(e.target).parent().next().height() == 0) {
+        $(e.target).next().attr('src', arrow_down_icon)
+      } else {
+        $(e.target).next().attr('src', arrow_icon)
+      }
+      for (let i = 0; i < tmpDomLis.length; i++) {
+        let tmpDiv = tmpDomLis[i]
+        $(tmpDiv).children().eq(1).slideUp()
+        $(tmpDiv).children().eq(0).children('img').eq(0).attr('src', arrow_icon)
+      }
+    } else if ($(e.target).attr('src')) {
+      let tmpDomLis = $(e.target).parent().parent().siblings()
+      $(e.target).parent().next().slideToggle()
+      if ($(e.target).parent().next().height() == 0) {
+        $(e.target).attr('src', arrow_down_icon)
+      } else {
+        $(e.target).attr('src', arrow_icon)
+      }
+      for (let i = 0; i < tmpDomLis.length; i++) {
+        let tmpDiv = tmpDomLis[i]
+        $(tmpDiv).children().eq(1).slideUp()
+        $(tmpDiv).children().eq(0).children('img').eq(0).attr('src', arrow_icon)
+      }
+    } else {
+      let tmpDomLis = $(e.target).parent().siblings()
+      $(e.target).next().slideToggle()
+      if ($(e.target).next().height() == 0) {
+        $(e.target).children('img').eq(0).attr('src', arrow_down_icon)
+      } else {
+        $(e.target).children('img').eq(0).attr('src', arrow_icon)
+      }
+      for (let i = 0; i < tmpDomLis.length; i++) {
+        let tmpDiv = tmpDomLis[i]
+        $(tmpDiv).children().eq(1).slideUp()
+        $(tmpDiv).children().eq(0).children('img').eq(0).attr('src', arrow_icon)
       }
     }
-
-    render() {
-        const { allCheckShow,id,name,preview,sex } = this.props;
-        let previewJson = JSON.parse(preview);
-        let sexStr = sex==2?' (女)':sex==1?' (男)':' (通用)';
-        return (
-            <div className={style.wrapper}>
-                <div className={ 
-                    allCheckShow?
-                    `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}`:
-                    `${style["title-wrapper"]} ${style["clearfix"]}`}
-                    onClick={this.handleTitleClick}
-                >
-                    {
-                        allCheckShow?<div className={style['check-wrap']} onClick={(e)=>{this.handleCheckboxClick(e,id)}}>
-                            <img className={`${style['fl-element']} ${style['check-box']}`} 
-                            src={this.getCheckIcon()[0]}
-                        /></div>:null
-                    }
-                    <i
-                        className={style['title']}
-                        title={name+sexStr}
-                    >
-                        {name+sexStr}
-                    </i>
-                    <img className={style.arrow} src={arrow_icon} />
-                    <img title={'删除模板'} 
-                        className={style.del}
-                        style={{display:allCheckShow?'none':'block'}}
-                        src={this.getDelIcon()} 
-                        onMouseEnter={() => this.handleDelIconMouseEnter()}
-                        onMouseLeave={() => this.handleDelIconMouseLeave()}
-                        onClick={(e) => this.handleTemplateDel(e)} 
-                    />
-                    <span className={style.quote} onClick={(e) => this.handleContentClick(e,sex)}>引用</span>
-                    <img title={'修改模板标题'}
-                        className={style.edit}
-                        src={this.getEditIcon()}
-                        onMouseEnter={() => this.handleEditIconMouseEnter()}
-                        onMouseLeave={() => this.handleEditIconMouseLeave()}
-                        onClick={(e) => this.handleEditIconClick(e,name)}
-                    />
-                </div>
-                <div
-                    ref={(content) => this.content = content}
-                    className={style.content}
-                    title={this.title}
-                >
-                    {
-                        previewJson?<DesItem preview={previewJson}></DesItem>:<p>暂无数据</p>
-                    }
-                </div>
-            </div>
-        )
-    }
-
-    componentWillUnmount() {
-        clearTimeout(this.timer);
-    }
+  }
+
+  render() {
+    const { allCheckShow, id, name, preview, sex } = this.props;
+    let previewJson = JSON.parse(preview);
+    let sexStr = sex == 2 ? ' (女)' : sex == 1 ? ' (男)' : ' (通用)';
+    return (
+      <div className={style.wrapper}>
+        <div className={
+          allCheckShow ?
+            `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}` :
+            `${style["title-wrapper"]} ${style["clearfix"]}`}
+          onClick={this.handleTitleClick}
+        >
+          {
+            allCheckShow ? <div className={style['check-wrap']} onClick={(e) => { this.handleCheckboxClick(e, id) }}>
+              <img className={`${style['fl-element']} ${style['check-box']}`}
+                src={this.getCheckIcon()[0]}
+              /></div> : null
+          }
+          <i
+            className={style['title']}
+            title={name + sexStr}
+          >
+            {name + sexStr}
+          </i>
+          <img className={style.arrow} src={arrow_icon} />
+          <img title={'删除模板'}
+            className={style.del}
+            style={{ display: allCheckShow ? 'none' : 'block' }}
+            src={this.getDelIcon()}
+            onMouseEnter={() => this.handleDelIconMouseEnter()}
+            onMouseLeave={() => this.handleDelIconMouseLeave()}
+            onClick={(e) => this.handleTemplateDel(e)}
+          />
+          <span className={style.quote} onClick={(e) => this.handleContentClick(e, sex)}>引用</span>
+          <img title={'修改模板标题'}
+            className={style.edit}
+            src={this.getEditIcon()}
+            onMouseEnter={() => this.handleEditIconMouseEnter()}
+            onMouseLeave={() => this.handleEditIconMouseLeave()}
+            onClick={(e) => this.handleEditIconClick(e, name)}
+          />
+        </div>
+        <div
+          ref={(content) => this.content = content}
+          className={style.content}
+          title={this.title}
+        >
+          {
+            previewJson ? <DesItem preview={previewJson}></DesItem> : <p>暂无数据</p>
+          }
+        </div>
+      </div>
+    )
+  }
 }
 
 export default TemplateItem;
 TemplateItem.propTypes = {
-    id: PropTypes.string,
-    title: PropTypes.string,
-    content: PropTypes.arrayOf(PropTypes.string),
-    handleContentClick: PropTypes.func,
-    handleTemplateDel: PropTypes.func,
-    handleTitleChange: PropTypes.func
+  id: PropTypes.string,
+  title: PropTypes.string,
+  content: PropTypes.arrayOf(PropTypes.string),
+  handleContentClick: PropTypes.func,
+  handleTemplateDel: PropTypes.func,
+  handleTitleChange: PropTypes.func
 };

+ 127 - 0
src/components/TimeInterval/index.jsx

@@ -0,0 +1,127 @@
+import React from "react";
+import style from "./index.less";
+import $ from "jquery";
+import { Calendar } from '@commonComp';
+import { getCalendarDate, getCurrentDate } from "@utils/tools";
+/**
+ * top  定位距离
+ * sure 是否显示确认按钮
+ * timesure 点击确认事件
+ * needTime 是否需要时分秒
+ * timeLis 已选时间,点开后显示上次选择事件
+ * handleChange 日期改变调用
+ */
+class TimeInterval extends React.Component {
+  constructor(props) {
+    super(props);
+    const date = new Date();
+    this.state = {
+      startTime: getCurrentDate(false) + ' 00:00:00',
+      endTime: getCurrentDate(false) + ' 23:59:59',
+      show: false,
+      flg: 0,
+      timeLisStart: {
+        year: date.getFullYear(),
+        month: date.getMonth() + 1,
+        day: date.getDate(),
+        hour: '00',
+        minute: '00',
+        second: '00'
+      },
+      timeLisEnd: {
+        year: date.getFullYear(),
+        month: date.getMonth() + 1,
+        day: date.getDate(),
+        hour: '23',
+        minute: '59',
+        second: '59'
+      }
+    }
+    this.handleShowTime = this.handleShowTime.bind(this)
+    this.timeSure = this.timeSure.bind(this)
+  }
+  handleChangeDate(date) {
+    // console.log(date,'外')
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let startTimeDes = document.getElementById("startTimeDes")
+      let endTimeDes = document.getElementById("endTimeDes")  
+      let calendarDate = document.getElementById("calendarDate")
+      if (calendarDate) {
+        if (startTimeDes != event.target && endTimeDes != event.target && !calendarDate.contains(event.target)) {
+          this.setState({ show: false });
+        }
+      }
+    });
+  }
+  timeSure(date) {
+    const { getStartTime, getEndTime } = this.props;
+    if (this.state.flg == 1) {
+      this.setState({
+        show: false,
+        startTime: getCalendarDate(date, true),//页面显示的时间
+        timeLisStart: date//事件组件的日期
+      })
+      getStartTime(getCalendarDate(date, true))
+    } else if (this.state.flg == 2) {
+      this.setState({
+        show: false,
+        endTime: getCalendarDate(date, true),
+        timeLisEnd: date
+      })
+      getEndTime(getCalendarDate(date, true))
+    }
+  }
+  handleShowTime(flg) {
+    if (this.state.show) {
+      if(flg == this.state.flg){
+        this.setState({
+          show: false,
+          flg: flg
+        })
+      }else{
+        this.setState({ show: false }, () => {
+          this.setState({
+            show: true,
+            flg: flg
+          })
+        })
+      }
+    } else {
+      this.setState({
+        show: true,
+        flg: flg
+      })
+    }
+  }
+  render() {
+    const { startTime, endTime, show, timeLisStart, timeLisEnd, flg } = this.state
+    const { handleShowTime, timeSure, handleChangeDate } = this
+    return <div className={style.timeWrap}>
+      <div className={style.timeIpts}>
+        <input
+          value={startTime}
+          readOnly
+          className={style.ipt}
+          onClick={() => handleShowTime(1)}
+          type="text"
+          id="startTimeDes"
+          placeholder="起始时间" />~
+              <input
+          value={endTime}
+          readOnly
+          id="endTimeDes"
+          className={style.ipt}
+          onClick={() => handleShowTime(2)}
+          type="text"
+          placeholder="终止时间" />
+      </div>
+        {
+          show ? <Calendar timeLis={flg == 2 ? timeLisEnd : timeLisStart} top={40} sure={true} timeSure={timeSure} needTime={true} isShow={true} handleChange={handleChangeDate}></Calendar> : null
+        }
+    </div>
+  }
+}
+
+export default TimeInterval;

+ 14 - 0
src/components/TimeInterval/index.less

@@ -0,0 +1,14 @@
+.timeWrap {
+  display: inline-block;
+}
+.timeIpts{
+  height: 26px;
+  line-height: 26px;
+  display: inline-block;
+  background-color: #fff;
+}
+input.ipt {
+  width: 126px;
+  text-align: center;
+  font-size: 12px;
+}

+ 105 - 0
src/components/WrapModalBody/Item/index.jsx

@@ -0,0 +1,105 @@
+import React from "react";
+import style from "../index.less";
+import {getCalendarDate,getCurrentDate} from "@utils/tools";
+import TimeInterval from '../../TimeInterval';
+
+class Item extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state={
+      startTime:getCurrentDate(false)+' 00:00:00',
+      endTime:getCurrentDate(false)+' 23:59:59',
+      code:'',
+      name:'',
+      sex:'',
+      age:''
+    }
+    this.getStartTime = this.getStartTime.bind(this)
+    this.getEndTime = this.getEndTime.bind(this)
+    this.handleInput = this.handleInput.bind(this)
+  }
+  getStartTime(date){
+    this.setState({startTime:date})
+  }
+  getEndTime(date){
+    this.setState({endTime:date})
+  }
+  handleInput(e,val){
+    switch(val){
+      case 1:
+        this.setState({
+          code:e.target.value
+        })
+        break;
+      case 2:
+        this.setState({
+          name:e.target.value
+        })
+        break;
+      case 3:
+        this.setState({
+          sex:e.target.value
+        })
+        break;
+      case 4:
+        this.setState({
+          age:e.target.value
+        })
+        break;
+    }
+  }
+  render() {
+    const {handleSearch,message} = this.props
+    return <div className={style['items']}>
+      <ul>
+        <li className={`${style.code} ${style.pubLi}`}>
+          <span>门诊号 : </span>
+          <input type="text" value={this.state.code || message.recordId} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,1)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,1)
+            }} />
+        </li>
+        <li className={`${style.name} ${style.pubLi}`}>
+          <span>姓名 : </span>
+          <input type="text" value={this.state.name || message.patientName} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,2)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,2)
+            }} />
+        </li>
+        <li className={`${style.sex} ${style.pubLi}`}>
+          <span>性别 : </span>
+          <input type="text" value={this.state.sex || message.patientSex} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,3)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,3)
+            }} />
+        </li>
+        <li className={`${style.age} ${style.pubLi}`}>
+          <span>年龄 : </span>
+          <input type="text" value={this.state.age||message.patientAge} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,4)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,4)
+            }} />
+        </li>
+        <li className={`${style.time} ${style.pubLi}`}>
+          <span>送检时间 : </span>
+          <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
+        </li>
+      </ul>
+      <div className={style.search} onClick={()=>handleSearch(this.state)}>检索</div>
+    </div>
+  }
+}
+
+export default Item;

+ 37 - 0
src/components/WrapModalBody/WrapModalRight/index.jsx

@@ -0,0 +1,37 @@
+import React from "react";
+import style from "../index.less";
+import {getStatusImg} from "@utils/tools";
+
+const WrapModalRight = (props) => {
+  const {selectGroupList,height,showInIcss} = props;
+  return <div className={style['modalRight']}>
+    <div className={`${style.modalRightT} clearfix`}>
+      <span className={style.tip}>已选化验项</span>
+      <span className={style.btnS} onClick={showInIcss}>确认选择</span>
+    </div>
+    <div className={style.modalRightB} style={{height:(height-106)+'px'}}>
+      {
+        selectGroupList&&selectGroupList.map((part)=>{
+          return <div className={style['modalRightPart']}>
+            <div className={style.title}>{part.groupName}</div>
+            <ul className={style.partLis}>
+              {part.lisExcelWrapper&&part.lisExcelWrapper.map((item)=>{
+                return <li>
+                  <p className={style.itemName}>{item.itemName}</p>
+                  <p>
+                    {
+                      getStatusImg(item.type,item.value,1)
+                    } 
+                    <span style={{color: '#5D5D5D'}}>{item.unit} ( {item.min}-{item.max} )</span>
+                  </p>
+                </li>
+              })}
+            </ul>
+        </div>
+        })
+      }
+    </div>
+  </div>
+}
+
+export default WrapModalRight;

+ 39 - 0
src/components/WrapModalBody/WrapModalTable/index.jsx

@@ -0,0 +1,39 @@
+import React from "react";
+import style from "../index.less";
+
+const WrapModalTable = (props) => {
+  const { hospitalInspect, handleGetSonList } = props;
+  return <div className={style['modalTable']}>
+    <div className={style.tablePubP}>
+      <table>
+        <tr className={style.head}>
+          <td className={`${style.fst} ellipsOver`}>编号</td>
+          <td className={`${style.sec} ellipsOver`}>标本类型</td>
+          <td className={`${style.trd} ellipsOver`}>组名称</td>
+          <td className={`${style.four} ellipsOver`}>送检医生</td>
+          <td className={`${style.fif} ellipsOver`}>送检时间</td>
+          <td className={`${style.six} ellipsOver`}>报告时间</td>
+          <td className={`${style.sev} ellipsOver`} style={{display:hospitalInspect.length>5?'':'none'}}></td>
+        </tr>
+      </table>
+    </div>
+    <div className={`${style.parentTable} ${style.tablePubP}`}>
+      <table>
+        {
+          hospitalInspect && hospitalInspect.map((item, idx) => {
+            return <tr onClick={() => handleGetSonList(item.groupName)}>
+              <td className={`${style.fst} ellipsOver`}>{idx+1}</td>
+              <td title={item.specimenType} className={`${style.sec} ellipsOver`}>{item.specimenType}</td>
+              <td title={item.groupName} className={`${style.trd} ellipsOver`}>{item.groupName}</td>
+              <td title={item.inspectDoctor} className={`${style.four} ellipsOver`}>{item.inspectDoctor}</td>
+              <td title={item.inspectTime} className={`${style.fif} ellipsOver`}>{item.inspectTime}</td>
+              <td title={item.reportTime} className={`${style.six} ellipsOver`}>{item.reportTime}</td>
+            </tr>
+          })
+        }
+      </table>
+    </div>
+  </div>
+}
+
+export default WrapModalTable;

+ 75 - 0
src/components/WrapModalBody/WrapModalTableSon/index.jsx

@@ -0,0 +1,75 @@
+import React from "react";
+import style from "../index.less";
+import check_circle from '../img/check-circle.png';
+import check_right from '../img/check-right.png';
+import {getStatusImg} from '@utils/tools';
+
+class WrapModalTableSon extends React.Component {
+  constructor(props) {
+    super(props)
+    this.getImgPath = this.getImgPath.bind(this)
+  }
+  getImgPath(name,groupName,item){
+    const { checkedList,selectOneCheck } = this.props;
+    let num = 0;
+    for(let k = 0;k < checkedList.length;k++){
+      let tmpLis = checkedList[k];
+      if(tmpLis == name){
+        return <img className={style.check} onClick={()=>selectOneCheck(name,groupName,item)} src={check_right} alt="" />
+      }else{
+        ++num
+      }
+    }
+    if(num == checkedList.length){
+      return <img className={style.check} onClick={()=>selectOneCheck(name,groupName,item)} src={check_circle} alt="" />
+    }
+  }
+  render() {
+    const { hospitalSonInspect,allCheckImport,allCheck,selectWaring } = this.props;
+    return <div className={style['modalTable']}>
+      <div className={style.sonTitle}>
+        <span>组名称 : {hospitalSonInspect.groupName}</span><span className={style.btn} onClick={selectWaring}>选中异常值数据</span>
+      </div>
+      <div className={`${style.SonTable}`}>
+        <table>
+          <tr className={style.head}>
+            <td className={`${style.fst} ellipsOver`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
+            <td className={`${style.sec} ellipsOver`}>编号</td>
+            <td className={`${style.trd} ellipsOver`}>项目名称</td>
+            <td className={`${style.four} ellipsOver`}>结果</td>
+            <td className={`${style.fif} ellipsOver`}>单位</td>
+            <td className={`${style.six} ellipsOver`}>参考值</td>
+            <td className={`${style.sev} ellipsOver`} style={{display:(hospitalSonInspect && hospitalSonInspect.lisExcelWrapper && hospitalSonInspect.lisExcelWrapper.length)>5?'':'none'}}></td>
+          </tr>
+        </table>
+      </div>
+      <div className={`${style.parentTable} ${style.SonTable}`}>
+        <table>
+          {/* {type-0正常1异常2上升3下降} */}
+          {
+            hospitalSonInspect && hospitalSonInspect.lisExcelWrapper && hospitalSonInspect.lisExcelWrapper.map((item, idx) => {
+              return <tr>
+                <td className={`${style.fst} ellipsOver`}>
+                  {
+                    this.getImgPath(item.itemName,hospitalSonInspect.groupName,item)
+                  }
+                </td>
+                <td className={`${style.sec} ellipsOver`}>{idx+1}</td>
+                <td title={item.itemName} className={`${style.trd} ellipsOver`}>{item.itemName}</td>
+                <td title={item.value} className={`${style.four} ellipsOver`}>
+                  {
+                    getStatusImg(item.type,item.value,0)
+                  }
+                </td>
+                <td title={item.unit} className={`${style.fif} ellipsOver`}>{item.unit}</td>
+                <td title={`${item.min}-${item.max}`} className={`${style.six} ellipsOver`}>{item.min}-{item.max}</td>
+              </tr>
+            })
+          }
+        </table>
+      </div>
+    </div>
+  }
+}
+
+export default WrapModalTableSon;

+ 12 - 0
src/components/WrapModalBody/WrapModalTitle/index.jsx

@@ -0,0 +1,12 @@
+import React from "react";
+import style from "../index.less";
+import Item from "../Item";
+
+const WrapModalTitle =(props)=>{
+  const { handleSearch,message } = props
+  return <div className={style['modalTop']}>
+    <Item handleSearch={handleSearch} message={message}></Item>
+  </div>
+}
+
+export default WrapModalTitle;

BIN
src/components/WrapModalBody/img/check-circle.png


BIN
src/components/WrapModalBody/img/check-right.png


+ 36 - 0
src/components/WrapModalBody/index.jsx

@@ -0,0 +1,36 @@
+import React from "react";
+import style from "./index.less";
+import WrapModalTitle from "./WrapModalTitle";
+import WrapModalTable from "./WrapModalTable";
+import WrapModalTableSon from "./WrapModalTableSon";
+import WrapModalRight from "./WrapModalRight";
+
+const WrapModalBody =(props)=>{
+  const { handleSearch, hospitalInspect,height,selectOneCheck,showInIcss, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = props;
+  return <div className={style['container']}>
+    <div className={`${style.left}`}>
+      <WrapModalTitle handleSearch={handleSearch} message={message}></WrapModalTitle>
+      <WrapModalTable
+        hospitalInspect={hospitalInspect}
+        handleGetSonList={handleGetSonList}
+      ></WrapModalTable>
+      {
+        hospitalSonInspect && hospitalSonInspect.lisExcelWrapper?
+        <WrapModalTableSon
+          allCheckImport={allCheckImport}
+          allCheck={allCheck}
+          hospitalSonInspect={hospitalSonInspect}
+          selectGroupList={selectGroupList}
+          checkedList={checkedList}
+          selectOneCheck={selectOneCheck}
+          selectWaring={selectWaring}
+        ></WrapModalTableSon>:null
+      }
+    </div>
+    <div className={`${style.right}`}>
+      <WrapModalRight showInIcss={showInIcss} height={height} selectGroupList={selectGroupList}></WrapModalRight>
+    </div>
+  </div>
+}
+
+export default WrapModalBody;

+ 267 - 0
src/components/WrapModalBody/index.less

@@ -0,0 +1,267 @@
+@import "~@less/mixin.less";
+
+.container {
+  height: 100%;
+  // background-color: @ipt-wrap-color;
+  position: relative;
+  .left {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 762px;
+    height: 100%;
+    border-right: 1px solid #D8D8D8;
+  }
+  .right {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 238px;
+    height: 100%;
+  }
+  .modalTop {
+    height: 46px;
+    line-height: 46px;
+    background-color: @ipt-bg-color;
+    padding: 0 20px;
+  }
+  .items {
+    .search {
+      font-size: 12px;
+      float: right;
+      height: 26px;
+      line-height: 24px;
+      border: 1px solid #9C9C9C;
+      border-radius: 4px;
+      padding: 0 11px;
+      margin-top: 10px;
+      cursor: pointer;
+    }
+    .search:hover {
+      background-color: @blue;
+      border: 1px solid @blue;
+      color: #fff;
+    }
+    .pubLi {
+      float: left;
+      margin-right: 5px;
+      position: relative;
+      span {
+        font-size: 12px;
+      }
+      input {
+        font-size: 12px;
+        height: 26px;
+        line-height: 26px;
+        padding: 0 3px;
+        box-sizing: border-box;
+        cursor: pointer;
+      }
+    }
+    .code{
+      input {
+        width: 74px;
+      }
+    }
+    .name {
+      input {
+        width: 42px;
+      }
+    }
+    .sex {
+      input {
+        width: 28px;
+      }
+    }
+    .age {
+      input {
+        width: 28px;
+      }
+    }
+    .time {
+      .timeIpts{
+        height: 26px;
+        line-height: 26px;
+        display: inline-block;
+        background-color: #fff;
+      }
+      input.ipt {
+        width: 126px;
+        text-align: center;
+      }
+    }
+  }    
+  .modalRightT{
+    height: 46px;
+    line-height: 46px;
+    background-color: #F0F0F0;
+    padding: 0 20px;
+    position: absolute;
+    width: 100%;
+    span.tip {
+      font-size: 12px;
+      float: left;
+    }
+    span.btnS {
+      font-size: 12px;
+      float: right;
+      width: 64px;
+      height: 26px;
+      line-height: 26px;
+      margin-top: 10px;
+      color: #fff;
+      text-align: center;
+      border-radius: 4px;
+      background-color: @blue;
+      cursor: pointer;
+    }
+  }
+  .modalRightB{
+    padding: 20px;
+    margin-bottom: 20px;
+    overflow: auto;
+    position: absolute;
+    top: 46px;
+    height: 100%;
+    width: 100%;
+    .title {
+      font-size: 14px;
+      padding-bottom: 6px;
+    }
+    .partLis {
+      width: 100%;
+      padding: 10px;
+      margin-bottom: 20px;
+      background-color: #E9F5FA;
+      li {
+        padding: 5px 0;
+      }
+      p {
+        line-height: 22px;
+      }
+      .itemName {
+        line-height: 22px;
+      }
+    }
+  }
+  .modalTable {
+    .tablePubP {
+      td.fst {
+        width: 48px;
+        max-width: 48px;
+      }
+      td.sec {
+        width: 116px;
+        max-width: 116px;
+      }
+      td.trd {
+        // width: 215px;
+        // max-width: 215px;
+        // cursor: pointer;
+      }
+      td.four {
+        width: 87px;
+        max-width: 87px;
+      }
+      td.fif {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.six {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.sev {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .parentTable {
+      height: 206px;
+      overflow: auto;
+      tr {
+        cursor: pointer;
+      }
+    }
+    .SonTable {
+      .check {
+        width: 20px;
+        height: 20px;
+        position: relative;
+        top: 5px;
+      }
+      td.fst {
+        width: 72px;
+        max-width: 72px;
+        cursor: pointer;
+      }
+      td.sec {
+        width: 59px;
+        max-width: 59px;
+      }
+      td.trd {
+        // width: 215px;
+        // max-width: 215px;
+        cursor: default;
+      }
+      td.four {
+        width: 87px;
+        max-width: 87px;
+      }
+      td.fif {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.six {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.sev {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .sonTitle {
+      height: 46px;
+      line-height: 46px;
+      background-color: #F0F0F0;
+      padding: 0 20px;
+      .btn {
+        font-size: 12px;
+        float: right;
+        height: 26px;
+        line-height: 24px;
+        border: 1px solid #9C9C9C;
+        border-radius: 4px;
+        padding: 0 11px;
+        margin-top: 10px;
+        cursor: pointer;
+        &:hover {
+          background-color: @blue;
+          border: 1px solid @blue;
+          color: #fff;
+        }
+      }
+      
+    }
+    table {
+      border-collapse: collapse;
+      tr {
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        td {
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          border: 1px solid #E7EAEB;
+          padding: 0 5px;
+          box-sizing: border-box;
+        }
+      }
+      .head {
+        background-color: #EAF7FA;
+      }
+    }
+  }
+}

+ 105 - 0
src/components/WrapModalBodyPac/Item/index.jsx

@@ -0,0 +1,105 @@
+import React from "react";
+import style from "../index.less";
+import {getCalendarDate,getCurrentDate} from "@utils/tools";
+import TimeInterval from '../../TimeInterval';
+
+class Item extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state={
+      startTime:getCurrentDate(false,'/')+' 00:00:00',
+      endTime:getCurrentDate(false,'/')+' 23:59:59',
+      code:'',
+      name:'',
+      sex:'',
+      age:''
+    }
+    this.getStartTime = this.getStartTime.bind(this)
+    this.getEndTime = this.getEndTime.bind(this)
+    this.handleInput = this.handleInput.bind(this)
+  }
+  getStartTime(date){
+    this.setState({startTime:date})
+  }
+  getEndTime(date){
+    this.setState({endTime:date})
+  }
+  handleInput(e,val){
+    switch(val){
+      case 1:
+        this.setState({
+          code:e.target.value
+        })
+        break;
+      case 2:
+        this.setState({
+          name:e.target.value
+        })
+        break;
+      case 3:
+        this.setState({
+          sex:e.target.value
+        })
+        break;
+      case 4:
+        this.setState({
+          age:e.target.value
+        })
+        break;
+    }
+  }
+  render() {
+    const {handleSearch,message} = this.props
+    return <div className={style['items']}>
+      <ul>
+        <li className={`${style.code} ${style.pubLi}`}>
+          <span>门诊号 : </span>
+          <input type="text" value={this.state.code || message.recordId} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,1)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,1)
+            }} />
+        </li>
+        <li className={`${style.name} ${style.pubLi}`}>
+          <span>姓名 : </span>
+          <input type="text" value={this.state.name || message.patientName} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,2)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,2)
+            }} />
+        </li>
+        <li className={`${style.sex} ${style.pubLi}`}>
+          <span>性别 : </span>
+          <input type="text" value={this.state.sex || message.patientSex} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,3)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,3)
+            }} />
+        </li>
+        <li className={`${style.age} ${style.pubLi}`}>
+          <span>年龄 : </span>
+          <input type="text" value={this.state.age||message.patientAge} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,4)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,4)
+            }} />
+        </li>
+        <li className={`${style.time} ${style.pubLi}`}>
+          <span>送检时间 : </span>
+          <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
+        </li>
+      </ul>
+      <div className={style.search} onClick={()=>handleSearch(this.state)}>检索</div>
+    </div>
+  }
+}
+
+export default Item;

+ 33 - 0
src/components/WrapModalBodyPac/WrapModalRight/index.jsx

@@ -0,0 +1,33 @@
+import React from "react";
+import style from "../index.less";
+
+const WrapModalRight = (props) =>{
+  const {selectGroupList,height,showInIcss} = props;
+  return <div className={style['modalRight']}>
+    <div className={`${style.modalRightT} clearfix`}>
+      <span className={style.tip}>已选辅检项</span>
+      <span className={style.btnS} onClick={showInIcss}>确认选择</span>
+    </div>
+    <div className={style.modalRightB} style={{height:(height-106)+'px'}}>
+      {
+        selectGroupList&&selectGroupList.map((part)=>{
+          return <div className={style['modalRightPart']}>
+            <div className={style.title}>{part.checkItem}</div>
+            <ul className={style.partLis}>
+              {part.pacsResultDTO&&part.pacsResultDTO.map((item)=>{
+                return <li>
+                  <p className={style.itemName}>{item.checkItem}</p>
+                  <p>
+                    影像诊断 : <span style={{color: '#5D5D5D'}}>{item.imagingResults}</span>
+                  </p>
+                </li>
+              })}
+            </ul>
+        </div>
+        })
+      }
+    </div>
+  </div>
+}
+
+export default WrapModalRight;

+ 45 - 0
src/components/WrapModalBodyPac/WrapModalTable/index.jsx

@@ -0,0 +1,45 @@
+import React from "react";
+import style from "../index.less";
+
+const WrapModalTable = (props) => {
+  const { hospitalPac, handleGetSonList,msgObj } = props;
+  return <div className={style['modalTable']}>
+    <div className={style.tablePubP}>
+      <table>
+        <tr className={style.head}>
+          <td className={`${style.fst} ellipsOver`}>申请单号</td>
+          <td className={`${style.sec} ellipsOver`}>申请时间</td>
+          <td className={`${style.trd} ellipsOver`}>检查项目</td>
+          <td className={`${style.four} ellipsOver`}>检查号</td>
+          <td className={`${style.fif} ellipsOver`}>类型</td>
+          <td className={`${style.six} ellipsOver`}>患者姓名</td>
+          <td className={`${style.sev} ellipsOver`}>病人编号</td>
+          <td className={`${style.egt} ellipsOver`}>检查时间</td>
+          <td className={`${style.egt} ellipsOver`}>报告时间</td>
+          <td className={`${style.nig} ellipsOver`} style={{display:hospitalPac.length>4?'':'none'}}></td>
+        </tr>
+      </table>
+    </div>
+    <div className={`${style.parentTable} ${style.tablePubP}`}>
+      <table>
+        {
+          hospitalPac && hospitalPac.map((item, idx) => {
+            return <tr onClick={() => handleGetSonList(item.checkItem,item.reportTime)}>
+              <td title={item.applicationNum} className={`${style.fst} ellipsOver`}>{item.applicationNum}</td>
+              <td title={item.applicationDate} className={`${style.sec} ellipsOver`}>{item.applicationDate}</td>
+              <td title={item.checkItem} className={`${style.trd} ellipsOver`}>{item.checkItem}</td>
+              <td title={item.checkNum} className={`${style.four} ellipsOver`}>{item.checkNum}</td>
+              <td title={item.type} className={`${style.fif} ellipsOver`}>{item.type}</td>
+              <td title={msgObj.name} className={`${style.six} ellipsOver`}>{msgObj.name}</td>
+              <td title={msgObj.patientNum} className={`${style.sev} ellipsOver`}>{msgObj.patientNum}</td>
+              <td title={item.inspectTime} className={`${style.egt} ellipsOver`}>{item.inspectTime}</td>
+              <td title={item.reportTime} className={`${style.egt} ellipsOver`}>{item.reportTime}</td>
+            </tr>
+          })
+        }
+      </table>
+    </div>
+  </div>
+}
+
+export default WrapModalTable;

+ 66 - 0
src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx

@@ -0,0 +1,66 @@
+import React from "react";
+import style from "../index.less";
+import check_circle from '../img/check-circle.png';
+import check_right from '../img/check-right.png';
+
+class WrapModalTableSon extends React.Component {
+  constructor(props) {
+    super(props)
+    this.getImgPath = this.getImgPath.bind(this)
+  }
+  getImgPath(name,checkItem,item){
+    const { checkedList,selectOneCheck } = this.props;
+    let num = 0;
+    for(let k = 0;k < checkedList.length;k++){
+      let tmpLis = checkedList[k];
+      if(tmpLis == name){
+        return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item)} src={check_right} alt="" />
+      }else{
+        ++num
+      }
+    }
+    if(num == checkedList.length){
+      return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item)} src={check_circle} alt="" />
+    }
+  }
+  render() {
+    const { hospitalSonInspect,allCheckImport,allCheck } = this.props;
+    return <div className={style['modalTable']}>
+      <div className={style.sonTitle}>
+        <span>组名称 : {hospitalSonInspect.checkItem}</span>
+      </div>
+      <div className={`${style.SonTable}`}>
+        <table>
+          <tr className={style.head}>
+            <td className={`${style.fst} ellipsOver`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
+            <td className={`${style.sec} ellipsOver`}>检查项目</td>
+            <td className={`${style.trd} ellipsOver`}>影像所见</td>
+            <td className={`${style.four} ellipsOver`}>影像诊断</td>
+            <td className={`${style.sev} ellipsOver`} style={{display:(hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.length)>5?'':'none'}}></td>
+          </tr>
+        </table>
+      </div>
+      <div className={`${style.parentTables} ${style.SonTable}`}>
+        <table>
+          {/* {type-0正常1异常2上升3下降} */}
+          {
+            hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.map((item, idx) => {
+              return <tr>
+                <td className={`${style.fst} ellipsOver`}>
+                  {
+                    this.getImgPath(item.checkItem,hospitalSonInspect.checkItem,item)
+                  }
+                </td>
+                <td title={item.checkItem} className={`${style.sec} ellipsOver`}>{item.checkItem}</td>
+                <td title={item.imagingDiagnose} className={`${style.trd} ellipsOver`}>{item.imagingDiagnose}</td>
+                <td title={item.imagingResults} className={`${style.four} ellipsOver`}>{item.imagingResults}</td>
+              </tr>
+            })
+          }
+        </table>
+      </div>
+    </div>
+  }
+}
+
+export default WrapModalTableSon;

+ 12 - 0
src/components/WrapModalBodyPac/WrapModalTitle/index.jsx

@@ -0,0 +1,12 @@
+import React from "react";
+import style from "../index.less";
+import Item from "../Item";
+
+const WrapModalTitle = (props) => {
+  const { handleSearch,message } = props
+  return <div className={style['modalTop']}>
+    <Item handleSearch={handleSearch} message={message}></Item>
+  </div>
+}
+
+export default WrapModalTitle;

BIN
src/components/WrapModalBodyPac/img/check-circle.png


BIN
src/components/WrapModalBodyPac/img/check-right.png


+ 37 - 0
src/components/WrapModalBodyPac/index.jsx

@@ -0,0 +1,37 @@
+import React from "react";
+import style from "./index.less";
+import WrapModalTitle from "./WrapModalTitle";
+import WrapModalTable from "./WrapModalTable";
+import WrapModalTableSon from "./WrapModalTableSon";
+import WrapModalRight from "./WrapModalRight";
+
+const WrapModalBody =(props)=>{
+  const { handleSearch,msgObj, hospitalPac,height,selectOneCheck,showInIcss, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = props;
+  return <div className={style['container']}>
+    <div className={`${style.left}`}>
+      <WrapModalTitle handleSearch={handleSearch} message={message}></WrapModalTitle>
+      <WrapModalTable
+        hospitalPac={hospitalPac}
+        msgObj={msgObj}
+        handleGetSonList={handleGetSonList}
+      ></WrapModalTable>
+      {
+        hospitalSonInspect && hospitalSonInspect.pacsResultDTO?
+        <WrapModalTableSon
+          allCheckImport={allCheckImport}
+          allCheck={allCheck}
+          hospitalSonInspect={hospitalSonInspect}
+          selectGroupList={selectGroupList}
+          checkedList={checkedList}
+          selectOneCheck={selectOneCheck}
+          selectWaring={selectWaring}
+        ></WrapModalTableSon>:null
+      }
+    </div>
+    <div className={`${style.right}`}>
+      <WrapModalRight showInIcss={showInIcss} height={height} selectGroupList={selectGroupList}></WrapModalRight>
+    </div>
+  </div>
+}
+
+export default WrapModalBody;

+ 275 - 0
src/components/WrapModalBodyPac/index.less

@@ -0,0 +1,275 @@
+@import "~@less/mixin.less";
+
+.container {
+  height: 100%;
+  // background-color: @ipt-wrap-color;
+  position: relative;
+  .left {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 762px;
+    height: 100%;
+    border-right: 1px solid #D8D8D8;
+  }
+  .right {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 238px;
+    height: 100%;
+  }
+  .modalTop {
+    height: 46px;
+    line-height: 46px;
+    background-color: @ipt-bg-color;
+    padding: 0 20px;
+  }
+  .items {
+    .search {
+      font-size: 12px;
+      float: right;
+      height: 26px;
+      line-height: 24px;
+      border: 1px solid #9C9C9C;
+      border-radius: 4px;
+      padding: 0 11px;
+      margin-top: 10px;
+      cursor: pointer;
+    }
+    .search:hover {
+      background-color: @blue;
+      border: 1px solid @blue;
+      color: #fff;
+    }
+    .pubLi {
+      float: left;
+      margin-right: 5px;
+      position: relative;
+      span {
+        font-size: 12px;
+      }
+      input {
+        font-size: 12px;
+        height: 26px;
+        line-height: 26px;
+        padding: 0 3px;
+        box-sizing: border-box;
+        cursor: pointer;
+      }
+    }
+    .code{
+      input {
+        width: 74px;
+      }
+    }
+    .name {
+      input {
+        width: 42px;
+      }
+    }
+    .sex {
+      input {
+        width: 28px;
+      }
+    }
+    .age {
+      input {
+        width: 28px;
+      }
+    }
+    .time {
+      .timeIpts{
+        height: 26px;
+        line-height: 26px;
+        display: inline-block;
+        background-color: #fff;
+      }
+      input.ipt {
+        width: 126px;
+        text-align: center;
+      }
+    }
+  }    
+  .modalRightT{
+    height: 46px;
+    line-height: 46px;
+    background-color: #F0F0F0;
+    padding: 0 20px;
+    position: absolute;
+    width: 100%;
+    span.tip {
+      font-size: 12px;
+      float: left;
+    }
+    span.btnS {
+      font-size: 12px;
+      float: right;
+      width: 64px;
+      height: 26px;
+      line-height: 26px;
+      margin-top: 10px;
+      color: #fff;
+      text-align: center;
+      border-radius: 4px;
+      background-color: @blue;
+      cursor: pointer;
+    }
+  }
+  .modalRightB{
+    padding: 20px;
+    margin-bottom: 20px;
+    overflow: auto;
+    position: absolute;
+    top: 46px;
+    height: 100%;
+    width: 100%;
+    .title {
+      font-size: 14px;
+      padding-bottom: 6px;
+    }
+    .partLis {
+      width: 100%;
+      padding: 10px;
+      margin-bottom: 20px;
+      background-color: #E9F5FA;
+      li {
+        padding: 5px 0;
+      }
+      p {
+        line-height: 22px;
+      }
+      .itemName {
+        line-height: 22px;
+      }
+    }
+  }
+  .modalTable {
+    .tablePubP {
+      td.fst {
+        width: 70px;
+        max-width: 70px;
+      }
+      td.sec {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.trd {
+        width: 112px;
+        max-width: 112px;
+        cursor: pointer;
+      }
+      td.four {
+        width: 80px;
+        max-width: 80px;
+      }
+      td.fif {
+        width: 48px;
+        max-width: 48px;
+      }
+      td.six {
+        width: 70px;
+        max-width: 70px;
+      }
+      td.sev {
+        width: 80px;
+        max-width: 80px;
+      }
+      td.egt {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.nig {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .parentTable {
+      height: 326px;
+      overflow-y: auto;
+      overflow-x: hidden;
+      tr {
+        cursor: pointer;
+      }
+    }
+    .parentTables {
+      height: 86px;
+      overflow-y: auto;
+      overflow-x: hidden;
+    }
+    
+    .SonTable {
+      .check {
+        width: 20px;
+        height: 20px;
+        position: relative;
+        top: 5px;
+      }
+      td.fst {
+        width: 72px;
+        max-width: 72px;
+        cursor: pointer;
+      }
+      td.sec {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.trd {
+        // width: 215px;
+        // max-width: 215px;
+        cursor: default;
+      }
+      td.four {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.sev {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .sonTitle {
+      height: 46px;
+      line-height: 46px;
+      background-color: #F0F0F0;
+      padding: 0 20px;
+      .btn {
+        font-size: 12px;
+        float: right;
+        height: 26px;
+        line-height: 24px;
+        border: 1px solid #9C9C9C;
+        border-radius: 4px;
+        padding: 0 11px;
+        margin-top: 10px;
+        cursor: pointer;
+        &:hover {
+          background-color: @blue;
+          border: 1px solid @blue;
+          color: #fff;
+        }
+      }
+      
+    }
+    table {
+      tr {
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        td {
+          border-collapse: collapse;
+          // overflow: hidden;
+          // text-overflow: ellipsis;
+          // white-space: nowrap;
+          border: 1px solid #E7EAEB;
+          padding: 0 5px;
+          box-sizing: border-box;
+          // line-height: 24px;
+        }
+      }
+      .head {
+        background-color: #EAF7FA;
+      }
+    }
+  }
+}

+ 1 - 0
src/config/index.js

@@ -33,4 +33,5 @@ export default {
     showCheckNum:16,        //查体默认展开非自由文本标签的个数
     radioOptionPer:'()',     //单选项输入占位符
     textReg:new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])"), //包含中英文或数字
+    slideTime:400,      //右侧指标推送展开/收起动画时间
 };

+ 0 - 1
src/containers/AssessResultHis.js

@@ -2,7 +2,6 @@ import React from 'react';
 import {connect} from 'react-redux';
 import AssessResultHis from '@components/AssessResult/AssessHis';
 import {ISREAD} from '@store/types/homePage.js';
-import {billing} from '@store/async-actions/pushMessage';
 import {getAssessHis,getIndexData} from '@store/async-actions/fetchModules';
 import {SET_ASSESS_DATA,SET_INDEX_DATA} from '@types/assessResult';
 import {SET_ASSESS_HISTORY_DATA,SET_ASSESS_HISTORY_LOADING} from '@types/assessResultHis';

+ 30 - 4
src/containers/AssistCheck.js

@@ -3,12 +3,12 @@ import {
     connect
 } from 'react-redux';
 import AssistCheck from '@components/AssistCheck';
-import { assistLable,delAssistLabel,changeAssistVal,changeDate } from '@store/actions/assistCheck';
-import { getSearchList,getInstroduce } from '@store/async-actions/assistCheck';
+import { assistLable,delAssistLabel,changeAssistVal,changeDate,allCheckImports,selectOneChecks,showInIcsss } from '@store/actions/assistCheck';
+import { getSearchList,getInstroduce ,getImportLists,getSonDetailList} from '@store/async-actions/assistCheck';
 import {ISREAD} from '@store/types/homePage.js';
 import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
 
-function mapStateToProps(state) {
+function mapStateToProps(state) {//console.log(state.assistCheck)
     return {
         list:state.assistCheck.list,
         assistLabel:state.assistCheck.assistLabel,
@@ -16,12 +16,38 @@ function mapStateToProps(state) {
         winWidth:state.homePage.windowWidth,
         assistList:state.homePage.assistList,
         assistVal:state.assistCheck.assistVal,
-        windowHeight:state.homePage.windowHeight
+        windowHeight:state.homePage.windowHeight,
+        hospitalMsg: state.patInfo.hospitalMsg,
+
+        message: state.patInfo.message,
+        hospitalMsg: state.patInfo.hospitalMsg,
+        hospitalPac: state.assistCheck.hospitalPac,
+        hospitalSonInspect: state.assistCheck.hospitalPacObj,
+        checkedList: state.assistCheck.checkedList,
+        selectGroupList: state.assistCheck.selectGroupList,
+        allCheck: state.assistCheck.allCheck,
+        msgObj: state.assistCheck.msgObj,
     }
 }
 
 function mapDispatchToProps(dispatch, store) {
     return {
+        showInIcss(){
+          dispatch(showInIcsss())
+        },
+        selectOneCheck(name,checkItem,item){
+          dispatch(selectOneChecks(name,checkItem,item))
+        },
+        allCheckImport() {
+          dispatch(allCheckImports())
+        },
+        handleSearchs(data) {
+          dispatch(getImportLists(data))
+        },
+        handleGetSonList(name,time) {
+          dispatch(getSonDetailList(name,time))
+        },
+
         getInfomation(item){
             dispatch(getConceptDetail(item))
         },

+ 0 - 36
src/containers/BodyContainer.js

@@ -1,36 +0,0 @@
-import React from 'react';
-import {connect} from 'react-redux';
-import EMRContainer from '@components/EMRContainer';
-import {saveTemplateDetail} from '@store/async-actions/tabTemplate';
-import {initPersonInfo} from '@store/async-actions/getInfoByUuid';
-import {initHistoryDetails} from '@store/async-actions/patInfo';
-import {getAllDataList} from '@utils/tools';
-import store from '@store';
-
-function mapStateToProps(state) {
-    return {
-        
-    }
-}
-
-function mapDispatchToProps(dispatch,getStore) { 
-    return {
-        /*initHospital(){
-            dispatch(initPersonInfo())
-        },*/
-        saveDataAll(val){
-            dispatch(saveTemplateDetail(val))
-        },
-        isVisible(bool){
-            dispatch(changeVisible(bool))
-        },
-        initHistoryLastest(){
-            dispatch(initHistoryDetails())
-        }
-    }
-}
-
-
-const SaveDataAll = connect(mapStateToProps, mapDispatchToProps)(EMRContainer);
-
-export default SaveDataAll;

+ 0 - 6
src/containers/CheckBody.js

@@ -3,7 +3,6 @@ import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
 import {HIDE,RESET,SETDROPSHOW,ISREAD,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
-import {billing} from '@store/async-actions/pushMessage';
 import {filterDataArr} from '@utils/tools.js';
 
 function mapStateToProps(state){ 
@@ -54,11 +53,6 @@ function mapDispatchToProps(dispatch){
         }
       });
     },
-    //右侧推送
-    fetchPushInfos(){
-      //调右侧推送
-      dispatch(billing());
-    },
     getSearchLocation(top,left){
       dispatch({
         type:SEARCH_DROP_LOCATION,

+ 7 - 1
src/containers/ChronicInfo.js

@@ -1,6 +1,6 @@
 import {connect} from 'react-redux';
 import ChronicInfo from '../components/ChronicInfo';
-import {SHOW_TABLE_LIST,HIDE_TABLE_LIST, SET_CHRONIC_PUSHS} from '@store/types/pushMessage';
+import {SHOW_TABLE_LIST,HIDE_TABLE_LIST, SET_CHRONIC_PUSHS,TOGGLE_CHRONIC_INFO} from '@store/types/pushMessage';
 import {getTableList,getScaleInfo,getConceptDetail} from '../store/async-actions/pushMessage';
 import {ADD_ASSESS_ITEMS,SET_SAVE_ASSESS_DATA,SET_CHRONIC_CALCU_RESULT,ADD_WHOLE_SCALE_ITEMS,SET_CALCU_VALUES} from "@types/assessResult";
 import {saveMessage} from "../store/async-actions/print";
@@ -34,6 +34,12 @@ function mapStateToProps(state){
 
 function mapDispatchToProps(dispatch){
   return {
+    toggleSlide(flag){
+      dispatch({
+        type:TOGGLE_CHRONIC_INFO,
+        flag
+      });
+    },
     getTableList(name){
       dispatch(getTableList(name))
       // dispatch({type:SHOW_TABLE_LIST})

+ 3 - 1
src/containers/CurrentIll.js

@@ -94,7 +94,9 @@ function mapDispatchToProps(dispatch) {
         //文本模式下推送
         fetchPushInfos(){
           //调右侧推送
-          dispatch(billing());
+          if(didPushParamChange()) {
+            dispatch(billing());
+          }
         },
       handleInput(obj){    //文本模式值保存
         dispatch({

+ 50 - 0
src/containers/Emergency.js

@@ -0,0 +1,50 @@
+import {connect} from 'react-redux';
+import Emergency from '@components/Emergency';
+import {getAllHis,getFilterHis,downloadData,addSecondDiag} from '@store/async-actions/fetchModules.js';
+import { downloadExportedData } from '@utils/tools.js';
+import {CLEAR_RECORD} from '@store/types/emergencyHis.js';
+import { getSearchList } from '@store/async-actions/diagnosticSearch';
+import {Notify} from '@commonComp';
+
+const mapStateToProps = function(state){
+  const {emergencyHis} = state;
+  return {
+    data:emergencyHis.allHisRecord,
+    total:emergencyHis.total,
+    params:emergencyHis.params,
+    preInfo : state.patInfo.message,
+    searchData:emergencyHis.searchData
+  }
+}
+
+const mapDispatchToProps = function(dispatch){
+  return {
+    getNextPage(item){
+      dispatch(getAllHis(item));
+    },
+    filterData(obj){
+      dispatch(getFilterHis(obj))
+    },
+    async getDownload(ids){
+      let resData = await downloadData(ids);
+      downloadExportedData(resData.data,"全科历史病历");
+    },
+    clearHisRecord(){
+      dispatch({type:CLEAR_RECORD})
+    },
+    handleChangeValue(val){
+      dispatch(getSearchList(val,true))
+    },
+    async addSecond(item){
+      // dispatch(addSecondDiag(item))
+      let resData = await addSecondDiag(item);
+      if(resData&&resData.data.code==0){
+        Notify.info("添加成功");
+        dispatch(getFilterHis({flag:-1}));
+      }
+      
+    }
+  }
+}
+
+export default connect(mapStateToProps,mapDispatchToProps)(Emergency);

+ 100 - 52
src/containers/Inspect.js

@@ -1,61 +1,109 @@
 import React from 'react';
-import {connect} from 'react-redux';
+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, getConceptDetail} from '@store/async-actions/pushMessage';
-function mapStateToProps(state) {//console.log(state)
-    return {
-        list:state.inspect.list,
-        labelList:state.inspect.labelList,
-        fillActive:state.inspect.fillActive,
-        getExcelDataList:state.inspect.getExcelDataList,
-        labelListActive:state.inspect.labelListActive,
-        inspectList:state.homePage.inspectList,
-        windowHeight:state.homePage.windowHeight,
-        inspectVal:state.inspect.inspectVal
-    }
+import {
+  getSearchList,
+  getSublableList,
+  getImportList,
+  getSonDetailList
+} from '@store/async-actions/inspect';
+import {
+  setLabel,
+  fillActived,
+  fillActiveDetail,
+  checkValueIsChange,
+  delExcelLis,
+  clearLabel,
+  delPartItem,
+  allCheckImport,
+  selectOneCheck,
+  selectWaring,
+  showInIcss
+} from '@store/actions/inspect';
+import {
+  billing,
+  getConceptDetail
+} from '@store/async-actions/pushMessage';
+
+function mapStateToProps(state) {//console.log(state.inspect)
+  return {
+    list: state.inspect.list,
+    labelList: state.inspect.labelList,
+    fillActive: state.inspect.fillActive,
+    getExcelDataList: state.inspect.getExcelDataList,
+    labelListActive: state.inspect.labelListActive,
+    inspectList: state.homePage.inspectList,
+    windowHeight: state.homePage.windowHeight,
+    inspectVal: state.inspect.inspectVal,
+    message: state.patInfo.message,
+    hospitalMsg: state.patInfo.hospitalMsg,
+    hospitalInspect: state.inspect.hospitalInspect,
+    hospitalSonInspect: state.inspect.hospitalInspectObj,
+    allCheck: state.inspect.allCheck,
+    selectGroupList: state.inspect.selectGroupList,
+    checkedList: state.inspect.checkedList,
+  }
 }
 
 function mapDispatchToProps(dispatch, store) {
-    return {
-        handleChangeValue(val){
-            dispatch(getSearchList(val))
-        },
-        getInfomation(item){
-            dispatch(getConceptDetail(item))
-        },
-        handleSign(id,idx,type){
-            dispatch(setLabel(idx,type))
-            dispatch(getSublableList(id))
-        },
-        handleLabelSub(e,id,idx){
-            dispatch(fillActived(id,idx))
-            // e.stopPropagation()
-        },
-        handleClear(e,idx){
-            e.stopPropagation();
-            dispatch(clearLabel(idx))
-        },
-        handleConfirm(e,idx,time,arr){
-            e.stopPropagation();
-            dispatch(checkValueIsChange(idx,time,arr))
-        },
-        changeActivePart(idx,value){
-            dispatch(fillActiveDetail(idx,value))
-        },
-        handleCloseExcel(idx){
-            dispatch(delExcelLis(idx));
-        },
-        delPartItem(idx){
-            dispatch(delPartItem(idx))
-        },
-        //右侧推送
-        fetchPushInfos(){
-          //调右侧推送
-          dispatch(billing());
-        }
+  return {
+    showInIcss(){
+      dispatch(showInIcss())
+    },
+    selectWaring(){
+      dispatch(selectWaring())
+    },
+    selectOneCheck(name,groupName,item){
+      dispatch(selectOneCheck(name,groupName,item))
+    },
+    allCheckImport(data) {
+      dispatch(allCheckImport(data))
+    },
+    handleSearch(data) {
+      dispatch(getImportList(data))
+    },
+    handleGetSonList(name) {
+      dispatch(getSonDetailList(name))
+    },
+    handleChangeValue(val) {
+      dispatch(getSearchList(val))
+    },
+    getInfomation(item) {
+      dispatch(getConceptDetail(item))
+    },
+    handleSign(id, idx, type) {
+      dispatch(setLabel(idx, type))
+      dispatch(getSublableList(id))
+    },
+    handleLabelSub(e, id, idx) {
+      dispatch(fillActived(id, idx))
+      // e.stopPropagation()
+    },
+    handleClear(e, idx) {
+      e.stopPropagation();
+      dispatch(clearLabel(idx))
+    },
+    handleConfirm(e, idx, time, arr) {
+      e.stopPropagation();
+      dispatch(checkValueIsChange(idx, time, arr))
+    },
+    changeActivePart(idx, value) {
+      dispatch(fillActiveDetail(idx, value))
+    },
+    handleCloseExcel(idx) {
+      dispatch(delExcelLis(idx));
+    },
+    delPartItem(idx) {
+      dispatch(delPartItem(idx))
+    },
+    //右侧推送
+    fetchPushInfos() {
+      //调右侧推送
+      dispatch(billing());
     }
+  }
 }
 
 const InspectAction = connect(mapStateToProps, mapDispatchToProps)(Inspect);

+ 6 - 5
src/containers/MainSuit.js

@@ -100,7 +100,9 @@ function mapDispatchToProps(dispatch) {
           })
         },
       pushMessage(data) {//结构模式右侧推送
-        dispatch(billing(data));
+        if(didPushParamChange()) {
+          dispatch(billing(data));
+        }
       },
       getSearchData:(item)=>{
         getSearch(item).then((res)=>{
@@ -149,7 +151,9 @@ function mapDispatchToProps(dispatch) {
       },
       fetchPushInfos(){//文本模式下推送
         //调右侧推送
-        dispatch(billing());
+        if(didPushParamChange()) {
+          dispatch(billing());
+        }
       },
       handleInput(obj){   //文本模式值保存
           dispatch({
@@ -202,9 +206,6 @@ function mapDispatchToProps(dispatch) {
           data:item
         })
       },
-      getBilling: () => {
-        dispatch(billing())
-      },
       autoFillModules() {//自动填充模板
         dispatch(autoFillModules())
       }

+ 0 - 1
src/containers/MedicalInfoContainer.js

@@ -6,7 +6,6 @@ import {getAllConceptDetail} from '../store/async-actions/pushMessage';
 
 function mapStateToProps(state) {
     return{
-        searchValue: state.medicalInfo.searchValue,
         searchResult: state.medicalInfo.searchResult,
     }
 }

+ 1 - 3
src/containers/NumberDrop.js

@@ -124,11 +124,9 @@ function mapDispatchToProps(dispatch,store){
       handleModuleDiff(dispatch,params);
 
       //右侧推送
-      clearTimeout(timer);
-      let timer = setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
+      setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
         if(didPushParamChange()){     //操作后内容有变化才推送
           dispatch(billing('',params.ikey.substr(0,1)));
-          clearTimeout(timer);
         }
       },config.delayPushTime);
     },

+ 3 - 1
src/containers/OtherHistory.js

@@ -66,7 +66,9 @@ function mapDispatchToProps(dispatch,store){
     //右侧推送
     fetchPushInfos(){
       //调右侧推送
-      dispatch(billing());
+      if(didPushParamChange()) {
+        dispatch(billing());
+      }
     },
     handleInput(obj){    //文本模式值保存
       dispatch({

+ 29 - 0
src/containers/ScaleSearchContainer.js

@@ -0,0 +1,29 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { getSearchList } from '@store/async-actions/ScaleSearch';
+import ScaleSearch from '@components/ScaleSearch';
+import {getScaleInfo} from '../store/async-actions/pushMessage';
+
+function mapStateToProps(state) {
+    return{
+        searchResult: state.scaleSearch.searchResult,
+        formulaResult: state.pushMessage.formulaResult,//Á¿±íÄÚÈÝ
+    }
+}
+
+function mapDispatchToProps(dispatch) {
+    return {
+        handleChangeValue(val){
+            dispatch(getSearchList(val))
+        },
+        getScale(name) {
+            dispatch(getScaleInfo(name))
+        }
+    }
+}
+const ScaleSearchContainer = connect(
+    mapStateToProps,
+    mapDispatchToProps
+)(ScaleSearch);
+
+export default ScaleSearchContainer

+ 1 - 3
src/containers/eleType.js

@@ -122,7 +122,7 @@ function multLabels(params){
                      ikey={boxMark+i}
                      selecteds={selecteds&&selecteds[i]}
                      saveText={saveText}
-                     name={data.name||data.tagName}
+                     /*name={data.name||data.tagName}*/
                      textPrefix={data.prefix}
                      textSuffix={data.suffix}></MultSpread>
 }
@@ -144,8 +144,6 @@ function multCheckLabels(params,tagType){
                      isImports={isHigh}
                      type={boxMark}
                      tagType={tagType}
-                     textPrefix={data.prefix}
-                     textSuffix={data.suffix}
                      id={data.id}
                      flag={data.flag}></SpreadDrop>
 }

+ 0 - 0
src/store/actions/assistCheck.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff