Sfoglia il codice sorgente

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

# Conflicts:
#	src/components/AddAssistCheck/index.less
#	src/components/AddInspect/index.jsx
#	src/components/TemplateItems/TemplateItem/index.jsx
#	src/containers/OtherHistory.js
#	src/store/async-actions/patInfo.js
#	src/utils/tools.js
zhouna 6 anni fa
parent
commit
8a4d339499
100 ha cambiato i file con 4085 aggiunte e 793 eliminazioni
  1. 2 0
      package.json
  2. 63 0
      src/common/components/CheckBtn/index.jsx
  3. 24 0
      src/common/components/CheckBtn/index.less
  4. 44 0
      src/common/components/ComplexModal/index.jsx
  5. 82 0
      src/common/components/ComplexModal/index.less
  6. 7 2
      src/common/components/ConfirmModal/index.jsx
  7. 6 1
      src/common/components/ConfirmModal/index.less
  8. 47 0
      src/common/components/MiniToast/index.jsx
  9. 42 0
      src/common/components/MiniToast/index.less
  10. 0 65
      src/common/components/Radio/index.js
  11. 65 0
      src/common/components/Radio/index.jsx
  12. 3 3
      src/common/components/Radio/index.less
  13. 3 3
      src/common/components/SearchOption/index.less
  14. 2 2
      src/common/components/Textarea/index.jsx
  15. 8 2
      src/common/components/index.js
  16. BIN
      src/common/images/add-result.png
  17. BIN
      src/common/images/added.png
  18. BIN
      src/common/images/all-table.png
  19. BIN
      src/common/images/check.png
  20. BIN
      src/common/images/chronic.png
  21. BIN
      src/common/images/close-icon.png
  22. BIN
      src/common/images/close-icon1.png
  23. BIN
      src/common/images/delete.png
  24. BIN
      src/common/images/info-pic.png
  25. BIN
      src/common/images/info-pic1.png
  26. BIN
      src/common/images/manage.png
  27. BIN
      src/common/images/table.png
  28. BIN
      src/common/images/加入@3x.png
  29. BIN
      src/common/images/已加入@3x.png
  30. BIN
      src/common/images/筛选表.png
  31. BIN
      src/common/images/级别1.png
  32. BIN
      src/common/images/级别2.png
  33. BIN
      src/common/images/级别3.png
  34. BIN
      src/common/images/级别4.png
  35. BIN
      src/common/images/级别5.png
  36. 1 1
      src/common/js/func.js
  37. 6 0
      src/common/less/variables.less
  38. BIN
      src/components/AddAssistCheck/img/info2.png
  39. BIN
      src/components/AddAssistCheck/img/info3.png
  40. 172 140
      src/components/AddAssistCheck/index.jsx
  41. 34 2
      src/components/AddAssistCheck/index.less
  42. 17 4
      src/components/AddInspect/SlideExcel/index.jsx
  43. 27 0
      src/components/AddInspect/SlideExcel/index.less
  44. 28 11
      src/components/AddInspect/SlideSelect/index.jsx
  45. 27 0
      src/components/AddInspect/SlideSelect/index.less
  46. BIN
      src/components/AddInspect/img/info2.png
  47. BIN
      src/components/AddInspect/img/info3.png
  48. 340 310
      src/components/AddInspect/index.jsx
  49. 5 0
      src/components/AddInspect/index.less
  50. 3 4
      src/components/Advice/index.jsx
  51. 89 0
      src/components/AssessResult/AssessHis/index.jsx
  52. 32 0
      src/components/AssessResult/AssessHis/index.less
  53. 239 0
      src/components/AssessResult/ChartItem/index.jsx
  54. 76 0
      src/components/AssessResult/ChooseItem/index.jsx
  55. 259 0
      src/components/AssessResult/ScaleItem/index.jsx
  56. 106 0
      src/components/AssessResult/index.jsx
  57. 153 0
      src/components/AssessResult/index.less
  58. 3 1
      src/components/AssistCheck/index.jsx
  59. 5 0
      src/components/BodyContainer/index.less
  60. 2 2
      src/components/CheckBody/index.jsx
  61. 417 0
      src/components/ChronicInfo/index.jsx
  62. 272 0
      src/components/ChronicInfo/index.less
  63. 1 1
      src/components/CopyRight/index.less
  64. 7 6
      src/components/CurrentIll/index.jsx
  65. 5 3
      src/components/DiagResultSearch/index.less
  66. 27 6
      src/components/DiagnosticItem/index.jsx
  67. 84 6
      src/components/DiagnosticList/index.jsx
  68. 37 0
      src/components/DiagnosticList/index.less
  69. 4 2
      src/components/EMRContainer/index.jsx
  70. 1 0
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  71. 41 0
      src/components/Information/index.jsx
  72. 17 0
      src/components/Information/index.less
  73. 3 1
      src/components/Inspect/index.jsx
  74. 93 5
      src/components/MainSuit/index.jsx
  75. 33 0
      src/components/MainSuit/index.less
  76. 3 2
      src/components/MultSpread/index.jsx
  77. 3 2
      src/components/NumberDrop/index.jsx
  78. 3 3
      src/components/PatInfo/index.jsx
  79. 9 1
      src/components/PatInfo/index.less
  80. 33 115
      src/components/PreviewBody/index.jsx
  81. 48 18
      src/components/PreviewBody/index.less
  82. 8 10
      src/components/PrintPreview/index.jsx
  83. 19 24
      src/components/PushItems/index.jsx
  84. 188 1
      src/components/PushItems/index.less
  85. 5 3
      src/components/RadioDrop/index.jsx
  86. 5 3
      src/components/RadioInpDrop/index.jsx
  87. 271 0
      src/components/ScaleTable/index.jsx
  88. 128 0
      src/components/ScaleTable/index.less
  89. 5 3
      src/components/SpreadDrop/index.jsx
  90. 1 22
      src/components/TemplateItems/TemplateItem/index.jsx
  91. 1 0
      src/components/TemplateItems/TemplateItem/index.less
  92. 6 3
      src/components/TemplateItems/index.jsx
  93. 41 0
      src/components/Treat/AdverseReactions/index.jsx
  94. 27 0
      src/components/Treat/AdverseReactions/index.less
  95. 77 0
      src/components/Treat/DrugHistory/LastDrug/index.jsx
  96. 14 0
      src/components/Treat/DrugHistory/LastDrug/index.less
  97. 33 0
      src/components/Treat/DrugHistory/index.jsx
  98. 27 0
      src/components/Treat/DrugHistory/index.less
  99. 66 0
      src/components/Treat/FollowUp/Textarea/index.jsx
  100. 0 0
      src/components/Treat/FollowUp/Textarea/index.less

+ 2 - 0
package.json

@@ -26,6 +26,7 @@
     "copy-webpack-plugin": "^4.5.1",
     "cross-env": "^5.1.4",
     "css-loader": "^0.28.10",
+    "echarts": "^4.2.1",
     "es3ify-webpack-plugin": "0.0.1",
     "eventsource-polyfill": "^0.9.6",
     "express": "^4.16.2",
@@ -62,6 +63,7 @@
     "anujs": "1.4.8",
     "axios": "^0.18.0",
     "babel-polyfill": "6.26.0",
+    "echarts": "^4.2.1",
     "jquery": "1.12.4",
     "koa-body": "^4.0.4",
     "koa-router": "^7.4.0",

+ 63 - 0
src/common/components/CheckBtn/index.jsx

@@ -0,0 +1,63 @@
+import React from 'react';
+/*import PropTypes from 'prop-types';*/
+import on from '@common/images/checked.png';
+import style from './index.less';
+
+/**
+ * 多选按钮
+ * handleClick:点击触发按键 会将输入的props信息作为参数传入
+ * isSelect:是否选中
+ * label:右侧显示文字
+ */
+class CheckBtn extends React.Component {
+  constructor(props){
+    super(props);
+    this.handleClick = this.handleClick.bind(this);
+  }
+
+  handleClick(id){
+    this.props.handleClick(id);
+  }
+
+  getStyle(){
+    if(this.props.display=='block'){
+      return {
+        display:'block',
+        // marginBottom:'10px'
+      }
+    }
+    return {
+      display:'inline-block',
+      /*marginLeft:'10px'*/
+    }
+  }
+
+  render() {
+    const {id,label,isSelect,disabled} = this.props;
+    /*if(disabled){
+        return (
+            <div className={style['check-box']}
+                 style={this.getStyle()}>
+                <span className={style['img']}></span>
+                <span style={{color:'#aaa'}}>{label}</span>
+            </div>
+        )
+    }*/
+    return (
+      <div className={style['check-box']}
+           onClick={() =>this.handleClick(id)}
+           style={this.getStyle()}>
+        <span className={isSelect?style['on']:style['img']}></span>
+        <span>{label}</span>
+      </div>
+    )
+  }
+}
+
+/*Radio.propTypes = {
+    handleClick:PropTypes.func,
+    isSelect:PropTypes.bool,
+    name:PropTypes.string
+};*/
+
+export default CheckBtn;

+ 24 - 0
src/common/components/CheckBtn/index.less

@@ -0,0 +1,24 @@
+.check-box{
+  max-width: 120px;
+  height: 35px;
+  line-height: 35px;
+  cursor: pointer;
+  .img{
+    display: inline-block;
+    width: 14px;
+    height: 14px;
+    vertical-align: middle;
+    margin-right: 4px;
+    background: #fff;
+    -webkit-appearance: none;
+    border: 1px solid #c9c9c9;
+    border-radius: 4px;
+    outline: none;
+    cursor: pointer;
+  }
+  .on{
+    .img;
+    background: url("../../images/first.png") no-repeat;
+    background-size: 93% 100%;
+  }
+}

+ 44 - 0
src/common/components/ComplexModal/index.jsx

@@ -0,0 +1,44 @@
+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';
+/**
+ * title:标题
+ * children:弹窗内容
+ * onClose:弹窗关闭事件
+ * shadeClose:点蒙层关闭,默认true
+ *footer:固定在弹窗底部的内容如确定按钮
+ *icon:标题前的图标
+ *width:弹窗的宽度
+ *height:弹窗的高度
+ * **/
+
+
+class ComplexModal extends Component {
+  constructor(props) {
+    super(props);
+  }
+
+  render() {
+    const { onclose,title,children,footer,shadeClose,icon,width,top,bottom} = this.props;
+    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 className={style['modal']} style={{width: width?width:'auto', marginLeft:marginLeft, top:top?top+'px':'',bottom:bottom?bottom+'px':''}}>
+        <div className={style['close']}>
+          {icon?<img src={icon} />:''}
+          {title}
+          <img src={close} onClick={onclose} className={style['closeIcon']} />
+        </div>
+        <i className={style['flg']}>患者基本信息</i>
+        <div className={style["content"]} style = {{width: width?width:'auto'}}>{children}</div>
+        <div className={style['footer']} style = {{width: width?width:'auto'}}>{footer}</div>
+      </div>
+    </div>,domNode);
+  }
+}
+
+export default ComplexModal;

+ 82 - 0
src/common/components/ComplexModal/index.less

@@ -0,0 +1,82 @@
+.container {
+  position: relative;
+  z-index: 2000;
+  .content{
+    overflow: auto;
+    position: fixed;
+    bottom: 70px;
+    top: 70px;
+    // width: 820px;
+  }
+  .footer{
+    // width: 820px;
+    position: fixed;
+    bottom:30px;
+    text-align: right;
+  }
+  // @media print {
+  //   .close{
+  //     display: none;
+  //   }
+  //   .flg {
+  //     display: block !important;
+  //   }
+  // }
+  .flg {
+    display: none;
+  }
+  .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: 65px;
+    bottom: 65px;
+  }
+  .close {
+    padding:  15px 15px 15px 20px;
+    border-bottom: 1px solid #EAEDF1;
+    background: #e5eefe;
+    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;
+    }
+  }
+}
+

+ 7 - 2
src/common/components/ConfirmModal/index.jsx

@@ -122,7 +122,8 @@ class ConfirmModal extends Component {
             width, 
             height, 
             closable, 
-            noFooter
+            noFooter,
+            icon
         } = this.props;
         const marginLeft = -parseInt(width)/2
         const marginTop = -parseInt(height)/2
@@ -130,7 +131,11 @@ class ConfirmModal extends Component {
             <NewPortal visible={visible}>
                 <div className={styles['modal-wrapper']} id='confirm'>
                     <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, height:height, marginTop:marginTop}}>
-                        <div className={styles['modal-title']} style={{background: titleBg}}>{title ? title : ''} {closable ? <img onClick={this.closeModal} className={styles['modal-close']} src = {close}/> : false}</div>
+                        <div className={styles['modal-title']} style={{background: titleBg}}>
+                            {icon?<img src={icon} className={styles['icon']}/>:''}
+                            {title ? title : ''} 
+                            {closable ? <img onClick={this.closeModal} className={styles['modal-close']} src = {close}/> : false}
+                        </div>
                         <div className={styles['modal-content']}>{children}</div>
                         {noFooter ? '' : <div className={styles['modal-operator']+' clearfix'}>
                             <div className={styles['modal-btn-box']}>

+ 6 - 1
src/common/components/ConfirmModal/index.less

@@ -17,6 +17,11 @@
     background: #e5e5e5
 }
 
+.icon{
+    vertical-align: text-top;
+    margin-right: 2px;
+}
+
 .modal-close {
     position: absolute;
     right: 0px;
@@ -80,4 +85,4 @@
     filter:alpha(opacity=60);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
     z-index: 9998;
-}
+}

+ 47 - 0
src/common/components/MiniToast/index.jsx

@@ -0,0 +1,47 @@
+import React from 'react';
+import style from './index.less';
+import close from "../../images/close-icon.png";
+/**
+*小弹窗,没有蒙层,例如计算公式结果
+*title:弹窗标题
+*icon:标题旁边的icon,不传不显示
+*children:弹窗内容
+*show:弹窗显示
+*footer:是否显示底部“确定”按钮,默认不显示
+*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} = 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)}>确定</span>
+              </div>
+            </div>
+  }
+}
+
+export default MiniToast;

+ 42 - 0
src/common/components/MiniToast/index.less

@@ -0,0 +1,42 @@
+.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;
+  }
+  .infoFoot{
+    text-align: right;
+    // border-top: 1px solid #EAEDF1;
+    padding: 10px 20px 10px 0;
+    span{
+      color:#3B9ED0;
+      display: inline-block;
+      width: 66px;
+      height: 32px;
+      line-height: 32px;
+      text-align: center;
+      border: 1px solid #3B9ED0;
+      border-radius: 4px;
+      cursor: pointer;
+    }
+  }
+}

+ 0 - 65
src/common/components/Radio/index.js

@@ -1,65 +0,0 @@
-import React from 'react';
-/*import PropTypes from 'prop-types';*/
-import on from './img/on.png';
-import off from './img/off.png';
-import disable from './img/disable.png';
-import style from './index.less';
-
-/**
- * 单选按钮
- * handleClick:点击触发按键 会将输入的props信息作为参数传入
- * isSelect:是否选中
- * name:右侧显示文字
- */
-class Radio extends React.Component {
-    constructor(props){
-        super(props);
-        this.handleClick = this.handleClick.bind(this);
-    }
-
-    handleClick(id){
-        this.props.handleClick(id);
-    }
-
-    getStyle(){
-        if(this.props.display=='block'){
-            return {
-                display:'block',
-                // marginBottom:'10px'
-            }
-        }
-        return {
-            display:'inline-block',
-            marginLeft:'10px'
-        }
-    }
-
-    render() {
-        const {id,name,isSelect,disabled} = this.props;
-        if(disabled){
-            return (
-                <div className={style['radio']}
-                     style={this.getStyle()}>
-                    <img src={isSelect?disable:off}/>
-                    <span style={{color:'#aaa'}}>{name}</span>
-                </div>
-            )
-        }
-        return (
-            <div className={style['radio']}
-                 onClick={() =>this.handleClick(id)}
-                 style={this.getStyle()}>
-                <img src={isSelect?on:off}/>
-                <span>{name}</span>
-            </div>
-        )
-    }
-}
-
-/*Radio.propTypes = {
-    handleClick:PropTypes.func,
-    isSelect:PropTypes.bool,
-    name:PropTypes.string
-};*/
-
-export default Radio;

+ 65 - 0
src/common/components/Radio/index.jsx

@@ -0,0 +1,65 @@
+import React from 'react';
+/*import PropTypes from 'prop-types';*/
+import on from '@common/images/icon-radio-active.png';
+import off from '@common/images/icon-radio-default.png';
+import disable from './img/disable.png';
+import style from './index.less';
+
+/**
+ * 单选按钮
+ * handleClick:点击触发按键 会将输入的props信息作为参数传入
+ * isSelect:是否选中
+ * label:右侧显示文字
+ */
+class Radio extends React.Component {
+  constructor(props){
+    super(props);
+    this.handleClick = this.handleClick.bind(this);
+  }
+
+  handleClick(id){
+    this.props.handleClick(id);
+  }
+
+  getStyle(){
+    if(this.props.display=='block'){
+      return {
+        display:'block',
+        // marginBottom:'10px'
+      }
+    }
+    return {
+      display:'inline-block',
+      /*marginLeft:'10px'*/
+    }
+  }
+
+  render() {
+    const {id,label,isSelect,disabled} = this.props;
+    if(disabled){
+      return (
+        <div className={style['radio']}
+             style={this.getStyle()}>
+          <img src={isSelect?disable:off}/>
+          <span style={{color:'#aaa'}}>{label}</span>
+        </div>
+      )
+    }
+    return (
+      <div className={style['radio']}
+           onClick={() =>this.handleClick(id)}
+           style={this.getStyle()}>
+        <img src={isSelect?on:off}/>
+        <span>{label}</span>
+      </div>
+    )
+  }
+}
+
+/*Radio.propTypes = {
+    handleClick:PropTypes.func,
+    isSelect:PropTypes.bool,
+    name:PropTypes.string
+};*/
+
+export default Radio;

+ 3 - 3
src/common/components/Radio/index.less

