浏览代码

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

# Conflicts:
#	src/store/actions/mainSuit.js
#	src/store/async-actions/patInfo.js
zhouna 6 年之前
父节点
当前提交
6289edd9d1
共有 100 个文件被更改,包括 21088 次插入2193 次删除
  1. 9 11
      src/common/components/Banner/index.jsx
  2. 24 40
      src/common/components/Button/index.jsx
  3. 1 1
      src/common/components/Calendar/Content/index.jsx
  4. 1 1
      src/common/components/Calendar/MonthItem/index.less
  5. 1 0
      src/common/components/Calendar/SelectList/index.less
  6. 6 1
      src/common/components/Calendar/Time/index.jsx
  7. 3 1
      src/common/components/Calendar/Time/index.less
  8. 4 3
      src/common/components/Calendar/YearItem/index.less
  9. 131 95
      src/common/components/Calendar/index.jsx
  10. 23 1
      src/common/components/Calendar/index.less
  11. 0 78
      src/common/components/CheckBox/Multiple/index.jsx
  12. 0 48
      src/common/components/CheckBox/Multiple/index.less
  13. 0 64
      src/common/components/CheckBox/Select/index.jsx
  14. 0 44
      src/common/components/CheckBox/Select/index.less
  15. 0 131
      src/common/components/CheckBox/index.jsx
  16. 0 81
      src/common/components/CheckBox/index.less
  17. 6 9
      src/common/components/ComplexModal/index.jsx
  18. 15 40
      src/common/components/ComplexModal/index.less
  19. 2 4
      src/common/components/ConfirmModal/index.less
  20. 3 3
      src/common/components/DelToast/index.jsx
  21. 5 8
      src/common/components/DropContainer/index.jsx
  22. 21 0
      src/common/components/Footer/index.jsx
  23. 33 0
      src/common/components/Footer/index.less
  24. 40 51
      src/common/components/InlineTag/index.jsx
  25. 9 20
      src/common/components/InspectCommon/index.jsx
  26. 0 1
      src/common/components/InspectCommon/index.less
  27. 28 42
      src/common/components/MiniToast/index.jsx
  28. 3 1
      src/common/components/MiniToast/index.less
  29. 0 92
      src/common/components/MixCheckBox/index.jsx
  30. 0 70
      src/common/components/MixCheckBox/index.less
  31. 10 19
      src/common/components/Modal/body/ModalBody.jsx
  32. 1 0
      src/common/components/Modal/footer/ModalFooter.jsx
  33. 11 11
      src/common/components/NumberUnitPan/index.jsx
  34. 0 34
      src/common/components/SlideSide/index.jsx
  35. 0 10
      src/common/components/SlideSide/index.less
  36. 12 15
      src/common/components/Tab/TabOne/index.jsx
  37. 0 27
      src/common/components/Tab/TabOne/index.less
  38. 19 26
      src/common/components/Tab/index.jsx
  39. 28 0
      src/common/components/Tab/index.less
  40. 12 18
      src/common/components/TailInlineTag/index.jsx
  41. 3 12
      src/common/components/TailInlineTag/index.less
  42. 1 2
      src/common/components/Textarea/index.jsx
  43. 28 0
      src/common/components/WrapModalContainer/index.jsx
  44. 49 0
      src/common/components/WrapModalContainer/index.less
  45. 8 5
      src/common/components/index.js
  46. 二进制
      src/common/images/check-circle.png
  47. 二进制
      src/common/images/check-right.png
  48. 二进制
      src/common/images/date1.png
  49. 二进制
      src/common/images/delete.png
  50. 二进制
      src/common/images/delete_no.png
  51. 二进制
      src/common/images/down.png
  52. 二进制
      src/common/images/emergency.png
  53. 二进制
      src/common/images/likely.png
  54. 二进制
      src/common/images/up.png
  55. 0 201
      src/common/js/func.js
  56. 0 36
      src/common/js/util.js
  57. 42 6
      src/common/less/variables.less
  58. 2 2
      src/components/AddAssistCheck/Textarea/index.jsx
  59. 127 84
      src/components/AddAssistCheck/index.jsx
  60. 142 79
      src/components/AddAssistCheck/index.less
  61. 61 53
      src/components/AddInspect/SlideExcel/index.jsx
  62. 7 0
      src/components/AddInspect/SlideExcel/index.less
  63. 50 11
      src/components/AddInspect/SlideSelect/index.jsx
  64. 6 4
      src/components/AddInspect/SlideSelect/index.less
  65. 76 53
      src/components/AddInspect/index.jsx
  66. 1 0
      src/components/AddInspect/index.less
  67. 4 3
      src/components/Advice/Textarea/index.jsx
  68. 9 11
      src/components/AssessResult/AssessHis/index.jsx
  69. 2 2
      src/components/AssessResult/ChartItem/index.jsx
  70. 68 35
      src/components/AssessResult/ScaleItem/index.jsx
  71. 21 14
      src/components/AssessResult/index.jsx
  72. 37 13
      src/components/AssessResult/index.less
  73. 二进制
      src/components/AssistCheck/dists/FileAPI.flash.camera.swf
  74. 二进制
      src/components/AssistCheck/dists/FileAPI.flash.image.swf
  75. 二进制
      src/components/AssistCheck/dists/FileAPI.flash.swf
  76. 3608 0
      src/components/AssistCheck/dists/FileAPI.html5.js
  77. 2 0
      src/components/AssistCheck/dists/FileAPI.html5.min.js
  78. 4418 0
      src/components/AssistCheck/dists/FileAPI.js
  79. 2 0
      src/components/AssistCheck/dists/FileAPI.min.js
  80. 11008 0
      src/components/AssistCheck/dists/jQuery.js
  81. 4 0
      src/components/AssistCheck/dists/jq.js
  82. 2 0
      src/components/AssistCheck/dists/jquery.fileapi.min.js
  83. 193 6
      src/components/AssistCheck/index.jsx
  84. 50 12
      src/components/AssistCheck/index.less
  85. 73 9
      src/components/Banner/index.jsx
  86. 13 5
      src/components/Banner/index.less
  87. 7 17
      src/components/BodyContainer/index.jsx
  88. 11 18
      src/components/CheckBody/index.jsx
  89. 212 161
      src/components/ChronicInfo/index.jsx
  90. 30 132
      src/components/ChronicInfo/index.less
  91. 35 37
      src/components/CommonSymptom/index.jsx
  92. 2 12
      src/components/CommonSymptom/index.less
  93. 10 9
      src/components/CopyRight/CopyModalSon/index.jsx
  94. 65 0
      src/components/CopyRight/CopyModalSon/index.less
  95. 9 10
      src/components/CopyRight/DiscontentSon/index.jsx
  96. 90 0
      src/components/CopyRight/DiscontentSon/index.less
  97. 6 2
      src/components/CopyRight/index.jsx
  98. 19 9
      src/components/CopyRight/index.less
  99. 14 27
      src/components/CurrentIll/index.jsx
  100. 0 0
      src/components/CurrentIll/index.less

+ 9 - 11
src/common/components/Banner/index.jsx

@@ -1,18 +1,16 @@
-import React, { Component } from "react";
 import style from "./index.less";
 import logo from '../../images/logoa.png'
 import setup from '../../images/setup.png';
-class Banner extends Component {
-  render(){
-    const {src,text, children} = this.props;
 
-    return <div className={style['banner-wrapper']+" "+"clearfix"}>
-         <div className={style['logo']}> <img src={logo}/><span >|&nbsp;&nbsp;智能辅助临床决策系统</span>
-            <div className={style['buon']}><img className={style['st']} src={setup}/>设置</div>
-            </div>
-      {children?<div className='fl'>{children}</div>:''}
-    </div>;
-  }
+const Banner = (props) => {
+  const {src,text, children} = props;
+
+  return <div className={style['banner-wrapper']+" "+"clearfix"}>
+       <div className={style['logo']}> <img src={logo}/><span >|&nbsp;&nbsp;智能辅助临床决策系统</span>
+          <div className={style['buon']}><img className={style['st']} src={setup}/>设置</div>
+          </div>
+    {children?<div className='fl'>{children}</div>:''}
+  </div>;
 }
 
 export default Banner;

+ 24 - 40
src/common/components/Button/index.jsx

@@ -1,7 +1,6 @@
 /**
  * Created by ZN on 2018/5/03.
  */
-import React, {Component} from 'react';
 /*import PropTypes from 'prop-types';*/
 import style from './index.less';
 
@@ -17,45 +16,30 @@ import style from './index.less';
     icon: PropTypes.oneOf(['confirm','close','add','aptmts','cancel','print','qa','search','setting','update','tick','submit','more','info']),
     onClick: PropTypes.func
 };*/
-
-class Button extends Component {
-    constructor(props) {
-        super(props);
-        /* this.handleClick = this.handleClick.bind(this);
-         this.handleLeave = this.handleLeave.bind(this);*/
-    }
-
-    /*handleClick(){
-        this.props.onClick&&this.props.onClick();
-    }*/
-
-    render() {
-        let props = this.props;
-        let type = props.type ? style[props.type] : '';
-        let classes = style["button"] + " " + type;
-        const spanStyle = {
-            position: "relative",
-            left: "-3px",
-            lineHeight: "30px"
-        };
-        if (props.disabled) {
-            return <button contenteditable="false" className={classes} style={props.style}  {...props} disabled>
-                {
-                    React.Children.map(props.children, function (child) {
-                        return <span style={spanStyle}>{child}</span>;
-                    })
-                }
-            </button>;
-        }
-        return <button contenteditable="false" className={classes} style={props.style} {...props}>
-            {
-                React.Children.map(props.children, function (child) {
-                    return <span style={spanStyle}>{child}</span>;
-                })
-            }
-        </button>;
-    }
+const Button = (props) => {
+  let type = props.type ? style[props.type] : '';
+  let classes = style["button"] + " " + type;
+  const spanStyle = {
+      position: "relative",
+      left: "-3px",
+      lineHeight: "30px"
+  };
+  if (props.disabled) {
+      return <button contenteditable="false" className={classes} style={props.style}  {...props} disabled>
+          {
+              React.Children.map(props.children, function (child) {
+                  return <span style={spanStyle}>{child}</span>;
+              })
+          }
+      </button>;
+  }
+  return <button contenteditable="false" className={classes} style={props.style} {...props}>
+      {
+          React.Children.map(props.children, function (child) {
+              return <span style={spanStyle}>{child}</span>;
+          })
+      }
+  </button>;
 }
-/*Button.propTypes = propTypes;*/
 
 export default Button;

+ 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({})} id="getSureTime">确定</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;
+    }
+  }
 }

+ 0 - 78
src/common/components/CheckBox/Multiple/index.jsx

@@ -1,78 +0,0 @@
-import React,{Component} from 'react';
-import style from './index.less';
-import PropTypes from 'prop-types';
-
-class Multiple extends React.Component{
-  constructor(props){
-    super(props);
-    this.handleChange = this.handleChange.bind(this);
-    this.state = {
-      ban:false,
-      wu:false,
-      noBanWu:false//不点伴无
-    }
-  }
-
-  handleClick(e){
-    e.stopPropagation();
-  }
-
-  handleChange(item,e){
-    e.stopPropagation();
-    const {handleClick} = this.props;
-   // handleClick && handleClick(item.name); 
-   // console.log(2222,item);
-
-  }
-
-  getSelectedStyle(it){
-    // const {isSelect,first,then} = this.props;
-    const isSelect = it.isSelect;
-    const {ban,wu} = this.state;
-    if(ban && isSelect){//伴、初为
-      return style.selectBtn;
-    }
-    else if(wu && isSelect){//无、后为
-      return `${style.selectBtn} ${style.thenSel}`;
-    }
-    else if(isSelect){
-      return style.selectBtn;
-    }
-    else{
-       return style.btn
-    }
-
-  }
-
-  getTabs(){
-    const {datas} =this.props;
-    let pushData = datas && datas.filter(function(item){
-      return item.name
-    });
-    // 没有标签的暂时过滤
-    let list = pushData && pushData.map((it,i)=>{
-        return <p onClick={this.handleChange.bind(this,it)} contentEditable='false' className={this.getSelectedStyle(it)}>{it.name}</p>
-      })
-      return list;
-  }
-
-  render(){
-    const selectStyle = this.props.style;
-    const {name} = this.props;
-    return <div className={style['multiple']} onClick={this.handleClick.bind(this)} style={selectStyle}>
-      {this.props.children}
-      <div className={style['multiple-con']}>
-        {/*<p onClick={this.handleChange.bind(this,name)} contentEditable='false' className={this.getSelectedStyle()}>{name}</p>*/}
-        {this.getTabs()}
-      </div>
-    </div>
-  }
-}
-
-Multiple.propTypes = {
-    handleClick:PropTypes.func,
-    isSelect:PropTypes.bool,
-    name:PropTypes.string
-};
-
-export default Multiple;

+ 0 - 48
src/common/components/CheckBox/Multiple/index.less

@@ -1,48 +0,0 @@
-
-.multiple{
-  // width: 200px;
-  // height: 44px;
-  // line-height: 44px;
-  margin-left: 10px;
-  display: inline-block;
-  vertical-align: top;
-
-  .btn{
-    height: 44px;
-    line-height: 44px;
-    // width: 100%;
-    font-size: 12px;
-    text-align: left;
-    border: none;
-    color:#000000;
-    background: #fff;
-    // padding-left: 40px;
-    padding: 0 10px 0 30px;
-    cursor: pointer;
-  }
-  .selectBtn{
-    height: 44px;
-    line-height: 44px;
-    // width: 100%;
-    font-size: 12px;
-    text-align: left;
-    border: none;
-    color:#000000;
-    background: rgba(59,158,208,0.1);
-    // padding-left: 40px;
-    padding: 0 10px 0 30px;
-    cursor: pointer;
-    background-image: url(../../../images/first.png);
-    background-repeat: no-repeat;
-    background-position: 12px 15px;
-  }
-
-  .thenSel{
-    background-image: url(../../../images/then.png);
-  }
-  
-  .multiple-con{
-
-  }
-}
-

+ 0 - 64
src/common/components/CheckBox/Select/index.jsx

@@ -1,64 +0,0 @@
-import React,{Component} from 'react';
-import style from './index.less';
-import PropTypes from 'prop-types';
-
-/*
-多选组件
-datas:父组件传来的数据(数组)
-name:标签名;
-isSelect:是否选中;
-noSpecialFlag:无殊标识, 2选中其他 1选中无殊 0默认无选中;
-*/
-
-class Select extends React.Component{
-  constructor(props){
-    super(props);
-    this.handleChange = this.handleChange.bind(this);
-  }
-
-  handleClick(e){
-    e.stopPropagation();
-  }
-
-  handleChange(name,e){
-    e.stopPropagation();
-    const {handleClick,parentId,checkBoxId,flag} = this.props;
-    const items = {
-      name,
-      parentId,
-      checkBoxId,
-      flag
-    }
-   handleClick && handleClick(items);     
-  }
-
-  getTab(){
-    const {noSpecialFlag,datas} = this.props;
-    if(noSpecialFlag==2){//无殊
-      let list = datas.map((it,i)=>{
-        return <p contentEditable='false' className={`${style['btn']} ${style['nospecialDis']}`}>{it.name}</p>
-      })
-      return list;
-    }else{
-      let list = datas.map((it,i)=>{
-        return <p onClick={this.handleChange.bind(this,it.name)} contentEditable='false' className={!it.isSelect ? style['btn']:style['selectBtn']}>{it.name}</p>
-      })
-      return list;
-    }
-  }
-
-  render(){
-    return <div className={style['select']} onClick={this.handleClick.bind(this)}>
-      {this.props.children}
-      {this.getTab()}
-    </div>
-  }
-}
-
-Select.propTypes = {
-    handleClick:PropTypes.func,
-    handleChange:PropTypes.func,
-    datas:PropTypes.array
-};
-
-export default Select;

+ 0 - 44
src/common/components/CheckBox/Select/index.less

@@ -1,44 +0,0 @@
-// @import "~@less/variables.less";
-.select{
-  // width: 200px;
-  // height: 44px;
-  // line-height: 44px;
-  display: inline-block;
-  vertical-align: top;
-  margin-left: 10px;
-  .btn{
-    height: 44px;
-    line-height: 44px;
-    // width: 100%;
-    font-size: 12px;
-    text-align: left;
-    border: none;
-    color:#000000;
-    background: #fff;
-    padding: 0 10px 0 30px;
-    cursor: pointer;
-  }
-  .selectBtn{
-    height: 44px;
-    line-height: 44px;
-    width: 100%;
-    font-size: 12px;
-    text-align: left;
-    border: none;
-    color:#000000;
-    background: rgba(59,158,208,0.1);
-    padding: 0 10px 0 30px;
-    cursor: pointer;
-    background-image: url(../../../images/first.png);
-    background-repeat: no-repeat;
-    background-position: 12px 15px;
-  } 
-
-  .nospecialDis{
-    color:#000000;
-    opacity: 0.3;
-    filter:alpha(opacity=30);
-    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
-    cursor: auto;
-  }
-}

+ 0 - 131
src/common/components/CheckBox/index.jsx

@@ -1,131 +0,0 @@
-import React,{Component} from 'react';
-import PropTypes from 'prop-types';
-import style from './index.less';
-import Select from './Select';
-import Multiple from './Multiple';
-
-class CheckBox extends React.Component{
-  constructor(props){
-    super(props);
-    this.handleBtnConfirm = this.handleBtnConfirm.bind(this);
-    this.handleBtnClear = this.handleBtnClear.bind(this);
-    this.handleFirst = this.handleFirst.bind(this);
-    this.handleThen = this.handleThen.bind(this);
-    this.handleNospencial = this.handleNospencial.bind(this);
-    this.preventClick = this.preventClick.bind(this);
-    this.handleSpenc = this.handleSpenc.bind(this);
-    this.state={
-      widthStyle:'small',//控制下拉框的宽度big--初为 后为;small--一列展示
-      multiple:false,//true为三列,false为一列
-    }
-  }
-
-
-  preventClick(e){
-    //阻止冒泡,冒泡会使下拉框消失
-    e.stopPropagation();
-  }
-
-  getCheckItems(){
-    const items = [];
-    const {selectVal,isClear,checks,noSpecialFlag} = this.props;
-    const that = this;
-    checks&&checks.map((v,i)=>{
-      if(that.state.multiple){//三列显示
-        items[i] = <Multiple {...v} handleClick={this.props.handleCheckBoxClick} key={v.id} selectVal={selectVal} isClear={isClear} />
-      }else{//一列
-        items[i] = <Select {...v} handleClick={this.props.handleCheckBoxClick} key={v.id} selectVal={selectVal} isClear={isClear} noSpecialFlag={noSpecialFlag} />
-      }
-      
-    })
-    return items;
-  }
-
-  handleSpenc(e,code){
-    e.stopPropagation();
-    // console.log(3333,e,code);
-    if(code == 1){//伴
-
-    }else if(code == 2){//无
-
-    }
-  }
-
-
-  getTabs(){
-    //datas为questionDetailList
-    const {datas,handleCheckBoxClick,firstChoo} = this.props; 
-    let list = datas.length>0 && datas.map((it,ind)=>{
-      if(it.code){
-          return <p contentEditable='false' onClick={(e)=>{this.handleSpenc(e,it.code)}} className={firstChoo?`${style['nospecial']} ${style['firstSel']}`:style['nospecial']}>{it.name}</p>
-        }else {
-          return <Multiple {...it} handleClick={this.props.handleCheckBoxClick} key={it.id} />
-        }    
-    })
-    return list;
-  }
-
-  handleBtnConfirm(e){//确定
-    e.stopPropagation();
-    const {confirmCheckBox,showCheckBox,checkBoxId} = this.props;
-    const data = {
-      showCheckBox,
-    }
-    confirmCheckBox && confirmCheckBox(checkBoxId);   
-  }
-
-  handleBtnClear(e,){//清空
-    e.stopPropagation();
-    const {clearCheckBox,showCheckBox,checkBoxId} = this.props;
-    clearCheckBox && clearCheckBox(checkBoxId);
-  }
-
-  handleFirst(){//初为
-    const {firstChoo} = this.props;
-    firstChoo && firstChoo(true);
-  }
-
-  handleThen(){//后为
-    const {thenChoo} = this.props;
-    thenChoo && thenChoo(false);
-  }
-
-  handleNospencial(e){
-    e.stopPropagation();
-    const {noSpecialClick} = this.props;
-    noSpecialClick && noSpecialClick();
-  }
-
-  getNoSpecial(){
-    // noSpecialFlag 0默认无选中,1选中标签,2选中无殊
-    const {noSpecial,noSpecialFlag,noSpecialClick} = this.props;
-    return noSpecialFlag==1?<p className={`${style['nospecial']} ${style['nospecialDis']}`} style={{display:this.state.multiple?'none':'block'}}>个人史无殊</p> : <p className={noSpecial?`${style['nospecial']} ${style['firstSel']}`:style['nospecial']} style={{display:this.state.multiple?'none':'block'}} onClick={this.handleNospencial}>个人史无殊</p>
-  }
-
-  render(){
-    const {showCheckBox,selectVal,firstC,thenC,firstArr,showDrop} = this.props;
-    const firstStyle = firstC;
-    const thenStyle = thenC;
-    {/*return <div className={`cb-box ${style['cb-container']}`} style={{display:'inline-block'}} onClick={this.preventClick}>*/}
-    return <div style={{display:'inline-block'}} onClick={this.preventClick}>
-      {this.getTabs()}
-      {/*<div className={style['multiple-tab']} style={{display:this.state.multiple?'inline-block':'none'}}>
-        <p contentEditable='false' onClick={this.handleFirst} className={firstStyle?`${style['nospecial']} ${style['firstSel']}`:style['nospecial']}>初为</p>
-        <p contentEditable='false' onClick={this.handleThen} className={thenStyle?`${style['nospecial']} ${style['thenSel']}`:style['nospecial']}>后为</p>
-      </div>
-      {this.state.multiple?'':this.getNoSpecial()}
-      <div className={style['multiple-con']}>{this.getCheckItems()}</div>
-      <div className={style['btn']}>
-        <button onClick={this.handleBtnClear} className={style['clear']}>清空选项</button>
-        <button onClick={this.handleBtnConfirm} className={style['confirm']}>确定</button> 
-      </div>*/}       
-    </div>
-  }
-}
-
-CheckBox.propTypes = {
-    handleClick:PropTypes.func,
-    datas:PropTypes.array
-};
-export default CheckBox;
-

+ 0 - 81
src/common/components/CheckBox/index.less