@@ -1,7 +1,7 @@
 .radio{
-  width: 120px;
-  height: 44px;
-  line-height: 44px;
+  // max-width: 120px;
+  height: 35px;
+  line-height: 35px;
   cursor: pointer;
   img{
     vertical-align: middle;

+ 3 - 3
src/common/components/SearchOption/index.less

@@ -11,9 +11,9 @@
     margin-bottom: 80px;
     .llStyle;
     .autoList {
-        max-height: 225px;
-        min-height: 80px;
-        overflow-y: auto;
+        // max-height: 225px;
+        // min-height: 80px;
+        // overflow-y: auto;
     }
     input {
         width: 100%;

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

@@ -21,9 +21,9 @@ class Textarea extends Component {
     this.handleKeydown = this.handleKeydown.bind(this);
   }
   handleFocus(){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
-    const {handleFocus,fuzhen,handleInput} = this.props;
+    const {handleFocus,fuzhen,handleInput,isChronic} = this.props;
     handleFocus&&handleFocus();         //其他史、查体获取数据的方法
-    if(fuzhen&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
+    if(fuzhen&& !isChronic.name&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
       const text = config.currentText.replace("(**)",fuzhen);
       this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
       handleInput&&handleInput({text});

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

@@ -3,7 +3,8 @@ import Button from "./Button";
 import Loading from "./Loading";
 import Message from "./Message";
 import Modal from "./Modal";
-import Radio from "./Radio";
+import Radio from "./Radio/index";
+import CheckBtn from './CheckBtn';
 import InlineTag from './InlineTag';
 import ItemBox from './ItemBox';
 import Tab from './Tab';
@@ -20,11 +21,14 @@ import EditableSpan from "./EditableSpan";
 import Textarea from "./Textarea";
 import NumberUnitPan from "./NumberUnitPan";
 import Add from "./Add";
+import ComplexModal from "./ComplexModal";
+import MiniToast from "./MiniToast";
 
 module.exports = {
     Banner,
     Modal,
     Radio,
+    CheckBtn,
     Loading,
     Button,
     Message,
@@ -43,5 +47,7 @@ module.exports = {
     EditableSpan,
     Textarea,
     NumberUnitPan,
-    Add
+    Add,
+    ComplexModal,
+    MiniToast
 };

BIN
src/common/images/add-result.png


BIN
src/common/images/added.png


BIN
src/common/images/all-table.png


BIN
src/common/images/check.png


BIN
src/common/images/chronic.png


BIN
src/common/images/close-icon.png


BIN
src/common/images/close-icon1.png


BIN
src/common/images/delete.png


BIN
src/common/images/info-pic.png


BIN
src/common/images/info-pic1.png


BIN
src/common/images/manage.png


BIN
src/common/images/table.png


BIN
src/common/images/加入@3x.png


BIN
src/common/images/已加入@3x.png


BIN
src/common/images/筛选表.png


BIN
src/common/images/级别1.png


BIN
src/common/images/级别2.png


BIN
src/common/images/级别3.png


BIN
src/common/images/级别4.png


BIN
src/common/images/级别5.png


+ 1 - 1
src/common/js/func.js

@@ -22,7 +22,7 @@ export function dateParser(timestamp,link = '-'){
     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+link+date+' '+hour+':'+minute;
+    let result = year+link+(month<10?"0"+month:month)+link+(date<10?"0"+date:date)+' '+hour+':'+minute;
     return result;
 }
 

+ 6 - 0
src/common/less/variables.less

@@ -44,6 +44,7 @@
 @dropdwon-long-width:600px;
 @dropdwon-height:200px;
 @selected-bg:#fff;
+@import-color:#ffad5f;
 
 /*********推送内容容器宽度*************/
 @push-width: 450px;
@@ -177,4 +178,9 @@
   border:2px @blue solid;
   border-radius: 2px;
   /*box-shadow: 0px 0px 2px @blue;*/
+}
+
+.orange-border{
+  border:1px solid @import-color;
+  //color: @import-color!important;
 }

BIN
src/components/AddAssistCheck/img/info2.png


BIN
src/components/AddAssistCheck/img/info3.png


+ 172 - 140
src/components/AddAssistCheck/index.jsx

@@ -1,159 +1,191 @@
 import React from 'react';
-import { SearchOption, Calendar ,ConfirmModal,Notify,Add} from '@commonComp';
+import { SearchOption, Calendar, ConfirmModal, Notify, Add } from '@commonComp';
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
 import close from './img/close.png';
 
 class AddAssistCheck extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            show: false,
-            date: false,
-            dateTime:"",
-            active:'',
-            visible:false,
-            id:null
-        }
-        this.handleShowDate = this.handleShowDate.bind(this)
-        this.getCurrentDate = this.getCurrentDate.bind(this)
-        this.getSearchList = this.getSearchList.bind(this)
-        this.getAssistLabel = this.getAssistLabel.bind(this)
-        this.handleDelClick = this.handleDelClick.bind(this)
-        this.delConfirm = this.delConfirm.bind(this)
-        this.handleCancel = this.handleCancel.bind(this)
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false,
+      date: false,
+      dateTime: "",
+      active: '',
+      visible: false,
+      id: null
     }
+    this.handleShowDate = this.handleShowDate.bind(this)
+    this.getCurrentDate = this.getCurrentDate.bind(this)
+    this.getSearchList = this.getSearchList.bind(this)
+    this.getAssistLabel = this.getAssistLabel.bind(this)
+    this.handleDelClick = this.handleDelClick.bind(this)
+    this.delConfirm = this.delConfirm.bind(this)
+    this.handleCancel = this.handleCancel.bind(this)
+  }
 
-    handleDelClick(id){
-        this.setState({
-            visible:true,
-            id:id
-        })
-    }
+  handleDelClick(id) {
+    this.setState({
+      visible: true,
+      id: id
+    })
+  }
 
-    delConfirm(){
-        const {handleDelAssist,handlePush} = this.props;
-        const {id} = this.state;
-        handleDelAssist&&handleDelAssist(id);
-        handlePush&&handlePush();           //右侧推送
-        this.setState({
-            visible:false,
-            id:null
-        })
-        Notify.success("删除成功");
-    }
+  delConfirm() {
+    const { handleDelAssist, handlePush } = this.props;
+    const { id } = this.state;
+    handleDelAssist && handleDelAssist(id);
+    handlePush && handlePush();           //右侧推送
+    this.setState({
+      visible: false,
+      id: null
+    })
+    Notify.success("删除成功");
+  }
 
-    handleCancel(){
-        this.setState({
-            visible:false,
-            id:null
-        })
-    }
+  handleCancel() {
+    this.setState({
+      visible: false,
+      id: null
+    })
+  }
 
-    componentDidMount() {
-        $(document).click((event) => {
-            let _con = $('#searchWrapAssist');   // 设置目标区域
-            let _cons = $('#datePick');   // 设置目标区域
-            if (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 });
-            }
-        });
-        this.getCurrentDate();
-    }
-    handleSearchShow(e) {
-        let tmpShow = this.state.show;
-        this.setState({ show: !tmpShow })
-        // e.stopPropagation();
-    }
-    handleShowDate(idx){
-        this.setState({
-            date:!this.state.date,
-            active:idx
+  componentDidMount() {
+    $(document).click((event) => {
+      let _con = $('#searchWrapAssist');   // 设置目标区域
+      let _cons = $('#datePick');   // 设置目标区域
+      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 });
+      }
+    });
+    this.getCurrentDate();
+  }
+  handleSearchShow(e) {
+    let tmpShow = this.state.show;
+    this.setState({ show: !tmpShow })
+    // e.stopPropagation();
+  }
+  handleShowDate(idx) {
+    this.setState({
+      date: !this.state.date,
+      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;
+    return <ul className={styles.searchLiUl}>
+      {
+        list && list.map((item, idx) => {
+          return <li key={item.id}
+            className={styles.searchLi}
+            title={item.name}
+            onClick={() => {
+              handleSign(item.questionId, idx,'search');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}{item.name == item.retrievalName ? null : '(' + item.retrievalName + ')'}
+          </li>
         })
-    }
-    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;
-        return <ul>
-        {
-            list && list.map((item,idx) => {
-                return <li key={item.id}
-                    className={styles.searchLi}
-                    title={item.name}
-                    onClick={() => {
-                        handleSign(item.questionId,idx);
-                        this.setState({ show: false })
-                    }}
-                >
-                    {item.name}{item.name == item.retrievalName?null:'('+item.retrievalName+')'}
-                </li>
-            })
-        }
+      }
     </ul>
-    }
-    getAssistLabel(){
-        const {assistLabel,handleChangeAssistValue,handleChangeDate,isRead,handlePush,winWidth} = this.props;
-        return <ul className={styles.labelWrap} id="datePick">
+  }
+  getCommonList() {      //常用列表
+    const { handleSign,assistList } = this.props;
+    return <ul className={styles.searchLiUl}>
+      {
+        assistList && assistList.map((item, idx) => {
+          return <li key={item.id}
+            className={styles.searchLi}
+            title={item.name}
+            onClick={() => {
+              handleSign(item.questionId, idx,'common');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}
+          </li>
+        })
+      }
+    </ul>
+  }
+  getAssistLabel() {
+    const { assistLabel, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation } = this.props;
+    return <ul className={styles.labelWrap} id="datePick">
+      {
+        assistLabel.map((item, idx) => {
+          return (<li key={item.id} 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) }}><img src={close} alt="" /></a>
+              <div style={{ display: this.state.date && idx == this.state.active ? "block" : "none", position: "relative" }}>
+                <Calendar isShow={true} handleChange={(info) => { handleChangeDate(info, idx); this.setState({ date: false }) }}></Calendar>
+              </div>
+            </div>
+          </li>)
+        })
+      }
+    </ul>
+  }
+  render() {
+    const { handleChangeValue, list } = this.props;
+    const { visible } = this.state;
+    return (
+      <div className={styles.wrapper}>
+        {this.getAssistLabel()}
+        <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
+          <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
+          {this.state.show ? <SearchOption handleChangeValue={handleChangeValue} visible={true}>
+            {list && list.length>0?this.getSearchList(list):''}
             {
-              assistLabel.map((item,idx) => {
-                    return (<li key={item.id} className={styles.assistLists}>
-                        <span className={styles.assistName} style={{width:winWidth < 1200?'120px':'auto'}}>{item.name}:</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)}}><img src={close} alt=""/></a>
-                            <div style={{display:this.state.date && idx == this.state.active?"block":"none",position:"relative"}}>
-                                <Calendar isShow={true} handleChange={(info)=>{handleChangeDate(info,idx);this.setState({date:false})}}></Calendar>
-                            </div>
-                        </div>
-                    </li>)
-                })
+              list && list.length>0?'':<div>
+                <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
+                {
+                  this.getCommonList()
+                }
+              </div>
             }
-        </ul>
-    }
-    render() {
-        const { handleChangeValue, list } = this.props;
-        const { visible } = this.state;
-        return (
-            <div className={styles.wrapper}>
-                {this.getAssistLabel()}
-                <div id="searchWrapAssist" style={{position:"relative",clear:'both'}}>
-                    <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck"/>
-                  {this.state.show?<SearchOption handleChangeValue={handleChangeValue} visible={true}>
-                        {this.getSearchList(list)}
-                    </SearchOption>:''}
-                </div>
-                <ConfirmModal 
-                    visible={visible}
-                    confirm={this.delConfirm}
-                    close={this.handleCancel}
-                    cancel={this.handleCancel}
-                    okText="删除"
-                    cancelText='取消'
-                    // okBorderColor={'#3B9ED0'}
-                    // okColor={'#fff'}
-                    // oKBg={'#3B9ED0'}
-                >
-                    <p className={styles['center']}>是否删除该辅检项?</p>
-                </ConfirmModal>
-            </div>
-        )
-    }
+          </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>
+    )
+  }
 }
 
 export default AddAssistCheck;

File diff suppressed because it is too large
+ 34 - 2
src/components/AddAssistCheck/index.less


+ 17 - 4
src/components/AddInspect/SlideExcel/index.jsx

@@ -31,17 +31,25 @@ class SlideExcel extends Component {
     })
   }
   render() {
-    const {items,item,idx,dateTime} = this.props;
+    const {items,item,idx,dateTime,getInfomation} = this.props;
     const {show} = this.state;
     return (
       <li className={styles.excelDataLis} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
           <span className={styles.excelDataTitle}>
-              {item.menus}
+              <span className={styles.tagSpan}>
+                {item.menus}
+                <span className={styles.imgInfo} onClick={()=>getInfomation('',item.lisExcelItem[0].uniquemealName || '','excel')}></span>
+              </span>
           </span>
           <table className={styles.table}>
              {  show ? (item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
                   return <tr>
-                      <td style={{width:'30%'}}>{value.itemName}</td>
+                      <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)}
@@ -51,7 +59,12 @@ class SlideExcel extends Component {
                 })):(item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
                   if(idx < 4){
                     return <tr>
-                        <td style={{width:'30%'}}>{value.itemName}</td>
+                        <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)}

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

@@ -142,4 +142,31 @@
   .num {
     color: @blue;
   }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+}
+.imgInfo:hover {
+  background: url('../img/info3.png') no-repeat center center;
+  background-size: 100% auto; 
+}
+.tagSpan {
+  position: relative;
+}
+.tagSpan:hover {
+  .imgInfo {
+    display: block;
+  }
 }

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

@@ -6,6 +6,7 @@ import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 import date1 from '../img/date1.png';
 import close from '../img/close.png';
+
 class SlideSelect extends Component {
   constructor(props) {
     super(props);
@@ -34,7 +35,7 @@ class SlideSelect extends Component {
     })
   }
   render() {
-    const {handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate} = this.props;
+    const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate} = this.props;
     const {show} = this.state;
     let numPlus = 0,numPlus1 = 0;
     return (
@@ -43,28 +44,39 @@ class SlideSelect extends Component {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
-                <span data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); handleFillShow(e,idx) }}>{item.name}</span>
+                <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>
             </p>:
-            <p>
-                <i data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); handleFillShow(e,idx) }}>{item.name}</i>
+            <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>
+                </i>
             </p>
         }
         
         {
           item.details && item.details.map((val)=>{
             if(val.value && val.value != ''){
-                numPlus = ++numPlus
-              }
-            })
-          }
+              numPlus = ++numPlus
+            }
+          })
+        }
         {
-            item.show ? 
+            item.show ?
                 <table className={styles.table}>
                     {
                         show?(item.details.map((val)=>{
                             if(val.value && val.value != ''){
                                 return <tr>
-                                    <td style={{width:'30%'}}>{val.name}</td>
+                                    <td style={{width:'30%'}}>
+                                      <span className={styles.tagSpan}>
+                                        {val.name}
+                                        <span className={styles.imgInfo} onClick={()=>getInfomation(val.id)}></span>                                        
+                                      </span>
+                                    </td>
                                     {showDetails(val)}
                                     <td style={{width:'25%'}}>
                                         {normalVal(val.minValue,val.maxValue)}
@@ -77,7 +89,12 @@ class SlideSelect extends Component {
                               ++numPlus1;
                               if(numPlus1 < 5){
                                 return <tr>
-                                    <td style={{width:'30%'}}>{val.name}</td>
+                                    <td style={{width:'30%'}}>
+                                      <span className={styles.tagSpan}>
+                                        {val.name}
+                                        <span className={styles.imgInfo} onClick={()=>getInfomation(val.id)}></span>
+                                      </span>
+                                    </td>
                                     {showDetails(val)}
                                     <td style={{width:'25%'}}>
                                         {normalVal(val.minValue,val.maxValue)}

+ 27 - 0
src/components/AddInspect/SlideSelect/index.less

@@ -151,4 +151,31 @@
   .num {
     color: @blue;
   }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+}
+.imgInfo:hover {
+  background: url('../img/info3.png') no-repeat center center;
+  background-size: 100% auto; 
+}
+.tagSpan {
+  position: relative;
+}
+.tagSpan:hover {
+  .imgInfo {
+    display: block;
+  }
 }

BIN
src/components/AddInspect/img/info2.png


BIN
src/components/AddInspect/img/info3.png


+ 340 - 310
src/components/AddInspect/index.jsx

@@ -11,335 +11,365 @@ import slideDown from "@common/images/slide-down.png";
 import store from '@store';
 import $ from 'jquery';
 class Inspect extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            show: false,
-            showFill: false,
-            date: false,
-            currentIdx: '',
-            dateTime:"",
-            currentData:{},
-            numPlus:0,     //判断是否所有的填写单都是空
-            num:0,            //暂存数据,获取一次,不能每次都是新的数据
-            toastText:'',
-            visible:false,
-            type:null,
-            id:null,
-            tmpIds:[],      //内层外层
-        }
-        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.changeActivePart = this.changeActivePart.bind(this)
-        this.showDetails = this.showDetails.bind(this)
-        this.delConfirm = this.delConfirm.bind(this)
-        this.handleCancel = this.handleCancel.bind(this)
-        this.handleSearchShow = this.handleSearchShow.bind(this)
-        this.changeShowFill = this.changeShowFill.bind(this)
-        this.handleFillShow = this.handleFillShow.bind(this)
-        this.handleDelClick = this.handleDelClick.bind(this)
-    }
-    delConfirm(){//弹窗确定
-        const{delPartItem,handleCloseExcel,handlePush} = this.props;
-        const{type,id} = this.state;
-        if(type==1){
-            delPartItem(id)
-        }else if(type==2){
-            handleCloseExcel(id)
-        }
-        this.setState({
-            visible:false,
-            type:null,
-            id:null,
-        })
-        Notify.success("删除成功");
-        handlePush&&handlePush();       //右侧推送
-    }
-    handleDelClick(type,idx){
-        this.setState({
-            type:type,
-            id:idx,
-            visible:true
-        })
-        if(type==1){//单项
-            this.setState({
-                toastText:'是否删除该化验项?'
-            })
-        }else if(type==2){//导入项
-            this.setState({
-                toastText:'是否删除导入项?'
-            })
-        }
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false,
+      showFill: false,
+      date: false,
+      currentIdx: '',
+      dateTime: "",
+      currentData: {},
+      numPlus: 0,     //判断是否所有的填写单都是空
+      num: 0,            //暂存数据,获取一次,不能每次都是新的数据
+      toastText: '',
+      visible: false,
+      type: null,
+      id: null,
+      tmpIds: [],      //内层外层
     }
-    handleCancel(){
-        this.setState({
-            visible:false,
-            type:null,
-            id: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)
+    this.changeActivePart = this.changeActivePart.bind(this)
+    this.showDetails = this.showDetails.bind(this)
+    this.delConfirm = this.delConfirm.bind(this)
+    this.handleCancel = this.handleCancel.bind(this)
+    this.handleSearchShow = this.handleSearchShow.bind(this)
+    this.changeShowFill = this.changeShowFill.bind(this)
+    this.handleFillShow = this.handleFillShow.bind(this)
+    this.handleDelClick = this.handleDelClick.bind(this)
+  }
+  delConfirm() {//弹窗确定
+    const { delPartItem, handleCloseExcel, handlePush } = this.props;
+    const { type, id } = this.state;
+    if (type == 1) {
+      delPartItem(id)
+    } else if (type == 2) {
+      handleCloseExcel(id)
     }
-    componentDidMount() {
-        $(document).click((event) => {
-            let searchWrap = $('#searchWrap')[0];   // 搜索按钮
-            let searchOption = $('#searchOption')[0];   // 搜索列表
-            let inspectFill = $('#inspectFill')[0];         // 公共填写单
-            if(searchOption){
-                if ( searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
-                    this.setState({ show: false });
-                }
-            }
-            if(inspectFill){
-                if ( event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
-                    this.setState({ showFill: false ,date:false});
-                }
-            }
-        });
-        this.getCurrentDate();
+    this.setState({
+      visible: false,
+      type: null,
+      id: null,
+    })
+    Notify.success("删除成功");
+    handlePush && handlePush();       //右侧推送
+  }
+  handleDelClick(type, idx) {
+    this.setState({
+      type: type,
+      id: idx,
+      visible: true
+    })
+    if (type == 1) {//单项
+      this.setState({
+        toastText: '是否删除该化验项?'
+      })
+    } else if (type == 2) {//导入项
+      this.setState({
+        toastText: '是否删除导入项?'
+      })
     }
-    componentWillReceiveProps(nextProps){
-        if(nextProps.fillActive.name != this.props.fillActive.name){
-            this.setState({num:0})
+  }
+  handleCancel() {
+    this.setState({
+      visible: false,
+      type: null,
+      id: null,
+    })
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let searchWrap = $('#searchWrap')[0];   // 搜索按钮
+      let searchOption = $('#searchOption')[0];   // 搜索列表
+      let inspectFill = $('#inspectFill')[0];         // 公共填写单
+      if (searchOption) {
+        if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
+          this.setState({ show: false });
         }
+      }
+      if (inspectFill) {
+        if (event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
+          this.setState({ showFill: false, date: false });
+        }
+      }
+    });
+    this.getCurrentDate();
+  }
+  componentWillReceiveProps(nextProps) {
+    if (nextProps.fillActive.name != this.props.fillActive.name) {
+      this.setState({ num: 0 })
     }
-    changeShowFill(){
-      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);
-        this.setState({dateTime:date,date:false})
-    }
-    handleSearchShow(e) {
-        let tmpShow = this.state.show;
-        this.setState({ show: !tmpShow })
-        // e.stopPropagation();
-    }
-    handleFillShow(e,idx) {
-        let tmpShow = this.state.showFill;
-        let baseList = store.getState().inspect.fillActive;
-        this.setState({
-            showFill: !tmpShow, 
-            currentIdx:idx,
-            currentData:baseList,
-            dateTime:baseList.time?baseList.time:this.getCurrentDate()
-        })
-        e.stopPropagation();
-    }
-    handleShowDate(){
-        this.setState({
-            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;
+  }
+  changeShowFill() {
+    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);
+    this.setState({ dateTime: date, date: false })
+  }
+  handleSearchShow(e) {
+    let tmpShow = this.state.show;
+    this.setState({ show: !tmpShow })
+    // e.stopPropagation();
+  }
+  handleFillShow(e, idx) {
+    let tmpShow = this.state.showFill;
+    let baseList = store.getState().inspect.fillActive;
+    this.setState({
+      showFill: !tmpShow,
+      currentIdx: idx,
+      currentData: baseList,
+      dateTime: baseList.time ? baseList.time : this.getCurrentDate()
+    })
+    e.stopPropagation();
+  }
+  handleShowDate() {
+    this.setState({
+      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;
+    if (nums == 0) {
+      fillActive = this.props.fillActive;
+    } else {
+      fillActive = this.state.currentData;
     }
-    changeActivePart(idx,val,clear){
-        let nums = this.state.num;
-        let fillActive;
-        if(nums == 0){
-            fillActive = this.props.fillActive;
-        }else{
-            fillActive = this.state.currentData;
+    ++nums;
+    this.setState({ num: nums });
+    let tempArr = deepClone(fillActive);
+
+    if (clear) {    //点击清空按钮,至清初输入的数字
+      for (let i = 0; i < tempArr.details.length; i++) {
+        tempArr.details[i].value = ''
+        tempArr.show = false;
+      }
+      tempArr.time = this.getCurrentDate();
+      this.setState({ currentData: tempArr })
+      return;
+    } else {
+      let tempNumPlus = 0;
+      for (let i = 0; i < tempArr.details.length; i++) {
+        if (i == idx) {
+          tempArr.details[i].value = val
         }
-        ++nums;
-        this.setState({num:nums});
-        let tempArr = deepClone(fillActive);
-        
-        if(clear){    //点击清空按钮,至清初输入的数字
-          for (let i = 0; i < tempArr.details.length; i++) {
-            tempArr.details[i].value = ''
+        if (tempArr.details[i].value != undefined && tempArr.details[i].value != '') {
+          tempArr.show = true;
+        } else {
+          ++tempNumPlus;
+          if (tempNumPlus == tempArr.details.length) {
             tempArr.show = false;
           }
-          tempArr.time = this.getCurrentDate();
-          this.setState({currentData:tempArr})
-          return;
-        }else{
-          let tempNumPlus = 0;
-          for (let i = 0; i < tempArr.details.length; i++) {
-              if (i == idx) {
-                  tempArr.details[i].value = val
-              }
-              if(tempArr.details[i].value != undefined && tempArr.details[i].value != ''){
-                  tempArr.show = true;
-              }else{
-                  ++tempNumPlus;
-                  if(tempNumPlus == tempArr.details.length){
-                      tempArr.show = false;
-                  }
-              }
-          }
-          tempArr.time = this.state.dateTime;
-          this.setState({currentData:tempArr})
         }
+      }
+      tempArr.time = this.state.dateTime;
+      this.setState({ currentData: tempArr })
     }
-    getItemList(){        //填写单展示
-        let number = this.state.num;
-        let fillActive;
-        if(number == 0){
-            fillActive = this.props.fillActive;
-        }else{
-            fillActive = this.state.currentData;
-        }
-        return <ul className={styles.searchLis}>
-            {
-                fillActive && fillActive.details && fillActive.details.map((item,idx) => {
-                    if(item.controlType == 1){
-                        return (
-                            <li className={`${styles.itemPart} ${fillActive.details.length>1?'':styles.itemPartOne}`}>
-                                <span className={styles.itemPartL}>{item.name}</span>
-                                <select className={styles.itemPartR} onChange={(e)=>{
-                                        if(e.target.value == '请选择') {
-                                            this.changeActivePart(idx,'')
-                                            return;
-                                        }
-                                        this.changeActivePart(idx,e.target.value);
-                                    }}
-                                >
-                                    <option value="请选择">请选择</option>
-                                    {
-                                        (item.questionDetailList).map((val)=>{
-                                            return <option value={val.name} 
-                                                selected={val.name == item.value?true:false}
-                                            >{val.name}</option>
-                                        })
-                                    }
-                                </select>
-                            </li>
-                        )
-                    }else if(item.controlType == 6){
-                        return (
-                            <li className={`${styles.itemPart} ${fillActive.details.length>1?'':styles.itemPartOne}`}>
-                                <span className={styles.itemPartL} title={item.name}>{item.name}</span>
-                                <span className={styles.itemPartT}>
-                                    <input type="text" 
-                                        placeholder="(填写)"
-                                        value={item.value}
-                                        onKeyUp={(e)=>{this.changeActivePart(idx,e.target.value.trim())}} 
-                                    />
-                                    <p className={styles.unit}>{item.labelSuffix}</p>
-                                </span>
-                            </li>
-                        )
-                    }
-                })
-            }
-        </ul>
+  }
+  getItemList() {        //填写单展示
+    let number = this.state.num;
+    let fillActive;
+    if (number == 0) {
+      fillActive = this.props.fillActive;
+    } else {
+      fillActive = this.state.currentData;
     }
-    getSearchList(list){      //搜索列表
-        const {handleSign} = this.props;
-        return <ul>
-        {
-            list && list.map((item,idx) => {
-                return <li key={idx}
-                    className={styles.searchLi}
-                    title={item.name == item.retrievalName?item.name:item.name+'('+item.retrievalName+')'}
-                    onClick={() => {
-                        handleSign(item.questionId,idx);
-                        this.setState({ show: false })
-                    }}
+    return <ul className={styles.searchLis}>
+      {
+        fillActive && fillActive.details && fillActive.details.map((item, idx) => {
+          if (item.controlType == 1) {
+            return (
+              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
+                <span className={styles.itemPartL}>{item.name}</span>
+                <select className={styles.itemPartR} onChange={(e) => {
+                  if (e.target.value == '请选择') {
+                    this.changeActivePart(idx, '')
+                    return;
+                  }
+                  this.changeActivePart(idx, e.target.value);
+                }}
                 >
-                    {item.name}{item.name == item.retrievalName?null:'('+item.retrievalName+')'}
-                </li>
-            })
-        }
+                  <option value="请选择">请选择</option>
+                  {
+                    (item.questionDetailList).map((val) => {
+                      return <option value={val.name}
+                        selected={val.name == item.value ? true : false}
+                      >{val.name}</option>
+                    })
+                  }
+                </select>
+              </li>
+            )
+          } else if (item.controlType == 6) {
+            return (
+              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
+                <span className={styles.itemPartL} title={item.name}>{item.name}</span>
+                <span className={styles.itemPartT}>
+                  <input type="text"
+                    placeholder="(填写)"
+                    value={item.value}
+                    onKeyUp={(e) => { this.changeActivePart(idx, e.target.value.trim()) }}
+                  />
+                  <p className={styles.unit}>{item.labelSuffix}</p>
+                </span>
+              </li>
+            )
+          }
+        })
+      }
     </ul>
-    }
-    showDetails(val){
-        if(val.questionDetailList.length > 0){
-            return val.questionDetailList.map((item)=>{
-                if(val.value == item.name){
-                    return <td style={{width:'20%'}} className={item.abnormal != '0' ?"red":'' }>{val.value}</td>
-                }
-            })
-        }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>
+  }
+  getSearchList(list) {//搜索列表
+    const { handleSign } = this.props;
+    return <ul className={styles.searchLiUl}>
+      {
+        list && list.map((item, idx) => {
+          return <li key={idx}
+            className={styles.searchLi}
+            title={item.name == item.retrievalName ? item.name : item.name + '(' + item.retrievalName + ')'}
+            onClick={() => {
+              handleSign(item.questionId, idx,'search');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}{item.name == item.retrievalName ? null : '(' + item.retrievalName + ')'}
+          </li>
+        })
+      }
+    </ul>
+  }
+  getCommonList(){//常用列表
+    const { handleSign,inspectList } = this.props;
+    return <ul className={styles.searchLiUl}>
+      {
+        inspectList && inspectList.map((item, idx) => {
+          return <li key={idx}
+            className={styles.searchLi}
+            title={item.name}
+            onClick={() => {
+              handleSign(item.questionId, idx,'common');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}
+          </li>
+        })
+      }
+    </ul>
+  }
+  showDetails(val) {
+    if (val.questionDetailList.length > 0) {
+      return val.questionDetailList.map((item) => {
+        if (val.value == item.name) {
+          return <td style={{ width: '20%' }} className={item.abnormal != '0' ? "red" : ''}>{val.value}</td>
         }
+      })
+    } 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>
     }
-    render() {
-        const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel,handlePush } = this.props;
-        const {toastText,visible,tmpId,tmpIdx} = this.state;
-        return (
-            <div className={styles.wrapper}>
-                <div className={styles.check}>
+  }
+  render() {
+    const { getInfomation,handleChangeValue, list, labelList, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const { toastText, visible, tmpId, tmpIdx } = this.state;
+    return (
+      <div className={styles.wrapper}>
+        <div className={styles.check}>
+          {
+            getExcelDataList.length > 0 && getExcelDataList.map((items, id) => {
+              return <div style={{ marginTop: '10px' }}>
+                {
+                  items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
+                    <img className={styles.close} src={close} alt="关闭导入excel数据" onClick={() => { this.handleDelClick(2, id) }} />
                     {
-                        getExcelDataList.length > 0 && getExcelDataList.map((items,id)=>{
-                            return <div style={{marginTop:'10px'}}>
-                                {
-                                    items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
-                                    <img className={styles.close} src={close} alt="关闭导入excel数据" onClick={()=>{this.handleDelClick(2,id)}}/>
-                                    {
-                                        items.lisExcelRes.map((item,idx)=>{
-                                            return <SlideExcel
-                                              items={items}
-                                              item={item}
-                                              idx={idx}
-                                              dateTime={this.state.dateTime}
-                                            ></SlideExcel>
-                                        })
-                                    }
-                                </ul>:null
-                                }
-                            </div>
-                        })
+                      items.lisExcelRes.map((item, idx) => {
+                        return <SlideExcel
+                          items={items}
+                          item={item}
+                          idx={idx}
+                          dateTime={this.state.dateTime}
+                          getInfomation={getInfomation}
+                        ></SlideExcel>
+                      })
                     }
-                    <ul className={styles.labelWrap} >
-                        {
-                            labelList && labelList.map((item,idx) => {
-                                return <SlideSelect
-                                  item={item}
-                                  idx={idx}
-                                  showFill={this.state.showFill}
-                                  handlePush={handlePush}
-                                  fillActive={fillActive}
-                                  handleLabelSub={handleLabelSub}
-                                  date={this.state.date}
-                                  dateTime={this.state.dateTime}
-                                  currentIdx={this.state.currentIdx}
-                                  currentData={this.state.currentData}
-                                  showDetails={this.showDetails}
-                                  handleShowDate={this.handleShowDate}
-                                  handleChangeDate={this.handleChangeDate}
-                                  changeShowFill={this.changeShowFill}
-                                  handleFillShow={this.handleFillShow}
-                                  getItemList={this.getItemList}
-                                  changeActivePart={this.changeActivePart}
-                                  handleDelClick={this.handleDelClick}
-                                  handleConfirm={handleConfirm}
-                                ></SlideSelect>
-                            })
-                        }
-                    </ul>
-                </div>
-                <div style={{position:"relative",clear:"both"}}>
-                    <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap"/>
-                  {this.state.show?<SearchOption handleChangeValue={handleChangeValue} visible={true}>
-                        {this.getSearchList(list)}
-                    </SearchOption>:''}
+                  </ul> : null
+                }
+              </div>
+            })
+          }
+          <ul className={styles.labelWrap} >
+            {
+              labelList && labelList.map((item, idx) => {
+                return <SlideSelect
+                  item={item}
+                  idx={idx}
+                  showFill={this.state.showFill}
+                  handlePush={handlePush}
+                  fillActive={fillActive}
+                  handleLabelSub={handleLabelSub}
+                  date={this.state.date}
+                  dateTime={this.state.dateTime}
+                  currentIdx={this.state.currentIdx}
+                  currentData={this.state.currentData}
+                  showDetails={this.showDetails}
+                  handleShowDate={this.handleShowDate}
+                  handleChangeDate={this.handleChangeDate}
+                  changeShowFill={this.changeShowFill}
+                  handleFillShow={this.handleFillShow}
+                  getItemList={this.getItemList}
+                  changeActivePart={this.changeActivePart}
+                  handleDelClick={this.handleDelClick}
+                  handleConfirm={handleConfirm}
+                  getInfomation={getInfomation}
+                ></SlideSelect>
+              })
+            }
+          </ul>
+        </div>
+        <div style={{ position: "relative", clear: "both" }}>
+          <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
+          {this.state.show ? <SearchOption handleChangeValue={handleChangeValue} visible={true}>
+            {list && list.length>0?this.getSearchList(list):''}
+            {
+              list && list.length>0?'':<div>
+                  <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用化验项</p>
+                  {
+                    this.getCommonList()
+                  }
                 </div>
-                <ConfirmModal 
-                    visible={visible}
-                    confirm={this.delConfirm}
-                    close={this.handleCancel}
-                    cancel={this.handleCancel}
-                    okText="删除"
-                    cancelText='取消'
-                    // okBorderColor={'#3B9ED0'}
-                    // okColor={'#fff'}
-                    // oKBg={'#3B9ED0'}
-                >
-                    <p className={styles['center']}>{toastText}</p>
-                </ConfirmModal>
-            </div>
-        )
-    }
+            }
+          </SearchOption> : ''}
+        </div>
+        <ConfirmModal
+          visible={visible}
+          confirm={this.delConfirm}
+          close={this.handleCancel}
+          cancel={this.handleCancel}
+          okText="删除"
+          cancelText='取消'
+          okBorderColor={'#3B9ED0'}
+          okColor={'#fff'}
+          oKBg={'#3B9ED0'}
+        >
+          <p className={styles['center']}>{toastText}</p>
+        </ConfirmModal>
+      </div>
+    )
+  }
 }
 
 export default Inspect;

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

@@ -88,6 +88,11 @@
 .fillWrap {
     display: none;
 }
+.searchLiUl {
+  overflow-y: auto;
+  max-height: 225px;
+  min-height: 80px;
+}
 .searchLi {
     height: 36px;
     line-height: 36px;

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

@@ -2,6 +2,7 @@ import React,{Component} from 'react';
 import style from './index.less';
 import {ItemBox} from '@commonComp';
 import Textarea from './Textarea';
+import FollowUp from '@components/Treat/FollowUp'
 
 class Advice extends Component{
   constructor(props){
@@ -65,10 +66,7 @@ class Advice extends Component{
 
   render(){
     const {advice} = this.props.pushMessage;
-    const {isRead} = this.props
-
-    
-
+    const {isRead, isFirstMainDiag, followUp, hasFollowUp, setFollowUp} = this.props
     let scheme = advice.scheme && advice.scheme.map((item, index) => {
       return <p>{item.treatment.map((it,ii) =>{
         return(it.treatmentStr && it.treatmentStr.length > 0 ? 
@@ -95,6 +93,7 @@ class Advice extends Component{
             {/* {advice.commontreatment && <div className={style['treat-input']}  onInput={this.handleComTreatInput}  contentEditable={true} style = {{outline: 'none'}}></div>} */}
             {<Textarea value={advice.commontreatment} isRead={isRead} handleChangeAssistValue={this.handleComTreatInput} ></Textarea>}
         </div>}
+        {!isFirstMainDiag && <FollowUp  noTitle="true"   setFollowUp={setFollowUp} followUp = {followUp} isRead={isRead}></FollowUp>}
         {advice.scheme && advice.scheme.length > 0 &&<div contentEditable='false' className={style['scheme']}>
           {advice.scheme && advice.scheme.length > 0  && <h1>治疗方案</h1>}
           {scheme}

+ 89 - 0
src/components/AssessResult/AssessHis/index.jsx

@@ -0,0 +1,89 @@
+import React, { Component } from "react";
+import style from "./index.less";
+import { Radio} from '@commonComp';
+import arrow from '@common/images/icon_tri_blue.png';
+import loadingIcon from '@common/images/loading.gif';
+import ChooseItem from "../ChooseItem";
+import ScaleItem from "../ScaleItem";
+import ChartItem from "../ChartItem";
+
+class AssessResultHis extends Component {
+  constructor(props) {
+    super(props);
+    this.state={
+      chartTimeTypes:{},      //图表模块
+    };
+    this.showAssessFn = this.showAssessFn.bind(this);
+    this.getAssessContent = this.getAssessContent.bind(this);
+  }
+  handleChartChange(i,selects){
+    const {chartTimeTypes} = this.state;
+    this.setState({
+      chartTimeTypes:Object.assign(chartTimeTypes,{[i]:selects})
+    });
+  }
+  showAssessFn(){
+    //获取历史评估数据
+    this.props.getAssessHis(this.props.inquiryId);
+  }
+  handoutTypes(obj,item,i){
+    const {wholeAssess,wholeIndexs,chooseSelecteds} =obj;
+    const {getIndexData,inquiryDate,indexData,inquiryId,timeTypes} = this.props;
+    const {chartTimeTypes} = this.state;
+    const name = item.regionName+":";
+    const list = item.data&&item.data.rows;
+    switch (+item.regionType){
+      case 0:     //数据来源与右侧手动添加
+        return <ScaleItem title={name} data={wholeAssess} indexs={wholeIndexs} disabled={true}></ScaleItem>;
+      case 1:     //数据来源于大数据
+        return <ChooseItem title={name} data={list} selecteds={chooseSelecteds&&chooseSelecteds[i]} disabled={true}></ChooseItem>;
+      case 10:    //数据来源于后台
+        return <ChartItem title={name}
+                          data={indexData||{}}
+                          timeTypes={JSON.stringify(chartTimeTypes||{})=='{}'?timeTypes&&timeTypes[i]:chartTimeTypes[i]}
+                          initFn={getIndexData}
+                          endDate={inquiryDate}
+                          pindex={i}
+                          handleChange={this.handleChartChange.bind(this,i)}></ChartItem>;
+      default:
+        return '';
+    }
+  }
+  getAssessContent(){
+    const { list,inquiryId } = this.props;
+    const obj = list&&list[inquiryId];
+    const data = obj&&obj.data;
+    if(data&&data.length>0){
+      return data.map((it,i)=>{
+        return this.handoutTypes(obj,it,i);
+      });
+    }else{
+      return data===null||(data&&data.length==0)?<p className={style['no-data']}>没有历史评估记录!</p>:'';
+    }
+  }
+  /*componentDidMount(){
+    const indexTimeTypes = JSON.parse(JSON.stringify(this.props.indexTimeTypes));
+    console.log(indexTimeTypes)
+    this.setState({
+      chartTimeTypes:indexTimeTypes
+    });
+  }*/
+  render() {
+    const { list,inquiryId,loading } = this.props;
+    const data = list&&list[inquiryId]&&list[inquiryId].data;
+    return <div className={style['assess-cont']}>
+      <div className={style['assess-result']}>
+        <p className={style['enter']}>管理和评估结果:<a onClick={this.showAssessFn}>查看结果<img src={arrow} /></a></p>
+      </div>
+      <div className={style['assess-box']}>
+        {loading?<p className={style['loading']}><img src={loadingIcon} alt='loading...'/></p>:''}
+        {/*{data?data.map((it,i)=>{
+          return this.handoutTypes(it,i);
+        }):data===null?<p className={style['no-data']}>没有历史评估记录!</p>:''}*/}
+        {this.getAssessContent()}
+      </div>
+    </div>;
+  }
+}
+
+export default AssessResultHis;

+ 32 - 0
src/components/AssessResult/AssessHis/index.less

@@ -0,0 +1,32 @@
+@import "~@less/variables.less";
+.assess-result{
+  border-top: 1px #e2e4e6 solid;
+  margin-top:50px;
+  .enter{
+    margin-top: 15px;
+  }
+  a{
+    color: @blue;
+    cursor: pointer;
+    img{
+      margin-left: 4px;
+    }
+  }
+}
+.assess-box{
+  margin: 20px 0 0 -15px;
+}
+.no-data{
+  text-align: center;
+  font-size: 20px;
+  color: @placeholder-color;
+  margin-top: 26px;
+  font-weight: bold;
+}
+.loading{
+  margin-top: 20px;
+  text-align: center;
+  img{
+    width: 30px;
+  }
+}

+ 239 - 0
src/components/AssessResult/ChartItem/index.jsx

@@ -0,0 +1,239 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import { Radio} from '@commonComp';
+import echarts from 'echarts';
+import config from "@config";
+/**
+ * 来源于后台数据
+ * 图表类型
+ *
+ *
+ * **/
+class ChartItem extends Component {
+  constructor(props) {
+    super(props);
+    this.getContainers = this.getContainers.bind(this);
+    this.rangChange = this.rangChange.bind(this);
+    this.getXAxisArr = this.getXAxisArr.bind(this);
+  }
+  getXAxisArr(type){
+    const endDate = this.props.endDate;
+    let now = endDate?new Date(endDate).getTime():new Date().getTime();
+    let arr = [],temp=0;
+    //近一周
+    switch(type){
+      case 'week':
+        for(let i=0;i<7;i++){
+          temp=i*1000*60*60*24;
+          arr.unshift(...this.getDayHours(now-temp,true));
+        }
+        break;
+      case 'month':
+        for(let i=0;i<30;i++){
+          temp=i*1000*60*60*24;
+          arr.unshift(this.getDayHours(now-temp));
+        }
+        break;
+      case 'sixMonth':
+        for(let i=0;i<180;i++){
+          temp=i*1000*60*60*24;
+          arr.unshift(this.getDayHours(now-temp));
+        }
+        break;
+      case 'year':
+        for(let i=0;i<365;i++){
+          temp=i*1000*60*60*24;
+          arr.unshift(this.getDayHours(now-temp));
+        }
+        break;
+      default:
+    }
+
+    return arr;
+  }
+  getDayHours(time,isHour){
+    const year = new Date(time).getFullYear();
+    const month = new Date(time).getMonth()+1;
+    const date = new Date(time).getDate();
+    const hour = new Date(time).getHours();
+    let arr=[],temp='';
+    const str= year+'-'+(month<10?'0'+month:month)+'-'+(date<10?'0'+date:date);
+    if(isHour){
+      for(let i=0;i<24;i++){
+        temp = hour-i>-1?hour-i:hour-i+24;
+        arr.unshift(str+" "+(temp<10?'0'+temp:temp));
+      }
+      return arr;
+    }else{
+      return str;
+    }
+  }
+  rangChange(type,i){
+    const {initFn,handleChange,data,pindex} = this.props;
+    const times = this.getXAxisArr(type);
+    const startTime=times[0];
+    const endTime=times[times.length-1];
+    const range = [startTime,endTime];
+    const temp=this.props.timeTypes;
+    if(!data[startTime+endTime]){
+      initFn&&initFn({range,rangeType:type,index:i,pindex,getNew:false});
+    }
+    handleChange&&handleChange(Object.assign(temp,{[i]:type}));
+  }
+  getContainers(){
+    const timeTypes = this.props.timeTypes;
+    const range = this.getXAxisArr(config.chartDismen);
+    const obj = this.props.data[range[0]+range[range.length-1]];
+    const {endDate} = this.props;
+    let arr = [];
+    for(let i in obj){
+      arr.push(<Chart data={obj[i]} endDate={endDate} type={timeTypes&&timeTypes[i]} index={i} getXAxisArr={this.getXAxisArr} handleRangeChange={this.rangChange}/>)
+    }
+    return arr;
+  }
+  componentDidMount(){
+    const {initFn,pindex} = 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});
+  }
+  render() {
+    const {title} = this.props;
+    return <div className={style['assess-item']}>
+      <h2>{title}</h2>
+      <div className={style['item-content']}>
+        {this.getContainers()}
+      </div>
+    </div>;
+  }
+}
+
+class Chart extends Component{
+  constructor(props) {
+    super(props);
+    this.state={
+      chartObj:null,
+      //timeRange:'year',
+      week:props.getXAxisArr('week'),
+      month:props.getXAxisArr('month'),
+      sixMonth:props.getXAxisArr('sixMonth'),
+      year:props.getXAxisArr('year')
+    };
+    this.drawChart = this.drawChart.bind(this);
+    this.timeSwitch = this.timeSwitch.bind(this);
+  }
+  drawChart(){
+    const {index,data,getXAxisArr,type,endDate} = this.props;
+    const xAxis = getXAxisArr(type);
+    const id = endDate?'chart'+endDate+index:'chart'+index;
+    let series = [],names=[],inx=-1;
+    let myChart = echarts.init(document.getElementById(id));
+
+    const interval = {
+      week:24,
+      month:4,
+      sixMonth:9,
+      year:60
+    };
+    data&&data.map((it)=>{
+      let values=new Array();
+      let name='';
+      it&&it.creatTime.map((x,i)=>{
+        inx=xAxis.findIndex((a)=>{
+          name=type=='week'?x.substr(0,13):x.substr(0,10);
+          return a==name;
+        });     //日期对应横坐标的位置
+        if(inx!=-1){
+          values[inx] = it.indexValue[i];       //值对应横坐标的位置
+        }
+      });
+      names.push(it.itemName);
+      series.push({
+        name: it.itemName,
+        type: 'line',
+        data: values,
+        showAllSymbol:true
+      });
+    });
+    // 指定图表的配置项和数据
+    var option = {
+      tooltip: {
+        trigger: 'axis'
+      },
+      legend: {
+        data:names,
+        bottom:210
+      },
+      grid:{
+        top:80
+      },
+      xAxis: {
+        type: 'category',
+        boundaryGap: false,
+        data: xAxis,
+        splitLine:{
+          show:false
+        },
+        axisPointer:{
+          //show:false
+        },
+        axisTick:{
+          show:false,
+          interval:interval[type]
+        },
+        axisLabel:{
+          show:true,
+          showMaxLabel:true,
+          interval:interval[type],
+          rotate:65,
+          fontSize:10
+        }
+      },
+      yAxis: {
+        type: 'value',
+        axisTick:{
+          show:false
+        },
+        axisLabel:{
+          show:true,
+          showMaxLabel:true
+        }
+      },
+      series: series
+    };
+
+    // 使用刚指定的配置项和数据显示图表。
+    myChart.setOption(option);
+  }
+  timeSwitch(type){
+    const {handleRangeChange,index} = this.props;
+
+    handleRangeChange&&handleRangeChange(type,index);
+
+    const that=this;
+    setTimeout(()=>{
+      that.drawChart();
+    },300);
+
+  }
+  componentDidMount(){
+    this.drawChart();
+  }
+  render(){
+    const {type,index,endDate} = this.props;
+    return <div className={style['cont']}>
+              <div className={style['time-range']}>
+                <span className={type=='year'?style['range']+" "+style['on']:style['range']} onClick={()=>this.timeSwitch("year")}>近一年</span>
+                <span className={type=='sixMonth'?style['range']+" "+style['on']:style['range']} onClick={()=>this.timeSwitch("sixMonth")}>近六个月</span>
+                <span className={type=='month'?style['range']+" "+style['on']:style['range']} onClick={()=>this.timeSwitch("month")}>近一个月</span>
+                <span className={type=='week'?style['range']+" "+style['on']:style['range']} onClick={()=>this.timeSwitch("week")}>近一周</span>
+              </div>
+              <div className={style["chart-box"]} id={endDate?'chart'+endDate+index:'chart'+index}></div>
+            </div>;
+  }
+}
+
+export default ChartItem;

+ 76 - 0
src/components/AssessResult/ChooseItem/index.jsx

@@ -0,0 +1,76 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import { Radio,CheckBtn } from '@commonComp';
+/****
+ * 大数据推送出的类型
+ * 要素:名称、选项、推荐选择
+ *
+ * ****/
+class ChooseItem extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      saveData:null,
+    };
+  }
+
+  handleRadio(name,value){
+    const {handleChange,selecteds} = this.props;
+    handleChange&&handleChange(Object.assign({},selecteds,{[name]:value}));
+  }
+  handleCheckbox(name,value){
+    const {handleChange,selecteds} = this.props;
+    selecteds[name]?selecteds[name]:selecteds[name]=[];
+    const index = selecteds[name].findIndex((i)=>i==value);
+    if(index!=-1){
+      selecteds[name].splice(index,1);
+    }else{
+      selecteds[name].push(value);
+    }
+    handleChange&&handleChange(selecteds);
+  }
+  render() {
+    const {title,data,selecteds,disabled} = this.props;
+    return <div className={style['assess-item']}>
+        <h2>{title}</h2>
+        <div className={style['item-content']}>
+          <ul>
+            {data&&data.map((it)=>{
+              return <li>
+                <span>{it.name}:</span>
+                <div className={style['row']}>
+                  {it.details&&it.details.map((i)=> {
+                    if(it.controltype ==0){
+                      return <div className={style['choose-item']}>
+                                <Radio label={i.detailName}
+                                       value={i.detailName}
+                                       disabled={disabled}
+                                       isSelect={selecteds&&selecteds[it.name]==i.detailName}
+                                       handleClick={this.handleRadio.bind(this,it.name,i.detailName)}></Radio>
+                                {i.state?<i>(智能推荐)</i>:''}
+                              </div>;
+                    }else{
+                      return <div className={style['choose-item']}>
+                                <CheckBtn id={i.detailName}
+                                          value={i.detailName}
+                                          label={i.detailName}
+                                          disabled={disabled}
+                                          isSelect={selecteds[it.name]&&selecteds[it.name].includes(i.detailName)}
+                                          handleClick={this.handleCheckbox.bind(this,it.name,i.detailName)}/>
+                                {i.state?<i>(智能推荐)</i>:''}
+                              </div>;
+                    }
+                  })}
+                </div>
+                {/*<div className={style["recommend"]}>
+                  推荐选择:正常
+                </div>*/}
+              </li>
+            })}
+          </ul>
+        </div>
+      </div>;
+  }
+}
+
+export default ChooseItem;

+ 259 - 0
src/components/AssessResult/ScaleItem/index.jsx

@@ -0,0 +1,259 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import deleteIcon from '@common/images/delete.png';
+import tableIcon from '@common/images/table.png';
+import printIcon from '@common/images/team.png';
+import allTableIcon from '@common/images/all-table.png';
+import level1 from "@common/images/级别1.png";
+import checkIcon from '@common/images/check.png';
+import {ComplexModal,MiniToast,Radio} from '@commonComp';
+import ScaleTable from '@containers/ScaleTable';
+import $ from "jquery";
+/**
+ * 来源于页面选择
+ *
+ * **/
+class ScaleItem extends Component {
+  constructor(props) {
+    super(props);
+    this.$area = React.createRef();
+    this.state = {
+      scaleId:'',
+      scaleName:'',
+      parentId:'',
+      showScale:false,
+      optionId:'',
+      possible:props.possible||{},
+      radioVal:props.radioVal||{},
+      formulaId:''
+    };
+    this.getItems = this.getItems.bind(this);
+    this.getDetailItems = this.getDetailItems.bind(this);
+    this.showScaleFn = this.showScaleFn.bind(this);
+    this.closeScaleFn = this.closeScaleFn.bind(this);
+    this.showOption = this.showOption.bind(this);
+    this.closeOption = this.closeOption.bind(this);
+    this.closeFormula = this.closeFormula.bind(this);
+    this.onPrint = this.onPrint.bind(this);
+  }
+  showOption(id){
+    this.setState({
+      optionId:id
+    })
+  }
+  closeOption(){
+    this.setState({
+      optionId:null
+    })
+  }
+  confirmOption(parent,pIndex){
+    const {radioVal,possible} = this.state;
+    this.setState({
+      possible:Object.assign({},possible,radioVal),
+      radioVal:Object.assign({},possible,radioVal),//不设置radioVal只有最近一次选中的值
+      optionId:null
+    })
+  }
+  handleRadio(item,parent,pIndex){
+    let {radioVal} = this.props;
+    this.setState({
+      radioVal:Object.assign({},radioVal,{[pIndex]:item.detailName})
+    })
+  }
+  handleForRadio(){
+
+  }
+  showFormula(id){
+    this.setState({
+      formulaId:id
+    })
+  }
+  confirmFormula(){
+
+  }
+  closeFormula(){
+    this.setState({
+      formulaId:null
+    })
+  }
+  getDetailItems(item,i){
+    let arr = [],temp='';
+    const {indexs} = this.props;
+    const {optionId,radioVal,possible,formulaId} = this.state;
+    item.details.map((it,j)=>{
+      if(indexs[i]&&indexs[i].includes(j)){
+        if(it.type==1){     //量表
+          temp =<span className={style['scale']} onClick={()=>this.showScaleFn(it.content.name,it.content.id,item.id)}>【{it.content.name}】</span>;
+        }else if(it.type==2){      //计算公式
+          temp = <div className={style['results']}>
+                    <span>计算公式:</span>
+                    <span className={style["blue"]} onClick={this.showFormula.bind(this,item.id)}>请选择</span>
+                    <img src={level1} />
+                    <MiniToast title={it.content.name}
+                               icon={allTableIcon}
+                               show={formulaId&&formulaId==item.id?true:false}
+                               close={this.closeFormula}
+                               confirm={this.confirmFormula.bind(this,item,i)}
+                               footer="true">
+                      <table>
+                        {it.content.details.map((item,idd)=>{
+                          if(item.controlType==0){//单选
+                            return <tr>
+                              <td>
+                                <span>{'请选择'+item.name+':'}</span>
+                              </td>
+                              <td>
+                                {item.details.map((ii,ind)=>{
+                                  return <div className={style["chooseItem"]}>
+                                    <Radio label={ii.detailName}
+                                           isSelect={radioVal[i]==ii.detailName}
+                                           handleClick={this.handleForRadio.bind(this,ii,item,i)}>
+                                    </Radio>
+                                  </div>
+                                })}
+                              </td>
+                            </tr>
+                          }else if(item.controlType==1){//多选
+
+                          }else if(item.controlType==2){//输入框
+                            return <tr>
+                              <td>
+                                <span>{'请输入'+item.name+':'}</span>
+                              </td>
+                              <td>
+                                <input type="text" placeholder="请输入"/>
+                              </td>
+
+                            </tr>
+                          }else if(item.controlType==3){//下拉
+                            return <tr>
+                              <td>
+                                <span>{'请选择'+item.name+':'}</span>
+                              </td>
+                              <td>
+                                {item.details.map((ii,ind)=>{
+                                  return <div className={style["chooseItem"]}>
+                                    <Radio label={ii.detailName}
+                                           isSelect={radioVal[i]==ii.detailName}
+                                           handleClick={this.handleForRadio.bind(this,ii,item,i)}>
+                                    </Radio>
+                                  </div>
+                                })}
+                              </td>
+
+                            </tr>
+                          }
+                        })}
+                      </table>
+                      <div className={style["forMulBtn"]}>计算</div>
+                    </MiniToast>
+                </div>
+        }else if(it.type==3){
+          temp = <div className={style['results']}>
+                    <span>可能结果:</span>
+                    <span onClick={this.showOption.bind(this,item.id)} className={style["blue"]}>{possible[i]?possible[i]:'请选择'}</span>
+                    <img src={level1} />
+                    <MiniToast title='结果选择'
+                         icon={checkIcon}
+                         show={optionId&&optionId==item.id?true:false}
+                         close={this.closeOption}
+                         confirm={this.confirmOption.bind(this,item,i)}
+                         footer="true">
+                        <div className={style["infoOption"]}>
+                          <span>是否贫血:</span>
+                          {it.content.details&&it.content.details.map((lis,ind)=>{
+                            return <div className={style["chooseItem"]}>
+                              <Radio label={lis.detailName}
+                                     isSelect={radioVal[i]==lis.detailName}
+                                     handleClick={this.handleRadio.bind(this,lis,item,i)}>
+                              </Radio>
+                            </div>
+                          })}
+                        </div>
+                    </MiniToast>
+                  </div>;
+        }
+        arr.push(<li>
+          <span>{item.name}:</span>
+          <div className={style['row']}>{temp}</div>
+          <div className={style["recommend"]} onClick={()=>this.props.handleRemove(i,j)}>
+            <img src={deleteIcon} />
+          </div>
+        </li>);
+      }
+    });
+    return arr;
+  }
+  getItems(){
+    const { data } = this.props;
+    return data&&data.map((it,i)=>{
+      return this.getDetailItems(it,i);
+    });
+  }
+  showScaleFn(name,id,pid){
+    const {getScaleData,scaleInfo} = this.props;
+    this.setState({
+      scaleId:id,
+      scaleName:name,
+      parentId:pid,
+      showScale:true
+    });
+    if(!scaleInfo[id]){
+      getScaleData&&getScaleData({id,name});
+    }
+  }
+  closeScaleFn(){
+    this.setState({
+      showScale:false
+    })
+  }
+  onPrint() {
+    let dom = this.state.showTable?$("#printcontent"):$("#AssistResult");
+    dom.jqprint({
+      debug: false,
+      importCSS: true,
+      printContainer: true,
+      operaSupport: false,
+    });
+  }
+  componentDidMount(){
+    if(this.props.text){
+      this.$area.current.value = this.props.text;
+    }
+  }
+  render() {
+    const {title,handleInp,scaleInfo,disabled} = this.props;
+    const {scaleName,scaleId,parentId,showScale} = this.state;
+    const footer = <div className={style['footer']}>
+      <span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
+      <span className={style['okBtn']} onClick={()=>{}}>确定</span>
+    </div>;
+    return <div className={style['assess-item']}>
+      <h2>{title}</h2>
+      <div className={style['item-content']}>
+        <ul>
+          {
+            this.getItems()
+          }
+          <li>
+            <textarea className={style['edit-row']}
+                      ref={this.$area}
+                      name="supplement"
+                      rows="6"
+                      placeholder='评估描述' onBlur={disabled?null:(e)=>handleInp(e.target.value)} disabled={disabled}></textarea>
+          </li>
+        </ul>
+      </div>
+      {showScale?<ComplexModal onclose={this.closeScaleFn} footer={footer}
+                               title={scaleName}
+                               icon={tableIcon}
+                               top={20}
+                               bottom={20}
+                               width={820}>
+        <ScaleTable data={scaleInfo[scaleId]} title={scaleName} tableId={scaleId} parentId={parentId}></ScaleTable>
+      </ComplexModal>:''}
+    </div>;
+  }
+}
+
+export default ScaleItem;

+ 106 - 0
src/components/AssessResult/index.jsx

@@ -0,0 +1,106 @@
+import React, { Component } from "react";
+import style from "./index.less";
+import { Radio } from '@commonComp';
+import ChooseItem from "./ChooseItem";
+import ScaleItem from "./ScaleItem";
+import Information from '../Information'
+import ChartItem from "./ChartItem";
+
+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为浅复制,下下级会同源
+    this.state={
+      chooseSelecteds:chooseSelecteds,     //大数据选择模块
+      chartTimeTypes:{},      //图表模块
+      wholeAssessItems:wholeIndexs,     //整体评估模块
+      wholeAssessText:props.wholeAssessText||''     //整体评估补充说明
+    }
+    this.handleChooseChange = this.handleChooseChange.bind(this);
+    this.handleScaleDel = this.handleScaleDel.bind(this);
+    this.handleScaleText = this.handleScaleText.bind(this);
+  }
+  componentWillMount(){
+    //获取评估
+    this.props.getAssess();
+  }
+  handleScaleText(text){
+      this.setState({
+        wholeAssessText:text
+      })
+  }
+  handleScaleDel(i,j){
+    const items = Object.assign({},this.state.wholeAssessItems);
+    const inx = items[i].findIndex(x=>x==j);
+    items[i].splice(inx,1);
+    this.setState({
+      wholeAssessItems: items
+    });
+  }
+  handleChooseChange(i,selects){
+    const {chooseSelecteds} = this.state;
+    this.setState({
+      chooseSelecteds: Object.assign(chooseSelecteds,{[i]:selects})
+    });
+  }
+  handleChartChange(i,selects){
+    const {chartTimeTypes} = this.state;
+    this.setState({
+      chartTimeTypes:Object.assign(chartTimeTypes,{[i]:selects})
+    });
+  }
+  componentWillUnmount(){
+    //点确定关闭弹窗时把参数传到父组件去
+    const {handleSave,isAssessConfirm,clearChartData} = this.props;
+    clearChartData&&clearChartData();
+    isAssessConfirm&&handleSave(this.state);
+  }
+  handoutTypes(item,i){
+    const {getIndexData,indexData,timeTypes,wholeAssessData,scaleInfo,getScaleInfo,possible,radioVal} =this.props;
+    const {chooseSelecteds,wholeAssessItems,wholeAssessText,chartTimeTypes} = this.state;
+    const chartData = indexData;
+    const name = item.regionName+":";
+    const list = item.data&&item.data.rows;
+    switch (+item.regionType){
+      case 0:     //数据来源与右侧手动添加
+        return <ScaleItem title={name}
+                          data={wholeAssessData}
+                          handleRemove={this.handleScaleDel}
+                          handleInp={this.handleScaleText}
+                          text={wholeAssessText}
+                          indexs={wholeAssessItems}
+                          scaleInfo={scaleInfo}
+                          possible={possible}
+                          radioVal={radioVal}
+                          getScaleData={getScaleInfo}></ScaleItem>;
+      case 1:     //数据来源于大数据
+        return <ChooseItem title={name}
+                           data={list}
+                           handleChange={this.handleChooseChange.bind(this,i)}
+                           selecteds={chooseSelecteds[i]} ></ChooseItem>;
+      case 10:   //数据来源于后台
+        return <ChartItem title={name}
+                          data={chartData||{}}
+                          timeTypes={JSON.stringify(chartTimeTypes)=='{}'?timeTypes&&timeTypes[i]:chartTimeTypes[i]}
+                          pindex={i}
+                          initFn={getIndexData}
+                          handleChange={this.handleChartChange.bind(this,i)}></ChartItem>;
+      default:
+        return '';
+    }
+  }
+  render() {
+    const { onClose, data } = this.props;
+    return <div className={style['assess-cont']} id="AssistResult">
+      <div className={style['printShow']}>
+        <Information></Information>
+      </div>
+      {data && data.map((it, i) => {
+        return this.handoutTypes(it, i);
+      })}
+    </div>;
+  }
+}
+
+export default AssessResult;

+ 153 - 0
src/components/AssessResult/index.less

@@ -0,0 +1,153 @@
+@import "~@less/variables.less";
+.assess-cont{
+  padding: 15px;
+}
+.assess-item{
+  h2{
+    line-height: 40px;
+    font-size: 16px;
+    /*background: #e5eefe;*/
+    padding: 0 15px;
+    font-weight: bold;
+  }
+  .item-content{
+    padding: 0 15px;
+    .choose-item{
+      margin-right: 12px;
+      display: inline-block;
+      i{
+        color: @blue;
+      }
+    }
+    input[type=checkbox]{
+      width: 14px;
+      height: 14px;
+      vertical-align: middle;
+      margin-right: 4px;
+      background-color: #fff;
+      -webkit-appearance: none;
+      border: 1px solid #c9c9c9;
+      border-radius: 4px;
+      outline: none;
+      cursor: pointer;
+    }
+  }
+  li {
+    line-height: 35px;
+    .row{
+      display: inline-block;
+    }
+    .results{
+      position: relative;
+    }
+    .chooseItem{
+      display: inline-block;
+      margin-right: 10px;
+    }
+    .scale{
+      color: @blue;
+      cursor: pointer;
+    }
+    .blue{
+      color:#3B9ED0;
+      cursor: pointer;
+    }
+    .blue + img{
+      vertical-align: middle;
+    }
+    .recommend{
+      max-width: 200px;
+      float: right;
+      color: #929292;
+      cursor: pointer;
+    }
+  }
+  .edit-row{
+    width: 100%;
+    border:1px @placeholder-color solid;
+    border-radius: 4px;
+    padding: 5px;
+  }
+  .cont{
+    display: inline-block;
+    min-width: 302px;
+    width: 49%;
+    height: 250px;
+    margin-bottom: 20px;
+    position: relative;
+    .chart-box{
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .cont:nth-child(odd){
+    /*margin-right: 2%;*/
+  }
+  .time-range{
+    position: absolute;
+    bottom: 180px;
+    /*top: 26px;*/
+    z-index: 2;
+    width: 100%;
+    text-align: center;
+    /*margin-left: 18px;*/
+    .range{
+      display: inline-block;
+      border:1px #DFDFDF solid;
+      border-radius: 10px;
+      background: #fff;
+      padding: 5px 10px;
+      margin-right: 10px;
+      font-size: 12px;
+      cursor: pointer;
+      &.on{
+        background: @blue;
+        color: #fff;
+        border-color: @blue;
+      }
+    }
+  }
+}
+.printShow {
+  display: none;
+}
+.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;
+  }
+}
+@media print {
+  .printShow {
+    display: block;
+  }
+}

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

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

+ 5 - 0
src/components/BodyContainer/index.less

@@ -1,3 +1,8 @@
+/*@media print{
+  .container{
+    display: none;
+  }
+}*/
 .container{
   padding: 50px 10px 0 10px;
   position: relative;

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

@@ -30,7 +30,7 @@ class CheckBody extends Component{
     this.setState({boxLeft:nextProps.boxLeft})
   }
   getLabels(){
-    const {data,showArr,saveText,selecteds} = this.props;
+    const {data,showArr,saveText,selecteds,importLabel} = this.props;
     let arr = [],list=[];//console.log(data,saveText)
     const {boxMark,showAll} = this.state;
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
@@ -45,7 +45,7 @@ class CheckBody extends Component{
     if(showData){
       list = showData;
       arr = list.map((it,i)=>{
-        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds});
+        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel});
       });
     }
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮

+ 417 - 0
src/components/ChronicInfo/index.jsx

@@ -0,0 +1,417 @@
+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 manageIcon from '@common/images/manage.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 {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn} from '@commonComp';
+import AssessResult from '@containers/AssessResult';
+import ScaleTable from '@containers/ScaleTable';
+import $ from 'jquery';
+
+/***
+慢病右侧推送模块规则:
+慢病--显示慢病名称以及管理和评估
+普通病--不显示管理和评估和量表按钮
+明细--量表-计算公式-核心指标
+controlType:0-radio  1-checkbox  2-text  3-dropdownlist
+**/
+
+class ChronicInfo extends React.Component{
+  constructor(props){
+    super(props);
+    this.state = {
+      show:true,
+      showInfo:false,
+      showOption:false,
+      showAssess:false,      //评估弹窗
+      infoId:null,  //静态知识
+      formulaId:null, //计算公式
+      optionId:null,  //可能结果,
+      isAssessConfirm:false,    //是否点击评估弹窗确定按钮
+      tableName:'' , //点击的量表名称
+      tableId:null ,//点击的量表id
+      parentId:null ,
+      radioVal:{},  //可能结果选择内容
+      possible:{},  //可能结果
+    };
+    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.showAssessFn = this.showAssessFn.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.handleSaveAssess = this.handleSaveAssess.bind(this);       //评估弹窗确定
+    this.onPrint = this.onPrint.bind(this); 
+  }
+
+  onPrint() {
+    const {showHide} = this.props;
+    let dom = showHide&&showHide.showTable?$("#printcontent"):$("#AssistResult");
+    dom.jqprint({
+      debug: false,
+      importCSS: true,
+      printContainer: true,
+      operaSupport: false,
+    });
+  }
+  componentWillReceiveProps() {
+    $(this.$content.current)[0].scrollIntoView(true);
+  }
+  
+  showTableList(id){//量表按钮
+    const {getTableList,questionId} = this.props;
+    // getTableList(questionId&&questionId.id);
+    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){//显示静态知识
+    // 静态知识显示在提示信息里(4-18)
+    const {getInfomation} = this.props;
+    const param = {
+      // id:id,
+      id:40738,
+      type:22,
+    }
+    getInfomation&&getInfomation(param);
+    /*this.setState({
+      infoId:id
+    })*/
+  }
+  closeInfo(){//关闭静态知识
+    this.setState({
+      infoId:null
+    })
+  }
+  showOption(id){
+    this.setState({
+      optionId:id
+    })
+  }
+  closeOption(){
+    this.setState({
+      optionId:null
+    })
+  }
+  showTable(it,parentId){
+    const {formulaResult,scaleInfo} = this.props;
+    // 密西根糖尿病周围神经病评分(MDNS) 为例 id:40744
+    const item = {
+      id:it.id,
+      name:it.name
+    }
+    // 判断:store里已经有该量表就无需重新调接口
+    if(scaleInfo&&scaleInfo[it.id]){
+      this.props.hideList({name:'showTable',value:true});
+    }else{
+      this.props.getScaleInfo(item);
+    }
+
+    this.setState({
+      tableName:it.name,
+      tableId:it.id,
+      parentId:parentId
+    })
+  }
+  closeTable(){
+    this.setState({
+      tableName:'',
+      tableId:null,
+      parentId:null,
+    })
+    this.props.hideList({name:'showTable',value:false});
+  }
+  showAssessFn(){
+    this.setState({
+      showAssess:!this.state.showAssess,
+      isAssessConfirm:false
+    });
+  }
+
+  showFormula(id){//计算公式
+    this.setState({
+      formulaId:id
+    })
+  }
+  closeFormula(){
+    this.setState({
+      formulaId:null
+    })
+  }
+  handleAddAssessItem(v,pIndex,i){
+    const {addAssessItem} = this.props;
+    addAssessItem(v,pIndex,i);
+  }
+  handleSaveAssess(){
+    this.setState({
+      isAssessConfirm:true
+    });
+    const that=this;
+    setTimeout(()=>{
+      that.showAssessFn();
+    });
+
+  }
+  handleForRadio(item,parent,pIndex){//计算公式
+
+  }
+  confirmFormula(){//计算公式确定
+
+  }
+  handleRadio(item,parent,pIndex){//可能结果
+    let {radioVal} = this.props;
+    this.setState({
+      radioVal:Object.assign({},radioVal,{[pIndex]:item.detailName})
+    })
+  }
+  confirmOption(parent,pIndex){//可能结果确定
+    const {radioVal,possible} = this.state;
+    this.setState({
+      possible:Object.assign({},possible,radioVal),
+      radioVal:Object.assign({},possible,radioVal),//不设置radioVal只有最近一次选中的值
+      optionId:null
+    })
+    
+  }
+  getDetail(){
+    const {data,indexs,scaleInfo,formulaResult} = this.props;
+    const {showInfo,showOption,infoId,formulaId,optionId,possible,radioVal} = this.state;
+    let list = data&&data.map((v,i)=>{
+                    return <div className={style["list"]}>
+                      <p ref={this.$content}>
+                        <span>{'患者可能有'+v.name}</span>
+                        <img src={infoPic} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/>
+                        :
+                      </p>
+                      {/*<MiniToast title='静态知识'
+                                icon={allTableIcon}
+                                show={infoId&&infoId==v.id?true:false}
+                                close={this.closeInfo}>
+                          {pureText}
+                      </MiniToast>*/}
+                      {v.details&&v.details.map((it,j)=>{
+                        if(it.type==1){
+                          return <p>
+                                <span className={style["listName"]} onClick={this.showTable.bind(this,it.content,v.id)}>
+                                  {'【'+it.content.name+'】'}
+                                  {formulaResult&&formulaResult[it.content.id]?<i>{'结果:'+ formulaResult[it.content.id].text}</i>:''}
+
+                                </span>
+                                {indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
+                                  <img src={added} />
+                                  已加入
+                                </span>:<span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
+                                  <img src={add} />
+                                  加入病历记录
+                                </span>
+                                }
+                              </p>
+                        }else if(it.type==2){
+                          return <div className={style["marTop"]}>
+                            <span className={style["limit"]}>
+                              计算公式结果:
+                              <i className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>请选择</i>
+                              <img src={level1} />
+                            </span>
+                            {indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
+                                  <img src={added} />
+                                  已加入
+                                </span>:<span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
+                                  <img src={add} />
+                                  加入病历记录
+                                </span>
+                            }
+                            <MiniToast title={it.content.name}
+                                icon={allTableIcon}
+                                show={formulaId&&formulaId==v.id?true:false}
+                                close={this.closeFormula}
+                                confirm={this.confirmFormula.bind(this,v,i)}
+                                footer="true">
+                                <table>
+                                {it.content.details.map((item,idd)=>{
+                                    if(item.controlType==0){//单选
+                                      return <tr>
+                                        <td>
+                                          <span>{'请选择'+item.name+':'}</span>
+                                        </td>
+                                        <td>
+                                          {item.details.map((ii,ind)=>{
+                                            return <div className={style["chooseItem"]}>
+                                                    <Radio label={ii.detailName}
+                                                             isSelect={radioVal[i]==ii.detailName}
+                                                             handleClick={this.handleForRadio.bind(this,ii,v,i)}>
+                                                      </Radio>
+                                                  </div>
+                                          })}
+                                        </td>  
+                                      </tr>
+                                    }else if(item.controlType==1){//多选
+
+                                    }else if(item.controlType==2){//输入框
+                                      return <tr>
+                                        <td>
+                                          <span>{'请输入'+item.name+':'}</span>
+                                        </td>
+                                        <td>
+                                          <input type="text" placeholder="请输入" value={item.value}/>
+                                        </td>
+                                        <td>
+                                          <span>{item.uint}</span>
+                                        </td>
+                                        
+                                      </tr>
+                                    }else if(item.controlType==3){//下拉
+                                      return <tr>
+                                        <td>
+                                          <span>{'请选择'+item.name+':'}</span>
+                                        </td>
+                                        <td>
+                                          {item.details.map((ii,ind)=>{
+                                            return <div className={style["chooseItem"]}>
+                                                    <Radio label={ii.detailName}
+                                                            isSelect={radioVal[i]==ii.detailName}
+                                                            handleClick={this.handleForRadio.bind(this,ii,v,i)}>
+                                                    </Radio>
+                                                  </div>
+                                          })}
+                                        </td>
+                                        
+                                      </tr>
+                                    }
+                                })}
+                                </table>
+                                <div className={style["forMulBtn"]}>计算</div>
+                            </MiniToast>
+                          </div>
+                        }else if(it.type==3){
+                          return <div className={style["marTop"]}>
+                            <span className={style["limit"]}>
+                              可能结果:
+                              <i onClick={this.showOption.bind(this,v.id)} className={style["blue"]}>{possible[i]?possible[i]:'请选择'}</i>
+                              <img src={level1} />
+                            </span>
+                            {indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
+                                  <img src={added} />
+                                  已加入
+                                </span>:<span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
+                                  <img src={add} />
+                                  加入病历记录
+                                </span>
+                            }
+                            <MiniToast title='结果选择'
+                                icon={checkIcon}
+                                show={optionId&&optionId==v.id?true:false}
+                                close={this.closeOption}
+                                confirm={this.confirmOption.bind(this,v,i)}
+                                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}
+                                               isSelect={radioVal[i]==lis.detailName}
+                                               handleClick={this.handleRadio.bind(this,lis,v,i)}>
+                                        </Radio>
+                                    </div>
+                                  })}
+                                </div>
+                            </MiniToast>
+                          </div>
+                        }
+                      })}
+                    </div>
+                  })
+    return list;
+  }
+
+  render(){
+    const footer = <div className={style['footer']}>
+      <span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
+      <span className={style['okBtn']} onClick={()=>this.handleSaveAssess()}>确定</span>
+    </div>;
+    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,showList,tableList,scaleInfo,data,saveAssessInfos,chronicDesease,formulaResult,showHide} = this.props;
+    const {showInfo,showOption,showAssess,isAssessConfirm,tableName,tableId,parentId,possible,radioVal} = this.state;
+    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"]}
+                    style={{width:'70px'}}
+                    onClick={this.showAssessFn}
+                  >
+                    管理和评估
+                  </span>
+                  <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={400} width={400}>
+                      <ul className={style['toast-cont']}>
+                        {tableList&&tableList.map((v,i)=>{
+                          return <li onClick={this.handleListClick.bind(this,v)}>
+                          <span>
+                            {'【'+v.name+'】'}
+                            {formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</i>:''}
+                          </span>
+                          </li>
+                        })}
+                      </ul>
+              </ConfirmModal>
+              {showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
+                      title={tableName}
+                      icon={tableIcon}
+                      top={20}
+                      bottom={20}
+                      width={820}>
+                <ScaleTable title={tableName} tableId={tableId} parentId={parentId}></ScaleTable>
+              </ComplexModal>:''}
+              {showAssess?<ComplexModal onclose={this.showAssessFn} footer={footer}
+                      title='管理和评估'
+                      icon={manageIcon}
+                      top={20}
+                      bottom={20}
+                      width={820}>
+                <AssessResult handleSave={saveAssessInfos}
+                              isAssessConfirm={isAssessConfirm}
+                              possible={possible}
+                              radioVal={radioVal}></AssessResult>
+              </ComplexModal>:''}
+      </div>
+  }
+}
+export default ChronicInfo;

+ 272 - 0
src/components/ChronicInfo/index.less

@@ -0,0 +1,272 @@
+.tips{
+  border:1px solid #EAEDF1;
+  .tips-title,h1{
+    font-size: 14px;
+    color: #000;
+    padding: 8px 15px;
+    background: #EAF7FA;
+    font-weight: bold;
+    img {
+      float:left;
+      margin-top: 0px;
+      margin-right: 5px;
+    }
+  }
+  .tips-title{
+    .tips-name{
+      width: 255px;
+      display: inline-block;
+    }
+    h2{
+      display: inline-block;
+    }
+    .tips-btn{
+      display: inline-block;
+      float: right;
+    }
+    .redTips{
+      display: inline-block;
+      font-size: 12px;
+      -webkit-transform:scale(0.9);
+      color: red;
+      font-weight: normal;
+      white-space: nowrap;
+    }
+    .tipsDetails {
+      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);
+    }
+    .content{
+      font-size: 14px;
+      padding:6px 15px;
+      .list{
+        border-bottom: 1px solid #EAEDF1;
+        padding-bottom: 10px;
+        position: relative;
+        .infoPic{
+          vertical-align: middle;
+          margin: 0 5px;
+        }
+        >p{
+          margin-top: 10px;
+        }
+        .listName{
+          color:#3B9ED0;
+          cursor: pointer;
+          display: inline-block;
+          width: 73%;
+        }
+        .listResult,.addResult{
+          float: right;
+          cursor: pointer;
+          display: inline-block;
+          width: 99px;
+          height: 26px;
+          line-height: 26px;
+          text-align: center;
+          border: 1px solid #EAEDF1;
+          border-radius: 4px;
+          font-size: 12px;
+          img{
+            vertical-align: middle;
+            width: 12px;
+            margin:-3px 3px 0 0;
+          }
+        }
+        .addResult{
+          color: #3B9ED0;
+          text-align: left;
+          padding-left: 5px;
+          cursor: default;
+        }
+        .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;
+          }
+        }
+      }
+      .marTop{
+        margin-top: 10px;
+        position: relative;
+        .limit{
+          display: inline-block;
+          width: 72%;
+        }
+        img{
+          vertical-align: middle;
+        }
+      }
+      .blue{
+        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;
+      }
+    }
+  }
+  .toast-title{
+    position: absolute;
+    top: 17px;
+    font-size: 16px;
+      // border-bottom: 1px solid #666;
+      width: 87%;
+      height: 25px;
+    }
+    .toast-cont{
+      line-height: 24px;
+      font-size: 14px;
+      // margin-top: 15px;
+      height: 222px;
+      overflow-y: auto;
+      padding: 10px 0 0 10px;
+      li{
+        margin-top: 10px;
+        cursor: pointer;
+      }
+      i{
+        color:#3B9ED0;
+        margin-left: 10px;
+      }
+    }
+    .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{
+    height: 32px;
+    line-height: 32px;
+    text-align: center;
+    color: #fff;
+    background: #DBDBDB;
+    border-radius: 4px;
+    cursor: auto;
+    margin-top: 15px;
+  }

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

@@ -2,7 +2,7 @@
   position: absolute;
   bottom: 0px;      //页面布局
   z-index: 40;
-  width: 418px;
+  width: 450px;
   .disTips{
     padding: 10px 20px 0px 20px;
     font-size: 10px;

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

@@ -43,7 +43,7 @@ class CurrentIll extends Component{
 
   handleFocus(e){
     // 判断主诉是否为空
-    const {mainData,mainText,setData,moduleNum,mainIds,data,changeEditIll,editClear,symptomFeature} = this.props;
+    const {mainData,mainText,setData,moduleNum,mainIds,data,changeEditIll,editClear,symptomFeature,isChronic} = this.props;
     const that = this;
     let {setDataTimer} = this.state; 
     let mainFinallyText = filterDataArr(mainText);
@@ -56,12 +56,11 @@ class CurrentIll extends Component{
       })
     }else {
       let num = moduleNum.num;//主诉使用了几个模板
-      // if(editClear && data.length==0){//第一次聚焦去设置现病史的data
-      if(data.length==0){
-        // setData && setData({useEmpty,num,mainData,mainIds});
+        // isChronic为一个对象
+      if(data.length==0 && !isChronic || !isChronic.name ){
         clearTimeout(setDataTimer);
         setDataTimer = setTimeout(function(){//延时,等待主诉失焦数据返回
-          setData && setData({num,mainData,mainIds,symptomFeature:symptomFeature.featureData});
+            setData && setData({num,mainData,mainIds,symptomFeature:symptomFeature.featureData,isChronic});   
         },200)  
         this.setState({
           setDataTimer
@@ -71,6 +70,7 @@ class CurrentIll extends Component{
           showMoudle:true,
           forbidInput:false,
           boxEditable:false,
+          setDataTimer
       })
       changeEditIll(false)
       /*const showTimer = setTimeout(function(){
@@ -142,7 +142,7 @@ class CurrentIll extends Component{
   }
 
   render(){
-    const {fuzhen,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,showArr,focusIndex,editClear,data,boxLeft,boxTop} = this.props;
+    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 searchFlag = searchData.length > 0 ? true : false;
 
@@ -151,6 +151,7 @@ class CurrentIll extends Component{
                         isRead={isRead}
                         value={saveText[0]}
                         fuzhen={fuzhen}
+                        isChronic={isChronic}
                         handlePush={fetchPushInfos}
                         handleInput={handleInput}/>;
     }

+ 5 - 3
src/components/DiagResultSearch/index.less

@@ -41,13 +41,15 @@
 // }
 
 .search-result {
-    max-height: 266px;
+    overflow-y: auto;
+    max-height: 225px;
+    min-height: 80px;
 }
 
 .search-result-item {
     padding: 0 30px;
-    height: 44px;
-    line-height: 44px;
+    height: 36px;
+    line-height: 36px;
     cursor: pointer;
 }
 

+ 27 - 6
src/components/DiagnosticItem/index.jsx

@@ -2,6 +2,8 @@ import React, { Component } from 'react';
 import style from './index.less';
 import {ConfirmModal} from '@commonComp';
 import Notify from '@commonComp/Notify';
+import {getChronic} from '@store/async-actions/homePage.js';
+import {storageLocal} from '@utils/tools';
 
 class DiagnosticItem extends Component{
     constructor(props){
@@ -28,13 +30,14 @@ class DiagnosticItem extends Component{
         this.addDiagodal(diagType)
     }
     close(){
-            this.setState({
-                visible: false
-            })
-        }
+        this.setState({
+            visible: false
+        })
+    }
     chooseDiagodal(item) {
         const { diagnosticList,getTips } = this.props;
-        getTips && getTips(item);
+        // getTips && getTips(item);
+        getTips && getTips({id:item.id,type:7});
         for (let i = 0; i < diagnosticList.length; i++) {
             if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
                 Notify.info('该诊断已存在');
@@ -47,7 +50,7 @@ class DiagnosticItem extends Component{
        
     }
     addDiagodal(diagType){
-        const {item} = this.props;
+        const {item, isChronicMag} = this.props;
         item.type = diagType;
         // setTimeout(()=>{
         //     this.setState({
@@ -60,6 +63,23 @@ class DiagnosticItem extends Component{
                 //         return
                 //     }
                 // }
+                if(item.type == 2) {
+                    isChronicMag(item);
+                }
+                // 从缓存取慢病列表
+                // let chronicList = JSON.parse(storageLocal.get('chronic'));
+                // if(!chronicList){
+                //     getChronic();
+                //     chronicList = JSON.parse(storageLocal.get('chronic'));
+                // }
+                // console.log(999,chronicList)
+                // for(let i=0; i<chronicList.length; i++){
+                //     if(chronicList[i].id==item.id&&chronicList[i].name==item.name){
+                //         //弹窗提示 “是否引用往期病例”?--往期病例接口、弹窗、引用
+                //         // 是--引用   否--走慢病流程
+                //         console.log("是慢病!")
+                //     }
+                // }
                 addDiagnostic&&addDiagnostic(item);
                 clearInput&&clearInput();
                 hideSearch&&hideSearch()
@@ -80,6 +100,7 @@ class DiagnosticItem extends Component{
                     <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 
                     </ConfirmModal>
+                   
                 </span>)
     }
 }

+ 84 - 6
src/components/DiagnosticList/index.jsx

@@ -6,6 +6,13 @@ import diagDown from './img/diagDown.png'
 import {ConfirmModal, Message} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
+import store from '@store';
+import { initItemList } from '@store/async-actions/historyTemplates';
+import { pushAllDataList,inspectAndAssist } from '@utils/tools';
+import iconRadioDefault from '@common/images/icon-radio-default.png'
+import iconRadioActive from '@common/images/icon-radio-active.png'
+import tableIcon from '@common/images/table.png';
+import { delFollowUp } from '../../store/actions/treat';
 
 class DiagnosticList extends Component {
     constructor(props) {
@@ -13,13 +20,19 @@ class DiagnosticList extends Component {
         this.state = {
             visible: false,
             delItem: {},
-            treatTitle: ''
+            treatTitle: '',
+            activeHistory: -1
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
         this.close = this.close.bind(this);
         this.showTreat = this.showTreat.bind(this);
         this.handleClickDiag = this.handleClickDiag.bind(this);
+        this.referRecord = this.referRecord.bind(this);
+        this.noReferRecord = this.noReferRecord.bind(this);
+        this.getHistoryCase = this.getHistoryCase.bind(this);
+        this.closeHistoryCaseModal = this.closeHistoryCaseModal.bind(this);
+        this.referCase = this.referCase.bind(this);
     }
 
     componentWillReceiveProps(nextprops) {
@@ -39,8 +52,10 @@ class DiagnosticList extends Component {
     }
     deleteItem() {
         const { delItem } = this.state;
-        const { delDiagnostic } = this.props;
+        const { delDiagnostic, delReact,delFollowUp } = this.props;
         delDiagnostic && delDiagnostic(delItem);
+        delReact && delReact(delItem)
+        delFollowUp && delFollowUp(delItem)
         this.setState({
             visible: false,
         })
@@ -73,18 +88,75 @@ class DiagnosticList extends Component {
     } 
     handleClickDiag(item) {
         const { getTips } = this.props;
-        getTips && getTips(item);
+        // getTips && getTips(item);
+        getTips && getTips({id:item.id,type:7});
     }
+    referRecord() {
+        const { hideReferRecord, showHistoryCaseModal ,chronicMagItem} = this.props
+        hideReferRecord && hideReferRecord()
+        showHistoryCaseModal && showHistoryCaseModal()
+        store.dispatch(initItemList(chronicMagItem));
+
+    }
+    noReferRecord() {
+        const { hideReferRecord } = this.props
+        hideReferRecord && hideReferRecord()
+        inspectAndAssist()//化验辅检模板
+    }
+    referCase() {
+        const { hideHistoryCaseModal, items } = this.props
+        hideHistoryCaseModal && hideHistoryCaseModal()
+        if (this.state.activeHistory === -1) {
+            return
+        }
+        let baseList = store.getState();
+        
+        let baseObj = items[this.state.activeHistory];
+  
+        // store.dispatch({type: CONFIRM_TYPE, confirmType: baseObj.sign});
+        pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
+        this.props.getBilling();
+        this.setState({
+            activeHistory: -1
+        })
+    }
+    closeHistoryCaseModal() {
+        const { hideHistoryCaseModal } = this.props
+        this.setState({
+            activeHistory: -1
+        })
+        hideHistoryCaseModal && hideHistoryCaseModal()
+    }
+    handleQuoteClick(item, index) {
+        console.log('asadsd', item)
+        const { handleQuoteClick } = this.props
+        // handleQuoteClick && handleQuoteClick(item)
+        this.setState({
+            activeHistory: index
+        })
+    }
+    getHistoryCase() {
+        const { items } = this.props
+        return (<div className={style['history-info']}>
+            {items.map((item, index) => {
+                return<div onClick={this.handleQuoteClick.bind(this, item, index)} style={this.state.activeHistory === index ? {color: '#abcdef'} : ''}>
+                    <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose}
+                </div>
+            })}
+        </div>)
+    }
+    
     
 
     render(){
-        const { list, treatment } = this.props
+        const { list, treatment, showReferRecord, showHistoryCase } = this.props
         const { visible, treatTitle } = this.state
         const lastIndex = list.length -1;
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
                         const hasTreat = item.treat && (item.treat.commonTreatment.content || item.treat.surgeryTreatment.content || item.treat.treatment.length>0)
+                        // const hasTreat= true;
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.id} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
@@ -93,7 +165,7 @@ class DiagnosticList extends Component {
                                     {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
                                     <span className={style['treat']}
                                         //   style ={{ color: hasTreat ?'' : 'gray', border: hasTreat ?'1px solid #3B9ED0' : '1px solid gray', cursor: hasTreat ? '' : 'text'}}
-                                          style ={hasTreat ? '' : { color: 'gray', border: '1px solid gray', cursor: 'auto'}}
+                                          style ={hasTreat ? '' : { color: 'gray', border: '1px solid gray', cursor: 'text'}}
                                           onClick={() =>{hasTreat && this.showTreat(item, index)}}>
                                           治疗方案
                                     </span>
@@ -110,9 +182,15 @@ class DiagnosticList extends Component {
                                   >
                                   <div className={style['del-msg']}>是否删除该诊断?</div> 
                     </ConfirmModal>
+                    <ConfirmModal visible={showReferRecord} okText='是' cancelText='否' confirm={this.referRecord}  cancel={this.noReferRecord} close={this.noReferRecord}>
+                        <div className={style['confirm-info']}>是否引用往期病历</div> 
+                    </ConfirmModal>
+                    <ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal} titleBg="#DFEAFE" icon={tableIcon} height={300}>
+                        {this.getHistoryCase()}
+                        <div className={style['confirm-history']}><span className={style['confirm-history-btn']} onClick={this.referCase}>确定</span></div>
+                    </ConfirmModal>
                 </div>
                
-            
         )
     }
 }

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

@@ -102,4 +102,41 @@
     width: 20px;
     margin-bottom: 4px;
     cursor: pointer;
+}
+.confirm-info {
+    height: 70px;
+    font-size: 16px;
+    line-height: 16px;
+    text-align: center;
+    padding: 10px 30px;
+}
+.confirm-history {
+    // height: 50px;
+    position: relative;
+}
+.confirm-history-btn {
+    position: absolute;
+    right: 15px;
+    // bottom: 10px;
+    display: inline-block;
+    width: 66px;
+    height: 32px;
+    line-height: 32px;
+    text-align: center;
+    color: #3B9ED0;
+    border: 1px solid #3B9ED0;
+    border-radius: 4px;
+    cursor: pointer;
+}
+.history-info {
+    height: 185px;
+    overflow-y: auto;
+    padding: 15px;
+    >div{
+        line-height: 26px;
+        img{
+            vertical-align: middle;
+            margin-right: 5px;
+        }
+    }
 }

+ 4 - 2
src/components/EMRContainer/index.jsx

@@ -29,8 +29,10 @@ class EMRContainer extends Component {
         windowEventHandler('resize', ()=>{
           const height = getWindowInnerHeight() - 175;
           const width = getWindowInnerWidth() - 480;
-          this.$cont.current.style.height = height + "px";
-          this.$cont.current.style.width = width + "px";
+          if(this.$cont.current){
+            this.$cont.current.style.height = height + "px";
+            this.$cont.current.style.width = width + "px";
+          }
         });
     }
     render() {

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

@@ -75,6 +75,7 @@ class HistoryCaseContainer extends React.Component {
                             dataStr={dataStr.length > 0?getAllDataStringList(dataStr):[]}
                             show={false}
                             flg={true}
+                            showAssessBtn={true}
                         ></PreviewBody>
                     }
                 </div>

+ 41 - 0
src/components/Information/index.jsx

@@ -0,0 +1,41 @@
+import React, { Component } from "react";
+import style from "./index.less";
+import store from "@store";
+import $ from "jquery";
+
+
+class Information extends Component {
+  constructor(props) {
+    super(props)
+    this.$content = React.createRef();
+  }
+
+  componentWillReceiveProps() {
+    $(this.$content.current)[0].scrollIntoView(true);
+  }
+  render() {
+    const { baseObj } = this.props;
+    let baseData = store.getState()
+    let preInfo = baseData.patInfo.message;
+    const noData = JSON.stringify(preInfo) == '{}';
+    return <div className={style['information']}>
+        <div ref={this.$content} className={style['title']}>{preInfo.hospitalName}</div>
+        <table className={style['patInfo']}>
+          <tr>
+            <td>卡号:{baseObj ? baseObj.patientIdNo : noData ? '' : preInfo.patientIdNo}</td>
+            <td>姓名:{baseObj ? baseObj.patientName : noData ? '' : preInfo.patientName}</td>
+            <td>年龄:{baseObj ? baseObj.patientAge : noData ? '' : preInfo.patientAge}</td>
+            <td>性别:{baseObj ? baseObj.patientSex : noData ? '' : preInfo.patientSex}</td>
+          </tr>
+          <tr>
+            <td>就诊时间:{baseObj ? baseObj.inquiryDate : (noData ? '' : preInfo.systemTime.split(' ')[0])}</td>
+            <td>科室:{baseObj ? baseObj.hospitalDeptName : (noData ? '' : preInfo.hospitalDeptName)}</td>
+            <td>医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</td>
+            <td>门诊号:{baseObj ? baseObj.inquiryCode : (noData ? '' : preInfo.recordId)}</td>
+          </tr>
+        </table>
+      </div>
+  }
+}
+
+export default Information;

+ 17 - 0
src/components/Information/index.less

@@ -0,0 +1,17 @@
+.title {
+  clear: both;
+  font-size: 24px;
+  margin-bottom: 30px;
+  text-align:center;
+}
+.patInfo {
+  margin: 0px 0px 30px 0px;
+  td {
+    border: 1px solid #aaa;
+    padding: 8px 10px;
+    font-size: 14px;
+  }
+  tr td:first-child{
+    width: 31%;
+  }
+}

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

@@ -147,7 +147,7 @@ class Inspect extends React.Component {
         </ul>
     }
     render() {
-        const {fetchPushInfos, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem } = this.props;
+        const {fetchPushInfos,getInfomation, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem,inspectList } = this.props;
         const {ieVersion,isIE} = this.state;
         return (
             <div className={styles.wrapper} >
@@ -183,6 +183,8 @@ class Inspect extends React.Component {
                             handleCloseExcel={handleCloseExcel}
                             labelListActive={labelListActive}
                             delPartItem={delPartItem}
+                            inspectList={inspectList}
+                            getInfomation={getInfomation}
                         >
                         </AddInspect>
                     </div>

+ 93 - 5
src/components/MainSuit/index.jsx

@@ -1,13 +1,19 @@
 import React,{Component} from 'react';
 import style from './index.less';
-import {Button,InlineTag,ItemBox,DropDown,DropList,Textarea,Notify} from '@commonComp';
+import {Button,InlineTag,ItemBox,DropDown,DropList,Textarea,Notify,ConfirmModal} from '@commonComp';
 import TailInlineTag from '@commonComp/TailInlineTag';
 import SearchDrop from '@components/SearchDrop';
 import CommonSymptom from '@components/CommonSymptom';
 import chooseType from '@containers/eleType.js';
 import config from "@config/index";
-import {isIE,getPageCoordinate,windowEventHandler,filterDataArr} from "@utils/tools.js"
+import {isIE,getPageCoordinate,windowEventHandler,filterDataArr,getAllDataList,getAllDataStringList,ifOtherClear} from "@utils/tools.js"
+import { initItemList } from '@store/async-actions/historyTemplates';
+import tableIcon from '@common/images/table.png';
+import iconRadioDefault from '@common/images/icon-radio-default.png'
+import iconRadioActive from '@common/images/icon-radio-active.png'
+import { pushAllDataList,inspectAndAssist } from '@utils/tools';
 import $ from 'jquery';
+import store from '@store';
 
 class MainSuit extends Component{
   constructor(props){
@@ -29,6 +35,8 @@ class MainSuit extends Component{
       overFlag:false,
       tmpScroll:0,
       tmpTop:0,
+      activeHistory: -1,
+      showHistoryCase:false
     };
     this.toggleEditable = this.toggleEditable.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
@@ -37,6 +45,11 @@ class MainSuit extends Component{
     this.handleChange = this.handleChange.bind(this);
     this.handleClick = this.handleClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
+    this.referRecord = this.referRecord.bind(this);
+    this.noReferRecord = this.noReferRecord.bind(this);
+    this.referCase = this.referCase.bind(this);
+    this.closeHistoryCaseModal = this.closeHistoryCaseModal.bind(this);
+    this.handleQuoteClick = this.handleQuoteClick.bind(this);
   }
   componentWillReceiveProps(nextProps){
     this.setState({boxLeft:nextProps.boxLeft})
@@ -232,7 +245,7 @@ class MainSuit extends Component{
   }
 
   handleBlur(e){//隐藏常见症状下拉、存自由输入的值
-    const {freeText,saveText,datas,clearSearch,getSymptomFeature,currentData} = this.props;
+    const {freeText,saveText,datas,clearSearch,getSymptomFeature,currentData,saveChronic} = this.props;
     const that = this;
     let data = this.state.inpText;
     if(!isIE()){
@@ -241,6 +254,15 @@ class MainSuit extends Component{
       } 
       e.target.innerText?(e.target.innerText=""):(e.target.innerHTML="")
       freeText && freeText(data.trim());
+      // 慢病模板获取:精确匹配"糖尿病复诊",储存慢病字段
+      // 页面有模板数据 就不在请求
+      let baseList = store.getState();
+      let jsonData = getAllDataList(baseList);
+      let jsonStr = getAllDataStringList(baseList);
+      let flg = ifOtherClear(jsonData,jsonStr,baseList);//除主诉外 其他是否为空
+      if(data.trim()=='糖尿病复诊' && !flg){
+        saveChronic && saveChronic({name:'糖尿病',id:21773});
+      }
     }else{
       if(datas.length==0){
         const ev = e || window.event;
@@ -259,10 +281,69 @@ class MainSuit extends Component{
       },config.delayTime-200); 
   }
 
+  // 慢病
+  referRecord() {//是否引用历史病例弹窗--是
+    const { chronicDesease,closeHisBox } = this.props
+    closeHisBox&&closeHisBox();//关闭
+    this.setState({
+      showHistoryCase:true
+    })
+    store.dispatch(initItemList(chronicDesease));
+  }
+  noReferRecord() {//否
+    const {closeHisBox,autoFillMoudles} = this.props;
+    closeHisBox&&closeHisBox();
+    // 不引用病例 -直接分发模板进行填充
+    autoFillMoudles && autoFillMoudles()
+    inspectAndAssist()//化验辅检模板
+  }
+  referCase() {
+        const { items ,pureSaveChronic} = this.props
+        this.setState({
+          showHistoryCase:false
+        })
+        if (this.state.activeHistory === -1) {
+            return
+        }
+        // let baseList = store.getState(); 
+        let baseObj = items[this.state.activeHistory];
+        pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
+        pureSaveChronic && pureSaveChronic({name:'糖尿病',id:21773}); //储存慢病疾病
+        this.props.getBilling();
+        this.setState({
+            activeHistory: -1
+        })
+    }
+  closeHistoryCaseModal() {//关闭病例列表
+    const {autoFillMoudles} = this.props;
+      this.setState({
+        activeHistory: -1,
+        showHistoryCase:false
+      })
+     // 不引用病例直接分发模板进行填充 
+     autoFillMoudles&&autoFillMoudles();
+  }
+  handleQuoteClick(item, index) {
+      console.log('asadsd', item)
+      this.setState({
+          activeHistory: index
+      })
+  }
+  getHistoryCase() {
+        const { items } = this.props
+        return (<div className={style['history-info']}>
+            {items.map((item, index) => {
+                return<div onClick={this.handleQuoteClick.bind(this, item, index)} style={this.state.activeHistory === index ? {color: '#abcdef'} : ''}>
+                    <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose}
+                </div>
+            })}
+        </div>)
+    }
+
 
   render(){
-    const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,boxLeft,boxTop} = this.props;
-    const {showModule,show,symptom,search} = this.state;
+    const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,boxLeft,boxTop,showHisBox} = this.props;
+    const {showModule,show,symptom,search,showHistoryCase} = this.state;
     const symptomFlag = CommonSymptoms.length>0 ? true : false;
     const searchFlag = searchData.length>0 ? true : false;
     const boxTop1 = datas.length>0?boxTop:45;
@@ -286,6 +367,13 @@ class MainSuit extends Component{
       </ItemBox>
       {/*没有推送结果就不显示*/}
       {symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
+      <ConfirmModal visible={showHisBox} okText='是' cancelText='否' confirm={this.referRecord}  cancel={this.noReferRecord} close={this.noReferRecord}>
+          <div className={style['confirm-info']}>是否引用往期病历</div> 
+      </ConfirmModal>
+      <ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal} titleBg="#DFEAFE" icon={tableIcon} height={300}>
+        {this.getHistoryCase()}
+        <div className={style['confirm-history']}><span className={style['confirm-history-btn']} onClick={this.referCase}>确定</span></div>
+    </ConfirmModal>
     </div>
   }
 }

+ 33 - 0
src/components/MainSuit/index.less

@@ -22,4 +22,37 @@
             border: 1px solid red !important;
         }
     }
+}
+.confirm-info {
+    height: 70px;
+    font-size: 16px;
+    line-height: 16px;
+    text-align: center;
+    padding: 10px 30px;
+}
+.history-info {
+    height: 185px;
+    overflow-y: auto;
+    padding: 15px;
+    >div{
+        line-height: 26px;
+        img{
+            vertical-align: middle;
+            margin-right: 5px;
+        }
+    }
+}
+.confirm-history-btn {
+    position: absolute;
+    right: 15px;
+    // bottom: 10px;
+    display: inline-block;
+    width: 66px;
+    height: 32px;
+    line-height: 32px;
+    text-align: center;
+    color: #3B9ED0;
+    border: 1px solid #3B9ED0;
+    border-radius: 4px;
+    cursor: pointer;
 }

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

@@ -33,12 +33,13 @@ class MultSpread extends Component{
     this.handleEdit = this.handleEdit.bind(this);
   }
   getClass(){
-    const {saveText,ikey,showAdd} = this.props;
+    const {saveText,ikey,showAdd,isImports} = this.props;
     const labelInx = ikey.substr(1);
     const text = saveText&&saveText[+labelInx];
+    const orgBorder = isImports&&!text?style['orange-border']:'';
     const isSelected = text?style['selected']:style['container'];
     const hasAdd = showAdd?style['add']:'';
-    return classNames(isSelected,hasAdd);
+    return classNames(isSelected,hasAdd,orgBorder);
   }
   getLabels(){
     const {data,ikey,showArr,copyId,selecteds,boxMark} = this.props;

+ 3 - 2
src/components/NumberDrop/index.jsx

@@ -203,13 +203,14 @@ class NumberDrop extends Component{
     }
   }*/
   getClasses(){         //整个标签是否有值的状态
-    const {hideTag,placeholder,value} = this.props;
+    const {hideTag,placeholder,value,isImports} = this.props;
     const $span = this.$span.current;
     const val = value;//$span&&$span.innerText.trim()||value;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
+    const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag,blueBorder);
+    return className(isSelected,noTag,blueBorder,orgBorder);
   }
   changeToEdit(e){        //整个标签双击编辑状态
     const {value,id,handleDbclick,patId,handleHide,show} = this.props;

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

@@ -15,16 +15,16 @@ class PatInfo extends Component {
     const {sizeFlag} = this.props;
      return <table className={sizeFlag?`${style["table"]} ${style["newSize"]}`:style["table"]}>
       <tr>
-        <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`}>卡号:{message.patientIdNo && message.patientIdNo}</td>
+        <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'卡号:' + (message.patientIdNo && message.patientIdNo)}>卡号:{message.patientIdNo && message.patientIdNo}</td>
         <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`} title={sizeFlag&&message.patientName&&message.patientName.length>3?message.patientName:''}>姓名:{sizeFlag&&message.patientName && message.patientName.length>3?message.patientName.slice(0,3)+'...':message.patientName}</td>
         <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`}>年龄:{message.patientAge && message.patientAge}</td>
         <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`}>性别:{message.patientSex && message.patientSex}</td>
       </tr>
       <tr>
-        <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}}>就诊时间:{message.systemTime&&message.systemTime.substring(0, 10)}</td>
+        <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}} title={'就诊时间:'+(message.systemTime&&message.systemTime.substring(0, 10))}>就诊时间:{message.systemTime&&message.systemTime.substring(0, 10)}</td>
         <td key='6' className={`${style.tdBorderR}`}>科室:{message.hospitalDeptName && message.hospitalDeptName}</td>
         <td key='7' className={`${style.tdBorderR}`} title={sizeFlag&&message.doctorName&&message.doctorName.length>3?message.doctorName:''}>医生:{sizeFlag&&message.doctorName && message.doctorName.length>3?message.doctorName.slice(0,3)+'...':message.doctorName}</td>
-        <td key='8' className={`${style.tdBorderR}`}>门诊号:{message.recordId && message.recordId}</td>
+        <td key='8' className={`${style.tdBorderR}`} title={'门诊号:'+(message.recordId && message.recordId)}>门诊号:{message.recordId && message.recordId}</td>
       </tr>
     </table>;
   }

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

@@ -12,10 +12,18 @@
     white-space: nowrap;
   }
   .tdBorderB {
-      border-bottom: 1px solid @person-table-color;
+    border-bottom: 1px solid @person-table-color;
+    max-width: 180px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
   }
   .tdBorderR {
     border-right: 1px solid @person-table-color;
+    max-width: 180px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
   }
 }
 .newSize{

+ 33 - 115
src/components/PreviewBody/index.jsx

@@ -2,65 +2,9 @@ import React, { Component } from "react";
 import style from "./index.less";
 import { normalVal, filterDataArr, filterOtherDataArr,timestampToTime } from '@utils/tools';
 import Notify from '@commonComp/Notify';
+import Information from '../Information';
 import $ from "jquery";
-import { relative } from "path";
-
-(function ($) {
-  var opt;
-
-  $.fn.jqprint = function (options) {
-    opt = $.extend({}, $.fn.jqprint.defaults, options);
-
-    var $element = (this instanceof $) ? this : $(this);
-
-    if (opt.operaSupport && $.browser.opera) {
-      var tab = window.open("", "jqPrint-preview");
-      tab.document.open();
-
-      var doc = tab.document;
-    }
-    else {
-      var $iframe = $("<iframe  />");
-
-      if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-300px", top: "-300px" }); }
-
-      $iframe.appendTo("body");
-      var doc = $iframe[0].contentWindow.document;
-    }
-
-    if (opt.importCSS) {
-      if ($("link[media=print]").length > 0) {
-        $("link[media=print]").each(function () {
-          doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
-        });
-      }
-      else {
-        $("link").each(function () {
-          doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
-        });
-      }
-    }
-
-    if (opt.printContainer) { doc.write($element.outer()); }
-    else { $element.each(function () { doc.write($(this).html()); }); }
-
-    doc.close();
-
-    (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
-    setTimeout(function () { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
-  }
-
-  $.fn.jqprint.defaults = {
-    debug: false,
-    importCSS: true,
-    printContainer: true,
-    operaSupport: true
-  };
-
-  $.fn.outer = function () {
-    return $($('<div></div>').html(this.clone())).html();
-  }
-})($);
+import AssessResultHis from '@containers/AssessResultHis'
 
 class PreviewBody extends Component {
   constructor(props) {
@@ -68,16 +12,12 @@ class PreviewBody extends Component {
     this.state = {
       dateTime: "",
     }
-    this.$content = React.createRef();
     this.getCurrentDate = this.getCurrentDate.bind(this);
     this.onPrint = this.onPrint.bind(this);
   }
   componentDidMount() {
     this.getCurrentDate();
   }
-  componentWillReceiveProps() {
-    $(this.$content.current)[0].scrollIntoView(true);
-  }
   onPrint() {
     $("#content").jqprint({
       debug: false,
@@ -99,16 +39,6 @@ class PreviewBody extends Component {
       this.onPrint();
       this.props.save(true)
     }
-    // if(filterDataArr(JSON.parse(jsonStr.chief)) == ''){
-    //   Notify.info('主诉不能为空');
-    //     return false;
-    // }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
-    //     Notify.info('诊断不能为空');
-    //     return false;
-    // }else{
-    //     this.onPrint();
-    //     this.props.save(true)
-    // }
   }
   getCurrentDate() {
     let myDate = new Date();
@@ -143,45 +73,32 @@ class PreviewBody extends Component {
     }
   }
   render() {
-    const { show, preInfo, dataJson, dataStr, baseObj, flg } = this.props;
+    const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn} = this.props;
     const other_yjs = filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other);
+    const noData = JSON.stringify(preInfo) == '{}';
     return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
-      <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "600px" }}>
-        <div ref={this.$content} style={{ clear: 'both', fontSize: '24px', margin: '0px 0px 30px 0px', textAlign: 'center' }}>{preInfo.hospitalName}</div>
-        <table className={style['patInfo']} style={{ margin: '0px 0px 30px 0px', borderCollapse: 'collapse', width: "100%" }}>
-          <tr>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '31%', fontSize: "14px" }}>卡号:{baseObj ? baseObj.patientIdNo : JSON.stringify(preInfo) == '{}' ? '' : preInfo.patientIdNo}</td>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '23%', fontSize: "14px" }}>姓名:{baseObj ? baseObj.patientName : JSON.stringify(preInfo) == '{}' ? '' : preInfo.patientName}</td>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '23%', fontSize: "14px" }}>年龄:{baseObj ? baseObj.patientAge : JSON.stringify(preInfo) == '{}' ? '' : preInfo.patientAge}</td>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '23%', fontSize: "14px" }}>性别:{baseObj ? baseObj.patientSex : JSON.stringify(preInfo) == '{}' ? '' : preInfo.patientSex}</td>
-          </tr>
-          <tr>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '31%', fontSize: "14px" }}>就诊时间:{baseObj ? baseObj.inquiryDate : (JSON.stringify(preInfo) == '{}' ? '' : preInfo.systemTime.split(' ')[0])}</td>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '23%', fontSize: "14px" }}>科室:{baseObj ? baseObj.hospitalDeptName : (JSON.stringify(preInfo) == '{}' ? '' : preInfo.hospitalDeptName)}</td>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '23%', fontSize: "14px" }}>医生:{baseObj ? baseObj.doctorName : (JSON.stringify(preInfo) == '{}' ? '' : preInfo.doctorName)}</td>
-            <td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '23%', fontSize: "14px" }}>门诊号:{baseObj ? baseObj.inquiryCode : (JSON.stringify(preInfo) == '{}' ? '' : preInfo.recordId)}</td>
-          </tr>
-        </table>
-        <table style={{ width: "100%", borderCollapse: 'collapse' }}>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>主诉:</td>
-            <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px', lineHeight: '20px',wordBreak:"break-all" }}>
+      <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>
+        <Information baseObj={baseObj} preInfo={preInfo}></Information>
+        <table className={style['infos']}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>主诉:</td>
+            <td className={style['patInfoSec']}>
               {
                 filterDataArr(JSON.parse(dataStr.chief))
               }
             </td>
           </tr>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>现病史:</td>