@@ -1,81 +0,0 @@
-
-.cb-container{
-  // width: 277px;
-  min-width: 216px;
-  padding: 10px;
-  position: absolute;
-  top: 25px;
-  left: 0px;
-  background: #fff;
-  z-index: 10;
-  box-shadow: 0 10px 20px 0 rgba(194,194,194,0.50);
-}
-.clear{
-  width: 88px;
-  height: 44px;
-  line-height: 44px;
-  font-size: 12px;
-  color:#FF0000;
-  border: none;
-  background: #fff;
-  float: left;
-  margin-top: 10px;
-}
-.confirm{
-  width: 88px;
-  height: 44px;
-  line-height: 44px;
-  color:#3B9ED0;
-  font-size: 12px;
-  border: 1px solid #3B9ED0;
-  background: #fff;
-  margin-left: 20px;
-  float: right;
-  margin-top: 10px;
-}
-.multiple-tab{
-  // width: 200px;
-  vertical-align: top;
-  // p{
-  //   width: 200px;
-  //   height: 44px;
-  //   line-height: 44px;
-  //   cursor: pointer;
-  //   padding-left: 40px;
-  // }
-}
-.multiple-con{
-  // width: 440px;
-  display: inline-block;
-}
-.btn{
-
-}
-.nospecial{
-  // width: 200px;
-  height: 44px;
-  line-height: 44px;
-  cursor: pointer;
-  color:#000000;
-  padding: 0 10px 0 30px;
-  border-bottom: 1px solid #EAEDF1;
-}
-.nospecialDis{
-  color:#000000;
-  opacity: 0.3;
-  filter:alpha(opacity=30);
-  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
-  cursor: auto;
-}
-.firstSel{
-  background: rgba(59,158,208,0.1);
-  background-image: url(../../images/first.png);
-  background-repeat: no-repeat;
-  background-position: 12px 15px;
-}
-.thenSel{
-  background: rgba(59,158,208,0.1);
-  background-image: url(../../images/then.png);
-  background-repeat: no-repeat;
-  background-position: 12px 15px;
-}

+ 6 - 9
src/common/components/ComplexModal/index.jsx

@@ -1,10 +1,8 @@
 import React, { Component } from "react";
 import ReactDom from "react-dom";
 import style from "./index.less";
-import Notify from '@commonComp/Notify';
 import close from '@common/images/icon_close.png';
-import { dragBox } from '@utils/tools';
-
+import { dragBox } from '@utils/drag';
 /**
  * title:标题
  * children:弹窗内容
@@ -22,23 +20,22 @@ class ComplexModal extends Component {
     super(props);
   }
   componentDidMount(){
-    dragBox('complexModalWrap','complexModalTitle')
+    dragBox('dragModalWrap','dragModalTitle','add')
   }
 
   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']}>
       <div className={style['shade']} onClick={shadeClose===false?'':onclose}></div>
-      <div id="complexModalWrap" className={style['modal']} style={{width: width?width:'auto', marginLeft:marginLeft, top:top?top+'px':'',bottom:bottom?bottom+'px':''}}>
-        <div className={`${style['close']} drag-title`} id="complexModalTitle">
+      <div id="dragModalWrap" className={style['modal']} style={{width: width?width:'auto', marginLeft:marginLeft, top:top?top+'px':'',bottom:bottom?bottom+'px':''}}>
+        <div className={`${style['close']} drag-title`} id="dragModalTitle">
           {icon?<img src={icon} />:''}
           {title}
-          <img src={close} onClick={onclose} className={style['closeIcon']} />
         </div>
-        <i className={style['flg']}>患者基本信息</i>
+        <img src={close} onClick={onclose} className={style['closeIcon']}/>
         <div className={style["content"]} style = {{width: width?width:'auto'}}>{children}</div>
         <div className={style['footer']} style = {{width: width?width:'auto'}}>{footer}</div>
       </div>

+ 15 - 40
src/common/components/ComplexModal/index.less

@@ -1,15 +1,17 @@
+@import "~@less/mixin.less";
 .container {
-  position: relative;
+  // position: relative;
+  // padding-top: 40px;  //改为绝对定位,拖拽元素不在监听document,改为这个
   z-index: 2000;
-  padding-top: 40px;
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  top: 0;
   .content{
     overflow: auto;
     position: relative;
     height: 100%;
     padding-bottom: 30px;
-    // bottom: 70px;
-    // top: 70px;
-    // width: 820px;
   }
   .footer{
     // width: 820px;
@@ -19,17 +21,6 @@
     text-align: right;
     background-color: #fff;
   }
-  // @media print {
-  //   .close{
-  //     display: none;
-  //   }
-  //   .flg {
-  //     display: block !important;
-  //   }
-  // }
-  .flg {
-    display: none;
-  }
   .shade {
     position: fixed;
     left: 0;
@@ -63,30 +54,14 @@
     img{
       vertical-align: text-top;
     }
-    .closeIcon{
-      float:right;
-      cursor: pointer;
-      margin-top: -5px;
-    }
-  }
-  .button {
-    position: fixed;
-    bottom: 75px;
-    left: 50%;
-    margin-left: 280px;
-    span{
-      display: inline-block;
-      width: 80px;
-      height: 34px;
-      background: #3B9ED0;
-      font-size: 14px;
-      color: #FFFFFF;
-      font-size: 14px;
-      text-align: center;
-      line-height: 34px;
-      border-radius: 4px;
-      cursor: pointer;
-    }
+  }  
+  .closeIcon{
+    cursor: pointer;
+    position: absolute;
+    top: 14px;
+    right: 10px;
+    z-index: 100;
+    vertical-align: text-top;
   }
 }
 

+ 2 - 4
src/common/components/ConfirmModal/index.less

@@ -1,3 +1,4 @@
+@import "~@less/mixin.less";
 .modal {
     position: fixed;
     top: 50%;
@@ -47,16 +48,13 @@
 }
 
 .modal-operator-close, .modal-operator-confirm {
+    .btnCom;
     width: 100px;
-    border: none;
-    outline: none;
     margin: auto;
     height: 34px;
     line-height: 32px;
     opacity: 1;
     color: #fff;
-    cursor: pointer;
-    border-radius: 4px;
     border: 1px solid #78bddd;
 }
 .modal-operator-confirm {

+ 3 - 3
src/common/components/DelToast/index.jsx

@@ -24,12 +24,12 @@ class DelToast extends React.PureComponent{
     cancel&&cancel();
   }
   render(){
-    const {show,name} = this.props;
+    const {show,name,top,right} = this.props;
     if(show){
-      return <div className={style['del-box']} id="delBox">
+      return <div className={style['del-box']} id="delBox" style={{right:right,top:top}}>
         <div className={style['del-con']}>
           <div className={style['del-tri']}></div>
-          <div className={style['del-title']} id="delTit" title={'删除 ' + name + '?'}>删除 {name} ?</div>
+          <div className={style['del-title']} id="delTit" title={'删除 '+name+' ?'}>删除 {name} ?</div>
           <div className={style['del-foot']}>
             <span className={`${style['del-btn']} ${style['del-del']}`} onClick={this.handleDel}>删除</span>
             <span className={`${style['del-btn']} ${style['del-cancel']}`} onClick={this.handleCancel}>取消</span>

+ 5 - 8
src/common/components/DropContainer/index.jsx

@@ -6,15 +6,12 @@
  * children:下拉内容
  *
  * ***/
-import React,{Component} from 'react';
 
-class DropContainer extends Component {
-  render(){
-    const {children} = this.props;
-    return <div className="container">
-              {children}
-            </div>;
-  }
+const DropContainer = (props) => {
+  const {children} = props;
+  return <div className="container">
+            {children}
+          </div>;
 }
 
 export default DropContainer;

+ 21 - 0
src/common/components/Footer/index.jsx

@@ -0,0 +1,21 @@
+import style from './index.less';
+import printIcon from '@common/images/team.png';
+/**
+ * author: Liucf@2019-05-15
+ * 弹窗底部按钮(目前用于管理评估、量表、推荐结果弹窗)
+ * 两个按钮:打印 + 确定/关闭/其他 
+ * print:是否显示打印按钮;
+ * footText:另一按钮显示文字;
+ * handlePrint:打印按钮的点击事件;
+ * handleConfirm:另一按钮的点击事件;
+**/
+
+const Footer = (props) => {
+  const {footText,print,handlePrint,handleConfirm} = props;
+  return <div className={style['footer']}>
+    {print?<span className={style['print']} onClick={handlePrint}><img src={printIcon} alt=""/>打印</span>:''}
+    {handleConfirm?<span className={style['okBtn']} onClick={handleConfirm}>{footText}</span>:''}
+  </div>;
+}
+
+export default Footer;

+ 33 - 0
src/common/components/Footer/index.less

@@ -0,0 +1,33 @@
+@import "~@less/mixin.less";
+.footer{
+    .print{
+        width: 111px;
+        height: 34px;
+        line-height: 34px;
+        outline: none;
+        border-radius: 4px;
+        border: 0 none;
+        cursor: pointer;
+        background: #fff;
+        margin-right: 20px;
+        img{
+          width: 20px;
+          vertical-align: middle;
+          margin-right: 4px;
+        }
+      }
+      .okBtn{
+        .btnCom;
+        /*width: 80px;*/
+        padding: 0 10px;
+        height: 34px;
+        line-height: 32px;
+        border: 1px solid #3B9ED0;
+        box-sizing: border-box;
+        margin-left: 20px;
+        background: #3B9ED0;
+        color: #fff;
+        float: right;
+        margin-right: 20px;
+      }
+  }

+ 40 - 51
src/common/components/InlineTag/index.jsx

@@ -10,8 +10,6 @@ import {handleEnter} from '@utils/tools.js';
  * value:输入的值
  * placeholder
  * suffix:后缀文字
- * canEditable: 切换父元素框(主诉同级框)的可编辑属性,
- *              PS:父元素框可编辑时子元素onBlur无法触发,因为此时focus的元素为父元素框
  *
  ***/
 class InlineTag extends Component {
@@ -19,9 +17,12 @@ class InlineTag extends Component {
     super(props);
     this.$box = React.createRef();
     this.$span = React.createRef();
+    this.$pre = React.createRef();
+    this.$suf = React.createRef();
     this.state = {
       editable:false,
-      value:props.value||''
+      value:props.value||'',
+      placeholder:props.placeholder||''
     };
     this.changeToEdit = this.changeToEdit.bind(this);
     this.changeToClick = this.changeToClick.bind(this);
@@ -29,7 +30,6 @@ class InlineTag extends Component {
     this.handleInput = this.handleInput.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
     this.handleFixClick = this.handleFixClick.bind(this);
-    this.handleBoxInput = this.handleBoxInput.bind(this);
   }
   changeToEdit(e){
     const {handledbClick,id} = this.props;
@@ -44,45 +44,34 @@ class InlineTag extends Component {
     //埋点记录
     handledbClick&&handledbClick({id});
   }
-  handleBoxInput(e){
-    const {handleInput,ikey,prefix,suffix} = this.props;
-    const total = e.target.innerText;
-    const text = this.$span.current.innerText;
-    if(!total){
-      handleInput&&handleInput({text:total,ikey});
-    }
-  }
-  changeToClick(event){
-    event.returnValue = true;
-    const {canEditable} = this.props;
-    canEditable&&canEditable();
+  changeToClick(e){
+    e.stopPropagation();
+    const {saveEditText,ikey} = this.props;
     this.setState({
       editable:false
     });
+    saveEditText&&saveEditText({
+      changeVal:this.$span.current.innerText,
+      totalVal:this.$box.current.innerText,
+      prefix:this.$pre.current.innerText,
+      suffix:this.$suf.current.innerText,
+      ikey
+    });
   }
   handleInput(e){       //输入时保存临时值,在修改灰显为黑色时判断用
     e.stopPropagation();
-    const {handleInput,ikey,prefix,suffix} = this.props;
-    const text = e.target.innerText || e.target.innerHTML;
-    // 内容全部删除时,要把空值存到store,否则会遗留最后一个字且为灰色无法删除
-    if(!text){
-      this.$span.current.innerText?(this.$span.current.innerText=''):(this.$span.current.innerHTML='');      //修改生成文字变成输入的2倍bug
-      handleInput&&handleInput({text:text,ikey,prefix,suffix});
-      this.setState({
-        value:" "
-      });
-      return
-    }
-    this.setState({
-      value:text
-    });
-   // e.target.innerText = text;  
   }
   handleBlur(e){         //鼠标离开是保存值到store中
     e.stopPropagation(); //不阻止会触发外层div的失焦事件
-    const {value} = this.state;
-    const {handleInput,ikey,prefix,suffix} = this.props;
-    this.$span.current.innerText?(this.$span.current.innerText=''):(this.$span.current.innerHTML='');      //修改生成文字变成输入的2倍bug
+    const value = e.target.innerText;
+    const {handleInput,ikey,prefix,suffix,placeholder} = this.props;
+    if(!value.trim()){
+      this.setState({
+        placeholder:placeholder,
+        value:''
+      });
+    }
+    //this.$span.current.innerText?(this.$span.current.innerText=''):(this.$span.current.innerHTML='');      //修改生成文字变成输入的2倍bug
     handleInput&&handleInput({text:value.trim(),ikey,prefix,suffix});
     this.setState({
       value:value.trim()
@@ -92,20 +81,22 @@ class InlineTag extends Component {
     e.stopPropagation();
     const text = e.target.innerText || e.target.innerHTML;
     const {placeholder} = this.props;
-    if(text==placeholder){
-      e.target.innerText?(e.target.innerText = ''):(e.target.innerHTML='');
+    if(text.trim()==placeholder){
+      this.setState({
+        placeholder:''
+      });
     }
   }
   getStyle(){
-    const {value} = this.state;
-    const {hideTag} = this.props;
+    const {hideTag,placeholder} = this.props;
+    const value = this.$span.current&&this.$span.current.innerText.trim();
     if(hideTag){
       if(value){
         return classNames(style['selected-no-tag']);
       }
       return style['no-tag'];
     }
-    if(!value){
+    if(!value||value.trim()==placeholder){
       return classNames(style['gray']);
     }
     return style['selected-tag'];
@@ -133,27 +124,25 @@ class InlineTag extends Component {
     this.$span.current.style.minWidth=spanWidth;
   }
   render(){
-    const {placeholder,value,prefix,suffix} = this.props;
-    const {editable} = this.state;
-    const inp = this.state.value;
+    const {prefix,suffix} = this.props;
+    const {editable,placeholder,value} = this.state;
     return <div className={this.getStyle()}
                  onDoubleClick={this.changeToEdit}
-                  onClick={!editable?this.handleFixClick:''}
-                 onkeydown={handleEnter}
+                 /*onClick={!editable?this.handleFixClick:''}*/
+                 onKeyDown={handleEnter}
                  onBlur={this.changeToClick} 
                  ref={this.$box} 
-                 contentEditable={editable}
-                 onInput={this.handleBoxInput}>
-                {prefix}
+                 contentEditable={editable}>
+                <span ref={this.$pre}>&nbsp;{prefix}</span>
                 <span className={style['free-in']}
                       contentEditable={true}
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}
                       onFocus={this.handleFocus}
-                      onClick={e=>e.stopPropagation()}
-                      onkeydown={handleEnter}
-                      ref={this.$span}>{value||(inp?'':placeholder)}</span>
-                {suffix}
+                      /*onClick={e=>e.stopPropagation()}*/
+                      onKeyDown={handleEnter}
+                      ref={this.$span}>&nbsp;{value||placeholder}</span>
+                <span ref={this.$suf}>&nbsp;{suffix}</span>
             </div>;
     }
 }

+ 9 - 20
src/common/components/InspectCommon/index.jsx

@@ -1,27 +1,16 @@
-import React from 'react';
 import style from "./index.less";
 import PropTypes from "prop-types";
 
-/**
- * 
- */
-class InspectCommon extends React.Component {
-    constructor(props) {
-        super(props);
-    }
-
-    render() {
-        const { children,handleClear,handleConfirm} = this.props;
-        return <div className={ style.wrapper} id="inspectFill">
-            {children}
-            <div className={style.btnWrap}>
-                <span className={style.clear + ' red'} onClick={handleClear}>清空选项</span>
-                <span className={style.sure} onClick={handleConfirm}>确定</span>
-            </div>
-        </div>
-    }
+const InspectCommon = (props) => {
+  const { children,handleClear,handleConfirm} = props;
+  return <div className={ style.wrapper} id="inspectFill">
+      {children}
+      <div className={style.btnWrap}>
+          <span className={style.clear + ' red'} onClick={handleClear}>清空选项</span>
+          <span className={style.sure} onClick={handleConfirm}>确定</span>
+      </div>
+  </div>
 }
-
 InspectCommon.propTypes = {
     handleClear: PropTypes.func,
     handleConfirm: PropTypes.func

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

@@ -29,7 +29,6 @@
     }
     .clear {
         float: left;
-        // font-weight: bold;
         bottom: 0;
         cursor: pointer;
     }

+ 28 - 42
src/common/components/MiniToast/index.jsx

@@ -1,48 +1,34 @@
-import React from 'react';
 import style from './index.less';
-import close from "../../images/close-icon.png";
+import closeIcon from "../../images/close-icon.png";
 /**
-*小弹窗,没有蒙层,例如计算公式结果
-*title:弹窗标题
-*icon:标题旁边的icon,不传不显示
-*children:弹窗内容
-*show:弹窗显示
-*footer:是否显示底部“确定”按钮,默认不显示
-*confirmText:确认按钮文字
-*close:关闭弹窗事件
-*confirm:确定事件
-*使用时,父元素需要加相对定位position: relative;
-*/
-class MiniToast extends React.Component{
-  constructor(props){
-    super(props);
-  }
-
-  close(){
-    const {close} = this.props;
-    close&&close();
-  }
-
-  confirm(){
-    const {confirm} = this.props;
-    confirm&&confirm();
-  }
-
-
-  render(){
-    const {show,title,icon,children,footer,confirmText} = this.props;
-    return <div className={style["infoBox"]} style={{display:show?'block':'none'}}>
-              <p className={style["infoTitle"]}>
-                {icon?<img src={icon} />:''}
-                {title}
-                <img src={close} onClick={this.close.bind(this)} className={style["closeIcon"]}/>
-              </p>
-              <div className={style["infoCon"]}>{children}</div>
-              <div className={style["infoFoot"]} style={{display:footer?'block':'none'}}>
-                <span onClick={this.confirm.bind(this)}>{confirmText?confirmText:'确定'}</span>
-              </div>
-            </div>
+* author:Liucf@2019-05-15
+* 小弹窗,没有蒙层,例如计算公式结果
+* title:弹窗标题
+* icon:标题旁边的icon,不传不显示
+* children:弹窗内容
+* show:弹窗显示
+* footer:是否显示底部“确定”按钮,默认不显示
+* confirmText:确认按钮文字
+* close:关闭弹窗事件
+* confirm:确定事件
+* 使用时,父元素需要加相对定位position: relative;
+**/
+const MiniToast = (props) => {
+  const {show,title,icon,children,footer,close,confirm,confirmText} = props;
+  if(show){
+    return <div className={style["infoBox"]}>
+            <p className={style["infoTitle"]}>
+              {icon?<img src={icon} />:''}
+              {title}
+              <img src={closeIcon} onClick={close} className={style["closeIcon"]}/>
+            </p>
+            <div className={style["infoCon"]}>{children}</div>
+            {footer?<div className={style["infoFoot"]}>
+                      <span onClick={confirm}>{confirmText?confirmText:'确定'}</span>
+                    </div>:''}
+          </div>
   }
+  return ''
 }
 
 export default MiniToast;

+ 3 - 1
src/common/components/MiniToast/index.less

@@ -7,6 +7,7 @@
   border: 1px solid #EAEDF1;
   /*box-shadow: 0 5px 10px 0 rgba(0,0,0,0.10);*/
   box-shadow: 0 10px 20px 0 #989DA3;
+  margin-bottom: 20px;
   .infoTitle{
     height: 40px;
     line-height: 40px;
@@ -32,7 +33,8 @@
     span{
       color:#3B9ED0;
       display: inline-block;
-      width: 66px;
+      /*width: 66px;*/
+      padding:0 10px;
       height: 32px;
       line-height: 32px;
       text-align: center;

+ 0 - 92
src/common/components/MixCheckBox/index.jsx

@@ -1,92 +0,0 @@
-import React,{Component} from 'react';
-import PropTypes from 'prop-types';
-import style from './index.less';
-import Select from '../CheckBox/Select';
-import Radio from '../RadioB';
-import Normal from '../Normal';
-import CheckBox from '../CheckBox';
-import className from 'classnames';
-import Multiple from '../CheckBox/Multiple';
-
-/***
-单选多选混合组件
-接收参数:
-datas:数据源,为数组,必须;
-showDrop:控制填写单显示与隐藏,必须;
-confirmCheckBox:点击确定,必须
-clearCheckBox:点击清空,必须
-noSpecial:无殊选中标识,true为选中,有无殊时必须;
-noSpecialFlag:互斥标识,2选中其他 1选中无殊 0默认无选中;
-noSpecialClick:无殊点击事件;
-handleRadioClick:单选点击事件,有单选列时必须;
-handleCheckBoxClick:多选点击事件,有多选时必须;
-**/
-
-class MixCheckBox extends React.Component{
-  constructor(props){
-    super(props);
-    this.handleBtnConfirm = this.handleBtnConfirm.bind(this);
-    this.handleBtnClear = this.handleBtnClear.bind(this);
-  }
-
-  getLabs(){
-    const {datas,noSpecial,noSpecialFlag,noSpecialClick,checkBoxId,flag} = this.props;
-    let list = datas && datas.map((v,i)=>{
-      if(+v.formPosition == 1){//正常无殊
-         return <Normal datas={v.questionDetailList} noSpecialFlag={noSpecialFlag} noSpecial={noSpecial} noSpecialClick={noSpecialClick}/>
-      }else{
-        if(v.controlType==1 && v.formPosition !== 1){//单选
-          return <Radio datas={v.questionDetailList} handleClick={this.props.handleCheckBoxClick} parentId={v.id} disabled={noSpecialFlag}/>;
-        }else if(v.controlType==2){//2多选
-          return <Select datas={v.questionDetailList} handleClick={this.props.handleCheckBoxClick} parentId={v.id} noSpecialFlag={noSpecialFlag} checkBoxId={checkBoxId} flag={flag}/>
-        }
-        /*else if(v.controlType==4 || v.controlType==99){//4 伴/无 99推送
-          return <Multiple datas={v.questionDetailList} handleClick={this.props.handleCheckBoxClick} parentId={v.id} />
-        }*/
-      }
-    })
-    return list;
-  }
-
-  handleBtnConfirm(e){//确定
-    e.stopPropagation();
-    const {confirmCheckBox,checkBoxId,flag} = this.props;
-    let item = {
-      checkBoxId,
-      flag
-    };
-    confirmCheckBox && confirmCheckBox(item);   
-  }
-
-  handleBtnClear(e){//清空
-    e.stopPropagation();
-    const {clearCheckBox,checkBoxId,flag} = this.props;
-    let item = {
-      checkBoxId,
-      flag
-    };
-    clearCheckBox && clearCheckBox(item);
-  }
-
-  getContainerStyle(){
-    const {showDrop} = this.props;
-    const isShow = showDrop?'':style['ishide'];
-    return className(style['cb-container'],isShow);
-  }
-  render(){
-    return <div className={this.getContainerStyle()} >
-          <div style={{whiteSpace: 'nowrap'}}>{this.getLabs()}</div>
-          <div className={style['btn']}>
-            <button onClick={this.handleBtnClear} className={style['clear']}>清空选项</button>
-            <button onClick={this.handleBtnConfirm} className={style['confirm']}>确定</button> 
-          </div>         
-        </div>
-    }
-}
-
-MixCheckBox.propTypes = {
-    handleClick:PropTypes.func,
-    items:PropTypes.array
-};
-export default MixCheckBox;
-

+ 0 - 70
src/common/components/MixCheckBox/index.less

@@ -1,70 +0,0 @@
-@import "~@less/variables.less";
-.cb-container{
-  // width: 277px;
-  min-width: 216px;
-  padding: 10px;
-  position: absolute;
-  top: 25px;
-  left: -62px;
-  background: #fff;
-  z-index: 12;
-  box-shadow: 0 10px 20px 0 rgba(194,194,194,0.50);
-}
-.clear{
-  width: 88px;
-  height: 44px;
-  line-height: 44px;
-  font-size: 12px;
-  color:#FF0000;
-  border: none;
-  background: #fff;
-  float: left;
-}
-.confirm{
-  width: 88px;
-  height: 44px;
-  line-height: 44px;
-  color:#3B9ED0;
-  font-size: 12px;
-  border: 1px solid #3B9ED0;
-  background: #fff;
-  margin-left: 20px;
-  float: right;
-}
-.sentence{
-  width: 100%;
-  height: 54px;
-  border-bottom: 1px solid #EAEDF1;
-  margin-bottom: 15px;
-  span{
-    color:#000000;
-    display: inline-block;
-    height: 44px;
-    line-height: 44px;
-    padding: 0 10px 0 30px;
-  }
-}
-.selected-span{
-  background: rgba(59,158,208,0.1);
-  background-image: url(../../images/first.png);
-  background-repeat: no-repeat;
-  background-position: 12px 15px;
-}
-.disabled{
-  opacity: 0.3;
-  filter:alpha(opacity=30);
-  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
-}
-.multiple-tab{
-  // width: 200px;
-  vertical-align: top;
-}
-.multiple-con{
-  // width: 140px;
-  margin-left: 10px;
-  display: inline-block;
-  vertical-align: top;
-}
-.ishide{
-  .hide;
-}

+ 10 - 19
src/common/components/Modal/body/ModalBody.jsx

@@ -1,24 +1,15 @@
-import React, {Component} from "react";
-import classNames from 'classnames';
-
 import styles from "./index.less";
 
-class ModalBody extends Component {
-    constructor(props) {
-        super(props);
-    }
-
-    render() {
-        const  {overflow, children} = this.props;
-        let bodyStyle = {
-            overflowY: overflow ? "auto": "hide"
-        };
-        return (
-            <div className={styles['modal-body']} style={bodyStyle}>
-                {children ? children : <div className="paragraph"> </div>}
-            </div>
-        );
-    }
+const ModalBody = (props) => {
+  const  {overflow, children} = props;
+  let bodyStyle = {
+      overflowY: overflow ? "auto": "hide"
+  };
+  return (
+      <div className={styles['modal-body']} style={bodyStyle}>
+          {children ? children : <div className="paragraph"> </div>}
+      </div>
+  );
 }
 
 export default ModalBody;

+ 1 - 0
src/common/components/Modal/footer/ModalFooter.jsx

@@ -3,6 +3,7 @@ import classNames from 'classnames';
 
 import styles from "./index.less";
 
+
 class ModalFooter extends Component {
 
 

+ 11 - 11
src/common/components/NumberUnitPan/index.jsx

@@ -1,9 +1,12 @@
 import React,{Component} from 'react';
 import style from './index.less';
-import config from '@config/index.js';
 import Notify from '../Notify/index.js';
 import ReactDom from "react-dom";
-import backspace from '../../images/backspace.png'
+import backspace from '../../images/backspace.png';
+/**
+* 时间单位组件下拉(tagType=1,controlType=5)
+* 
+*/
 
 class NumberUnitPan extends Component{
   constructor(props){
@@ -15,18 +18,18 @@ class NumberUnitPan extends Component{
   }
   handleSelect(e){
     e.stopPropagation();
+    const {handleSelect,toClear} = this.props;
     const text = e.target.innerText || e.target.innerHTML;
     const preValue = this.state.value;
     if(+text==0 && !preValue){//第一位不能是0
       Notify.info("请输入正确时间");
       return false;
     }
-    const value = this.props.toClear?'':this.state.value;     //键盘输入替换已有的值
-    const onSelect = this.props.handleSelect;
+    const value = toClear?'':this.state.value;     //键盘输入替换已有的值
     this.setState({
       value: value+text
     });
-    onSelect&&onSelect({text:value+text,mark:true});//增加mark参数,清空删除不提示字数限制
+    handleSelect&&handleSelect({text:value+text,mark:true});//增加mark参数,清空删除不提示字数限制
   }
   handleClear(e){
     e.stopPropagation();
@@ -44,25 +47,23 @@ class NumberUnitPan extends Component{
   }
   handleBack(e){
     e.stopPropagation();
-    // const value = this.state.value;
-    const value = this.props.value;
+     const {handleSelect,value} = this.props;
     const len = value.length-1;
     if(len<0){
       return;
     }
-    const onSelect = this.props.handleSelect;
     const text = value.substring(0,len);
     this.setState({
       value:text
     });
-    onSelect&&onSelect({text,mark:false});
+    handleSelect&&handleSelect({text,mark:false});
   }
   getStyle(){
     const {left,top,show} = this.props;
     return {
       left:left?left+'px':'0',
       top:top?top+'px':'0',
-      display:show?'table':'none'        //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
+      display:show?'table':'none'
     }
   }
   componentWillReceiveProps(nextProps){
@@ -74,7 +75,6 @@ class NumberUnitPan extends Component{
      }
   }
   render(){
-    // const select = this.handleSelect.bind(this);
     const domNode = document.getElementById('root');
     return ReactDom.createPortal( 
       <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} style={this.getStyle()}>

+ 0 - 34
src/common/components/SlideSide/index.jsx

@@ -1,34 +0,0 @@
-import React from 'react';
-import styles from './index.less';
-import $ from 'jquery';
-
-class SlideSide extends React.Component {
-    constructor(props) {
-        super(props);
-        this.side = React.createRef();
-    }
-    componentDidMount() {
-        const sideNode = this.side.current;
-        // setTimeout(() => {
-        //     $(sideNode).animate({
-        //         "right":'360px'
-        //     },500)
-        // }, 1000);
-        // setTimeout(() => {
-        //     $(sideNode).animate({
-        //         "right":'260px'
-        //     },500)
-        // }, 3000);
-    }
-    render() {
-        return (
-            <div ref={this.side}
-                className={styles['slide-pub']}
-            >
-                侧滑不用了
-            </div>
-        )
-    }
-}
-
-export default SlideSide;

+ 0 - 10
src/common/components/SlideSide/index.less

@@ -1,10 +0,0 @@
-.slide-pub{
-    background-color: #ccc;
-    border: 1px solid #333;
-    width: 100px;
-    height: 300px;
-    position: absolute;
-    top: 0;
-    z-index: 100;
-    right: 260px;
-}

+ 12 - 15
src/common/components/Tab/TabOne/index.jsx

@@ -1,17 +1,14 @@
-import React from 'react'
-import styles from './index.less'
-class TabContain extends React.Component {
-    render() {
-        let { title, id, isSelect ,handleClick} = this.props;
-        return (
-            <div className={isSelect ? `${styles['tabOne']} ${styles['active']}` : styles['tabOne']}
-                onClick={() =>handleClick(id)}
-            >
-                {title}
-                <div className={isSelect ? `${styles['tabLine']} ${styles['activeLine']}` : styles['tabLine']}></div>
-            </div>
-        )
-    }
-}
+import styles from '../index.less'
 
+const TabContain = (props) =>{
+  let { title, id, isSelect ,handleClick} = props;
+  return (
+      <div className={isSelect ? `${styles['tabOne']} ${styles['active']}` : styles['tabOne']}
+          onClick={() =>handleClick(id)}
+      >
+          {title}
+          <div className={isSelect ? `${styles['tabLine']} ${styles['activeLine']}` : styles['tabLine']}></div>
+      </div>
+  )
+}
 export default  TabContain;

+ 0 - 27
src/common/components/Tab/TabOne/index.less

@@ -1,27 +0,0 @@
-@import "~@less/variables.less";
-
-.tabOne {
-  font-size: 18px;
-  color:  #767676;
-  display: inline-block;
-  min-width: 36px;
-  margin-right: 20px;
-  position: relative;
-  font-weight: 800;
-  cursor: pointer;
-}
-.tabOne:hover {
-    // color: @tab-color;
-}
-.tabLine {
-    width: auto;
-    height: 3px;
-    margin: 8px 6px 0 6px;
-    background-color: transparent;
-}
-.active {
-  color: @tab-color;
-}
-.activeLine {
-  background-color: @tab-color;
-}

+ 19 - 26
src/common/components/Tab/index.jsx

@@ -1,34 +1,27 @@
-import React from 'react';
 import TabOne from '@commonComp/Tab/TabOne';
 import styles from './index.less'
 import PropTypes from "prop-types"
 
-class RightPart extends React.Component {
-    constructor(props) {
-        super(props)
-    }
-    render() {
-        let { tabs, activeId, children ,handleActiveClick} = this.props;
-        return (
-            <div className={styles['clearfix']} >
-                <div className={`${styles['tabTop']} ${styles['clearfix']}`}>
-                    {
-                        tabs && tabs.map((value, idx) => {
-                            return <TabOne
-                                isSelect={activeId == idx}
-                                title={value.title}
-                                id={idx}
-                                handleClick={handleActiveClick}
-                            ></TabOne>
-                        })
-                    }
-                </div>
-                {children}
-            </div>
-        )
-    }
+const RightPart = (props) => {
+  let { tabs, activeId, children ,handleActiveClick} = props;
+  return (
+      <div className={styles['clearfix']} >
+          <div className={`${styles['tabTop']} ${styles['clearfix']}`}>
+              {
+                  tabs && tabs.map((value, idx) => {
+                      return <TabOne
+                          isSelect={activeId == idx}
+                          title={value.title}
+                          id={idx}
+                          handleClick={handleActiveClick}
+                      ></TabOne>
+                  })
+              }
+          </div>
+          {children}
+      </div>
+  )
 }
-
 RightPart.defaultProps = {
     activeId: '0'
 };

+ 28 - 0
src/common/components/Tab/index.less

@@ -1,3 +1,5 @@
+@import "~@less/variables.less";
+
 .tabWrap {
     
 }
@@ -13,4 +15,30 @@
     height: 0;
     clear: both;
     visibility: hidden;
+}
+
+.tabOne {
+  font-size: 18px;
+  color:  #767676;
+  display: inline-block;
+  min-width: 36px;
+  margin-right: 20px;
+  position: relative;
+  font-weight: 800;
+  cursor: pointer;
+}
+.tabOne:hover {
+    // color: @tab-color;
+}
+.tabLine {
+    width: auto;
+    height: 3px;
+    margin: 8px 6px 0 6px;
+    background-color: transparent;
+}
+.active {
+  color: @tab-color;
+}
+.activeLine {
+  background-color: @tab-color;
 }

+ 12 - 18
src/common/components/TailInlineTag/index.jsx

@@ -1,22 +1,16 @@
 import React, { Component } from "react";
-import style from './index.less'
-import classNames from 'classnames';
+import style from './index.less';
 import more from '@common/images/addItem1.png';
 
 /**
-子模板组件,如添加病程变化
-
+* 子模板标签组件,如添加病程变化
+* 单纯展示组件,接收两个参数:
+* showText:展示文字;
+* handleTailClick:点击事件;
 **/
 
-class TailInlineTag extends Component {
-  constructor(props){
-    super(props);
-    this.handleClick = this.handleClick.bind(this);
-    this.state = {
-      boxEditable:false
-    }
-  }
-
+class TailInlineTag extends React.PureComponent {
+  
   handleClick(e){
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
     const {handleTailClick,questionMapping,id,relationModule} = this.props;
@@ -24,11 +18,11 @@ class TailInlineTag extends Component {
   }
 
   render(){
-    const {showText,value,suffix} = this.props;
-    return <div className={style['tag-container']} onClick={(e)=>{this.handleClick(e)}}> 
-        <img src={more} style={{verticalAlign:'middle'}}/>  
-        <div className={`inline-box ${style['gray']}`} contentEditable="false" >
-          {value||showText?<span className={style['free-in']}>{value||showText}</span>:''}
+    const {showText} = this.props;
+    return <div className={style['tag-container']} onClick={this.handleClick.bind(this)}> 
+        <img src={more} />  
+        <div className={style['gray']} contentEditable="false" >
+          {showText?<span>{showText}</span>:''}
         </div>
       </div>
   }

+ 3 - 12
src/common/components/TailInlineTag/index.less

@@ -1,26 +1,17 @@
 @import "~@less/variables.less";
-.editable-tag,.clickable-tag{
-  border-bottom: 1px @border-color dashed;
-  display: inline-block;
-  padding: 0 3px 3px;
-}
 .tag-container{
   margin:5px 2px;
   display: inline-block;
   position: relative;
   cursor: pointer;
   line-height: 14px;
+  img{
+    vertical-align: middle;
+  }
   .gray{
     display: inline-block;
     color: @blue;
     border-bottom: none; 
     margin: 0 3px 0 2px;
   }
-}
-.pre-block{
-  display: inline-block;
-}
-.block{
-  display: inline-block;
-  min-width: 10px;
 }

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

@@ -2,7 +2,6 @@ import React, { Component } from "react";
 import style from "./index.less";
 import Notify from '../Notify';
 import config from '@config/index';
-import {setLastPosition} from '@common/js/util';
 import {isIE} from '@utils/tools.js';
 import $ from "jquery";
 
@@ -23,7 +22,7 @@ class Textarea extends Component {
   handleFocus(){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
     const {handleFocus,fuzhen,handleInput,isChronic} = this.props;
     handleFocus&&handleFocus();         //其他史、查体获取数据的方法
-    if(fuzhen&& !isChronic.name&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
+    if(fuzhen&& !isChronic&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
       const text = config.currentText.replace("(**)",fuzhen.replace(";",''));
       this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
       handleInput&&handleInput({text});

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

@@ -0,0 +1,28 @@
+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}</div>
+        <img className={style['img']} src={close} onClick={onClose} />
+        {children}
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default WrapModalContainer;

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

@@ -0,0 +1,49 @@
+.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{
+    cursor: pointer;
+    position: absolute;
+    top: 10px;
+    right: 10px;
+    z-index: 100;
+  }
+}

+ 8 - 5
src/common/components/index.js

@@ -10,13 +10,11 @@ import ItemBox from './ItemBox';
 import Tab from './Tab';
 import DropList from './DropList';
 import NumberPan from './NumberPan';
-import SlideSide from './SlideSide';
 import ConfirmModal from './ConfirmModal';
 import Calendar from "./Calendar";
 import SearchOption from "./SearchOption";
 import InspectCommon from "./InspectCommon";
 import Notify from "./Notify";
-import MixCheckBox from "./MixCheckBox";
 import EditableSpan from "./EditableSpan";
 import Textarea from "./Textarea";
 import NumberUnitPan from "./NumberUnitPan";
@@ -24,6 +22,9 @@ import Add from "./Add";
 import ComplexModal from "./ComplexModal";
 import MiniToast from "./MiniToast";
 import DelToast from "./DelToast";
+import TailInlineTag from "./TailInlineTag";
+import Footer from "./Footer";
+import WrapModalContainer from "./WrapModalContainer";
 
 module.exports = {
     Banner,
@@ -38,18 +39,20 @@ module.exports = {
     Tab,
     DropList,
     NumberPan,
-    SlideSide,
     ConfirmModal,
     Calendar,
     SearchOption,
     InspectCommon,
     Notify,
-    MixCheckBox,
     EditableSpan,
     Textarea,
     NumberUnitPan,
     Add,
     ComplexModal,
     MiniToast,
-    DelToast
+    DelToast,
+    MiniToast,
+    TailInlineTag,
+    Footer,
+    WrapModalContainer
 };

二进制
src/common/images/check-circle.png


二进制
src/common/images/check-right.png


二进制
src/common/images/date1.png


二进制
src/common/images/delete.png


二进制
src/common/images/delete_no.png


二进制
src/common/images/down.png


二进制
src/common/images/emergency.png


二进制
src/common/images/likely.png


二进制
src/common/images/up.png


+ 0 - 201
src/common/js/func.js

@@ -1,201 +0,0 @@
-import config from '@config/index.js';
-//函数类工具,对函数进行操作 返回函数
-//延时操作
-export function debounce(func, delay) {
-    let timer = null;
-    return function (...args) {
-        if (timer) {
-            clearTimeout(timer);
-        }
-        timer = setTimeout(() => {
-            func.apply(this, args);
-        }, delay);
-    }
-}
-
-// 时间戳转换日期
-export function dateParser(timestamp,link = '-'){
-    let time = new Date(timestamp);
-    let year = time.getFullYear();
-    let month = time.getMonth()+1;
-    let date = time.getDate();
-    let hour = time.getHours().toString().padStart(2,'0');
-    let minute = time.getMinutes().toString().padStart(2,'0');
-    // let result = year+link+month+link+date;
-    let result = year+link+(month<10?"0"+month:month)+link+(date<10?"0"+date:date)+' '+hour+':'+minute;
-    return result;
-}
-
-//时间搓转换年龄
-export const getAge = (time) => {
-  const birthday = new Date(time),
-    year = birthday.getFullYear(),
-    month = birthday.getMonth() + 1,
-    day = birthday.getDate(),
-    now = new Date(),
-    now_year = now.getFullYear(),
-    now_month = now.getMonth() + 1,
-    now_day = now.getDate();
-  let age= now_year - year;
-  if (now_month > month) {
-    age += 1;
-  } else if (now_month === month) {
-    if (now_day >= day) {
-      age += 1;
-    }
-  }
-  return age;
-};
-
-//获取URL参数-返回json对象
-export const parseUrl = (url) => {
-  const r = url.substr(1).split("&"),
-    obj = {};
-  r.forEach((v) => {
-    const index = v.indexOf('=');
-    if (index > -1) {
-      obj[v.substring(0, index)] = v.substring(index + 1);
-    }
-  });
-  return obj;
-}
-
-//字符串去空格
-export const strTrim = (str) =>{
-  return str.replace(/&nbsp;|<div>|<\/div>|<br>|\s/g,'');
-};
-
-//获取组合组件已填文字填入saveText
-function getSaveText(data){//console.log(data)
-  const arr = data.questionMapping.map((it)=>{
-    return it.value?(it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||''):'';
-  });
-  return arr.join('');
-}
-
-//添加自由文本标签
-function notTextLabel(label){
-  return +label.tagType!==8;
-}
-/*
-* 给标签组添加自由文本标签
-* 入参:arr源数组,
-*       noPre是否不添加前置文本标签,默认false即添加
-*       noEnd是否不添加后置文本标签,默认false即添加
-*       ifEmpty是否添加空标签,默认true即添加,传false添加逗号,如查体,
-*       showInCheck是否默认在查体中展开
-* */
-export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
-  let newArr =[],
-      pre={},
-      textLabel={},
-      _textLabel={},
-      notText = true,
-      saveText=[],
-      tempText = '',
-      value = '',
-      item={},
-      cNum = 0,
-      checkHiddenDefault=false;//console.log(arr)
-  arr&&arr.map((it,i)=>{
-    notText = notTextLabel(it);
-    cNum = i;
-    value = it.value||'';
-    textLabel = !ifEmpty&&i==0?Object.assign({},JSON.parse(config.textLabel),{showInCheck:true}):JSON.parse(config.textLabel);
-    //n个显示的标签最后一个标签后面要落关标,所以+1
-    _textLabel = !ifEmpty&&cNum<config.showCheckNum+1?Object.assign({},JSON.parse(config._textLabel),{showInCheck:true}):JSON.parse(config._textLabel);
-    if(i===0){
-      //第一个标签不是文本标签时在前面添加文本标签
-      if(!noPre&&notText){
-        newArr.push(textLabel);
-        saveText.push('');
-      }
-      item = ifEmpty?it:Object.assign({},it,{showInCheck:true});
-      newArr.push(item);
-      if(it.tagType != 3){
-        tempText = value?it.labelPrefix+value+it.labelSuffix:'';
-        tempText = notText?tempText:it.value||it.name;
-      }else{
-        tempText = getSaveText(it);
-      }
-      saveText.push(tempText);
-      // 模板只有一个标签时第一项后面也要加空标签
-      if(arr.length==1&&notText){
-        newArr.push(textLabel);
-        saveText.push('');
-      }
-    }else{
-      pre = arr[i-1];
-      item = !ifEmpty&&cNum<config.showCheckNum?Object.assign({},it,{showInCheck:true}):it;
-      //判断单选项是否有默认选中,位置在隐藏区域时,查体所有标签展示
-      if(!ifEmpty&&!checkHiddenDefault&&cNum>config.showCheckNum&&+it.tagType===1&&(+it.controlType===0||+it.controlType===1)){
-        if(it.questionDetailList.find((it)=>it.defaultSelect=='1')){
-          checkHiddenDefault=true;
-        }
-      }
-      //如果本身不是文本标签且前面一个也不是文本标签,该标签前面添加文本标签
-      if(notTextLabel(pre)&&notText){
-          // newArr.push(textLabel,it);
-          ifEmpty?newArr.push(textLabel,it):newArr.push(_textLabel,item);
-          if(it.tagType != 3) {
-            tempText = value ? it.labelPrefix + value + it.labelSuffix : '';
-          }else{
-            tempText = getSaveText(it);
-          }
-          saveText.push("",tempText);
-      }else{    //本身是或者前面是文本标签时,前面不添加文本标签
-        newArr.push(item);
-        if(it.tagType != 3) {
-          tempText = value ? it.labelPrefix + value + it.labelSuffix : '';
-          // tempText = notText?tempText:it.value||it.name;
-          tempText = notText ? tempText : (it.value || it.value == "" ? it.value : it.name);
-        }else{
-          tempText = getSaveText(it);
-        }
-        saveText.push(tempText);
-      }
-      if(notText&&!noEnd&&i===arr.length-1){//最后一个非文本标签,后面添加一个文本标签
-        //不能用上面的变量textLabel,因为上一个if可能也进了,这样就是同一个对象,值改变时会同步
-        const _text = arr.length>config.showCheckNum?JSON.parse(config._textLabel):_textLabel;
-        newArr.push(ifEmpty?textLabel:_text);
-        saveText.push("");
-      }
-    }
-  });
-  return {newArr,saveText,checkHiddenDefault};
-};
-
-
-//获取标签index,入参:病例项index+标签index+标签内index
-export const getLabelIndex = (index)=>{
-  let ikey = '';
-  if(index.length == 3){
-    ikey = index.substr(1,1);
-  }else if(index.length == 4){
-    ikey = index.substr(1,2);
-  }else if(index.length == 5){
-    ikey = index.substr(1,3);
-  }
-  return ikey;
-};
-
-export const getWindowInnerHeight = ()=>{
-  if(window.innerHeight!=undefined){
-    return window.innerHeight;
-  }else{
-    let by = document.body, ele = document.documentElement;
-    return Math.min(by.clientHeight,ele.clientHeight);
-  }
-};
-export const getWindowInnerWidth = ()=>{
-  let width = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth 
-  return width
-};
-
-export const getIds = (data)=>{
-  let ids = [];
-  data&&data.forEach((it,i)=>{
-   ids.push(it.id);
-  })
-  return ids;
-}

+ 0 - 36
src/common/js/util.js

@@ -1,36 +0,0 @@
-
-/**
- * 业务相关工具函数
- */
-export const setLastPosition=(dom)=>{
-    dom.focus();
-    if (window.getSelection && document.createRange) {
-        const range = document.createRange();
-        range.selectNodeContents(dom);
-        range.collapse(false);
-        const sel = window.getSelection();
-        sel.removeAllRanges();
-        sel.addRange(range);
-    } else if (document.body.createTextRange) {
-        const textRange = document.body.createTextRange();
-        textRange.moveToElementText(dom);
-        textRange.collapse(false);
-        textRange.select();
-    }
-};
-// export const setLastPosition=(obj)=> {
-//     if (window.getSelection) {//ie11 10 9 ff safari
-//         obj.focus(); //解决ff不获取焦点无法定位问题
-//         var range = window.getSelection();//创建range
-//         range.selectAllChildren(obj);//range 选择obj下所有子内容
-//         range.collapseToEnd();//光标移至最后
-//     }
-//     else if (document.selection) {//ie10 9 8 7 6 5
-//         var range = document.selection.createRange();//创建选择对象
-//         //var range = document.body.createTextRange();
-//         range.moveToElementText(obj);//range定位到obj
-//         range.collapse(false);//光标移至最后
-//         range.select();
-//     }
-// }
-

+ 42 - 6
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;
 
@@ -54,6 +58,13 @@
 @EMR-width: calc(~"100% - "@push-width);
 
 /*******下拉框公用样式**********/
+.btnCom{
+  border: none;
+  outline: none;
+  cursor: pointer;
+  border-radius: 4px;
+  text-align: center;
+}
 .pop{
   position: absolute;
   // top:40px;
@@ -93,12 +104,12 @@
   line-height: 44px;
   font-size: 12px;
   color:@red;
-  border: none;
+  // border: none;
   background: #fff;
   float: left;
-  outline: none;
-  text-align: center;
-  cursor: pointer;
+  // outline: none;
+  // text-align: center;
+  // cursor: pointer;
   margin-left: 22px;
   position: relative;
   bottom: -10px;
@@ -113,9 +124,9 @@
   background: #fff;
   margin-left: 20px;
   float: right;
-  outline: none;
+  // outline: none;
   text-align: right;
-  cursor: pointer;
+  // cursor: pointer;
   font-weight: bold;
   position: relative;
   bottom: -10px;
@@ -196,12 +207,23 @@
   -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;
   text-align: left;
   padding-left: 5px;
   cursor: default;
+  display: inline-block;
   width: 99px;
   height: 26px;
   line-height: 26px;
@@ -219,6 +241,7 @@
   text-align: left;
   padding-left: 5px;
   cursor: default;
+  display: inline-block;
   width: 99px;
   height: 26px;
   line-height: 26px;
@@ -233,3 +256,16 @@
     opacity: .5;
   }
 }
+// 弹窗遮罩
+.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;
+}

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

@@ -66,11 +66,11 @@ class Textarea extends Component {
     this.textInput.current.previousSibling.focus();
   }
   render() {
-    const {idx} = this.props;
+    const {idx,disabled} = this.props;
     return (
       <div className={style.textWap}>
         <div className={style.divTextarea}
-            contenteditable={true}
+            contenteditable={disabled?false:true}
             ref={this.$dom}
             onInput={this.handleInput}
             onKeyUp={this.handleInput}

+ 127 - 84
src/components/AddAssistCheck/index.jsx

@@ -3,7 +3,7 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
-import { getPageCoordinate } from '@utils/tools';
+import { getPageCoordinate,getCurrentDate } from '@utils/tools';
 import close from './img/close.png';
 
 class AddAssistCheck extends React.Component {
@@ -20,12 +20,38 @@ class AddAssistCheck extends React.Component {
       activeName:''
     }
     this.handleShowDate = this.handleShowDate.bind(this)
-    this.getCurrentDate = this.getCurrentDate.bind(this)
     this.getSearchList = this.getSearchList.bind(this)
     this.getAssistLabel = this.getAssistLabel.bind(this)
     this.handleDelClick = this.handleDelClick.bind(this)
     this.delConfirm = this.delConfirm.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
+    this.timeSure = this.timeSure.bind(this)
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let _con = $('#searchWrapAssist');   // 设置目标区域
+      let _cons = $('#datePick');   // 设置目标区域
+      let _del = document.getElementById("delBox");   // 删除弹窗
+      let _close = document.getElementById("assiClose");   // 删除icon
+      let _closeTil = $('#delTit')[0];   // 弹窗标题
+      if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+        this.setState({ show: false });
+      }
+      if (!_cons.is(event.target) && _cons.has(event.target).length === 0) { // Mark 1
+        this.setState({ date: false });
+      }
+      
+      if(_del){
+        if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
+          this.setState({
+            visible: false,
+            id: null,
+            activeName:''
+          })
+        }
+      }
+    });
+    getCurrentDate(1);
   }
 
   handleDelClick(id,item) {
@@ -36,10 +62,10 @@ class AddAssistCheck extends React.Component {
     })
   }
 
-  delConfirm() {
+  delConfirm(type) {
     const { handleDelAssist, handlePush } = this.props;
-    const { id } = this.state;
-    handleDelAssist && handleDelAssist(id);
+    const { id,activeName } = this.state;
+    handleDelAssist && handleDelAssist(id,activeName,type);
     handlePush && handlePush();           //右侧推送
     this.setState({
       visible: false,
@@ -57,29 +83,6 @@ class AddAssistCheck extends React.Component {
     })
   }
 
-  componentDidMount() {
-    $(document).click((event) => {
-      let _con = $('#searchWrapAssist');   // 设置目标区域
-      let _cons = $('#datePick');   // 设置目标区域
-      let _del = $('#delBox')[0];   // 删除弹窗
-      let _close = $('#assiClose')[0];   // 删除icon
-      let _closeTil = $('#delTit')[0];   // 弹窗标题
-      if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
-        this.setState({ show: false });
-      }
-      if (!_cons.is(event.target) && _cons.has(event.target).length === 0) { // Mark 1
-        this.setState({ date: false });
-      }
-      if(!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
-          this.setState({
-            visible: false,
-            id: null,
-            activeName:''
-          })
-      }
-    });
-    this.getCurrentDate();
-  }
   handleSearchShow(e) {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
@@ -91,14 +94,6 @@ class AddAssistCheck extends React.Component {
       active: idx
     })
   }
-  getCurrentDate() {
-    let myDate = new Date();
-    let year = myDate.getFullYear();       //获取完整的年份(4位,1970-????)
-    let mon = myDate.getMonth() - 0 + 1;       //获取当前月份(0-11,0代表1月)
-    let day = myDate.getDate();            //获取当前日(1-31)
-    let date = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day);
-    this.setState({ dateTime: date })
-  }
 
   getSearchList(list) {      //搜索列表
     const { handleSign } = this.props;
@@ -107,13 +102,13 @@ class AddAssistCheck extends React.Component {
         list && list.map((item, idx) => {
           return <li key={item.id}
             className={styles.searchLi}
-            title={item.name}
+            title={(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
             onClick={() => {
-              handleSign(item.questionId, idx,'search');
+              handleSign(item.conceptId,idx,'search');
               this.setState({ show: false })
             }}
           >
-            {item.name}{item.name == item.retrievalName ? null : '(' + item.retrievalName + ')'}
+            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
           </li>
         })
       }
@@ -128,7 +123,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
-              handleSign(item.questionId, idx,'common');
+              handleSign(item.conceptId, idx,'common');
               this.setState({ show: false })
             }}
           >
@@ -138,42 +133,103 @@ class AddAssistCheck extends React.Component {
       }
     </ul>
   }
+  handleChangeDate(){}
+  timeSure(date,idx){
+    this.props.handleChangeDate(date,idx)
+    this.setState({ date: false })
+  }
+
   getAssistLabel() {
-    const { assistLabel, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation } = this.props;
-    const { visible,activeName,id } = this.state;
-    return <ul className={styles.labelWrap} id="datePick">
+    const { assistLabel,checkedListImport, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation,assistList } = this.props;
+    const { visible,activeName,id,date } = this.state;
+    return <React.Fragment>
       {
-        assistLabel.map((item, idx) => {
-          return (<li key={item.questionId} className={styles.assistLists}>
-            <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
-              <span className={styles.tagSpan}>
-                {item.name}:
-                <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
-              </span>
-            </span>
-            <div className={styles.textareaWrap}>
-              <Textarea value={item.value} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
-            </div>
-            <div className={styles.pointerFinger}>
-              <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-              <i onClick={() => this.handleShowDate(idx)}></i>
-              {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,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>
-            </div>
-          <DelToast show={idx==id?visible:false}
-                    name={activeName} 
-                    cancel={this.handleCancel}
-                    confirm={this.delConfirm}/>
-          </li>)
+        checkedListImport.map((part,index)=>{
+          return <ul className={`${styles.labelWrap} ${styles.labelWrapSpec} ${styles.labelWrapSpecs}`}>
+            {
+              part.map((item, idx) => {
+                return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
+                  <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+                    <span className={styles.tagSpan}>
+                      {item.name}:
+                      <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                    </span>
+                  </span>
+                  <div className={styles.textareaWrap}>
+                    <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+                  </div>
+                  <div className={styles.pointerFinger}>
+                    <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                  </div>
+                </li>)
+              })
+            }
+            <DelToast show={index==id&&part.name==activeName?visible:false}
+                      name="该导入项"
+                      right={'-34px'}
+                      top={'22px'}
+                      cancel={this.handleCancel}
+                      confirm={()=>this.delConfirm(0)}/>
+            <span className={`${styles.closeIcon} ${styles.closeIcons}`} id="assiClose" onClick={()=>{ this.handleDelClick(index,part)}}></span>
+          </ul>
         })
       }
-    </ul>
+
+      <ul className={styles.labelWrap} id="datePick">
+        {
+          assistLabel.map((item, idx) => {
+            let staticTime = {}
+            if(item.time){
+              let tmp1 = (item.time).split(' ')[0].split('-')
+              let tmp2 = (item.time).split(' ').length>1&&(item.time).split(' ')[1].split(':')
+              staticTime = {
+                year: tmp1[0]-0,
+                month: tmp1[1]-0,
+                day: tmp1[2]-0,
+                hour: tmp2[0],
+                minute: tmp2[1],
+                second: tmp2[2]
+              }
+            }
+            return (item.disabled?null:<li className={`${styles.assistLists} ${styles.clearfix}`}>
+              <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+                <span className={styles.tagSpan}>
+                  {item.name}:
+                  <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                </span>
+              </span>
+              <div className={styles.textareaWrap}>
+                <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+              </div>
+              <div className={styles.pointerFinger}>
+                <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                <i onClick={() => this.handleShowDate(idx)}></i>
+                {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
+                <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
+                {
+                  this.state.date && idx == this.state.active ?<Calendar timeLis={staticTime} isShow={true} timeSure={(date)=>this.timeSure(date,idx)} needTime={true} sure={true} handleChange={(info) => { this.handleChangeDate(info, idx) }} top={30}></Calendar>:null
+                }
+              </div>
+              <DelToast show={idx==id&&item.name==activeName?visible:false}
+                  name={activeName}
+                  right={'-34px'}
+                  top={'40px'}
+                  cancel={this.handleCancel}
+                  confirm={()=>this.delConfirm(1)}/>
+              {/* {
+                id == null?null:<DelToast show={idx==id&&item.name==activeName?visible:false}
+                  name={activeName}
+                  cancel={this.handleCancel}
+                  confirm={this.delConfirm}/>
+              } */}
+            </li>)
+          })
+        }
+      </ul>
+    </React.Fragment> 
   }
   render() {
-    const { handleChangeValue, list,assistVal,windowHeight } = this.props;
+    const { handleChangeValue, list,assistVal,windowHeight,assistList } = this.props;
     const { visible,pageTop } = this.state;
     return (
       <div className={styles.wrapper}>
@@ -183,7 +239,7 @@ class AddAssistCheck extends React.Component {
           {this.state.show ? <SearchOption windowHeight={windowHeight} pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
-              list && list.length>0 || (assistVal != '')?'':<div>
+              (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
                 {
                   this.getCommonList()
@@ -192,19 +248,6 @@ class AddAssistCheck extends React.Component {
             }
           </SearchOption> : ''}
         </div>
-        {/*<ConfirmModal
-          visible={visible}
-          confirm={this.delConfirm}
-          close={this.handleCancel}
-          cancel={this.handleCancel}
-          okText="删除"
-          cancelText='取消'
-          okBorderColor={'#3B9ED0'}
-          okColor={'#fff'}
-          oKBg={'#3B9ED0'}
-        >
-          <p className={styles['center']}>是否删除该辅检项?</p>
-        </ConfirmModal>*/}
       </div>
     )
   }

文件差异内容过多而无法显示
+ 142 - 79
src/components/AddAssistCheck/index.less


+ 61 - 53
src/components/AddInspect/SlideExcel/index.jsx

@@ -1,88 +1,96 @@
 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 {
   constructor(props) {
     super(props);
     this.state = {
-      show:false
+      show: false
     };
     this.toTime = this.toTime.bind(this)
     this.handleSlide = this.handleSlide.bind(this)
   }
-  toTime(time){
-    let tmpTim = time.split(',').join('')-0
-    if(time && tmpTim.toString() != 'NaN'){
+  toTime(time) {
+    let tmpTim = time.split(',').join('') - 0
+    if (time && tmpTim.toString() != 'NaN') {
       let date = new Date('1900-01-01');
       let dateTim = date.getTime();
-      let times = (tmpTim-2)*24*60*60*1000;
-      let result = timestampToTime(dateTim+times).split(' ')[0]
+      let times = (tmpTim - 2) * 24 * 60 * 60 * 1000;
+      let result = timestampToTime(dateTim + times).split(' ')[0]
       return result;
-    }else{
+    } else {
       return time;
     }
   }
-  handleSlide(){
+  handleSlide() {
     let tmpShow = this.state.show
     this.setState({
-      show:!tmpShow
+      show: !tmpShow
     })
   }
   render() {
-    const {items,item,idx,dateTime,getInfomation} = this.props;
-    const {show} = this.state;
+    const { items, item, idx, getInfomation, dateTime } = this.props;
+    const { show } = this.state;
     return (
-      <li className={styles.excelDataLis} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
-          <span className={styles.excelDataTitle}>
-              <span className={styles.tagSpan}>
-                {item.menus}
-                <span className={styles.imgInfo} onClick={()=>getInfomation('',item.lisExcelItem[0].uniquemealName || '','excel')}></span>
-              </span>
+      <li className={`${styles.excelDataLis} clearfix`} style={{ border: items.lisExcelRes.length - 1 == idx ? 0 : '' }}>
+        <span className={styles.excelDataTitle}>
+          <span className={styles.tagSpan}>
+            {item.menus}
+            <span className={styles.imgInfo} onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
           </span>
-          <table className={styles.table}>
-             {  show ? (item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
-                  return <tr>
-                      <td style={{width:'30%'}}>
-                        <span className={styles.tagSpan}>
-                          {value.itemName}
-                          <span className={styles.imgInfo} onClick={()=>getInfomation('',value.uniqueName || '','excel')}></span>
-                        </span>
-                      </td>
-                      <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
-                      <td style={{width:'25%'}}>
-                          {normalVal(value.min,value.max)}
-                      </td>
-                      <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+dateTime):'化验时间: '+this.toTime(value.time)}</td>
-                  </tr>
-                })):(item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
-                  if(idx < 4){
-                    return <tr>
-                        <td style={{width:'30%'}}>
-                          <span className={styles.tagSpan}>
-                            {value.itemName}
-                            <span className={styles.imgInfo} onClick={()=>getInfomation('',value.uniqueName || '','excel')}></span>
-                          </span>
-                        </td>
-                        <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
-                        <td style={{width:'25%'}}>
-                            {normalVal(value.min,value.max)}
-                        </td>
-                        <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+dateTime):'化验时间: '+this.toTime(value.time)}</td>
-                    </tr>
+        </span>
+        <table className={styles.table}>
+          {show ? (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            return <tr>
+              <td style={{ width: '30%' }}>
+                <span className={styles.tagSpan}>
+                  {value.itemName}
+                  <span className={styles.imgInfo} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                </span>
+              </td>
+              <td style={{ width: '20%' }}>
+                {
+                  getStatusImg(value.type, value.value, 1)
+                }
+                {value.unit}</td>
+              <td style={{ width: '25%' }}>
+                {normalVal(value.min, value.max)}
+              </td>
+              <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+            </tr>
+          })) : (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            if (idx < 4) {
+              return <tr>
+                <td style={{ width: '30%' }}>
+                  <span className={styles.tagSpan}>
+                    {value.itemName}
+                    <span className={styles.imgInfo} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  </span>
+                </td>
+                <td style={{ width: '20%' }}>
+                  {
+                    getStatusImg(value.type, value.value, 1)
                   }
-                }))
+                  {value.unit}</td>
+                <td style={{ width: '25%' }}>
+                  {normalVal(value.min, value.max)}
+                </td>
+                <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+              </tr>
             }
+          }))
+          }
         </table>
         {
           item.lisExcelItem && item.lisExcelItem.length > 5 ?
-          <div className={styles.slides} onClick={this.handleSlide}>
+            <div className={styles.slides} onClick={this.handleSlide}>
               {
-                show ? <span>收起</span> :<span>剩余<span className={styles.num}>{item.lisExcelItem.length-4}</span>项</span>
+                show ? <span>收起</span> : <span>剩余<span className={styles.num}>{item.lisExcelItem.length - 4}</span>项</span>
               }
-              <img src={show ?slideUp:slideDown} alt=""/>
-          </div>:null
+              <img src={show ? slideUp : slideDown} alt="" />
+            </div> : null
         }
       </li>
     );

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

@@ -42,6 +42,7 @@
 .table {
   color: #000;
   width: 80%;
+  // display: inline-block;
   tr {
       line-height: 18px;
       height: 18px;
@@ -164,6 +165,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;
 }

+ 50 - 11
src/components/AddInspect/SlideSelect/index.jsx

@@ -4,6 +4,7 @@ import { normalVal,timestampToTime } from '@utils/tools';
 import { InspectCommon, Calendar,DelToast} from '@commonComp';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
+import $ from 'jquery';
 import date1 from '../img/date1.png';
 import close from '../img/close.png';
 
@@ -13,13 +14,29 @@ class SlideSelect extends Component {
     this.state = {
       show:false,
       activeInd:false,
-      activeName:''
+      activeName:'',
     };
     this.toTime = this.toTime.bind(this)
     this.handleSlide = this.handleSlide.bind(this)
     this.handleDel = this.handleDel.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
     this.delConfirm = this.delConfirm.bind(this)
+    this.timeSure = this.timeSure.bind(this)
+  }
+  handleChangeDate(date) {
+    // console.log(date,'外')
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let inspectToggleDate = document.getElementById("inspectToggleDate")
+      let timeIcon = document.getElementById("timeIcon")
+      let calendarDate = document.getElementById("calendarDate")
+      if (calendarDate) {
+        if (inspectToggleDate != event.target && timeIcon != event.target && !calendarDate.contains(event.target)) {
+          this.props.handleShowDate();
+        }
+      }
+    });
   }
   toTime(time){
     let tmpTim = time.split(',').join('')-0
@@ -61,10 +78,27 @@ class SlideSelect extends Component {
       activeName:''
     })
   }
+  timeSure(date){
+    const {handleChangeDate} = this.props;
+    handleChangeDate&&handleChangeDate(date)
+  }
   render() {
     const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate,showToast} = this.props;
     const {show,activeInd,activeName} = this.state;
     let numPlus = 0,numPlus1 = 0;
+    let staticTime = {}
+    if(dateTime){
+      let tmp1 = dateTime.split(' ')[0].split('-')            
+      let tmp2 = (dateTime).split(' ').length>1&&(dateTime).split(' ')[1].split(':')
+      staticTime = {
+        year: tmp1[0]-0,
+        month: tmp1[1]-0,
+        day: tmp1[2]-0,
+        hour: tmp2[0],
+        minute: tmp2[1],
+        second: tmp2[2]
+      }
+    }
     return (
       <li key={item.questionId} className={styles.slideLi}> 
         {
@@ -73,13 +107,13 @@ class SlideSelect extends Component {
             <p className={styles.staticTagActive}>
                 <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); handleFillShow(e,idx) }}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
+                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
                 <i className={styles.tagSpan} data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); handleFillShow(e,idx) }}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
+                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
         }
@@ -101,17 +135,17 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation(val.id)}></span>                                        
+                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
                                     <td style={{width:'25%'}}>
-                                        {normalVal(val.minValue,val.maxValue)}
+                                      {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
                                     </td>
                                     <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
                                 </tr>
                             }
-                        })):(item.details.map((val,num)=>{
+                        })):(item.details.map((val)=>{
                           if(val.value && val.value != '' ){
                               ++numPlus1;
                               if(numPlus1 < 5){
@@ -119,12 +153,12 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation(val.id)}></span>
+                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}
                                     <td style={{width:'25%'}}>
-                                        {normalVal(val.minValue,val.maxValue)}
+                                        {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
                                     </td>
                                     <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
                                 </tr>
@@ -163,15 +197,18 @@ class SlideSelect extends Component {
                     >
                     
                         <div className={styles.searchResultT}>
-                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} src={date1} alt="" onClick={handleShowDate}/>
-                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate}>
+                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} onClick={handleShowDate} src={date1} alt="" id="inspectToggleDate"/>
+                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate} id="timeIcon">
                                 {
                                   dateTime
                                 }
                             </p>
                             <div style={{display:date?"block":"none",position:"relative"}}>
                                 {/* 日期组件 */}
-                                <Calendar isShow={true} handleChange={handleChangeDate}></Calendar>
+                                {
+                                  date?<Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={this.handleChangeDate}></Calendar>:null
+                                }
+                                {/* <Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={handleChangeDate}></Calendar> */}
                             </div>
                         </div>
                             {/* 填写单内容显示 */}
@@ -184,6 +221,8 @@ class SlideSelect extends Component {
         <span id="addClose" className={styles.partDel} onClick={this.handleDel}></span>
         <DelToast show={showToast&&activeInd?true:false}
                     name={activeName} 
+                    right={'-34px'}
+                    top={'30px'}
                     cancel={this.handleCancel}
                     confirm={this.delConfirm}/>
     </li>

+ 6 - 4
src/components/AddInspect/SlideSelect/index.less

@@ -3,8 +3,9 @@
     // cursor: pointer;
     // color: #767676;
     position: relative;
-    padding: 10px 20px 10px 0;
+    padding: 10px 0px 10px 0;
     border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
     i {
         font-style: normal;
         display: inline-block;
@@ -31,10 +32,10 @@
         cursor: pointer;
         display: inline-block;
         position: absolute;
-        right: 2px;
-        top: 13px;
-        // background-color: #fff;
+        right: -4px;
+        top: 0px;
         background: @closeIcon;
+        background-color: #fff;
         background-size: 100% 100%;
     }
 }
@@ -43,6 +44,7 @@
     border-radius: 4px;
        .partDel{
         background: @closeHor;
+        background-color: #fff;
         background-size: 100% 100%;
       } 
 }

+ 76 - 53
src/components/AddInspect/index.jsx

@@ -1,8 +1,8 @@
 import React from 'react';
-import { SearchOption, InspectCommon, Calendar ,Notify,ConfirmModal,Add,DelToast} from '@commonComp';
+import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
 import SlideExcel from './SlideExcel';
 import SlideSelect from './SlideSelect';
-import { deepClone,getPageCoordinate } from '@utils/tools';
+import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate} from '@utils/tools';
 import styles from './index.less';
 import date1 from './img/date1.png';
 import close from './img/close.png';
@@ -24,13 +24,12 @@ class Inspect extends React.Component {
       num: 0,            //暂存数据,获取一次,不能每次都是新的数据
       type: null,
       id: null,
-      pageTop:'',
+      pageTop: '',
       // tmpIds: [],      //内层外层
-      impId:null
+      impId: null
     }
     this.handleChangeDate = this.handleChangeDate.bind(this)
     this.handleShowDate = this.handleShowDate.bind(this)
-    this.getCurrentDate = this.getCurrentDate.bind(this)
     this.getItemList = this.getItemList.bind(this)
     this.getSearchList = this.getSearchList.bind(this)
     this.getCommonList = this.getCommonList.bind(this)
@@ -45,7 +44,7 @@ class Inspect extends React.Component {
   }
   delConfirm() {//弹窗确定
     const { delPartItem, handleCloseExcel, handlePush } = this.props;
-    const { type, id ,impId} = this.state;
+    const { type, id, impId } = this.state;
     if (type == 1) {
       delPartItem(id)
     } else if (type == 2) {
@@ -59,18 +58,18 @@ class Inspect extends React.Component {
     Notify.success("删除成功");
     handlePush && handlePush();       //右侧推送
   }
-  handleDelClick(type, idx) { 
-    if (type == 2){
+  handleDelClick(type, idx) {
+    if (type == 2) {
       this.setState({
-        impId:idx,
+        impId: idx,
         type: type,
-        id:null
+        id: null
       })
-    }else{
+    } else {
       this.setState({
         type: type,
         id: idx,
-        impId:null
+        impId: null
       })
     }
   }
@@ -83,9 +82,9 @@ class Inspect extends React.Component {
   }
   componentDidMount() {
     $(document).click((event) => {
-      let searchWrap = $('#searchWrap')[0];   // 搜索按钮
-      let searchOption = $('#searchOption')[0];   // 搜索列表
-      let inspectFill = $('#inspectFill')[0];         // 公共填写单
+      let searchWrap = document.getElementById("searchWrap");   // 搜索按钮
+      let searchOption = document.getElementById("searchOption");   // 搜索列表
+      let inspectFill = document.getElementById("inspectFill");         // 公共填写单
 
       let _del = $('#delBox')[0];       // 删除弹窗  
       let _impClose = $('#impClose')[0];         // 导入删除按钮
@@ -97,18 +96,21 @@ class Inspect extends React.Component {
         }
       }
       if (inspectFill) {
-        if (event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
+        if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
           this.setState({ showFill: false, date: false });
         }
       }
-      if(!event.target.isEqualNode(_impClose) && !event.target.isEqualNode(_addClose) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
+
+      if (_del) {
+        if (!event.target.isEqualNode(_impClose) && !event.target.isEqualNode(_addClose) && !event.target.isEqualNode(_del) && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)) {
           this.setState({
             id: null,
             impId: null
           })
+        }
       }
     });
-    this.getCurrentDate();
+    // this.setState({ dateTime: getCurrentDate(1) })
   }
   componentWillReceiveProps(nextProps) {
     if (nextProps.fillActive.name != this.props.fillActive.name) {
@@ -119,12 +121,13 @@ class Inspect extends React.Component {
     this.setState({ showFill: false })
   }
   handleChangeDate(info) {
-    let date = info.year + '-' + (info.month < 10 ? '0' + info.month : info.month) + '-' + (info.day < 10 ? '0' + info.day : info.day);
+    // let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
+    let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')+' '+info.hour.toString().padStart(2,'0')+':'+info.minute.toString().padStart(2,'0')+':'+info.second.toString().padStart(2,'0');
     this.setState({ dateTime: date, date: false })
   }
   handleSearchShow(e) {
     let tmpShow = this.state.show;
-    this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
+    this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     // e.stopPropagation();
   }
   handleFillShow(e, idx) {
@@ -134,7 +137,7 @@ class Inspect extends React.Component {
       showFill: !tmpShow,
       currentIdx: idx,
       currentData: baseList,
-      dateTime: baseList.time ? baseList.time : this.getCurrentDate()
+      dateTime: baseList.time ? baseList.time : getCurrentDate(1)
     })
     e.stopPropagation();
   }
@@ -143,15 +146,6 @@ class Inspect extends React.Component {
       date: !this.state.date
     })
   }
-  getCurrentDate() {
-    let myDate = new Date();
-    let year = myDate.getFullYear();       //获取完整的年份(4位,1970-????)
-    let mon = myDate.getMonth() - 0 + 1;       //获取当前月份(0-11,0代表1月)
-    let day = myDate.getDate();            //获取当前日(1-31)
-    let date = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day);
-    this.setState({ dateTime: date })
-    return date;
-  }
   changeActivePart(idx, val, clear) {
     let nums = this.state.num;
     let fillActive;
@@ -169,7 +163,7 @@ class Inspect extends React.Component {
         tempArr.details[i].value = ''
         tempArr.show = false;
       }
-      tempArr.time = this.getCurrentDate();
+      tempArr.time = getCurrentDate(1);
       this.setState({ currentData: tempArr })
       return;
     } else {
@@ -253,20 +247,20 @@ class Inspect extends React.Component {
         list && list.map((item, idx) => {
           return <li key={idx}
             className={styles.searchLi}
-            title={item.name == item.retrievalName ? item.name : item.name + '(' + item.retrievalName + ')'}
+            title={(item.name == item.retrievalName || !item.retrievalName) ? item.name : item.name + '(' + item.retrievalName + ')'}
             onClick={() => {
-              handleSign(item.questionId, idx,'search');
+              handleSign(item.questionId, idx, 'search');
               this.setState({ show: false })
             }}
           >
-            {item.name}{item.name == item.retrievalName ? null : '(' + item.retrievalName + ')'}
+            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
           </li>
         })
       }
     </ul>
   }
-  getCommonList(){//常用列表
-    const { handleSign,inspectList } = this.props;
+  getCommonList() {//常用列表
+    const { handleSign, inspectList } = this.props;
     return <ul className={styles.searchLiUl}>
       {
         inspectList && inspectList.map((item, idx) => {
@@ -274,7 +268,7 @@ class Inspect extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
-              handleSign(item.questionId, idx,'common');
+              handleSign(item.questionId, idx, 'common');
               this.setState({ show: false })
             }}
           >
@@ -285,6 +279,32 @@ class Inspect extends React.Component {
     </ul>
   }
   showDetails(val) {
+    let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
+    if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
+      if (isNaN(value)) {//输入的不是数据
+        dom = getStatusImg(1, value, 1)
+      } else if (value <= min) {//下降
+        dom = getStatusImg(3, value, 1)
+      } else if (value >= max) {//上升
+        dom = getStatusImg(2, value, 1)
+      } else {//正常
+        dom = getStatusImg(0, value, 1)
+      }
+    } else if (isNaN(min) && !isNaN(max)) {//有最大值无最小值
+      if (value >= max) {//上升
+        dom = getStatusImg(2, value, 1)
+      } else {//正常
+        dom = getStatusImg(0, value, 1)
+      }
+    } else if (!isNaN(min) && isNaN(max)) {//有最小值无最大值
+      if (value <= min) {//下降
+        dom = getStatusImg(3, value, 1)
+      } else {//正常
+        dom = getStatusImg(0, value, 1)
+      }
+    } else {//无最大最小值
+      dom = getStatusImg(1, value, 1)
+    }
     if (val.questionDetailList.length > 0) {
       return val.questionDetailList.map((item) => {
         if (val.value == item.name) {
@@ -292,12 +312,13 @@ class Inspect extends React.Component {
         }
       })
     } else {
-      return <td style={{ width: '20%' }}><span className={(val.value - 0).toString() == 'NaN' ? "red" : (val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue ? "red" : '') : ''}>{val.value}</span> {val.labelSuffix}</td>
+      // return <td style={{ width: '20%' }}><span className={(val.value - 0).toString() == 'NaN' ? "red" : (val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue ? "red" : '') : ''}>{val.value}</span> {val.labelSuffix}</td>
+      return <td style={{ width: '20%' }}>{dom} {val.labelSuffix}</td>
     }
   }
   render() {
-    const { getInfomation,handleChangeValue,inspectVal, list, labelList,windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
-    const { tmpId, tmpIdx,id,pageTop,impId} = this.state;
+    const { getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
 
     return (
       <div className={styles.wrapper}>
@@ -309,10 +330,12 @@ class Inspect extends React.Component {
                   items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
                     {/*<img className={styles.close} src={close} alt="关闭导入excel数据" onClick={() => { this.handleDelClick(2, id) }} />*/}
                     <span className={styles.close} id="impClose" onClick={() => { this.handleDelClick(2, ind) }}></span>
-                    <DelToast show={impId==ind?true:false}
-                    name="该导入项" 
-                    cancel={this.handleCancel}
-                    confirm={this.delConfirm}/>
+                    <DelToast show={impId == ind ? true : false}
+                      top={'22px'}
+                      right={'-34px'}
+                      name="该导入项"
+                      cancel={this.handleCancel}
+                      confirm={this.delConfirm} />
                     {
                       items.lisExcelRes.map((item, idx) => {
                         return <SlideExcel
@@ -335,7 +358,7 @@ class Inspect extends React.Component {
                 return <SlideSelect
                   item={item}
                   idx={idx}
-                  showToast={idx==id?true:false}
+                  showToast={idx == id ? true : false}
                   showFill={this.state.showFill}
                   handlePush={handlePush}
                   fillActive={fillActive}
@@ -360,17 +383,17 @@ 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>)}
+            {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
             {
-              list && list.length>0 || (inspectVal != '')?'':<div>
-                  <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用化验项</p>
-                  {
-                    this.getCommonList()
-                  }
-                </div>
+              (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
+                <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
+                {
+                  this.getCommonList()
+                }
+              </div>
             }
           </SearchOption> : ''}
         </div>

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

@@ -185,6 +185,7 @@
         z-index: 30;
         border-radius: 50%;
         background: @closeIcon;
+        // background: url('/img/close.png') no-repeat center center;
         background-size: 100% 100%;
         background-color: #fff;
     }

+ 4 - 3
src/components/Advice/Textarea/index.jsx

@@ -18,7 +18,7 @@ class Textarea extends Component {
   handleInput(e){
     e.stopPropagation();
     const {handleChangeAssistValue,idx,handlePush} = this.props;
-    const text = e.target.innerText || e.target.innerHTML;
+    const text =  e.target.innerHTML;
     const stimer = this.state.timer;
     handleChangeAssistValue&&handleChangeAssistValue(text);
    
@@ -36,7 +36,7 @@ class Textarea extends Component {
     //   // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
     // }
     if(next.isRead != isRead && next.value || next.isRead != isRead && next.value!=this.props.value){      //value对比解决复诊不显示bug
-      next.value ? this.$dom.current.innerText = next.value :  this.$dom.current.innerText = '' 
+      next.value ? this.$dom.current.innerHTML = next.value :  this.$dom.current.innerHTML = '' 
       // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
     }
     if(next.typeConfig != typeConfig) {
@@ -46,7 +46,7 @@ class Textarea extends Component {
   componentDidMount(){
     const {value} = this.props;
     if(value && value.trim()){
-      this.$dom.current.innerText = value
+      this.$dom.current.innerHTML = value
       // this.$dom.current.focus()
       // this.$dom.current.innerText ? (this.$dom.current.innerText = value) : (this.$dom.current.innerHTML = value)
     //   this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = ''):(this.$dom.current.nextSibling.innerHTML = '')
@@ -62,6 +62,7 @@ class Textarea extends Component {
             ref={this.$dom}
             onInput={this.handleInput}
             onKeyUp={this.handleInput}
+            onkeydown={(e) => {e.stopPropagation()}}
         ></div>
       </div>
     );

+ 9 - 11
src/components/AssessResult/AssessHis/index.jsx

@@ -1,15 +1,15 @@
 import React, { Component } from "react";
 import style from "./index.less";
-import { Radio,ComplexModal,Notify} from '@commonComp';
+import { Radio,ComplexModal,Notify,Footer} from '@commonComp';
 import arrow from '@common/images/show.png';
 import arrowDown from '@common/images/close.png';
 import loadingIcon from '@common/images/loading.gif';
 import ChooseItem from "../ChooseItem";
 import ScaleItem from "../ScaleItem";
 import ChartItem from "../ChartItem";
-import printIcon from '@common/images/team.png';
 import tableIcon from '@common/images/table.png';
 import ScaleTableHis from '@components/ScaleTableHis';
+import { dragBox } from '@utils/drag';
 import $ from "jquery";
 
 class AssessResultHis extends Component {
@@ -67,6 +67,7 @@ class AssessResultHis extends Component {
       case 10:    //数据来源于后台
         return <ChartItem title={name}
                           data={indexData||{}}
+                          disName={item.diseaseName}
                           names={indexNames||{}}
                           timeTypes={JSON.stringify(chartTimeTypes||{})=='{}'?timeTypes&&timeTypes[i]:chartTimeTypes[i]}
                           initFn={getIndexData}
@@ -99,14 +100,11 @@ class AssessResultHis extends Component {
   showScaleFn(item){
     const { list,inquiryId } = this.props;
     const obj = list&&list[inquiryId];
-    if(item&&item.id&&!(obj.scaleInfo&&obj.scaleInfo[item.id])){
-      Notify.info("未保存该量表数据");
-      return ;
-    }
+    dragBox('dragModalWrap','dragModalTitle','del')
     if(item){
       this.setState({
         tableName:item.name,
-        tableId:item.id,
+        tableId:item.conceptId,
         showScale:!this.state.showScale
       });
     }else{
@@ -136,10 +134,10 @@ class AssessResultHis extends Component {
     const { loading, list,inquiryId } = this.props;
     const {tableName,tableId,showScale,showAssess} = this.state;
     const obj = list&&list[inquiryId];
-    const scaleFooter = <div className={style['footer']}>
-      <span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
-      <span className={style['okBtn']} onClick={()=>this.showScaleFn()}>关闭</span>
-    </div>;
+    const scaleFooter = <Footer print={true}
+                                footText="关闭"
+                                handlePrint={this.onPrint}
+                                handleConfirm={this.showScaleFn}/>;
     return <div className={style['assess-cont']}>
       <div className={style['assess-result']}>
         <p className={style['enter']}>管理和评估结果:{showAssess?<a onClick={this.showAssessFn}>收起结果<img src={arrowDown} /></a>:<a onClick={this.showAssessFn}>查看结果<img src={arrow} /></a>}</p>

+ 2 - 2
src/components/AssessResult/ChartItem/index.jsx

@@ -104,13 +104,13 @@ class ChartItem extends Component {
     return doms;
   }
   componentDidMount(){
-    const {initFn,pindex} = this.props;
+    const {initFn,pindex,disName} = this.props;
     const type = config.chartDismen;
     const times = this.getXAxisArr(config.chartDismen);
     const startTime=times[0];
     const endTime=times[times.length-1];
     const range = [startTime,endTime];
-    initFn&&initFn({range,rangeType:type,pindex,getNew:true});
+    initFn&&initFn({range,disName,rangeType:type,pindex,getNew:true});
   }
   render() {
     const {title,data,names} = this.props;

+ 68 - 35
src/components/AssessResult/ScaleItem/index.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from "react";
 import style from "../index.less";
 import deleteIcon from '@common/images/delete.png';
+import deleteIconNo from '@common/images/delete_no.png';
 import allTableIcon from '@common/images/all-table.png';
 import level1 from "@common/images/级别1.png";
 import checkIcon from '@common/images/check.png';
@@ -39,7 +40,8 @@ class ScaleItem extends Component {
   }
   showOption(id){
     this.setState({
-      optionId:id
+      optionId: id,
+      formulaId: ''
     })
   }
   closeOption(){
@@ -65,21 +67,31 @@ class ScaleItem extends Component {
   handleShowScale(item){
     const {showScaleFn,closeAssess} = this.props;
     //closeAssess&&closeAssess();    //关闭评估弹窗
-    showScaleFn&&showScaleFn(item);
+    showScaleFn&&showScaleFn(item,true);
   }
   handleRadio(item,parent){
     let {result} = this.props;
     let radioVal = result&&result.radioVal;
     this.setState({
-      radioVal:Object.assign({},radioVal,{[parent.id]:item.detailName})
+      radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
     })
   }
+  handleReg(e){   //只能输入数字和特殊符号
+    const key = e.key;
+    if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
+      e.preventDefault();
+    }
+  }
   handleInputformula(id,calcuContent,i,e) {
     const {calcuValues} = this.state;
     let obj = deepClone(calcuValues);
     let values = (obj&&obj[id])||deepClone(calcuContent);
-    values[i].value = e.target.value;
+    const txt = e.target.value;
+    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');       //处理中文输入法的情况
     obj[id] = values;
+    if(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g.test(txt)){
+      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');
+    }
     this.setState({
       isCalculated:false,
       calcuValues:obj
@@ -105,7 +117,8 @@ class ScaleItem extends Component {
   }
   showFormula(id){
     this.setState({
-      formulaId:id
+      formulaId: id,
+      optionId: ''
     });
   }
   closeFormula(){
@@ -171,23 +184,25 @@ class ScaleItem extends Component {
       let it=its;
       if(indexs[i]&&indexs[i].includes(j)){
         if(its.type==1){     //量表
-          let scaleRes=formulaResult&&formulaResult[it.content.id]&&formulaResult[it.content.id].calcalculate;
+          let scaleRes=formulaResult&&formulaResult[it.content.conceptId]&&formulaResult[it.content.conceptId].calcalculate;
+          const name = scaleRes&&scaleRes.result?(' 【'+it.content.name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+it.content.name+'】';
           temp =<span className={style['scale']}
-                      onClick={()=>this.handleShowScale(it.content)}>
-                        {scaleRes&&scaleRes.result?(' 【'+it.content.name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+it.content.name+'】'}
+                      title={name}
+                      onClick={this.handleShowScale.bind(this,it.content)}>
+                        {name}
                         </span>;
         }else if(its.type==2){      //计算公式
-          const showRes = calcuResult&&calcuResult[item.id]||it.content.result;
-          const details = calcuValues&&calcuValues[item.id]||it.content.details;
+          const showRes = calcuResult&&calcuResult[item.conceptId]||it.content.result;
+          const details = calcuValues&&calcuValues[item.conceptId]||it.content.details;
           const cresult = showRes&&showRes[1]&&showRes[1].text;
                     temp = <div className={style['results']}>
                     <span>计算公式结果:</span>
-                    <span className={style["blue"]} onClick={this.showFormula.bind(this,item.id,it)}>{cresult?cresult:'请选择'}</span>
+                    <span className={style["blue"]} onClick={this.showFormula.bind(this,item.conceptId,it)}>{cresult?cresult:'请选择'}</span>
                     <img src={level1} />
                     <MiniToast title={it.content.name}
                                confirmText='关闭'
                                icon={allTableIcon}
-                               show={formulaId&&formulaId==item.id?true:false}
+                               show={formulaId&&formulaId==item.conceptId?true:false}
                                close={this.closeFormula}
                                confirm={this.closeFormula}
                                footer="true">
@@ -204,7 +219,7 @@ class ScaleItem extends Component {
                                     <Radio label={ii.detailName}
                                            isSelect={ii.state == 1}
                                            disabled={disabled}
-                                           handleClick={this.handleForRadio.bind(this,item.id,details,idd,ind)}>
+                                           handleClick={this.handleForRadio.bind(this,item.conceptId,details,idd,ind)}>
                                       >
                                     </Radio>
                                   </div>
@@ -217,7 +232,7 @@ class ScaleItem extends Component {
                                 <span>{'请输入'+item1.name+':'}</span>
                               </td>
                               <td>
-                                {disabled?item1.value:<input type="text" placeholder="请输入"  value={item1.value} onInput={(e)=>this.handleInputformula(item.id,details,idd,e)}/>}
+                                {disabled?item1.value:<input type="text" placeholder="请输入"  value={item1.value} onKeyDown={this.handleReg.bind(this)} onInput={(e)=>this.handleInputformula(item.conceptId,details,idd,e)}/>}
                               </td>
                               <td>
                                 <span>{item1.uint}</span>
@@ -245,21 +260,21 @@ class ScaleItem extends Component {
         }else if(its.type==3){
           temp = <div className={style['results']}>
                     <span>可能结果:</span>
-                    <span onClick={this.showOption.bind(this,item.id)} className={style["blue"]}>{possible&&possible[item.id]?possible[item.id]:'请选择'}</span>
+                    <span onClick={this.showOption.bind(this,item.conceptId)} className={style["blue"]}>{possible&&possible[item.conceptId]?possible[item.conceptId]:'请选择'}</span>
                     <img src={level1} />
                     <MiniToast title='结果选择'
                          icon={checkIcon}
-                         show={optionId&&optionId==item.id?true:false}
+                         show={optionId&&optionId==item.conceptId?true:false}
                          close={this.closeOption}
-                         confirm={this.confirmOption.bind(this,item.id)}
-                         footer="true">
+                         confirm={this.confirmOption.bind(this,item.conceptId)}
+                         footer={true}>
                         <div className={style["infoOption"]}>
                           <span>{it.content.name?it.content.name+':':''}</span>
                           {it.content.details&&it.content.details.map((lis,ind)=>{
                             return <div className={style["chooseItem"]}>
                               <Radio label={lis.detailName}
                                      disabled={disabled}
-                                     isSelect={radioVal&&radioVal[item.id]==lis.detailName}
+                                     isSelect={radioVal&&radioVal[item.conceptId]==lis.detailName}
                                      handleClick={this.handleRadio.bind(this,lis,item,i)}>
                               </Radio>
                               {lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
@@ -269,14 +284,15 @@ class ScaleItem extends Component {
                     </MiniToast>
                   </div>;
         }
-        const passId = item.details[j].type==1?item.details[j].content.id:undefined;
+        const passId = item.details[j].type==1?item.details[j].content.conceptId:undefined;
         const li = disabled?<li>
-            <span>{item.name}:</span>
+            <span className={style['s-title']}>{item.name}:</span>
             <div className={style['row']}>{temp}</div>
           </li>:<li>
-          <span>{item.name}:</span>
+          <span className={style['s-title']}>{item.name}:</span>
           <div className={style['row']}>{temp}</div>
-          <div className={style["recommend"]} onClick={()=>this.props.handleRemove(false,i,passId,j)}>
+          <div className={style["recommend"]} onClick={this.props.handleRemove.bind(this,false,i,passId,j)}>
+            <img className={style["deleteIconNo"]} src={deleteIconNo} />
             <img className={style["deleteIcon"]} src={deleteIcon} />
           </div>
         </li>;
@@ -291,27 +307,44 @@ class ScaleItem extends Component {
       return this.getDetailItems(it,i);
     });
   }
+  getScaleContent(data){
+    if(!data){
+      return null;
+    }
+    const item = data&&data.find((it)=>{
+      return it.type==1;
+    });
+    const content = JSON.parse(item.content||null);
+    return {conceptId:item.conceptId,content,name:content.scaleName};
+  }
   getScales(){
     const {scaleItems,disabled,formulaResult} = this.props;
-    let li='',temp='';
-    const arr = scaleItems&&scaleItems.map((it,i)=>{
-      if(!it) return '';
-      let scaleRes=formulaResult&&formulaResult[it.id]&&formulaResult[it.id].calcalculate;
-      temp =<span className={style['scale']} onClick={()=>this.handleShowScale(it)}>
-                        {scaleRes&&scaleRes.result?(' 【'+it.name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+it.name+'】'}
-                        </span>;
+    let li='',temp='',arr=[],it={};
+    if(!scaleItems){
+      return '';
+    };
+    for( let i in scaleItems){
+      it = {conceptId:i,name:scaleItems[i].name};//this.getScaleContent(scaleItems[i].data);
+      if(!it) continue;
+      let scaleRes=formulaResult&&formulaResult[it.conceptId]&&formulaResult[it.conceptId].calcalculate;
+      const name = scaleRes&&scaleRes.result?(' 【'+scaleItems[i].name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+scaleItems[i].name+'】';
+      //这里onClick不能用箭头函数,用箭头函数会一直绑定for的最后一个it
+      temp =<span className={style['scale']}
+                  title={name}
+                  onClick={this.handleShowScale.bind(this,it)}>{name}</span>;
       li = disabled?<li>
-        <span>相关量表:</span>
+        <span className={style['s-title']}>相关量表:</span>
         <div className={style['row']}>{temp}</div>
       </li>:<li>
-        <span>相关量表:</span>
+        <span className={style['s-title']}>相关量表:</span>
         <div className={style['row']}>{temp}</div>
-        <div className={style["recommend"]} onClick={()=>this.props.handleRemove(true,i,it.id)}>
+        <div className={style["recommend"]} onClick={this.props.handleRemove.bind(this,true,it.conceptId)}>
+          <img className={style["deleteIconNo"]} src={deleteIconNo} />
           <img className={style["deleteIcon"]} src={deleteIcon} />
         </div>
       </li>;
-      return li;
-    });
+      arr.push(li);
+    };
     return arr;
   }
   handleInput(e){

+ 21 - 14
src/components/AssessResult/index.jsx

@@ -6,15 +6,16 @@ import ScaleItem from "./ScaleItem";
 import Information from '../Information'
 import ChartItem from "./ChartItem";
 import Notify from '@commonComp/Notify';
-import {readyKeepHistory} from '@utils/tools';
+import {readyKeepHistory,deepClone} from '@utils/tools';
 import loadingIcon from '@common/images/loading.gif';
 
 class AssessResult extends Component {
   constructor(props) {
     super(props);
-    const chooseSelecteds = JSON.parse(JSON.stringify(props.chooseSelecteds)||{});
-    const wholeIndexs = JSON.parse(JSON.stringify(props.wholeIndexs)||{});      //深度复制,Object.assgin为浅复制,下下级会同源
-    const wholeScale = JSON.parse(JSON.stringify(props.wholeScaleItems)||{});
+    const chooseSelecteds = deepClone(props.chooseSelecteds);
+    const wholeIndexs = deepClone(props.wholeIndexs);      //深度复制,Object.assgin为浅复制,下下级会同源
+    const wholeScale = deepClone(props.wholeScaleItems);
+    const wholeResults = deepClone(props.wholeResults);
 
     this.state={
       chooseSelecteds:chooseSelecteds,     //大数据选择模块
@@ -22,10 +23,7 @@ class AssessResult extends Component {
       wholeAssessItems:wholeIndexs,     //整体评估模块
       wholeScaleItems:wholeScale,
       wholeAssessText:props.wholeAssessText||{},     //整体评估补充说明
-      wholeResults:{
-        possible:props.possible,
-        radioVal:props.radioVal
-      },
+      wholeResults: wholeResults,
       calcuResult:props.calcuResult,     //计算公式结果
       calcuValues:props.calcuValues,    //计算公式填的值
       addedScaleIds:props.addedScaleIds,    //已加入量表的id
@@ -55,8 +53,9 @@ class AssessResult extends Component {
       ids.splice(idIndex,1);
     }
     if(isList){         //删除全部量表中的项目
-      const items = [...this.state.wholeScaleItems];
-      items[i]=null;
+      const items = Object.assign({},this.state.wholeScaleItems);
+      delete items[i];
+      //items[i]=null;
       this.setState({
         wholeScaleItems: items,
         addedScaleIds:ids
@@ -73,10 +72,12 @@ class AssessResult extends Component {
   }
   handleResult(opt){
     const {wholeResults} = this.state.wholeResults;
+    const {savePossibleRes} = this.props;
     const res = Object.assign({},wholeResults,opt);
     this.setState({
       wholeResults:res
     });
+    savePossibleRes && savePossibleRes(res);
   }
   handleChooseChange(i,selects){
     const {chooseSelecteds} = this.state;
@@ -91,21 +92,23 @@ class AssessResult extends Component {
     });
   }
   handleCalcu(values,ret){
+    const {saveCalcuValue,saveCalcuResult}=this.props;
     this.setState({
       calcuResult:ret,
       calcuValues:values
     });
+    saveCalcuResult&&saveCalcuResult(ret);
+    saveCalcuValue&&saveCalcuValue(values);
   }
   componentWillUnmount(){
     //点确定关闭弹窗时把参数传到父组件去
-    const {saveAssessInfos,isAssessConfirm,clearChartData,handleSavePossible} = this.props;
+    const {saveAssessInfos,isAssessConfirm,clearChartData} = this.props;
     clearChartData&&clearChartData();
     if(isAssessConfirm && readyKeepHistory() == 1){
       Notify.error("主诉不能为空");
     }else if(isAssessConfirm && readyKeepHistory() == 2){
       Notify.info('诊断不能为空');
     }
-    handleSavePossible&&handleSavePossible(this.state.wholeResults);
     if(isAssessConfirm){
       saveAssessInfos(this.state,readyKeepHistory());
     }
@@ -155,6 +158,7 @@ class AssessResult extends Component {
         return <ChartItem title={name}
                           data={chartData||{}}
                           names={indexNames||{}}
+                          disName = {item.diseaseName}
                           timeTypes={JSON.stringify(chartTimeTypes)=='{}'?timeTypes&&timeTypes[i]:chartTimeTypes[i]}
                           pindex={i}
                           initFn={getIndexData}
@@ -164,11 +168,14 @@ class AssessResult extends Component {
     }
   }
   render() {
-    const {disName} =this.props;
+    const {disName,chronicMagItemName} =this.props;
     const data = this.props.data&&this.props.data[disName];
     return <div className={style['assess-cont']} id="AssistResult">
-      <div className={style['printShow']}>
+      <div className={style['printShow']} style={{borderBottom: (chronicMagItemName == disName)?'1px solid #ccc':''}}>
         <Information></Information>
+        {
+          chronicMagItemName == disName?<p>诊断:{chronicMagItemName}复诊评估</p>:null
+        }
       </div>
       {!data?<p className={style['loading']}><img src={loadingIcon} alt='loading...'/></p>:''}
       {data&&data.length==0?<p className={style['no-data']}>暂无数据!</p>:''}

+ 37 - 13
src/components/AssessResult/index.less

@@ -36,6 +36,7 @@
     line-height: 35px;
     .row{
       display: inline-block;
+      max-width: 86%;
     }
     .results{
       position: relative;
@@ -45,11 +46,22 @@
       margin-right: 10px;
       .recomand{
         color: @blue;
+
       }
     }
+    .s-title{
+      display: inline-block;
+      max-width: 100px;
+      vertical-align: top;
+    }
     .scale{
+      display: inline-block;
       color: @blue;
       cursor: pointer;
+      white-space: nowrap;
+      max-width: 100%;
+      overflow: hidden;
+      text-overflow: ellipsis;
     }
     .blue{
       color:#3B9ED0;
@@ -63,6 +75,7 @@
       float: right;
       color: #929292;
       cursor: pointer;
+      margin-top: 8px;
     }
   }
   .edit-row{
@@ -113,17 +126,16 @@
 }
 .printShow {
   display: none;
+  p {
+    margin-bottom: 15px;
+  }
 }
 .footer{
   .print{
+    .btnCom;
     width: 111px;
     height: 34px;
     line-height: 34px;
-    outline: none;
-    border-radius: 4px;
-    /*color: #3B9ED0;*/
-    border: 0 none;
-    cursor: pointer;
     background: #fff;
     margin-right: 20px;
     img{
@@ -133,13 +145,10 @@
     }
   }
   .okBtn{
+    .btnCom;
     width: 80px;
     height: 34px;
     line-height: 32px;
-    text-align: center;
-    outline: none;
-    border-radius: 4px;
-    cursor: pointer;
     border: 1px solid #3B9ED0;
     box-sizing: border-box;
     margin-left: 20px;
@@ -150,14 +159,11 @@
   }
 }
 .forMulBtn{
+  .btnCom;
   height: 32px;
   line-height: 32px;
-  text-align: center;
   color: #fff;
-  // background: #DBDBDB;
   background: #3B9ED0;
-  border-radius: 4px;
-  cursor: auto;
   margin-top: 15px;
   cursor: pointer;
 }
@@ -203,6 +209,24 @@
   font-size: 18px;
   font-weight: bold;
 }
+.deleteIcon, .deleteIconNo {
+  width: 20px;
+}
+.deleteIconNo {
+  display: block;
+}
+.deleteIcon {
+  display: none;
+  
+}
+.recommend:hover {
+  .deleteIcon {
+    display: block;
+  }
+  .deleteIconNo {
+    display: none;
+  }
+}
 @media print {
   .printShow,.textareaStatic {
     display: block;

二进制
src/components/AssistCheck/dists/FileAPI.flash.camera.swf


二进制
src/components/AssistCheck/dists/FileAPI.flash.image.swf


二进制
src/components/AssistCheck/dists/FileAPI.flash.swf


文件差异内容过多而无法显示
+ 3608 - 0
src/components/AssistCheck/dists/FileAPI.html5.js


文件差异内容过多而无法显示
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.html5.min.js


文件差异内容过多而无法显示
+ 4418 - 0
src/components/AssistCheck/dists/FileAPI.js


文件差异内容过多而无法显示
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.min.js


文件差异内容过多而无法显示
+ 11008 - 0
src/components/AssistCheck/dists/jQuery.js


文件差异内容过多而无法显示
+ 4 - 0
src/components/AssistCheck/dists/jq.js


文件差异内容过多而无法显示
+ 2 - 0
src/components/AssistCheck/dists/jquery.fileapi.min.js


+ 193 - 6
src/components/AssistCheck/index.jsx

@@ -1,21 +1,207 @@
 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 '@containers/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){
+  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.closeInIcss=this.closeInIcss.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
+      })
+    }
+    closeInIcss(){
+      this.setState({
+        hide: false
+      })
+    }
     render(){
-        const {list,getInfomation,windowHeight,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = 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.import_way_pacs == 1 ? <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.import_way_pacs == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                        <p className={styles.importInspectBtn}>导入辅检结果</p>
+                      </div> : hospitalMsg.import_way_pacs == 3 ? <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 hide={hide} title={'导入辅检数据'} width={1000} height={650} onClose={onClose}>
+                        <WrapModalBodyPac
+                          closeInIcss={closeInIcss}
+                          height={650}
+                        ></WrapModalBodyPac>
+                      </WrapModalContainer> : null
+                    }
                 </div>
                 <ItemBox 
                     className={styles.title}
@@ -40,6 +226,7 @@ class AssistCheck extends React.Component {
                             assistList={assistList}
                             assistVal={assistVal}
                             windowHeight={windowHeight}
+                            checkedListImport={checkedListImport}
                         >
                         </AddAssistCheck>
                     </div>

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

+ 73 - 9
src/components/Banner/index.jsx

@@ -1,22 +1,33 @@
 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';
+import {dragBox} from '@utils/drag';
+import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
 
 class Banner extends Component {
   constructor(props){
     super(props)
     this.state = {
       mode: props.typeConfig,
-      zIndex:204
+      zIndex:204,
+      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(){
@@ -41,8 +52,10 @@ class Banner extends Component {
   }
 
   confirmType(){
-    const {typeConfig,confirmType} = this.props;
+    const {typeConfig,confirmType,clearCommS} = this.props;
     const mode = this.state.mode;
+    // 清空主诉常见症状
+    clearCommS();
     if(mode==typeConfig){
       this.closeConfigModal()
       return;
@@ -60,18 +73,42 @@ 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
+    })
+    dragBox('previewWrapper','previewStatic','del')    
+  }
   render() {
-    const {visible,disVisible,copyVisible} = this.props;
-    const {mode,zIndex} = this.state;
+    const {visible,disVisible,copyVisible,ifShow,deptName} = this.props;
+    const {mode,zIndex,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"]}>
+          {ifShow==1&&deptName=='急诊科'?<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 +122,36 @@ 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){
+  const {sysConfig} = state.homePage;
+  const {message} = state.patInfo;
+  return {
+    ifShow:sysConfig.general_show,
+    deptName:message.selfDeptName
+  }
+}
+
+const mapDispatchToProps = function(dispatch){
+  return {
+    getAllRecord(item){
+      dispatch(getAllHis(item));
+    },
+    clearCommS:()=>{//清除主诉常见症状
+      dispatch({
+        type: CLEAR_COMSYMPTOMS
+      })
+    },
+  }
+}
+// export default Banner;
+export default connect(mapStateToProps,mapDispatchToProps)(Banner);

+ 13 - 5
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;
@@ -93,19 +103,17 @@
           }
         }
         .btn {
+          .btnCom;
           width: 80px;
           height: 34px;
           background:#3B9ED0;
           color:#fff;
-          border-radius: 4px;
           font-size: 14px;
-          text-align: center;
           line-height: 34px;
           position: relative;
           left: 50%;
           margin-left: -40px;
           top: 30px;
-          cursor: pointer;
         }
       }
     }

+ 7 - 17
src/components/BodyContainer/index.jsx

@@ -1,24 +1,14 @@
-import React, { Component } from "react";
-
-//  引入组件
-import SaveDataAll from "@containers/BodyContainer";
+import EMRContainer from "@components/EMRContainer";
 import PushContainer from '@components/PushContainer';
 
 import style from './index.less';
 
-class BodyContainer extends Component {
-    constructor() {
-        super();
-    }
-    
-    render() {
-        const { saveDateAll } = this.props;
-        //console.log(saveDateAll)
-        return <div className={style['container'] + ' clearfix'}>
-            <SaveDataAll saveDateAll={saveDateAll}></SaveDataAll>
-            <PushContainer></PushContainer>
-        </div>;
-    }
+const BodyContainer = (props) =>{
+  const { saveDateAll } = props;
+  return <div className={style['container'] + ' clearfix'}>
+      <EMRContainer saveDateAll={saveDateAll}></EMRContainer>
+      <PushContainer></PushContainer>
+  </div>;
 }
 
 export default BodyContainer;

+ 11 - 18
src/components/CheckBody/index.jsx

@@ -26,8 +26,13 @@ class CheckBody extends Component{
     this.showHide = this.showHide.bind(this);
     //this.handleInput = this.handleInput.bind(this);
   }
-  componentWillReceiveProps(nextProps){
-    this.setState({boxLeft:nextProps.boxLeft})
+  componentWillReceiveProps(next){
+    if((this.props.defaultShowAll&&!next.defaultShowAll)||(!this.props.defaultShowAll&&next.defaultShowAll)||(!this.props.isEmpty&&next.isEmpty)){
+      this.setState({
+        showAll:next.defaultShowAll
+      })
+    }
+    this.setState({boxLeft:next.boxLeft})
   }
   getLabels(){
     const {data,showArr,saveText,selecteds,importLabel} = this.props;
@@ -53,8 +58,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 ;
@@ -66,10 +70,9 @@ class CheckBody extends Component{
       leftL = getPageCoordinate(e).boxLeft
     }else{
       const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-        return;
+      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
+        leftL = ele.offsetLeft+90
       }
-      leftL = ele.offsetLeft+90
     }
     getSearchLocation(getPageCoordinate(e).boxTop,leftL);
     this.setState({
@@ -98,7 +101,6 @@ class CheckBody extends Component{
     //有主诉时且本身无数据,第一次点击获取数据,(不论获取成功与否)再点击不获取(直到刷新成空白页或清空)
     if(hasMain&&isEmpty!=false){
       this.props.getInit();
-
     }
   }
   showHide(){
@@ -106,23 +108,14 @@ class CheckBody extends Component{
       showAll:!this.state.showAll
     });
   }
-  componentWillUpdate(next){
-    if((this.props.defaultShowAll&&!next.defaultShowAll)||(!this.props.defaultShowAll&&next.defaultShowAll)||(!this.props.isEmpty&&next.isEmpty)){
-      this.setState({
-        showAll:next.defaultShowAll
-      })
-    }
-  }
   render(){
     const {searchData,totalHide,data,boxLeft,boxTop,saveText} = this.props;
 
-    return  <div className={style['container']}>
-      <ItemBox title='查体' handleClick={this.handleClick}>
+    return <ItemBox title='查体' handleClick={this.handleClick}>
         {this.getLabels()}
         {/*{showMoreBtn?more:''}*/}
         {searchData && searchData.length>0?<SearchDrop data={searchData} show={!totalHide} left={boxLeft} top={boxTop} onSelect={this.handleSearchSelect}></SearchDrop>:''}
       </ItemBox>
-    </div>
   }
 }
 

+ 212 - 161
src/components/ChronicInfo/index.jsx

@@ -1,21 +1,19 @@
 import React from 'react';
 import style from './index.less';
-import infoPic from "../../common/images/info-pic.png";
 import chronicPic from "../../common/images/chronic.png";
 import level1 from "../../common/images/级别1.png";
-import printIcon from '@common/images/team.png';
 import tableIcon from '@common/images/table.png';
 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 {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn} from '@commonComp';
 import ScaleTable from '@containers/ScaleTable';
-import Notify from '@commonComp/Notify';
 import {deepClone} from '@utils/tools';
 import $ from 'jquery';
+import config from '@config/index';
 
 /***
 慢病右侧推送模块规则:
@@ -43,23 +41,31 @@ class ChronicInfo extends React.Component{
       isCalculated:false,     //是否刚计算过,关闭时值与结果对应
       calcuValues:deepClone(props.calcuValues),       //计算公式填的值
       hasEnterImg: false, //是否移入info
-      currentIndex: -1 //当前index
+      currentIndex: -1, //当前index
+      comfirnFlag:false,
+      flag:true,
+      ff:false,
+      timer:null,
+	  scaleParam:{},    //加入病例需要的参数
     };
-
+    this.$result = React.createRef();
+    this.$content = React.createRef();
     this.showInfo = this.showInfo.bind(this);
     this.closeInfo = this.closeInfo.bind(this);
     this.showOption = this.showOption.bind(this);
     this.closeOption = this.closeOption.bind(this);
     this.showTable = this.showTable.bind(this);//显示量表弹窗
     this.closeTable = this.closeTable.bind(this);//关闭量表弹窗
-    this.close = this.close.bind(this); //关闭量表列表
     this.showFormula = this.showFormula.bind(this); //打开计算公式
-    //this.closeFormula = this.closeFormula.bind(this); //关闭计算公式
     this.handleAddAssessItem = this.handleAddAssessItem.bind(this);   //加入病例记录
     this.onPrint = this.onPrint.bind(this);
     this.handleForRadio = this.handleForRadio.bind(this);
     this.handleSaveCalcu = this.handleSaveCalcu.bind(this);     //保存评估修改的计算和可能结果
-    this.getAddBtnState = this.getAddBtnState.bind(this);
+    this.slideToggle = this.slideToggle.bind(this);
+    this.resetComfirnFlag = this.resetComfirnFlag.bind(this);
+    this.slideToggle = this.slideToggle.bind(this);
+    this.comfirnTable = this.comfirnTable.bind(this);
+	  this.unscroeClose = this.unscroeClose.bind(this);
   }
 
   onPrint() {
@@ -72,29 +78,15 @@ class ChronicInfo extends React.Component{
       operaSupport: false,
     });
   }
-  
-  showTableList(id){//量表按钮
-    const {getTableList} = this.props;
-    if(id){
-      getTableList(id);
-    }
-  }
-  close(){//关闭量表列表
-    const {hideList} = this.props;
-    hideList&&hideList({name:'showList',value:false});
-  }
-  handleListClick(item){//量表列表单项点击
-    this.showTable(item,null);
-    //this.close()
-  }
-
-  showInfo(id){
+  showInfo(item){
     // 静态知识显示在提示信息里(4-18)
     const {getInfomation} = this.props;
     const param = {
-      id:id,
+      id:item.id,
+      name: item.name,
       // id:40738, //目前只有“肾功能不全”有数据
       type:22,
+      position: 1
     }
     getInfomation&&getInfomation(param);
   }
@@ -107,6 +99,11 @@ class ChronicInfo extends React.Component{
     this.setState({
       optionId:id,
       formulaId:null //关闭计算公式
+    });
+    const {patDom} = this.props;
+    const ht = $(patDom.current).height();
+    setTimeout(function(){
+      $(patDom.current).scrollTop(ht+200);
     })
   }
   closeOption(){
@@ -121,17 +118,17 @@ class ChronicInfo extends React.Component{
         radioVal:Object.assign({},radioVal,possible),
         optionId:null,
       });
-    } 
+    }
   }
-  showTable(it){
+  showTable(it,v,i,j){
     const {scaleInfo} = this.props;
     // 密西根糖尿病周围神经病评分(MDNS), id:40744
     const item = {
-      id:it.id,
+      conceptId:it.conceptId,
       name:it.name
     };
     // 判断:store里已经有该量表就无需重新调接口
-    if(scaleInfo&&scaleInfo[it.id]){
+    if(scaleInfo&&scaleInfo[it.conceptId]){
       this.props.hideList({name:'showTable',value:true},it);
     }else{
       this.props.getScaleInfo(item);
@@ -139,16 +136,68 @@ class ChronicInfo extends React.Component{
 
     this.setState({
       formulaId:null, //关闭计算公式和可能结果弹窗
-      optionId:null
+      optionId:null,
+      scaleParam:{
+        v,i,j
+      }
     })
   }
-  closeTable(){
+  // 量表明细-关闭,isClose是否是点击关闭按钮
+  closeTable(isClose){
+    const {scaleParam} = this.state;
+    const {showHide} = this.props;
+    if(!showHide.isPop){
+      //量表结果,判断需要计算并且dom中有值才能加入病例记录
+      const res = this.$result.current&&this.$result.current.innerText;
+      if(!isClose&&(this.$result.current&&!res)){
+        Notify.info("请先计算量表结果!");
+        return ;
+      }
+      !isClose&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
+      this.setState({
+        scaleParam:{}
+      });
+    }
     this.props.hideList({name:'showTable',value:false});
   }
+  // 非计分量表确定-延时关闭->量表存值
+  unscroeClose(){
+    let {timer} = this.state;
+    this.setState({
+      ff:true
+    })
+    clearTimeout(timer)
+    let _timer = setTimeout(()=>{
+      this.closeTable();
+    },200) 
+    this.setState({
+      timer:_timer
+    })
+  }
+  // 量表明细-确定
+  comfirnTable(){
+    const {flag} = this.state;
+    this.setState({
+      comfirnFlag:true,
+      flag:!flag //触发更新
+    })
+  }
+  resetComfirnFlag(){
+    this.setState({
+      comfirnFlag:false,
+      ff:false
+    })
+  }
+ 
   showFormula(id){//计算公式
     this.setState({
       formulaId:id,
       optionId:null  //关闭可能结果
+    });
+    const {patDom} = this.props;
+    const ht = $(patDom.current).height();
+    setTimeout(function(){
+      $(patDom.current).scrollTop(ht+200);
     })
   }
   closeFormula(it){
@@ -169,13 +218,22 @@ class ChronicInfo extends React.Component{
     });
   }
   handleAddAssessItem(v,pIndex,i){
-    const {addAssessItem} = this.props;
+    const {addAssessItem,showHide,addScaleItems,scaleInfo} = this.props;
+    if(!v){
+      addScaleItems(scaleInfo[showHide.conceptId],showHide.conceptId);
+      return ;
+    }
     addAssessItem(v,pIndex,i);
   }
-  handleReg(e){   //只能输入数字
-    const hasDot = e.target.value.indexOf('.')!=-1;
+  addFormula(it,v,pIndex,i){
+    const {chronicMagItem} = this.props;
+    this.closeFormula(it);
+    chronicMagItem&&this.handleAddAssessItem(v,pIndex,i);
+  }
+  handleReg(e){   //只能输入数字和特殊符号
+    //const hasDot = e.target.value.indexOf('.')!=-1;
     const key = e.key;
-    if(key!='Backspace'&&((/[^\d]/.test(key)&&key!='.')||(key=='.'&&(hasDot||!e.target.value)))){
+    if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
       e.preventDefault();
     }
   }
@@ -184,10 +242,10 @@ class ChronicInfo extends React.Component{
     let obj = deepClone(calcuValues);
     let values = (obj&&obj[id])||deepClone(calcuContent);
     const txt = e.target.value;
-    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.]/g,'');       //处理中文输入法的情况
+    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');       //处理中文输入法的情况
     obj[id] = values;
-    if(/[\u4e00-\u9fa5]|[^\d|.]/g.test(txt)){
-      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.]/g,'');
+    if(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g.test(txt)){
+      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');
     }
     this.setState({
       isCalculated:false,
@@ -215,18 +273,20 @@ class ChronicInfo extends React.Component{
   handleRadio(item,parent){//可能结果
     let {radioVal} = this.props;
     this.setState({
-      radioVal:Object.assign({},radioVal,{[parent.id]:item.detailName})
+      radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
     })
   }
-  confirmOption(parent,pIndex){//可能结果确定
+  confirmOption(parent,pIndex,i){//可能结果确定
     const {radioVal,possible} = this.state;
-    const {savePossibleResult} = this.props;
+    const {savePossibleResult,chronicMagItem} = this.props;
     this.setState({
       possible:Object.assign({},possible,radioVal),
       radioVal:Object.assign({},possible,radioVal),//不设置radioVal只有最近一次选中的值
       optionId:null,
     });
     savePossibleResult&&savePossibleResult({possible:Object.assign({},possible,radioVal),radioVal:Object.assign({},possible,radioVal)})
+    chronicMagItem&&this.handleAddAssessItem(parent,pIndex,i);
+
   }
   handleSaveCalcu(obj){
     this.setState({
@@ -245,7 +305,7 @@ class ChronicInfo extends React.Component{
         if(!calcuValues[i].value) {
           allHasInfo = false;
         }
-      } else if(calcuValues[i].controlType == 1) {
+      } else if(calcuValues[i].controlType == 0) {
         let hasSelect = false;
         for( let z = 0; z <calcuValues[i].details.length; z++) {
           if(calcuValues[i].details[z].state == 1) {
@@ -272,43 +332,6 @@ class ChronicInfo extends React.Component{
       Notify.info('请填写计算公式内容')
     }
   }
-  getAddBtnState(flag,v,i,j){
-    const {indexs,wholeScaleItems,addScaleItems,chronicMagItem,chronicDesease,addedScaleIds} = this.props;
-    let btn = '',reCheck=false;
-    let show = chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name;
-    if(!show){
-      return '';
-    }
-    if(flag){     //有结果
-      if(j!==undefined){
-        reCheck = addedScaleIds.includes(v.details[j].content.id);      //列表中是否加入同一量表
-        btn = (indexs[i]&&indexs[i].includes(j))||reCheck?<span className={style["add-record"]}>
-                   <img src={added} />
-                   已加入
-                 </span>:<span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
-                   <img src={add} />
-                   加入病历记录
-                 </span>;
-      }else{
-        reCheck = addedScaleIds.includes(v.id);         //推送中是否加入同一量表
-        btn = (wholeScaleItems&&wholeScaleItems[i])||reCheck?<span className={style["add-record"]}>
-                   <img src={added} />
-                   已加入
-                 </span>:<span className={style["listResult"]} onClick={()=>addScaleItems(v,i)}>
-                   <img src={add} />
-                   加入病历记录
-                 </span>;
-      }
-
-    }else{
-      btn = <span className={style["disable-add"]}>
-                   <img src={add} />
-                   加入病历记录
-                 </span>;
-    }
-
-    return btn;
-  }
   handleMouseEnterDrug(index) {
     this.setState({
         currentIndex: index,
@@ -316,7 +339,7 @@ class ChronicInfo extends React.Component{
   }
   handleMouseLeaveDrug() {
     this.setState({
-        currentIndex: -1, 
+        currentIndex: -1,
     })
   }
   handleMouseEnterImg() {
@@ -329,8 +352,9 @@ class ChronicInfo extends React.Component{
       hasEnterImg: false
     })
   }
+  
   getDetail(){
-    const {data,formulaResult,calcuResult} = this.props;
+    const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
     const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
     let list = data&&data.map((v,i)=>{
                     return <div className={style["list"]}>
@@ -342,49 +366,43 @@ class ChronicInfo extends React.Component{
                                   onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                                 >
                                   {v.name}
-                                  {<img className={style['info-img']}  
+                                  {<img className={style['info-img']}
                                     style ={currentIndex === i  ? {display: "inline-block"} : {display: "none"}}
-                                    src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow} 
+                                    src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                     onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
-                                    onClick={this.showInfo.bind(this,v.id)}/>}
-                                
+                                    onClick={this.showInfo.bind(this,v)}/>}
+
                                 </span>
                                 {/* <img src={infoShow} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/> */}
-                                
+
                               </p>:''}
                       {v.details&&v.details.map((it,j)=>{
                         if(it.type==1){
                           return <p>
                                 <span className={style["listName"]}>
-                                  <i onClick={this.showTable.bind(this,it.content,v.id,i)}>{'【'+it.content.name+'】'}</i>
-                                  {formulaResult&&formulaResult[it.content.id]?<i>{'结果:'}{formulaResult[it.content.id].calcalculate&&formulaResult[it.content.id].calcalculate.result.value +' '+ formulaResult[it.content.id].calcalculate.result.text}</i>:''}
+                                  <i onClick={this.showTable.bind(this,it.content,v,i,j)}>{'【'+it.content.name+'】'}</i>
+                                  {formulaResult&&formulaResult[it.content.conceptId]?<i>{'结果:'}{formulaResult[it.content.conceptId].calcalculate&&formulaResult[it.content.conceptId].calcalculate.result.value +' '+ formulaResult[it.content.conceptId].calcalculate.result.text}</i>:''}
                                 </span>
-                                {
-                                  this.getAddBtnState(formulaResult&&formulaResult[it.content.id],v,i,j)
-                                }
                               </p>
                         }else if(it.type==2){
-                          const cres = calcuResult&&calcuResult[v.id]||it.content.result;
+                          const cres = calcuResult&&calcuResult[v.conceptId]||it.content.result;
                           const result = cres&&cres[1]&&cres[1].text;
-                          const details = calcuValues&&calcuValues[v.id]||it.content.details;
+                          const details = calcuValues&&calcuValues[v.conceptId]||it.content.details;
                           return <div className={style["marTop"]}>
                             <span className={style["limit"]}>
                               计算公式结果:
-                              <i className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>{result?result:'请选择'}</i>
+                              <i className={style["blue"]} onClick={this.showFormula.bind(this,v.conceptId)}>{result?result:'请选择'}</i>
                               <img src={level1} />
                             </span>
-                            {
-                              this.getAddBtnState(result,v,i,j)
-                            }
-                            {formulaId&&formulaId==v.id&&<MiniToast title={it.content.name}
+                            {formulaId&&formulaId==v.conceptId&&<MiniToast title={it.content.name}
                                 icon={allTableIcon}
-                                confirmText='关闭'
-                                show={formulaId&&formulaId==v.id?true:false}
+                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                show={formulaId&&formulaId==v.conceptId?true:false}
                                 close={this.closeFormula.bind(this,it)}
-                                confirm={this.closeFormula.bind(this,it)}
-                                footer="true">
+                                confirm={this.addFormula.bind(this,it,v,i,j)}
+                                footer={result?true:false}>
                                 <table>
                                 {details.map((item,idd)=>{
                                     if(item.controlType==0){//单选
@@ -397,7 +415,7 @@ class ChronicInfo extends React.Component{
                                             return <div className={style["chooseItem"]}>
                                                     <Radio label={ii.detailName}
                                                              isSelect={ii.state == 1}
-                                                             handleClick={this.handleForRadio.bind(this,v.id,details,idd,ind)}>
+                                                             handleClick={this.handleForRadio.bind(this,v.conceptId,details,idd,ind)}>
                                                       </Radio>
                                                   </div>
                                           })}
@@ -409,17 +427,17 @@ class ChronicInfo extends React.Component{
                                           <span>{'请输入'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          <input type="text" placeholder="请输入"  value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.id,details,idd)}/>
+                                          <input type="text" placeholder="请输入"  value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>
                                         </td>
                                         <td>
                                           <span>{item.uint}</span>
                                         </td>
-                                        
+
                                       </tr>
                                     }
                                 })}
                                 </table>
-                                <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.id,it)}>计算</div>
+                                <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.conceptId,it)}>计算</div>
                                 <table>
                                   {cres && Array.isArray(cres) &&cres.map((itemResult, resultIndex) => {
                                     return <tr>
@@ -439,24 +457,22 @@ class ChronicInfo extends React.Component{
                           return <div className={style["marTop"]}>
                             <span className={style["limit"]}>
                               可能结果:
-                              <i onClick={this.showOption.bind(this,v.id)} className={style["blue"]}>{possible[v.id]?possible[v.id]:'请选择'}</i>
+                              <i onClick={this.showOption.bind(this,v.conceptId)} className={style["blue"]}>{possible[v.conceptId]?possible[v.conceptId]:'请选择'}</i>
                               <img src={level1} />
                             </span>
-                            {
-                              this.getAddBtnState(possible[v.id],v,i,j)
-                            }
                             <MiniToast title='结果选择'
                                 icon={checkIcon}
-                                show={optionId&&optionId==v.id?true:false}
+                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                show={optionId&&optionId==v.conceptId?true:false}
                                 close={this.closeOption}
-                                confirm={this.confirmOption.bind(this,v,i)}
-                                footer="true">
+                                confirm={this.confirmOption.bind(this,v,i,j)}
+                                footer={radioVal[v.conceptId]?true:false}>
                                 <div className={style["infoOption"]}>
                                   <span>{it.content.name?it.content.name+':':''}</span>
                                   {it.content.details&&it.content.details.map((lis,ind)=>{
                                     return <div className={style["chooseItem"]}>
                                       <Radio label={lis.detailName}
-                                               isSelect={radioVal[v.id]==lis.detailName}
+                                               isSelect={radioVal[v.conceptId]==lis.detailName}
                                                handleClick={this.handleRadio.bind(this,lis,v)}>
                                         </Radio>
                                         {lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
@@ -477,52 +493,87 @@ class ChronicInfo extends React.Component{
         calcuValues:next.calcuValues
       })
     }
+    if (JSON.stringify(next.wholeResults.possible) != JSON.stringify(this.props.possible)) {
+      this.setState({
+        radioVal: next.wholeResults.radioVal,
+        possible: next.wholeResults.possible
+      })
+    }
+    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 = <div className={style['footer']}>
-      <span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
-      <span className={style['okBtn']} onClick={()=>this.closeTable()}>确定</span>
-    </div>;
-    const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide} = this.props;
-    return <div className={style["tips"]} style={{marginBottom:'15px'}}>
-              <div className={`${style["tips-title"]} ${style["chronic"]}`}>
-                <div className={style["tips-name"]}>
-                  <img src={chronicPic} />
-                  <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'}}>
-                  <span className={style["tipsDetails"]} onClick={() => this.showTableList(chronicDesease&&chronicDesease.id||chronicMagItem&&chronicMagItem.id)}>量表
-                  </span>
-                </div>
-              </div>
-              <div className={style["content"]}> 
-                  {this.getDetail()}
-              </div>
-              <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>
-                            <span className={style["scaleName"]}>
-                              <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
-                              {formulaResult&&formulaResult[v.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ (formulaResult[v.id].calcalculate.result.text?formulaResult[v.id].calcalculate.result.text:'')}</i>:''}
-                            </span>
-                            {
-                              this.getAddBtnState(formulaResult&&formulaResult[v.id],v,i)
-                            }
-                          </li>
-                        })}
-                      </ul>
-              </ConfirmModal>
-              {showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
-                      title={showHide.name}
-                      icon={tableIcon}
-                      top={20}
-                      bottom={20}
-                      width={820}>
-                <ScaleTable title={showHide.name} tableId={showHide.id}></ScaleTable>
-              </ComplexModal>:''}
+    const {comfirnFlag,flag,ff} = this.state;
+    const {chronicMagItem,chronicDesease,data,showHide,slideUp} = this.props;
+    const scaleFooter = <Footer print={true}
+                                footText={showHide.isPop||!chronicMagItem?"确定":"加入病历记录"}
+                                handlePrint={this.onPrint}
+                                handleConfirm={this.comfirnTable}/>;
+    if(data&&data.length>0){
+      return <div className={style["tips"]} style={{marginBottom:'15px'}}>
+        <div className={`${style["tips-title"]} ${style["chronic"]}`} onClick={this.slideToggle}>
+          <div className={style["tips-name"]}>
+            <img src={chronicPic} />
+            <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}<span className={style["redTips"]}>(页面信息有更新可能影响评估结果)</span></h2>
+          </div>
+          <div className={style['toggle-btn']}>
+            <img src={slideUp?down:up} alt="展开/收起"/>
+          </div>
+        </div>
+        <div className={style["content"]} ref={this.$content}>
+          {this.getDetail()}
+        </div>
+        {showHide&&showHide.showTable?<ComplexModal onclose={()=>this.closeTable(true)} footer={scaleFooter}
+                                                    title={showHide.name}
+                                                    icon={tableIcon}
+                                                    top={20}
+                                                    bottom={20}
+                                                    width={820}>
+          <ScaleTable title={showHide.name}
+                      tableId={showHide.conceptId}
+                      comfirnFlag={comfirnFlag}
+                      flag={flag}
+                      flagT={ff}
+                      resetFlag={this.resetComfirnFlag}
+                      unscroeClose={this.unscroeClose}
+                      closeTable={this.closeTable}
+                      resRef={this.$result}
+          ></ScaleTable>
+        </ComplexModal>:''}
       </div>
+    }
+    //量表弹窗-无指标推送时量表弹窗要单独加载
+    if(showHide&&showHide.showTable){
+      return <ComplexModal onclose={()=>this.closeTable(true)} footer={scaleFooter}
+                           title={showHide.name}
+                           icon={tableIcon}
+                           top={20}
+                           bottom={20}
+                           width={820}>
+        <ScaleTable title={showHide.name}
+                    tableId={showHide.conceptId}
+                    comfirnFlag={comfirnFlag}
+                    flag={flag}
+                    flagT={ff}
+                    resetFlag={this.resetComfirnFlag}
+                    unscroeClose={this.unscroeClose}
+                    closeTable={this.closeTable}
+                    resRef={this.$result}
+        ></ScaleTable>
+      </ComplexModal>;
+    }
+
+
+
   }
 }
 export default ChronicInfo;

+ 30 - 132
src/components/ChronicInfo/index.less

@@ -1,22 +1,24 @@
-@import "~@less/variables.less";
+@import "~@less/mixin.less";
 .tips{
   border:1px solid #EAEDF1;
-  .tips-title,h1{
+  margin-bottom: 15px;
+  .tips-title{
     font-size: 14px;
     color: #000;
     padding: 8px 15px;
     background: #EAF7FA;
     font-weight: bold;
-    img {
-      float:left;
-      margin-top: 0px;
-      margin-right: 5px;
-    }
-  }
-  .tips-title{
+    white-space: nowrap;
+    cursor: pointer;
+    background: rgba(242,150,91,0.1);
     .tips-name{
       width: 238px;
       display: inline-block;
+      img {
+        float:left;
+        margin-top: 0px;
+        margin-right: 5px;
+      }
     }
     h2{
       display: inline-block;
@@ -34,27 +36,30 @@
       white-space: nowrap;
     }
     .tipsDetails {
+      .btnCom;
       display: inline-block;
       font-weight: normal;
       width: 42px;
       height: 20px;
       border: 1px solid #262626;
-      border-radius: 4px;
-      text-align: center;
       font-size: 12px;
-      // color: #3B9ED0;
       color: #262626;
       line-height: 18px;
       margin: 0 0 -2px 10px;
-      cursor: pointer;
       }
     }
-    .chronic{
-      background: rgba(242,150,91,0.1);
+    .toggle-btn{
+      display: inline-block;
+      float: right;
+      cursor: pointer;
     }
     .content{
       font-size: 14px;
       padding:6px 15px;
+      transition:display 2s;
+      -moz-transition:display 2s; /* Firefox 4 */
+      -webkit-transition:display 2s; /* Safari and Chrome */
+      -o-transition:display 2s; /* Opera */
       .list{
         border-bottom: 1px solid #EAEDF1;
         padding-bottom: 10px;
@@ -76,31 +81,11 @@
          .listResult{
           .add-record;
         }
-        .infoBox{
-          position: absolute;
-          top:27px;
-          width: 388px;
-          background: #fff;
-          z-index: 66;
-          border: 1px solid #EAEDF1;
-          box-shadow: 0 5px 10px 0 rgba(0,0,0,0.10);
-          .infoTitle{
-            height: 40px;
-            line-height: 40px;
-            padding-left: 18px;
-            // border-bottom: 1px solid #EAEDF1;
-            background: #DFEAFE;
-            img{
-              vertical-align: text-top;
-            }
-            .closeIcon{
-              // vertical-align: middle;
-              float: right;
-            }
-          }
-          .infoCon{
-            padding: 15px 26px 25px;
-          }
+        .addResult{
+          color: #3B9ED0;
+          text-align: left;
+          padding-left: 5px;
+          cursor: default;
         }
       }
       .marTop{
@@ -118,66 +103,17 @@
         color:#3B9ED0;
         cursor: pointer;
       }
-      /* .mainList{
-        .listBtn{
-          display: inline-block;
-          width: 96px;
-          height: 26px;
-          line-height: 26px;
-          text-align: center;
-          border: 1px solid #EAEDF1;
-          border-radius: 4px;
-        }
-        .listResult{
-          line-height: 26px;
-          i{
-            cursor: pointer;
-          }
-        }
-        .mainBox{
-          top: 65px;
-          .infoOption{
-            padding: 20px 0;
-          }
-          .infoConBtn{
-            text-align: right;
-            border-top: 1px solid #EAEDF1;
-            padding-top: 10px;
-            span{
-              color:#3B9ED0;
-              display: inline-block;
-              width: 66px;
-              height: 32px;
-              line-height: 32px;
-              text-align: center;
-              border: 1px solid #3B9ED0;
-              border-radius: 4px;
-            }
-          }
-        }
-      } */
       .infoOption{
         padding: 20px 0;
       }
-      .infoConBtn{
-        text-align: right;
-        border-top: 1px solid #EAEDF1;
-        padding-top: 10px;
-        span{
-          color:#3B9ED0;
-          display: inline-block;
-          width: 66px;
-          height: 32px;
-          line-height: 32px;
-          text-align: center;
-          border: 1px solid #3B9ED0;
-          border-radius: 4px;
-        }
-      }
       .list:last-child{
         border-bottom:none;
       }
     }
+
+  .slide{
+    display: none;
+  }
   }
   .toast-title{
     position: absolute;
@@ -210,54 +146,16 @@
         cursor: pointer;
       }
     }
-    .footer{
-      .print{
-        width: 111px;
-        height: 34px;
-        line-height: 34px;
-        outline: none;
-        border-radius: 4px;
-        /*color: #3B9ED0;*/
-        border: 0 none;
-        cursor: pointer;
-        background: #fff;
-        margin-right: 20px;
-        img{
-          width: 20px;
-          vertical-align: middle;
-          margin-right: 4px;
-        }
-      }
-      .okBtn{
-        width: 80px;
-        height: 34px;
-        line-height: 32px;
-        text-align: center;
-        outline: none;
-        border-radius: 4px;
-        cursor: pointer;
-        border: 1px solid #3B9ED0;
-        box-sizing: border-box;
-        margin-left: 20px;
-        background: #3B9ED0;
-        color: #fff;
-        float: right;
-        margin-right: 20px;
-      }
-    }
   .chooseItem{
     display: inline-block;
     margin-right: 10px;
   }
   .forMulBtn{
+    .btnCom;
     height: 32px;
     line-height: 32px;
-    text-align: center;
     color: #fff;
-    // background: #DBDBDB;
     background: #3B9ED0;
-    border-radius: 4px;
-    cursor: auto;
     margin-top: 15px;
     cursor: pointer;
   }

+ 35 - 37
src/components/CommonSymptom/index.jsx

@@ -2,17 +2,15 @@ import React,{Component} from 'react';
 import classNames from 'classnames';
 import $ from 'jquery';
 import style from "./index.less";
-/****
+/**
+ * author: Liucf
  * 主诉常见症状下拉--修改为横铺多选(3.13)
  * 接收参数:
- * data: json数组
- * show:true/false
- * textKey: 选项文字字段名
- * idKey: 选项id字段名
- * type: text选项为纯文本,label选项为标签
- * onSelect: 选中事件
- *
- * ***/
+ * data: json数组,数据源;
+ * show: true/false,与私有属性hide共同控制组件的显示隐藏;
+ * onSelect: 确定事件;
+ * 
+ * **/
 
 class CommonSymptom extends Component{
   constructor(props){
@@ -20,53 +18,52 @@ class CommonSymptom extends Component{
     this.state={
       select:[],
       ids:[],
-      hide:false
+      hide:false,
+      conceptId:[]
     }
     this.handleSelect = this.handleSelect.bind(this);
     this.handleClear = this.handleClear.bind(this);
     this.handleConfirm = this.handleConfirm.bind(this);
   }
   getClass(){
-    let name = style['text-list'];
     let isHide = this.props.show?'':style['hide'];
-    switch (this.props.type){
-      case 'text':
-        name = style['text-list'];
-        break;
-      case 'label':
-        name = style['label-list'];
-        break;
-      default:
-        name = style['text-list'];
-    }
-    return classNames(style['list'],name,isHide);
+    return classNames(style['list'],isHide);
   }
 
   handleSelect(e,item){
     e.stopPropagation();
-    let {select,ids} = this.state;
+    let {select,ids,conceptId} = this.state;
     const id = item.questionId
-    if(ids.includes(id)){
-      ids.splice(ids.indexOf(id),1);
+    const copid = item.conceptId
+    if(conceptId.includes(copid)){
+      conceptId.splice(conceptId.indexOf(copid),1);
+      if(ids.includes(id)){
+        ids.splice(ids.indexOf(id),1);
+      }
       let selectData = select;  
       select.forEach((it,i)=>{
-        if(it.questionId==id){
+        if(it.conceptId==copid){
          selectData.splice(i,1); 
         }
       })
       select = selectData; 
     }else{
-      ids.push(id);
+      // ids.push(id); //questionId可能没有
+      if(id){
+        ids.push(id);
+      }
+      conceptId.push(copid);
       select.push(item);
     }
     this.setState({
       select,
-      ids
+      ids,
+      conceptId
     })
   }
   getStyle(id){
-    const {ids} = this.state;
-    if(ids.includes(id)){
+    const {conceptId} = this.state;
+    if(conceptId.includes(id)){
       return style['selected'];
     }
     return '';
@@ -75,28 +72,29 @@ class CommonSymptom extends Component{
     e.stopPropagation();
     this.setState({
       select:[],
-      ids:[]
+      ids:[],
+      conceptId:[]
     })
   }
   handleConfirm(e){
     e.stopPropagation();
     const {onSelect} = this.props;
-    const {select,ids} = this.state;
-    onSelect&&onSelect({select,ids});
+    const {select,ids,conceptId} = this.state;
+    onSelect&&onSelect({select,ids,conceptId});
   }
 
   componentDidMount(){
-    const {hideSymptom} = this.props;
     $(document).click((e)=>{     
       let itemBox = $('#mainSuit')[0];
       let divBox = $('#symptBox')[0];
       let listBox = $('#listBox')[0];
       let operBox = $('#oper')[0];
-      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != operBox){
+      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != operBox && e.target != divBox){
         this.setState({
           hide:true,
           select:[],
-          ids:[]
+          ids:[],
+          conceptId:[]
         })
       }else{
         this.setState({
@@ -112,7 +110,7 @@ class CommonSymptom extends Component{
     return <div className={this.getClass()} contenteditable="false" id="symptBox" style={{'display':hide?'none':'block'}}>
       <ul className={style["listBox"]} id="listBox">
         {data&&data.map((it)=>{
-          return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.questionId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
+          return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
         })}
       </ul>
       <div className={style['oper']} id="oper">

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

@@ -2,29 +2,18 @@
 .list{
   .pop;
   left: 85px;
-  // padding: 0 0 10px;
   padding: 5px;
   white-space: pre-wrap;
   .listBox{
-    // max-height: 370px;
-    // overflow-y: auto;
     max-width: 460px;
-    // overflow-x: auto;
-    // display: inline-block;
-    // margin-right: 5px;
   }
   li{
     width: 85px;
     line-height: 32px;
-    // border:1px #fff solid;
-    // padding: 0 20px 0 30px;
-    // padding:0 20px;
-    // white-space: nowrap;
     padding-left: 15px;
     margin-right: 5px;
     cursor: pointer;
     display: inline-block;
-    // text-align: center;
   }
   li:hover{
     border-color:#3B9ED0;
@@ -32,14 +21,15 @@
   .selected{
     .select-li;
     width: 85px;
-    // text-align: center;
   }
   .clear{
+    .btnCom;
     .clear;
     margin-left: 15px;
     bottom: 0;
   }
   .confirm{
+    .btnCom;
     .confirm;
     width: 75px;
     margin-left: 15px;

+ 10 - 9
src/components/CopyRight/CopyModalSon/index.jsx

@@ -1,33 +1,34 @@
 import React, { Component } from "react";
-import style from "../index.less";
+import style from "./index.less";
 import close from '../../../common/images/icon_close.png'
-import { dragBox } from '@utils/tools';
+import { dragBox } from '@utils/drag';
+import ReactDom from "react-dom";
 
 class DiscontentSon extends Component {
   constructor(props) {
     super(props);
   }
   componentDidMount(){
-    dragBox('CopyModalWrap','CopyModalTitle')
+    dragBox('CopyModalWrap','CopyModalTitle','add')
   }
 
   render() {
     const { closeCopyModal,copyVisible,date,copyContent,number } = this.props;
 
-    return <div
-        className={style["copyModal"]}
-        style={copyVisible ? { display: "block" } : { display: "none" }}
-      >
+    
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<React.Fragment>
         <div className={style["shade"]} onClick={closeCopyModal}/>
         <div className={style["copyContent"]} id="CopyModalWrap">
-          <div className={`${style["header"]} drag-title`} id="CopyModalTitle">版本信息<img src={close} onClick={closeCopyModal} /></div>
+          <div className={`${style["header"]} drag-title`} id="CopyModalTitle">版本信息</div>
+          <img src={close} onClick={closeCopyModal} />
           <div className={style["now"]}>
             当前版本:{number}
             <span>{date && date.substring(0, 10)}</span>
           </div>
           <div className={style["content"]}>{copyContent}</div>
         </div>
-      </div>
+        </React.Fragment>,domNode)
   }
 }
 

+ 65 - 0
src/components/CopyRight/CopyModalSon/index.less

@@ -0,0 +1,65 @@
+
+      .copyContent{
+        position: fixed;
+        width: 820px;
+        left: 50%;
+        top: 20%;
+        margin-left: -410px;
+        background: #fff;
+        height: 60%;
+        z-index: 1000;
+        padding: 80px 0 40px;
+        img{
+          cursor: pointer;
+          position: absolute;
+          right: 10px;
+          top: 7px;
+          z-index: 100;
+        }
+        .header {
+          position: absolute;
+          width: 100%;
+          top: 0;
+          font-size: 14px;
+          height: 40px;
+          line-height: 40px;
+          padding: 0 20px;
+          border-bottom: 1px solid #EAEDF1;
+        }
+        .now{
+          position: absolute;
+          width: 100%;
+          top: 35px;
+          font-size: 18px;
+          padding: 15px 10px;
+          border-bottom:1px solid #EAEDF1;
+          margin-bottom: 10px;
+          span{
+            float: right;
+            margin-top: 3px;
+          }
+        }
+        .content {
+          height: 100%;
+          padding: 10px;
+          overflow-y: auto;
+          font-size: 12px;
+          line-height: 20px;
+          div{
+            font-size: 12px;
+            line-height: 20px;
+          }
+        }
+      }
+      .shade {
+        position: fixed;
+        left: 0;
+        top: 0;
+        right: 0;
+        bottom:0;
+        background: #000;
+        opacity: 0.6;
+        z-index: 999;
+        filter:alpha(opacity=60);
+        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+      }

+ 9 - 10
src/components/CopyRight/DiscontentSon/index.jsx

@@ -1,30 +1,29 @@
 import React, { Component } from "react";
-import style from "../index.less";
+import style from "./index.less";
 import close from '../../../common/images/icon_close.png'
-import { dragBox } from '@utils/tools';
+import { dragBox } from '@utils/drag';
+import ReactDom from "react-dom";
 
 class DiscontentSon extends Component {
   constructor(props) {
     super(props);
   }
   componentDidMount(){
-    dragBox('disContentWrap','DisclatmerTitle')
+    dragBox('disContentWrap','DisclatmerTitle','add')
   }
 
   render() {
     const { closeDisclatmerModal,disVisible,disclatmerContent } = this.props;
-
-    return <div
-          className={style["disModal"]}
-          style={disVisible ? { display: "block" } : { display: "none" }}
-        >
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<React.Fragment>
           <div className={style["shade"]} onClick={closeDisclatmerModal}/>
           <div className={style["disContent"]} id="disContentWrap">
-            <div className={`${style["header"]} drag-title`} id="DisclatmerTitle">免责声明<img src={close} onClick={closeDisclatmerModal} /></div>
+            <div className={`${style["header"]} drag-title`} id="DisclatmerTitle">免责声明</div>
+            <img src={close} onClick={closeDisclatmerModal} />
             <div className={style["content"]}>{disclatmerContent}</div>
             <div className={style["btnBox"]}><span  className={style["btn"]} onClick={closeDisclatmerModal}>确定</span></div>
           </div>
-      </div>
+          </React.Fragment>,domNode)
   }
 }
 

+ 90 - 0
src/components/CopyRight/DiscontentSon/index.less

@@ -0,0 +1,90 @@
+@import "~@less/mixin.less";
+
+      .disContent{
+        position: fixed;  
+        width: 50%;
+        height: 60%;
+        left: 25%;
+        background: #fff;
+        top: 20%;
+        z-index: 1000;
+        padding: 40px 0 60px 0;
+        img{
+          cursor: pointer;
+          position: absolute;
+          right: 10px;
+          top: 7px;
+          z-index: 100;
+        }
+        .header {
+          position: absolute;
+          top: 0px;
+          width: 100%;
+          height: 40px;
+          line-height: 40px;
+          font-size: 14px;
+          padding: 0 20px;
+          background: #fff;
+          width: 100% ;
+          border-bottom: 1px solid #EAEDF1;
+        }
+        .now{
+          font-size: 18px;
+          padding: 15px 10px;
+          border-bottom:1px solid #EAEDF1;
+          margin-bottom: 10px;
+          span{
+            float: right;
+            margin-top: 3px;
+          }
+        }
+        .content {
+          padding: 20px;
+          height: 100%;
+          overflow: auto;
+          font-size: 12px;
+          line-height: 20px;
+          div{
+            font-size: 12px;
+            line-height: 20px;
+          }
+        }
+        .btnBox {
+          position: relative;
+          // bottom: -60px;
+          width: 100%;
+          height: 60px;
+          background: #fff;
+        }
+        .btn{
+          .btnCom;
+          position: relative;
+          display: inline-block;
+          width: 80px;
+          height: 34px;
+          left: 50%;
+          top: 13px;
+          margin-left: -40px;
+          line-height: 34px;
+          font-size: 14px;
+          // border-radius: 4px;
+          background: #3B9ED0;
+          color:#fff;
+          // text-align: center;
+          // cursor: pointer;
+        }
+      }
+      
+    .shade {
+      position: fixed;
+      left: 0;
+      top: 0;
+      right: 0;
+      bottom:0;
+      z-index: 999;
+      background: #000;
+      opacity: 0.6;
+      filter:alpha(opacity=60);
+      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+    }
+    

+ 6 - 2
src/components/CopyRight/index.jsx

@@ -2,6 +2,7 @@ import React, { Component } from "react";
 import style from "./index.less";
 import close from '../../common/images/icon_close.png'
 import { storageLocal } from "../../utils/tools"
+import { dragBox } from "@utils/drag"
 import DiscontentSon from "./DiscontentSon"
 import CopyModalSon from "./CopyModalSon"
 
@@ -32,6 +33,7 @@ class CopyRight extends Component {
 
   closeCopyModal() {
     this.props.closeCopyModal();
+    dragBox('CopyModalWrap','CopyModalTitle','del')
   }
 
   showDisclatmerModal(){
@@ -39,15 +41,17 @@ class CopyRight extends Component {
   }
 
   closeDisclatmerModal(){
-      this.props.closeDisclatmerModal()
+    dragBox('disContentWrap','DisclatmerTitle','del')
+    this.props.closeDisclatmerModal()
   }
   disclatmerContent() {
     const { disContent } = this.props.copyRight;
     // const disclatmer = disContent.data.data[2].description
     if(disContent.data) {
+      const disclatmerContent = disContent.data.data.find(item => item.disclaimerCode == '3')
       return (
         <div className={style['message']}>
-          <div dangerouslySetInnerHTML={{__html: disContent.data.data[2].description}}></div>
+          <div dangerouslySetInnerHTML={{__html: disclatmerContent.description}}></div>
         </div>
       );
     }

+ 19 - 9
src/components/CopyRight/index.less

@@ -1,3 +1,4 @@
+@import "~@less/mixin.less";
 .container {
   position: absolute;
   bottom: 0px;      //页面布局
@@ -44,6 +45,7 @@
       bottom:0;
       background: #000;
       opacity: 0.6;
+      z-index: 9999;
       filter:alpha(opacity=60);
       -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
     }
@@ -58,16 +60,20 @@
         height: 60%;
         padding: 80px 0 40px;
         img{
-          float: right;
-          margin: -5px 5px 0px 0px;
           cursor: pointer;
+          position: absolute;
+          right: 10px;
+          top: 7px;
+          z-index: 100;
         }
         .header {
           position: absolute;
           width: 100%;
           top: 0;
           font-size: 14px;
-          padding: 10px 0px 10px 10px;
+          height: 40px;
+          line-height: 40px;
+          padding: 0 20px;
           border-bottom: 1px solid #EAEDF1;
         }
         .now{
@@ -100,17 +106,20 @@
         top: 20%;
         padding: 40px 0 60px 0;
         img{
-          float: right;
-          margin: -5px 5px 0px 0px;
           cursor: pointer;
+          position: absolute;
+          right: 10px;
+          top: 7px;
+          z-index: 100;
         }
         .header {
           position: absolute;
           top: 0px;
           width: 100%;
           height: 40px;
+          line-height: 40px;
           font-size: 14px;
-          padding: 10px 0px 10px 20px;
+          padding: 0 20px;
           background: #fff;
           width: 100% ;
           border-bottom: 1px solid #EAEDF1;
@@ -138,6 +147,7 @@
           background: #fff;
         }
         .btn{
+          .btnCom;
           position: relative;
           display: inline-block;
           width: 80px;
@@ -147,11 +157,11 @@
           margin-left: -40px;
           line-height: 34px;
           font-size: 14px;
-          border-radius: 4px;
+          // border-radius: 4px;
           background: #3B9ED0;
           color:#fff;
-          text-align: center;
-          cursor: pointer;
+          // text-align: center;
+          // cursor: pointer;
         }
       }
     }

+ 14 - 27
src/components/CurrentIll/index.jsx

@@ -1,7 +1,6 @@
 import React,{Component} from 'react';
 import style from './index.less';
-import {Button,InlineTag,ItemBox,Notify,Textarea} from '@commonComp';
-import TailInlineTag from '@commonComp/TailInlineTag';
+import {ItemBox,Notify,Textarea,TailInlineTag} from '@commonComp';
 import chooseType from '@containers/eleType.js';
 import SearchDrop from '@components/SearchDrop';
 import {filterDataArr,getPageCoordinate,windowEventHandler,isIE} from '@utils/tools'
@@ -12,14 +11,9 @@ class CurrentIll extends Component{
     super(props);
     this.state = {
       boxEditable:true,
-      showMoudle:false,
       forbidInput:false,
-      mainFlag:true,
-      mainData:[],
-      boxMark:"2",
       boxLeft:0,
       boxTop:0,
-      show:true,
       tmpScroll:0,
       tmpTop:0,
       setDataTimer:null
@@ -44,10 +38,10 @@ class CurrentIll extends Component{
 
   handleFocus(e){
     // 判断主诉是否为空
-    const {mainData,mainText,setData,moduleNum,mainIds,data,changeEditIll,editClear,symptomFeature,isChronic} = this.props;
+    const {mainData,mainText,setData,moduleNum,mainIds,mainTailIds,data,changeEditIll,editClear,symptomFeature,isChronic} = this.props;
     const that = this;
     const ev = e || window.event;
-    const text = ev.target.innerText||ev.target.innerHTML;
+    const text = ev.target.innerText || ev.target.innerHTML;
     let {setDataTimer} = this.state; 
     let mainFinallyText = filterDataArr(mainText);
     if(!mainFinallyText){
@@ -58,17 +52,16 @@ class CurrentIll extends Component{
       })
     }else if(!text) {//现病史框里没有内容时才设置模板
       let num = moduleNum.num;//主诉使用了几个模板
-      if(data.length==0 && !isChronic || !isChronic.name ){
+      if(data.length==0 && !isChronic){
         clearTimeout(setDataTimer);
         setDataTimer = setTimeout(function(){//延时,等待主诉失焦数据返回
-            setData && setData({num,mainData,mainIds,symptomFeature:symptomFeature.featureData,isChronic});   
+            setData && setData({num,mainData,mainIds,symptomFeature:symptomFeature.featureData,isChronic,mainTailIds});   
         },200)  
         this.setState({
           setDataTimer
         })
       }
       this.setState({
-          showMoudle:true,
           forbidInput:false,
           boxEditable:false,
           setDataTimer
@@ -92,17 +85,12 @@ class CurrentIll extends Component{
       leftL = getPageCoordinate(e).boxLeft
     }else{
       const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-        return;
+      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
+        leftL = ele.offsetLeft+90
       }
-      leftL = ele.offsetLeft+90
     }
-    // console.log(getPageCoordinate(e).boxTop)
     getSearchLocation(getPageCoordinate(e).boxTop,leftL)
     this.setState({
-      // boxLeft:getPageCoordinate(e).boxLeft,
-      // boxLeft:leftL,
-      // boxTop:getPageCoordinate(e).boxTop,
       tmpScroll: $("#addScrollEvent")[0].scrollTop,
       tmpTop:getPageCoordinate(e).boxTop
     });
@@ -114,9 +102,9 @@ class CurrentIll extends Component{
   }
 
   handleSearchSelect(obj){
-    const {questionId,name} = obj;
+    const {questionId,name,conceptId} = obj;
     const {fetchModules,focusIndex,span} = this.props;
-    fetchModules&&fetchModules({id:questionId,index:focusIndex,name,span});
+    fetchModules&&fetchModules({id:questionId,index:focusIndex,name,span,conceptId});
   }
 
   getInlineTag(){  
@@ -141,16 +129,15 @@ class CurrentIll extends Component{
         e.target.innerText?(e.target.innerText=""):(e.target.innerHTML="")
         freeText && freeText(innerData.trim());
       }else{
-          freeText && freeText(innerData);
+        freeText && freeText(innerData);
       }
-    }
+    } 
   }
 
   render(){
-    const {fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,showArr,focusIndex,editClear,data,boxLeft,boxTop} = this.props;
-    const {showMoudle,forbidInput,boxMark,show} = this.state;
+    const {fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data,boxLeft,boxTop} = this.props;
+    const {forbidInput} = this.state;
     const searchFlag = searchData.length > 0 ? true : false;
-
     if(+type===1){      //文本模式
       return <Textarea  title='现病史' boxMark='2'
                         isRead={isRead}
@@ -164,7 +151,7 @@ class CurrentIll extends Component{
       <ItemBox title='现病史' 
       editable={editClear||data.length==0?true:false} 
       handleFocus={this.handleFocus} 
-      onchange={forbidInput?(e)=>{this.onchange(e)}:''} 
+      onchange={forbidInput?this.onchange:''} 
       handleClick={this.handleClick}
       handleBlur={this.handleBlur}>
         {data.length>0?this.getInlineTag():(saveText[0]?saveText[0]:'')}

+ 0 - 0
src/components/CurrentIll/index.less


部分文件因为文件数量过多而无法显示