-            <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px', lineHeight: '20px',wordBreak:"break-all" }}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>现病史:</td>
+            <td className={style['patInfoSec']}>
               {
                 filterDataArr(JSON.parse(dataStr.present))
               }
             </td>
           </tr>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>其他史:</td>
-            <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px', lineHeight: '20px',wordBreak:"break-all" }}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>其他史:</td>
+            <td className={style['patInfoSec']}>
               {
                 other_yjs.str1
               }
@@ -201,17 +118,17 @@ class PreviewBody extends Component {
               }
             </td>
           </tr>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>查体:</td>
-            <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px', lineHeight: '20px',wordBreak:"break-all" }}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>查体:</td>
+            <td className={style['patInfoSec']}>
               {
                 filterDataArr(JSON.parse(dataStr.vital))
               }
             </td>
           </tr>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ width: 70, textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>化验:</td>
-            <td style={{ fontSize: '14px', padding: '4px 0px 8px 0px', lineHeight: '20px', maxWidth: '650px',wordBreak:"break-all" }}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>化验:</td>
+            <td className={style['patInfoSec']}>
               {
                 dataJson.lis.getExcelDataList && dataJson.lis.getExcelDataList.map((items) => {
                   return items.lisExcelRes && items.lisExcelRes.map((item) => {
@@ -262,9 +179,9 @@ class PreviewBody extends Component {
               }
             </td>
           </tr>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>辅检:</td>
-            <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px', lineHeight: '20px' }}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>辅检:</td>
+            <td className={style['patInfoSec']}>
               {
                 dataStr.pacs && dataStr.pacs != '' && dataStr.pacs.split(';').map((item) => {
                   return <div style={{ fontSize: '14px',wordBreak:"break-all" }}>{item}</div>
@@ -272,9 +189,9 @@ class PreviewBody extends Component {
               }
             </td>
           </tr>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>诊断:</td>
-            <td style={{ fontSize: '14px', padding: '9px 0px 8px 0px', lineHeight: '20px' }}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>诊断:</td>
+            <td className={style['patInfoSec']}>
               {
                 dataStr.diag && dataStr.diag != '' && dataStr.diag.split(';').map((item) => {
                   return <div style={{ fontSize: '14px' }}>{item}</div>
@@ -282,9 +199,9 @@ class PreviewBody extends Component {
               }
             </td>
           </tr>
-          <tr style={{ verticalAlign: 'top', borderBottom: "1px solid #e2e4e6" }}>
-            <td style={{ textAlign: 'right', padding: '9px 5px 8px 0px', fontSize: '14px',width:'70px' }}>医嘱:</td>
-            <td style={{ fontSize: '14px', padding: '1px 0px 8px 0px', lineHeight: '20px' }}>
+          <tr className={style['patInfoFst']}>
+            <td className={style['patInfoSec']}>医嘱:</td>
+            <td className={style['patInfoSec']} style={{ fontSize: '14px', padding: '1px 0px 8px 0px', lineHeight: '20px' }}>
               {dataJson.advice.commontreatment && dataJson.advice.commontreatment.length > 0 && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>一般治疗</span></p>}
               {
                 dataJson.advice.commontreatment && <div style={{ padding: '0px 0px 5px 0px',wordBreak:"break-all" }}>{dataJson.advice.commontreatment}</div>
@@ -304,7 +221,8 @@ class PreviewBody extends Component {
             </td>
           </tr>
         </table>
-        <p style={{textAlign:'right',marginTop:'15px'}}>医生签名:<span style={{minWidth: '60px',padding: '0 5px 2px 5px',borderBottom: '1px solid #333',}}>{baseObj ? baseObj.doctorName : (JSON.stringify(preInfo) == '{}' ? '' : preInfo.doctorName)}</span></p>
+        <p style={{textAlign:'right',marginTop:'15px'}}>医生签名:<span style={{minWidth: '60px',padding: '0 5px 2px 5px',borderBottom: '1px solid #333',}}>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
+        {showAssessBtn?<AssessResultHis inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
       </div>
 
       <div onClick={() => { this.surePrint(dataStr) }} style={{

+ 48 - 18
src/components/PreviewBody/index.less

@@ -1,18 +1,48 @@
-
-    .content {
-      position: fixed;
-      bottom: 70px;
-      overflow: auto;
-      top:120px;
-      width: 820px;
-      padding: 0 0px 60px 0px;
-      .contents {
-        position: relative;
-        padding-bottom: 26px;
-      }
-    }
-    .patInfo {
-      td {
-        border: 1px solid #aaa;
-      }
-    }
+@import "~@less/variables.less";
+.content {
+  position: fixed;
+  bottom: 70px;
+  overflow: auto;
+  top:120px;
+  width: 820px;
+  padding: 0 0px 60px 0px;
+  .contents {
+    position: relative;
+    padding-bottom: 26px;
+  }
+}
+table{
+  border-collapse: collapse;
+  width: 100%;
+}
+.infos{
+  .patInfoFst{
+    vertical-align: top;
+    border-bottom: 1px solid #e2e4e6;
+  }
+  .patInfoFst .patInfoSec{
+    padding: 9px 5px 8px 0px;
+    line-height: 20px;
+  }
+  .patInfoFst .patInfoSec:first-child{
+    text-align: right;    
+    width: 70px;
+    font-size: 14px;
+  }
+  &>tr>td:first-child {//打印样式需要改
+    // text-align: right;
+    // width: 70px;
+    // font-size: 14px;
+  }
+}
+.patInfo {
+  margin: 0px 0px 30px 0px;
+  td {
+    border: 1px solid #aaa;
+    padding: 8px 10px;
+    font-size: 14px;
+  }
+  tr td:first-child{
+    width: 31%;
+  }
+}

+ 8 - 10
src/components/PrintPreview/index.jsx

@@ -33,16 +33,14 @@ class PrintPreview extends Component {
             <div className={style['shade']} onClick={onClose}></div>
             <div className={style['modal']}>
                 <div className={style['close']}>打印<img src={close} onClick={onClose} /></div>
-                {/* <div id="content"> */}
-                    <PreviewBody
-                        preInfo={preInfo}
-                        dataJson={dataJson}
-                        dataStr={dataStr}
-                        show={true}
-                        onClose={onClose}
-                        save={save}
-                    ></PreviewBody>
-                {/* </div> */}
+                  <PreviewBody
+                      preInfo={preInfo}
+                      dataJson={dataJson}
+                      dataStr={dataStr}
+                      show={true}
+                      onClose={onClose}
+                      save={save}
+                  ></PreviewBody>
             </div>
         </div>
     }

+ 19 - 24
src/components/PushItems/index.jsx

@@ -14,7 +14,9 @@ import store from "@store";
 import { getWindowInnerHeight } from "@common/js/func";
 import {addLabel} from '@store/actions/inspect';
 import {addAssistLabel} from '@store/actions/assistCheck';
-import {windowEventHandler} from '@utils/tools'
+import {windowEventHandler,getCurrentDate} from '@utils/tools'
+import {ConfirmModal} from '@commonComp';
+import ChronicInfo from '@containers/ChronicInfo';//慢病推送模块
 
 class PushItems extends Component {
   constructor(props) {
@@ -22,7 +24,9 @@ class PushItems extends Component {
 
     this.state = {
       moreAssay: false,
-      moreCheck: false
+      moreCheck: false,
+      show:true,
+      showAssess:false      //评估弹窗
     };
 
     this.showMore = this.showMore.bind(this);
@@ -31,7 +35,7 @@ class PushItems extends Component {
     this.changeAssay = this.changeAssay.bind(this);
     this.changeCheck = this.changeCheck.bind(this);
     this.showTips = this.showTips.bind(this);
-    this.hideTips = this.hideTips.bind(this)
+    this.hideTips = this.hideTips.bind(this);
     this.$cont = React.createRef();
   }
 
@@ -42,14 +46,10 @@ class PushItems extends Component {
   closeMore(type) {
     this.setState({ [type]: false });
   }
-
-  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);
-    return date;
+  showAssessFn(){
+    this.setState({
+      showAssess:!this.state.showAssess
+    });
   }
 
   billing() {
@@ -57,13 +57,6 @@ class PushItems extends Component {
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
-    // if(checkedAssay.length > 0 || checkedCheck.length > 0) {
-    //   const Height = $(".src-components-BodyContainer-2SgEx").height();
-    //   const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
-    //   const winHeight = window.innerHeight;
-    //   const scrollTop = Height;
-    //   $('#addScrollEvent').scrollTop(100000)
-    // }
     let obj = {   //添加化验
       details: [],
       name: '',
@@ -74,7 +67,7 @@ class PushItems extends Component {
       name: '',
       questionId: '',
       showType: 1,
-      time:this.getCurrentDate(),
+      time:getCurrentDate(),
       value:''
     }
     if(checkedAssay.length > 0){
@@ -131,6 +124,7 @@ class PushItems extends Component {
     const { hideTipsDetailsModal } = this.props;
     hideTipsDetailsModal && hideTipsDetailsModal()
   }
+
   componentDidMount() {
     const height = getWindowInnerHeight() - 200;
     this.$cont.current.style.height = height + "px";
@@ -151,17 +145,17 @@ class PushItems extends Component {
       check,
       tips,
       showTipsDetails,
-      tipsDetails
+      tipsDetails,
+      tmpFlg,
     } = this.props.pushMessage;
-    const { tipsDiscalimer } = this.props;
-    const { moreAssay, moreCheck } = this.state;
+    const { tipsDiscalimer,chronicPushItems,wholeIndexs} = this.props;
+    const { moreAssay, moreCheck ,show} = this.state;
     const {
       showMore,
       closeMore,
       billing,
       changeCheck,
       changeAssay,
-      showAdd,
       showTips
     } = this;
     let assayNum = 0;
@@ -416,6 +410,7 @@ class PushItems extends Component {
                 )}
               </div>
             </div>
+            {chronicPushItems&&chronicPushItems.length>0?<ChronicInfo data={chronicPushItems} indexs={wholeIndexs}></ChronicInfo>:''}
             <div className={style["tips"]}>
               <h1>
                 <img src={tipsImg} />
@@ -429,6 +424,7 @@ class PushItems extends Component {
                       <span
                         className={style["tips-details"]}
                         onClick={() => showTips(tips)}
+                        style={{display:tmpFlg?'none':'inline-block'}}
                       >
                         详情
                       </span>
@@ -470,7 +466,6 @@ class PushItems extends Component {
             showTipsDetails = {showTipsDetails}
             hideTips = {this.hideTips}
             tipsDetails = {tipsDetails}/>}
-        
       </div>
     );
   }

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

@@ -176,7 +176,7 @@
   }
   .tips{
     border:1px solid #EAEDF1;
-    h1{
+    .tips-title,h1{
       font-size: 14px;
       color: #000;
       padding: 8px 15px;
@@ -188,6 +188,45 @@
         margin-right: 5px;
       }
     }
+    .tips-title{
+      .tips-name{
+        width: 255px;
+        display: inline-block;
+      }
+      h2{
+        display: inline-block;
+      }
+      .tips-btn{
+        display: inline-block;
+        float: right;
+      }
+      .redTips{
+        display: inline-block;
+        font-size: 12px;
+        -webkit-transform:scale(0.9);
+        color: red;
+        font-weight: normal;
+        white-space: nowrap;
+      }
+      .tipsDetails {
+        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);
+    }
     .content{
       font-size: 14px;
       padding:6px 15px;
@@ -229,6 +268,98 @@
         color: #979797;
         text-align: center;
       }
+      .list{
+        border-bottom: 1px solid #EAEDF1;
+        padding-bottom: 10px;
+        position: relative;
+        .infoPic{
+          vertical-align: middle;
+          margin: 0 5px;
+        }
+        >p{
+          margin-top: 10px;
+        }
+        .listName{
+          color:#3B9ED0;
+        }
+        .listResult{
+          float: right;
+          color: #000012;
+          i{
+            color: #F98F24;
+          }
+          img{
+            vertical-align: middle;
+          }
+        }
+        .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;
+          }
+        }
+      }
+      .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;
+            }
+          }
+        }
+      }
+      .list:last-child{
+        border-bottom:none;
+      }
     }
   }
   .modal {
@@ -353,3 +484,59 @@
   color: #979797;
   text-align: center;
 }
+
+.toast-title{
+  position: absolute;
+  top: 17px;
+  font-size: 16px;
+  // border-bottom: 1px solid #666;
+  width: 87%;
+  height: 25px;
+}
+.toast-cont{
+  line-height: 24px;
+  font-size: 14px;
+  // margin-top: 15px;
+  height: 222px;
+  overflow-y: auto;
+  padding: 10px 0 0 10px;
+  li{
+    margin-top: 10px;
+    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;
+  }
+}

+ 5 - 3
src/components/RadioDrop/index.jsx

@@ -1,6 +1,7 @@
 import React,{Component} from 'react';
 import {handleEnter,getPageCoordinate,windowEventHandler} from '@utils/tools.js';
 import {DropList} from '@commonComp';
+import classNames from 'classnames';
 import style from "./index.less";
 import $ from "jquery";
 
@@ -36,8 +37,9 @@ class RadioDrop extends Component{
     this.handleEditLabel = this.handleEditLabel.bind(this);
   }
   getClass(){
-    const {value,hideTag,placeholder,show} = this.props;
+    const {value,hideTag,placeholder,show,isImports} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
+    const orgBorder = isImports?style['orange-border']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
@@ -47,9 +49,9 @@ class RadioDrop extends Component{
       return style['no-tag'];
     }
     if(value){
-      return blueBorder?style['selected-tag']+' '+blueBorder:style['selected-tag'];
+      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
     }
-    return style['tag'];
+    return classNames(style['tag'],orgBorder);
   }
   handleSelect(item){
     const {handleSelect,ikey,mainSaveText,value} = this.props;

+ 5 - 3
src/components/RadioInpDrop/index.jsx

@@ -3,6 +3,7 @@ import {handleEnter,getPageCoordinate,windowEventHandler} from '@utils/tools.js'
 import {DropList} from '@commonComp';
 import config from '@config/index';
 import style from "./index.less";
+import classNames from 'classnames';
 import $ from "jquery";
 
 /****
@@ -39,8 +40,9 @@ class RadioInpDrop extends Component{
     this.handleInnerInp = this.handleInnerInp.bind(this);
   }
   getClass(){
-    const {value,hideTag,placeholder,show} = this.props;
+    const {value,hideTag,placeholder,show,isImports} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
+    const orgBorder = isImports&&!value?style['orange-border']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
@@ -50,9 +52,9 @@ class RadioInpDrop extends Component{
       return style['no-tag'];
     }
     if(value){
-      return blueBorder?style['selected-tag']+' '+blueBorder:style['selected-tag'];
+      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
     }
-    return style['tag'];
+    return classNames(style['tag'],orgBorder);
   }
   handleSelect(item){
     const {handleSelect,ikey,value,placeholder,mainSaveText} = this.props;

+ 271 - 0
src/components/ScaleTable/index.jsx

@@ -0,0 +1,271 @@
+import React from 'react';
+import style from './index.less';
+import mocks from '../../mock/chronicTable.js'
+import { Radio,CheckBtn ,Notify} from '@commonComp';
+ import Information from '../Information';
+ import {deepClone} from '@utils/tools.js';
+/**
+*量表 具体信息页面
+*title:量表标题/scaleName
+*data:量表内容:scaleName量表标题,calculate量表计算结果,group分组,
+*
+*
+**/
+class ScaleTable extends React.Component{
+  constructor(props){
+    super(props);
+    this.state={
+      selecteds:{},  //当前页面的选中标识,保存后使用select标识
+      valueData:{},
+      start:false,   //点击计算
+      score:{},  //选中的分数
+      totalScore:0  //前端计算结果
+    }
+  }
+  // handleRadio(groupName,name,value){
+  handleRadio(groupName,name,item){
+    const {selecteds,valueData,score} = this.state;
+    const value = item.detailName;
+    this.setState({
+      selecteds:Object.assign({},selecteds,{[name]:value}),
+      score:Object.assign({},score,{[name]:item.score})
+    })
+    const datas = JSON.parse(JSON.stringify(valueData));
+    const group = datas.group;
+    let rows;
+    let details;
+    for(let i=0; i<group.length; i++){
+      if(group[i].groupName==groupName){
+        rows = group[i].rows;
+        break;
+      }
+    }
+    if(rows){
+      for(let j=0; j<rows.length; j++){
+        let row = rows[j].row;
+        for(let k=0;k < row.length; k++){
+          if(row[k].name==name){
+            details = row[k].details;
+            row[k].isSelect = true;
+            break;
+          }
+        }
+      }
+    }
+    if(details){
+      for(let n=0; n<details.length; n++){
+        details[n].select = 0;
+        if(details[n].detailName==value){
+          details[n].select = 1;
+        }
+      }
+    }
+    this.setState({
+      valueData:datas
+    })
+  }
+  // handleCheckbox(name,value){
+  handleCheckbox(groupName,name,item){
+    let {selecteds,valueData} = this.state;
+    const value = item.detailName;
+    selecteds[name]?selecteds[name]:selecteds[name]=[];
+    const index = selecteds[name].findIndex((i)=>i==value);
+    if(index!=-1){
+      selecteds[name].splice(index,1);
+    }else{
+      selecteds[name].push(value);
+    }
+    this.setState({
+      selecteds:selecteds
+    });
+
+    const datas = JSON.parse(JSON.stringify(valueData));
+    const group = datas.group;
+    let rows;
+    let details;
+    for(let i=0; i<group.length; i++){
+      if(group[i].groupName==groupName){
+        rows = group[i].rows;
+        break;
+      }
+    }
+    if(rows){
+      for(let j=0; j<rows.length; j++){
+        let row = rows[j].row;
+        for(let k=0;k < row.length; k++){
+          if(row[k].name==name){
+            details = row[k].details;
+            row[k].isSelect = true;
+            break;
+          }
+        }
+      }
+    }
+    if(details){
+      for(let n=0; n<details.length; n++){
+        if(details[n].detailName==value){
+          if(!details[n].select || details[n].select==0){
+            details[n].select = 1;
+          }else{
+            details[n].select = 0;
+          }
+        }
+      }
+    }
+  }
+
+  handleFormula(data){//得分计算
+    const {tableId,getResult,parentId,scaleInfo} = this.props; 
+    const {valueData,score} = this.state; 
+    this.setState({
+      start:true
+    })
+    // 遍历是否有必填项未填的情况 filter:required==1 && !isSelect
+    const group = valueData.group;
+    let unfinish;
+    for(let i=0; i<group.length; i++){
+      let rows = group[i].rows;
+      for(let j=0; j<rows.length; j++){
+        if(rows[j].required==1&& (rows[j].row.filter((it,i)=>{return !it.isSelect})).length>0){
+          unfinish = true;
+          break;
+        }
+      }
+    }
+    if(unfinish){
+      Notify.info("请先将量表内容选择完整");
+      return
+    }
+    // 前端计算分数
+    let totalScore = 0;
+    for(let i in score){
+      totalScore += parseFloat(score[i])
+    }
+    this.setState({
+      totalScore:totalScore
+    })
+    const range = valueData&&valueData.calculate?valueData.calculate.range:'';
+    let resultText;
+    if(range){
+      for(let k=0; k<range.length; k++){
+        if(parseFloat(range[k].min) < totalScore && totalScore > parseFloat(range[k].max)){
+          resultText = range[k].text;
+        }
+      }
+    }
+    const result = {
+      score:totalScore,
+      text:resultText
+    }
+
+    const params = {
+      type:1,
+      content:JSON.stringify(valueData), //选择后的数据--字符串形式
+      id:parentId,
+      scaleId:tableId,
+    } 
+    // 替换表格内容
+    let allDatas = JSON.parse(JSON.stringify(scaleInfo[tableId])) ;
+     allDatas[1].content = JSON.stringify(valueData);
+    // 计算接口
+    getResult&&getResult({params,allDatas,result});
+  }
+  componentWillReceiveProps(nextProps){ 
+    const {tableId} = this.props;
+    if(JSON.stringify(nextProps.scaleInfo) !== '{}'){
+      this.setState({
+        // valueData:nextProps.scaleInfo[tableId].length?mocks.newData:JSON.parse(nextProps.scaleInfo[tableId].content),
+        valueData:JSON.parse(nextProps.scaleInfo[tableId][1].content),
+      })
+    }
+  }
+  componentDidMount(){
+    const {tableId,scaleInfo} = this.props;
+    if(scaleInfo&&scaleInfo[tableId]){
+      this.setState({
+        // valueData:scaleInfo[tableId].length?mocks.newData:JSON.parse(scaleInfo[tableId].content)
+        valueData:JSON.parse(scaleInfo[tableId][1].content)
+      })
+    }
+    
+  }
+  getContent(){ 
+    let {selecteds,valueData,start} = this.state;
+    // const datas = valueData&&valueData.group?valueData:mocks.newData;
+    const datas = valueData&&valueData.group?valueData:'';
+    let content =  datas&&datas.group&&datas.group.map((v,i)=>{
+                return <div className={style['group']}>
+                  <p className={style['groupName']}>{v.groupName}</p>
+                  {v.rows&&v.rows.map((it,ind)=>{
+                    return <div>
+                      {it.row.map((item,index)=>{
+                        if(item.controlType==0){
+                          return <div className={style['block']} style={{border:it.required==1&&!item.isSelect&&start?'1px solid #f00':'none'}}>
+                              <p className={style['miniName']}>{item.name}</p>
+                              {item.details&&item.details.map((vv,ii)=>{
+                                return <div className={style['item']}>
+                                        <Radio label={vv.detailName}
+                                           isSelect={vv.select==1||selecteds[item.name]==vv.detailName}
+                                           handleClick={this.handleRadio.bind(this,v.groupName,item.name,vv)}>
+                                        </Radio>
+                                        {vv.state==1?<span style={{color:'#3B9ED0'}}>(智能推荐)</span>:''}
+                                    </div>
+                              })}
+                              
+                            </div>
+                          }else{
+                            return <div className={style['block']}>
+                                <p className={style['miniName']}>{item.name}</p>
+                                  {item.details&&item.details.map((vv,ii)=>{
+                                    return <div className={style['item']}>
+                                    <CheckBtn value={vv.detailName}
+                                                    label={vv.detailName}
+                                                    isSelect={vv.select==1||selecteds[item.name]&&selecteds[item.name].includes(vv.detailName)}
+                                                    handleClick={this.handleCheckbox.bind(this,v.groupName,item.name,vv)}>
+                                          </CheckBtn>
+                                    {vv.state==1?<span style={{color:'#3B9ED0'}}>(智能推荐)</span>:''}
+                                    </div>
+                                  })}
+                            </div>
+                          }
+                        
+                      })}
+                    </div>
+                  })}
+                  {v.groupCalculate.isShow==1?<p className={style['subTotal']}>
+                    <span>计分</span>
+                    <span>{v.groupCalculate.result.value}</span>
+                  </p>:''}  
+                </div>
+              })
+    return content;
+  }
+
+  render(){
+    const {title,scaleInfo,tableId,formulaResult} = this.props;
+    const data = scaleInfo[tableId];
+    let {selecteds,totalScore} = this.state;
+    const content = data && data[1].content;//表格内容
+    const preContent = data && data[0].content;//表前文字
+    const footContent = data && data[2].content; //表后文字
+    const datas = content && JSON.parse(content);
+    const scaleResult = formulaResult&&formulaResult[tableId]; //量表计算结果
+    return <div className={style['tableBox']} id="printcontent">
+            <div className={style['printShow']}>
+              <Information></Information>
+            </div> 
+            <h1>{datas?datas.scaleName:''}</h1>
+            <div dangerouslySetInnerHTML={{__html:preContent}} className={style['textlh']}></div>
+            <div className={style['textContent']}>
+              {this.getContent()}
+              <div className={style['total']}>
+                <span>总分:</span>
+                <span>{scaleResult&&scaleResult.score||totalScore||''}</span>
+                <span className={style['totalBtn']} onClick={this.handleFormula.bind(this)}>得分</span>
+              </div>
+            </div>
+            <div dangerouslySetInnerHTML={{__html:footContent}} className={style['textlh']}></div>
+          </div>
+  }
+}
+export default ScaleTable;

+ 128 - 0
src/components/ScaleTable/index.less

@@ -0,0 +1,128 @@
+.tableBox{
+  // height: 690px;
+  overflow-y: auto;
+  // padding: 15px;
+  padding: 30px;
+  h1{
+    font-size: 16px;
+    font-weight: bold;
+    margin: 10px 0 30px;
+    text-align: center;
+  }
+}
+.table{
+  width: 100%;
+  margin: 10px 0;
+  border-top: 10px solid #D8D8D8;
+  border-bottom: 10px solid #D8D8D8;
+  tr{
+    border-bottom: 1px solid #979797;
+    td{
+      vertical-align: middle;
+      padding: 7px 0;
+    }
+  }
+  thead,tfoot{
+    tr{
+      height: 54px;
+    }
+    td{
+      color:#000;
+      font-weight: bold;
+    }
+  }
+  .sum{
+    text-align: right;
+    i{
+      display: inline-block;
+      min-width: 30px;
+      border-bottom: 1px solid #979797;
+      text-align: center;
+    }
+    .formulaBtn{
+      display: inline-block;
+      width: 50px;
+      height: 30px;
+      line-height: 30px;
+      text-align: center;
+      color:#fff;
+      background: #3B9ED0;
+      border-radius: 4px;
+      margin-left: 10px;
+      cursor: pointer;
+      font-weight: normal;
+    }
+  }
+  // .block{
+  //   display: block;
+  // }
+}
+strong{
+  font-weight: bold;
+}
+.textlh{
+  p{
+    line-height: 22px;
+  }
+}
+.textContent{
+  margin: 40px 0 30px;
+  .group{
+    border-bottom: 4px solid #EBEBEB;
+    padding-bottom: 10px;
+    margin-top: 25px;
+    .item{
+      display: inline-block;
+      margin-right: 24px;
+    }
+    .block{
+      margin-top: 20px;
+      padding-top: 5px;
+    }
+    .redBorder{
+      border: 1px solid #f00;
+    }
+    // .miniName{
+    //   margin-top: 25px;
+    // }
+  }
+  .groupName{
+    font-size: 14px;
+    font-weight: bold;
+    color:#000;
+    margin: 25px 0;
+  }
+  .subTotal{
+    height: 49px;
+    line-height: 49px;
+    border-top: 1px solid #EBEBEB;
+    text-align: right;
+    margin-top: 10px;
+  }
+  .total{
+    height: 72px;
+    line-height: 72px;
+    border-bottom: 10px solid #EBEBEB;
+    text-align: right;
+    .totalBtn{
+      display: inline-block;
+      width: 64px;
+      height: 32px;
+      line-height: 32px;
+      color:#3B9ED0;
+      border: 1px solid #3B9ED0;
+      border-radius: 4px;
+      margin-left: 40px;
+      text-align: center;
+      cursor: pointer;
+    }
+  }
+}
+.printShow {
+  display: none;
+}
+@media print {
+  .printShow {
+    display: block;
+  }
+}

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

@@ -310,16 +310,18 @@ class SpreadDrop extends Component{
     });
   }
   getClass(){
+    const {isImports,show,value} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
-    if(this.props.show){
+    const orgBorder = isImports&&!value?style['orange-border']:'';
+    if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
       $(this.$div.current).removeClass(style['borderd']);
     }
-    if(this.props.value){
+    if(value){
       return classNames(style['selected-tag'],blueBorder);
     }
-    return style['tag'];
+    return classNames(style['tag'],orgBorder);
   }
 
   componentDidMount(){

+ 1 - 22
src/components/TemplateItems/TemplateItem/index.jsx

@@ -10,7 +10,6 @@ import edit_icon from './img/edit_grey.png';
 import editing_icon from './img/edit_blue.png';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
-import Notify from '@commonComp/Notify';
 import store from '@store'
 import {checkItems} from '@store/actions/tabTemplate';
 import $ from 'jquery';
@@ -19,27 +18,16 @@ class TemplateItem extends React.Component {
     constructor() {
         super();
         this.content = null;
-        this.isAnimate = false;
         this.state = {
             delHover: false,
             editHover: false,
             checkBox:false,
-            bgColor:false
+            bgColor:false,
         };
-        this.titleDOM = null;
         this.isConfirmClick = false;
         this.timer = null;
         this.handleTitleClick = this.handleTitleClick.bind(this)
     }
-    genContent() {
-        const {preview} = this.props;
-        this.title = '';
-        let DesItems = [];
-        for(var a in previewJson){
-            DesItems.push(<DesItem preview={preview} des={a} />);            
-        }
-        return DesItems;
-    }
 
     getArrow() {
         return this.state.isOpen ? arrow_down_icon : arrow_icon;
@@ -118,10 +106,6 @@ class TemplateItem extends React.Component {
         this.props.handleTitleChange(currId,name);
     }
 
-    recoverTitle() {
-        this.titleDOM.innerHTML = this.props.title;
-    }
-
     handleTitleClick(e) {
       if(e.target.tagName == 'I'){
         let tmpDomLis = $(e.target).parent().parent().siblings()
@@ -184,7 +168,6 @@ class TemplateItem extends React.Component {
                         /></div>:null
                     }
                     <i
-                        ref={(title) => this.titleDOM = title}
                         className={style['title']}
                         title={name+sexStr}
                     >
@@ -221,10 +204,6 @@ class TemplateItem extends React.Component {
         )
     }
 
-    componentDidUpdate() {
-        this.isAnimate = false;
-    }
-
     componentWillUnmount() {
         clearTimeout(this.timer);
     }

+ 1 - 0
src/components/TemplateItems/TemplateItem/index.less

@@ -14,6 +14,7 @@
 //   margin-bottom: 5px;
   border: 1px solid #fff;
   &:hover{
+    border: 1px solid @blue-background-color;
     border: 1px solid @blue-background-color;
     .title{
       color:@blue-background-color;

+ 6 - 3
src/components/TemplateItems/index.jsx

@@ -18,18 +18,21 @@ class TemplateItems extends React.Component {
     componentDidMount(){
         const height = getWindowInnerHeight()-206;
         this.$cont.current.style.height = height+"px";
-        windowEventHandler('resize', ()=>{
+        if(this.$cont.current){
+          windowEventHandler('resize', ()=>{
             const height = getWindowInnerHeight()-206;
             this.$cont.current.style.height = height+"px";
-        });
+          });
+        }
     }
     genItems() {
         const Items = [];
-        this.props.items.forEach((v) => {
+        this.props.items.forEach((v,idx) => {
             Items.push(
                 <TemplateItem
                     {...v}
                     key={v.id}
+                    idx={idx}
                     checkItems={this.props.checkItems}
                     allCheckShow={this.props.allCheckShow}
                     handleContentClick={this.props.handleContentClick}

+ 41 - 0
src/components/Treat/AdverseReactions/index.jsx

@@ -0,0 +1,41 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import info2 from './../img/info2.png';
+import info3 from './../img/info3.png';
+import $ from "jquery";
+
+class AdverseReactions extends Component {
+    constructor(props){
+        super(props);
+      
+    }
+    changeReact(it, index) {
+        this.props.changeReact(it, index);
+    }
+
+
+    render() {
+        const { icon, titleStyle,titleBg, filter, title,  adversReactionList } = this.props
+        return(
+            <div className={style['last-treat-wrapper']}>
+                { console.log('adversReactionList', adversReactionList) }
+                <div className={style['last-treat-title-box']} style={titleStyle}></div>
+                <div className={style['last-treat-title']} ><img className={style['last-treat-icon']} src={icon}/>{title}</div>
+                {adversReactionList.map((item, index) => {
+                    return (<div key={item.id}><span>{item.tagName}:</span>
+                        {console.log('item.details', item.details)}
+                        {item.details.map((it, idx) => {
+                            return <span key={item.id + it.name}>
+                                <input type="checkbox" checked={it.checked} id={item.id + it.name} onChange={this.changeReact.bind(this, it, index)}/>
+                                <label for={item.id + it.name}> {it.name} </label>
+                            </span>
+                        })}
+                    </div>)
+                })}
+            </div>
+        )
+    }
+
+}
+
+export default AdverseReactions;

+ 27 - 0
src/components/Treat/AdverseReactions/index.less

@@ -0,0 +1,27 @@
+.last-treat-wrapper {
+    position: relative;
+    padding: 10px 0 0 0;
+}
+.last-treat-title-box {
+    height: 36px;
+    line-height: 36px;
+    background: rgb(47,199,156);
+    opacity: 0.1;
+    filter:alpha(opacity=10);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=10);";
+}
+.last-treat-title {
+    position: absolute;
+    width: 100%;
+    top: 10px;
+    height: 36px;
+    line-height: 36px;
+    font-weight: bold;
+}
+.last-treat-icon {
+    width: 16px;
+    float: left;
+    margin: 10px;
+}
+
+

+ 77 - 0
src/components/Treat/DrugHistory/LastDrug/index.jsx

@@ -0,0 +1,77 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import info2 from './../../img/info2.png';
+import info3 from './../../img/info3.png';
+import $ from "jquery";
+
+class LastDrug extends Component {
+    constructor(props){
+        super(props);
+        this.state = {
+            currentIndex: -1
+        }
+        this.handleMouseLeaveDrug = this.handleMouseLeaveDrug.bind(this);
+        this.handleMouseLeaveImg = this.handleMouseLeaveImg.bind(this);
+        this.setDrugInfo = this.setDrugInfo.bind(this);
+    }
+    handleMouseEnterDrug(index, item) {
+        const drugNameWidth = parseInt($('#'+item.medicitionName)[0].offsetWidth)
+        const imgLeft = drugNameWidth/2-8
+        $('#'+item.medicitionName).find('img').css('left', imgLeft)
+        this.setState({
+            currentIndex: index,
+        })
+    }
+    handleMouseLeaveDrug() {
+        this.setState({
+            currentIndex: -1, 
+        })
+    }
+    handleMouseEnterImg() {
+        this.setState({
+            hasEnterImg: true
+        })
+    }
+    handleMouseLeaveImg() {
+        this.setState({
+            hasEnterImg: false
+        })
+    }
+    setDrugInfo(item) {
+        const { setDrugInfo } = this.props;
+        setDrugInfo && setDrugInfo(item);
+    }
+
+
+    render() {
+        const { icon, titleStyle,titleBg, filter, title, lastDrugList, showDrugInfo } = this.props
+        const  { currentIndex, hasEnterImg } = this.state
+        return(
+             <div className={style['last-common-box']}>
+                <div className={style['last-common-title']}>{title}</div>
+                <div className={style['last-common-list']}>
+                    {lastDrugList.map((item, index) => {
+                        return<span
+                            onMouseEnter={this.handleMouseEnterDrug.bind(this, index, item)}
+                            onMouseLeave = {this.handleMouseLeaveDrug}
+                            id={item.medicitionName}
+                            className={style['last-common-warpper']}
+                            > 
+                            {item.medicitionName} 
+                            {<img className={style['info-img']}  
+                                style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
+                                src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
+                                onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                onMouseLeave = {this.handleMouseLeaveImg}
+                                onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
+                            {index == lastDrugList.length-1 ?  '' : <span>,</span>}
+                        </span>
+                    })}
+                </div>
+            </div>
+        )
+    }
+
+}
+
+export default LastDrug;

+ 14 - 0
src/components/Treat/DrugHistory/LastDrug/index.less

@@ -0,0 +1,14 @@
+.last-common-title {
+    height: 30px;
+    line-height: 30px;
+}
+.last-common-warpper {
+    position: relative;
+    margin: 0 20px 0 0
+}
+.info-img {
+    position: absolute;
+    width: 15px;
+    position: absolute;
+    top: -15px;
+}

+ 33 - 0
src/components/Treat/DrugHistory/index.jsx

@@ -0,0 +1,33 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import LastDrug from './LastDrug/index.jsx';
+import info2 from './../img/info2.png';
+import info3 from './../img/info3.png';
+import $ from "jquery";
+
+class DrugHistory extends Component {
+    constructor(props){
+        super(props);
+        this.state = {
+            currentIndex: -1    
+        }
+    }
+   
+
+    render() {
+        const { icon, titleStyle,titleBg, filter, title, drugHistory, showDrugInfo, setDrugInfo } = this.props
+        console.log('1111111111111111')
+        return(
+            (drugHistory['慢病用药内容'] && drugHistory['慢病用药内容'].length > 0 || drugHistory['普通病用药内容'] && drugHistory['普通病用药内容'].length > 0) &&
+            <div className={style['last-treat-wrapper']}>
+                <div className={style['last-treat-title-box']} style={titleStyle}></div>
+                <div className={style['last-treat-title']} ><img className={style['last-treat-icon']} src={icon}/>{title}</div>
+                {drugHistory['慢病用药内容'].length > 0 && <LastDrug title='普通病用药内容' lastDrugList = {drugHistory['慢病用药内容']}  showDrugInfo={showDrugInfo} setDrugInfo={setDrugInfo}></LastDrug>}
+                {drugHistory['普通病用药内容'].length > 0 && <LastDrug title='慢病用药内容' lastDrugList = {drugHistory['普通病用药内容']}  showDrugInfo={showDrugInfo} setDrugInfo={setDrugInfo}></LastDrug>}
+            </div>
+        )
+    }
+
+}
+
+export default DrugHistory;

+ 27 - 0
src/components/Treat/DrugHistory/index.less

@@ -0,0 +1,27 @@
+.last-treat-wrapper {
+    position: relative;
+    padding: 10px 0 0 0;
+}
+.last-treat-title-box {
+    height: 36px;
+    line-height: 36px;
+    background: rgb(47,199,156);
+    opacity: 0.1;
+    filter:alpha(opacity=10);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=10);";
+}
+.last-treat-title {
+    position: absolute;
+    width: 100%;
+    top: 10px;
+    height: 36px;
+    line-height: 36px;
+    font-weight: bold;
+}
+.last-treat-icon {
+    width: 16px;
+    float: left;
+    margin: 10px;
+}
+
+

+ 66 - 0
src/components/Treat/FollowUp/Textarea/index.jsx

@@ -0,0 +1,66 @@
+import React, { Component } from "react";
+import style from "./index.less";
+import config from '@config/index';
+import $ from 'jquery';
+
+class Textarea extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      timer:null,
+      val:'报告描述或意见'
+    };
+    this.textInput = React.createRef();
+    this.$dom = React.createRef();
+    this.$domW = React.createRef();
+    this.handleInput = this.handleInput.bind(this);
+  }
+  handleInput(e){
+    e.stopPropagation();
+    const {handleInputFollowUp,idx,handlePush} = this.props;
+    const text = e.target.innerText || e.target.innerHTML;
+    handleInputFollowUp&&handleInputFollowUp(text);
+   
+  }
+  shouldComponentUpdate(next){
+    if(JSON.stringify(next) == JSON.stringify(this.props)){
+      return false;
+    }
+    return true;
+  }
+  componentWillReceiveProps(next){
+    const isRead = this.props.isRead;
+    // if(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.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 = '' 
+      // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
+    }
+  }
+  componentDidMount(){
+    const {value} = this.props;
+    if(value && value.trim()){
+      this.$dom.current.innerText = 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 = '')
+    }
+  }
+ 
+  render() {
+    return (
+      <span>
+        <span 
+            className = {style['follow-up-box']}
+            contenteditable={true}
+            ref={this.$dom}
+            onInput={this.handleInput}
+            onKeyUp={this.handleInput}
+        ></span>
+      </span>
+    );
+  }
+}
+export default Textarea;

+ 0 - 0
src/components/Treat/FollowUp/Textarea/index.less


Some files were not shown because too many files changed in this diff