Bladeren bron

Merge remote-tracking branch 'origin/dev5.3.4' into dev5.3.4

zhouna 5 jaren geleden
bovenliggende
commit
4693504b82
58 gewijzigde bestanden met toevoegingen van 725 en 427 verwijderingen
  1. 1 1
      src/common/components/EditableSpan/index.jsx
  2. 74 0
      src/common/components/HasInfoItem/index.jsx
  3. 80 0
      src/common/components/HasInfoItem/index.less
  4. 2 2
      src/common/components/InlineTag/index.jsx
  5. 2 1
      src/common/components/ItemBox/index.jsx
  6. 1 1
      src/common/components/NumberUnitPan/index.less
  7. 9 9
      src/common/components/Textarea/index.jsx
  8. 1 1
      src/components/AddAssistCheck/Textarea/index.jsx
  9. 1 1
      src/components/AddAssistCheck/Textarea/index.less
  10. 2 2
      src/components/AddAssistCheck/index.jsx
  11. 1 0
      src/components/AddAssistCheck/index.less
  12. 2 2
      src/components/AddInspect/SlideSelect/index.jsx
  13. 3 0
      src/components/AddInspect/SlideSelect/index.less
  14. 14 20
      src/components/Advice/index.jsx
  15. 11 0
      src/components/Advice/index.less
  16. 0 1
      src/components/Diagnosis/index.jsx
  17. 2 2
      src/components/DiagnosticList/index.jsx
  18. 7 5
      src/components/DiagnosticList/index.less
  19. 8 4
      src/components/Information/index.jsx
  20. 1 1
      src/components/Information/index.less
  21. 1 1
      src/components/Inspect/index.jsx
  22. 13 9
      src/components/MultSpread/index.jsx
  23. 2 2
      src/components/Multiple/index.less
  24. 6 6
      src/components/NumberDrop/index.jsx
  25. 14 6
      src/components/PreviewBody/index.jsx
  26. 2 2
      src/components/RadioDrop/index.jsx
  27. 8 4
      src/components/RadioInpDrop/index.jsx
  28. 1 0
      src/components/RadioInpDrop/index.less
  29. 3 0
      src/components/SpreadDrop/index.jsx
  30. 3 0
      src/components/SpreadDrop/index.less
  31. 38 36
      src/components/Treat/DrugTreat/index.jsx
  32. 31 1
      src/components/Treat/DrugTreat/index.less
  33. 6 0
      src/components/Treat/FollowUp/index.less
  34. 24 3
      src/components/Treat/GeneralTreat/index.jsx
  35. 18 1
      src/components/Treat/GeneralTreat/index.less
  36. 4 4
      src/components/Treat/index.jsx
  37. 33 72
      src/components/TreatDesc/index.jsx
  38. 1 1
      src/components/TreatDesc/index.less
  39. 6 1
      src/config/index.js
  40. 2 1
      src/containers/AdviceContainer.js
  41. 1 0
      src/containers/AssistCheck.js
  42. 1 0
      src/containers/CheckBody.js
  43. 1 0
      src/containers/ChronicInfo.js
  44. 1 0
      src/containers/CurrentIll.js
  45. 2 1
      src/containers/Diagnosis.js
  46. 0 1
      src/containers/DiagnosticItem.js
  47. 1 0
      src/containers/Inspect.js
  48. 1 0
      src/containers/MainSuit.js
  49. 1 0
      src/containers/OtherHistory.js
  50. 4 6
      src/containers/Treat.js
  51. 125 32
      src/store/actions/pushMessage.js
  52. 6 4
      src/store/actions/treat.js
  53. 5 2
      src/store/async-actions/fetchModules.js
  54. 1 0
      src/store/async-actions/mainSuit.js
  55. 2 1
      src/store/async-actions/patInfo.js
  56. 67 119
      src/store/async-actions/treat.js
  57. 66 58
      src/utils/tools.js
  58. 2 0
      src/utils/utils.js

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

@@ -372,7 +372,7 @@ class EditableSpan extends Component{
     if(br&&$span&&!$span.innerText){
       this.$span.current.innerHTML=' ';
     }
-    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2));
+    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6));
   }
 
   render() {

+ 74 - 0
src/common/components/HasInfoItem/index.jsx

@@ -0,0 +1,74 @@
+import React,{Component} from 'react';
+import style from './index.less';
+import infoShow from '@common/images/info-show.png';
+import infoMove from '@common/images/info-move.png';
+import $ from 'jquery';
+
+class HasInfoItem extends Component {
+    constructor(props) {
+        super(props)
+        this.state = {
+            hasEnterItem: false,
+            hasEnterImg: false
+        }
+    }
+    handleMouseEnterDrug(){
+        this.setState({
+            hasEnterItem: true
+        })
+    }
+    handleMouseLeaveDrug(){
+        this.setState({
+            hasEnterItem: false
+        })
+    }
+    handleMouseEnterImg(){
+        this.setState({
+            hasEnterImg: true
+        })
+    }
+    handleMouseLeaveImg(){
+        this.setState({
+            hasEnterImg: false
+        })
+    }
+    setDrugInfo(item,e){
+        e.stopPropagation();
+        const{ setDrugInfo } = this.props
+        setDrugInfo && setDrugInfo(item)
+    }
+    handleSelect(){
+        const{ handleSelect, position } = this.props
+        handleSelect && handleSelect(position)
+    }
+
+    render(){
+        const { item } = this.props
+        const { hasEnterItem, hasEnterImg} = this.state
+        return (<span className={style['drug-name-wrapper']} >
+            <span className={`${style['drug-name']}`}  
+                // onDoubleClick={() =>{this.setDrugInfo(it);showDrugInfo();}}  //药品说明双击显示(现在为点击图标显示)
+                onClick={()=>{item.forbidden === '2' ? '' : this.handleSelect()}} 
+                onMouseEnter={this.handleMouseEnterDrug.bind(this)}
+                onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
+                >
+                <span className={`${style['drug-name-span']}  ${item.forbidden === '2' ? style['disabled']: item.selected ?  style['selected'] : ''}`}>
+                    {item.medicitionName}
+                </span>
+                {<img className={`${style['info-img']} ${hasEnterItem?style['show-content']:style['hide-content']}`}  
+                title='点击i图标可查看详细说明'
+                src={hasEnterImg?infoMove:infoShow} 
+                onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
+                onClick={this.setDrugInfo.bind(this,item)}/>}
+            </span>
+            {(item.forbidden === '1'||item.forbidden === '2') && <span className={`${style['info-flag']} ${item.forbidden === '1' ? style['cautious']:item.forbidden === '2'?style['disabled']:''}`}>
+                {item.forbidden === '1' ? "慎用":item.forbidden === '2'? "禁用":""} 
+            </span>}
+        {/*<span  style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{item.rate}</span>*/}
+
+    </span>)
+    }
+}
+
+export default HasInfoItem;

+ 80 - 0
src/common/components/HasInfoItem/index.less

@@ -0,0 +1,80 @@
+
+
+.drug-name-wrapper {
+    position: relative;
+    margin-right: 6px;
+    &:not(:last-child){
+        .drug-name-span:after{
+            display: inline;
+            content: ',';
+        }
+    }
+    
+.drug-name {
+    display: inline-block;
+    cursor: pointer;
+    position: relative;
+    
+    
+}
+.drug-name-span {
+   position: relative;
+   text-decoration: underline;
+   
+}
+}
+.underline {
+    position: absolute;
+    width: 100%;
+    border-bottom: 1px solid #666;
+    display: inline-block;
+    left: 0;
+    bottom: 0;
+}
+.underline-select {
+    border-bottom: 1px solid #3B9ED0;
+}
+.info-img, .info-img-more {
+    width: 12px;
+    margin: 0 3px -1px;
+    cursor: pointer;
+}
+.info-img {
+    width: 15px;
+    position: absolute;
+    top: -5px;
+    left: 50%;
+    margin-left: -7px;
+    cursor: pointer;
+}
+.info-flag {
+    display: inline-block;
+    width: 34px;
+    height: 16px;
+    line-height: 16px;
+    border-radius: 4px;
+    text-align: center;
+    margin: 0 0 0 5px;
+    border: 1px solid #000;
+    position: relative;
+    top: 2px;
+}
+.show-content {
+    display: inline-block;
+}
+.hide-content{
+    display: none;
+}
+.disabled{
+    opacity: 0.3;
+    filter:alpha(opacity=30);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
+}
+.selected {
+    color: #3B9ED0;
+}
+.cautious {
+    border: 1px solid #F4C051;
+    background: #F4C051;
+}
+

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

@@ -87,9 +87,9 @@ class InlineTag extends Component {
       return classNames(style['no-tag'],ext, setFontColorSize(2),'prefixUnsetColor');
     }
     if(!value||value.trim()==placeholder){//灰色标签
-      return classNames(style['gray'],ext, setFontColorSize(1));
+      return classNames(style['gray'],ext, setFontColorSize(2));
     }
-    return classNames(style['selected-tag'], setFontColorSize());
+    return classNames(style['selected-tag'],ext, setFontColorSize());
   }
   moveEnd(obj) {
     if(window.getSelection){//ie11 10 9 ff safari

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

@@ -1,5 +1,6 @@
 import React,{Component} from 'react';
 import style from './index.less';
+import store from '@store';
 import {isIE,handleEnter,setFontColorSize} from '@utils/tools.js';
 import $ from 'jquery';
 /***
@@ -38,7 +39,6 @@ class ItemBox extends Component {
       handleChange&&handleChange(e)
     }
   }
-
   componentDidMount(){
     const {setRef} = this.props;
     this.$div.current.innerHTML='';     //bug2276,FF26初始光标位置问题
@@ -49,6 +49,7 @@ class ItemBox extends Component {
       },this);
     }
   }
+  
 componentWillReceiveProps(nextP){
     if(nextP.children.length>1){
       const that = this;

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

@@ -4,7 +4,7 @@
 }
 .pan{
   width: 280px;
-  
+  font-weight: normal;
   td{
     width: 68px;
     height:44px;

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

@@ -4,7 +4,7 @@ import Notify from '../Notify';
 import config from '@config/index';
 import {isIE} from '@utils/tools.js';
 import {getFeature} from '@store/async-actions/fetchModules';
-import {getAllDataList,getAllDataStringList,ifOtherClear} from "@utils/tools.js";
+import {getAllDataList,getAllDataStringList,ifOtherClear,setFontColorSize} from "@utils/tools.js";
 import store from '@store';
 import $ from "jquery";
 
@@ -137,12 +137,12 @@ class Textarea extends Component {
       if(ev.keyCode==13){return false;}
     }
   }
-  shouldComponentUpdate(next){
-    if(JSON.stringify(next) == JSON.stringify(this.props)){
-      return false;
-    }
-    return true;
-  }
+  // 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&&next.value&&next.value.indexOf("复诊")!=-1)){    //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
@@ -167,9 +167,9 @@ class Textarea extends Component {
     const { title,boxMark } = this.props;
     return (
       <div className={style["box"]}>
-        <div className={style["title"]}>{title}</div>
+        <div className={`${style["title"]} ${setFontColorSize(2,4)}`}>{title}</div>
         {/*{isRead?<div className={style["content"]+" "+'11'} contentEditable={true} onFocus={this.handleFocus}>{value}</div>:''}*/}
-        <div className={style["content"]}
+        <div className={`${style["content"]} ${setFontColorSize(2,5)}`}
              onFocus={this.handleFocus}
              ref={this.$dom}
              contentEditable={true}

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

@@ -74,7 +74,7 @@ class Textarea extends Component {
     const {idx,disabled} = this.props;
     return (
       <div className={style.textWap}>
-        <div className={`${style.divTextarea} ${setFontColorSize(2,1)}`}
+        <div className={`${style.divTextarea} ${setFontColorSize(2)}`}
             contenteditable={disabled?false:true}
             ref={this.$dom}
             onInput={this.handleInput}

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

@@ -1,6 +1,6 @@
 .divTextarea {
   /*overflow-y: auto;*/
-  overflow-x: hidden;
+  // overflow-x: hidden;
   /*max-height: 100px;*/
   border-bottom: 1px dashed #333;
   box-sizing: border-box;

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

@@ -210,7 +210,7 @@ class AddAssistCheck extends React.Component {
                     </span>
                   </span> */}
                   <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
-                  <div className={styles.textareaWrap}>
+                  <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                     <ScrollArea speed={0.8}
                                 horizontal={false}
                                 stopScrollPropagation={showedBar?true:false}
@@ -264,7 +264,7 @@ class AddAssistCheck extends React.Component {
                 </span>
               </span> */}
               <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
-              <div className={styles.textareaWrap}>
+              <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                 <ScrollArea speed={0.8}
                             horizontal={false}
                             stopScrollPropagation={showedBar?true:false}

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

@@ -192,6 +192,7 @@
 .tagSpan {
   position: relative;
   cursor: default;
+  font-weight: bold;
 }
 
 .tagSpan:hover {

+ 2 - 2
src/components/AddInspect/SlideSelect/index.jsx

@@ -126,13 +126,13 @@ class SlideSelect extends Component {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
-                <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
+                <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
                   <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
-                <i className={styles.tagSpan} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
+                <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
                   <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>

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

@@ -197,6 +197,9 @@
   display: inline-block;
   position: relative;
 }
+.tagSpanS {
+    font-weight: bold;
+}
 .selectTagSpan {
   color: #000;
   font-weight: bold;

+ 14 - 20
src/components/Advice/index.jsx

@@ -20,12 +20,6 @@ class Advice extends Component{
     this.handleAdviceInput = this.handleAdviceInput.bind(this);
   }
 
-  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
@@ -68,20 +62,20 @@ class Advice extends Component{
   render(){
     const {advice} = this.props.pushMessage;
     const {isRead, isFirstMainDiag, followUp, hasFollowUp, saveFollowUp, typeConfig} = 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 ? 
-          <div>
-            { it.treatmentStr }
-            {/* <input className={style['treat-input']} ref={this.treatInput} onInput={(e)=>{this.handleTreatInput(e, index, ii)}} type='text' value={ it.treatmentStr }/>  */}
-          </div>: '') 
-
-        // return <div>{it.drugs.length > 0 ? it.name : ''}: {it.drugs.map((drug, drugIndex) =>{
-        //   return(<span>{drug.selected ? (drugIndex === 0 ? drug.name : '  ' + drug.name) : ''}</span>)
-        // })}</div>
-      })}</p>
+    let scheme = advice.scheme && advice.scheme.map((item0, index0) => {
+      return <p>
+        {item0.treatment.map((item1, index1) => {
+          return item1.meditionDetails.map((item2, index2) => {
+              return item2.treatment.map((item3, index3) => {
+                return(item3.treatmentStr && item3.treatmentStr.length > 0 ?
+                  <div>
+                    { item3.treatmentStr }
+                  </div>: '')
+              })
+          })
+        })}
+      </p>
     })
-
     return  <div id="adviceBox" className={`${'mainsuit-box'} ${style['main-suit']}`}>
       <ItemBox title='医嘱' editable={false} border={true} marginTop="10px">
         <div className={`${style['billing']} ${setFontColorSize(2)}`}>
@@ -94,7 +88,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 && hasFollowUp &&<div><FollowUp  noHeader="true" textStyle={{padding: '0 10px'}}  setFollowUp={saveFollowUp} followUp = {followUp} isRead={isRead}></FollowUp></div>}
+        {!isFirstMainDiag && hasFollowUp &&<FollowUp  noHeader="true" textStyle={{padding: '0 10px'}}  setFollowUp={saveFollowUp} followUp = {followUp} isRead={isRead}></FollowUp>}
         {advice.scheme && advice.scheme.length > 0 &&<div contentEditable='false' className={`${style['scheme']} ${setFontColorSize(2)}`}>
           {advice.scheme && advice.scheme.length > 0  && <h1>治疗方案</h1>}
           {scheme}

+ 11 - 0
src/components/Advice/index.less

@@ -8,17 +8,28 @@
 }
 .billing {
   padding: 0px 10px;
+  color: #000;
   h1{
     margin: 5px 0px;
+    font-size: unset;
+  }
+  p,span{
+    font-size: unset;
   }
 }
 .scheme {
   padding: 0px 10px;
+  color: #000;
   h1{
     margin: 5px 0px;
+    font-size: unset;
   }
   p{
     line-height: 18px;
+    font-size: unset;
+  }
+  div {
+    font-size: unset;
   }
 }
 .treat-input {

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

@@ -18,7 +18,6 @@ class Diagnosis extends Component {
     this.hideSearch = this.hideSearch.bind(this);
     this.handleshowSearch = this.handleshowSearch.bind(this);
     this.refreshScroller = this.refreshScroller.bind(this);
-
   }
   componentWillReceiveProps() {
     this.setState({

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

@@ -288,7 +288,7 @@ class DiagnosticList extends Component {
                     {list && (list.length > 0) && list.map((item, index) => {
                         const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
                            || (item.drugHistory && item.drugHistory['慢病用药内容'] &&  item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] &&  item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
-                        isChronic = chronicMagItem&&item.type==2&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
+                        isChronic = chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
                         return (<div draggable={true} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
                                     {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>}
@@ -300,7 +300,7 @@ class DiagnosticList extends Component {
                                       <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}} onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
                                         {item.name}
                                       </span>
-                                      <img className={`${style['info-img']}`}  
+                                      <img className={`${style['info-img']}`}
                                           title='点击i图标可查看详细说明'
                                           style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
                                           src={hasEnterImg ? infoMove : infoShow} 

+ 7 - 5
src/components/DiagnosticList/index.less

@@ -53,26 +53,28 @@
 
 
 .diag-name {
-   
     margin-left: 10px;
-    border-bottom: 1px solid #666;
+    // border-bottom: 1px solid #666;
     box-sizing: border-box;
     position: relative;
     color:#000;
     font-weight: bold;
     cursor: pointer;
+    line-height: 18px;
 }
 .diag-name-box {
     .ellipsis;
     display: inline-block;
-    line-height: 16px;
+    line-height: 18px;
+    border-bottom: 1px solid #666;
+    position: relative;
+    top: 3px;
     // max-width: 220px;
 }
 
 .diag-up, .diag-down {
     position: relative;
     top: 5px;
-    
 }
 
 .treat {
@@ -124,7 +126,7 @@
 }
 .assess{
     .treat;
-    right: 106px;
+    right: 116px;
 }
 .diag-del {
     position: absolute;

+ 8 - 4
src/components/Information/index.jsx

@@ -22,16 +22,20 @@ class Information extends Component {
         <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.inquiryCode : (noData ? '' : preInfo.recordId)}</td>
+          </tr>
+          <tr>
             <td>年龄:{baseObj ? baseObj.patientAge : noData ? '' : preInfo.patientAge}</td>
+            <td>医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</td>
+          </tr>
+          <tr>
             <td>性别:{baseObj ? baseObj.patientSex : noData ? '' : preInfo.patientSex}</td>
+            <td>科室:{baseObj ? baseObj.hospitalDeptName : (noData ? '' : preInfo.hospitalDeptName)}</td>
           </tr>
           <tr>
+            <td>卡号:{baseObj ? baseObj.patientIdNo : noData ? '' : preInfo.patientIdNo}</td>
             <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>

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

@@ -13,7 +13,7 @@
     font-size: 14px;
   }
   tr td:first-child{
-    width: 35%;
+    width: 50%;
   }
 }
 @media print{

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

@@ -219,7 +219,7 @@ class Inspect extends React.Component {
       <div className={styles.wrapper}>
         {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
         <div className={styles.top}>
-          <span id="inspectResultData" className={`${setFontColorSize(2,5)}`}>化验结果数据</span>
+          <span id="inspectResultData" className={setFontColorSize(2,5)}>化验结果数据</span>
           {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
           <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0 ? 'none' : 'block' }}>
             {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>

+ 13 - 9
src/components/MultSpread/index.jsx

@@ -40,6 +40,7 @@ class MultSpread extends Component{
       weight:0,     //体重
       bmi:'',        //BMI
       wrBmi:false,      //是否无效bmi值,是则要清空身高体重,不能用判断bmi是否为空来判断,因为初始就是为空
+      isSelectAll:false
     };
     this.setBMIParam = this.setBMIParam.bind(this);
     this.setBMI = this.setBMI.bind(this);
@@ -53,7 +54,7 @@ class MultSpread extends Component{
     //const orgBorder = isImports&&!text?style['orange-border']:'';
     const isSelected = text?style['selected']:style['container'];
     const hasAdd = showAdd?style['add']:'';
-    return classNames(isSelected,hasAdd,setFontColorSize(isExtBlue?2:1));
+    return classNames(isSelected,hasAdd,setFontColorSize(isExtBlue?2:!!text?'':1));
   }
   saveDoms(it){
     const doms = this.state.numDoms;
@@ -136,8 +137,10 @@ class MultSpread extends Component{
     }
   }
   getLabels(){
-    const {data,ikey,showArr,copyId,boxMark,isExtBlue} = this.props;
-    const {wrBmi,bmi} = this.state;
+    const {data,ikey,showArr,copyId,boxMark,isExtBlue,saveText} = this.props;
+    const {wrBmi,bmi,isSelectAll} = this.state;
+    const labelInx = tools.getLabelIndex(ikey);
+    const text = !!(saveText&&saveText[+labelInx]);
     let show = false;
     let inx = '',count=0;
     const list = data.map((it,i)=>{
@@ -200,6 +203,7 @@ class MultSpread extends Component{
                              suffix={it.labelSuffix}
                              placeholder={it.name}
                              isExtBlue={isExtBlue}
+                             isSelectAll={text}
                              //inputRef = {this['$inp'+(count++)]}
                              saveDoms={this.saveDoms.bind(this)}
                              reFocus={this.setNextFocus.bind(this)}
@@ -240,9 +244,9 @@ class MultSpread extends Component{
     const {saveAddItem,fullData,copyId,showAdd} = this.props;
     if(showAdd){
       const data = tools.deepClone(fullData);
-    setTimeout(function(){        //修改个别历史病例引用报错bug
-      saveAddItem&&saveAddItem(copyId,data);
-    })
+      setTimeout(function(){        //修改个别历史病例引用报错bug
+        saveAddItem&&saveAddItem(copyId,data);
+      })
     }
   }
   getContClass(){
@@ -251,16 +255,16 @@ class MultSpread extends Component{
     const text = saveText&&saveText[+labelInx];
     const ext = !text&&isExtBlue?style['ext']:'';
     const orgBorder = isImports&&!text?style['orange-border']:'';
-    return classNames(orgBorder,ext,setFontColorSize(isExtBlue?2:1));
+    return classNames(orgBorder,ext);
   }
   render(){
     const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue} = this.props;
     return (<div className={this.getContClass()}
                  style={{display:'inline-block'}}>
-        {textPrefix?<span className={`${setFontColorSize(isExtBlue?2:'')}`}>{textPrefix}ss</span>:''}
+        {textPrefix?<span className="prefixUnset">{textPrefix}</span>:''}
         <div className={this.getClass()}>
           {this.getLabels()}
-          {textSuffix?<span className={`${setFontColorSize(isExtBlue?2:'')}`}>{textSuffix}</span>:''}
+          {textSuffix?<span className="prefixUnset">{textSuffix}</span>:''}
           {showAdd?<img src={isExtBlue?addIcon1:addIcon} alt="复制该项"
                         className={style['add-icon']}
                         onClick={()=>addLabelItem({ikey,copyId})}/>:''}

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

@@ -7,7 +7,7 @@
   cursor: pointer;
   line-height: 20px;
   &.ext{
-    // color: @extBlue!important;
+    color: @extBlue!important;
   }
 }
 
@@ -22,6 +22,6 @@
   // color: @text-color;
   line-height: 22px;
   &.ext{
-    // color: @extBlue;
+    color: @extBlue;
   }
 }

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

@@ -198,16 +198,16 @@ class NumberDrop extends Component{
     handleHide&&handleHide();
   }
   getClasses(nospecial){         //整个标签是否有值的状态
-    const {hideTag,placeholder,isImports,isExtBlue} = this.props;
+    const {hideTag,placeholder,isImports,isExtBlue,isSelectAll} = this.props;
     const val = this.state.value;
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
     const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
     const noTag = hideTag?style['no-tag']:'';
-    
-    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(isExtBlue?2:1));
+    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(isExtBlue?2:val?2:isSelectAll?2:1));
   }
   getSpanClass(nospecial){       //将被替换的文字选中状态显示
+    const {isSelectAll} = this.props;
     const cls = this.props.show?style['blued']:style['nol'];
     return cls+' '+setFontColorSize(nospecial?'':2);
   }
@@ -245,13 +245,13 @@ class NumberDrop extends Component{
     });
   }
   render(){
-    const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode,nospecial} = this.props;
+    const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode,nospecial,isSelectAll,isExtBlue} = this.props;
     const val = formulaCode==="BMI_RES"?(+bmi===Infinity||isNaN(bmi)?'':bmi):value;
     const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses(nospecial)}
                 style={{position:'relative'}}
                 onClick={allClick?this.handleNumClick:null}>
-      <span className={`${setFontColorSize(nospecial?'':2)}`}>{prefix}</span>
+      <span className={`${setFontColorSize(isSelectAll?2:isExtBlue?2:1)}`}>{prefix}</span>
       <span onFocus={this.handleNumFocus}
             onClick={allClick?null:this.handleNumClick}
             contentEditable={true}
@@ -262,7 +262,7 @@ class NumberDrop extends Component{
             onInput={this.handleSpanInp}
             className={this.getSpanClass(nospecial)}
             >&nbsp;{val||placeholder}</span>
-      <span className={`${setFontColorSize(nospecial?'':2)}`}>{suffix}</span>
+      <span className={`${setFontColorSize(isSelectAll?2:isExtBlue?2:1)}`}>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
                  noString={formulaCode?true:false}
                  onClose={handleHide}

+ 14 - 6
src/components/PreviewBody/index.jsx

@@ -118,12 +118,20 @@ class PreviewBody extends Component {
               {adviceData&&adviceData.followUp && adviceData.followUp.length > 0 && <p className={style.pushMessageTitle}><span>回访时间:<span className={style['bbtm']}>{adviceData.followUp}</span> 后回访,不适随诊</span></p>}
               {adviceData&&adviceData.scheme && adviceData.scheme.length > 0 && <p className={style.pushMessageTitle}><span>治疗方案</span></p>}
               {
-                adviceData&&adviceData.scheme && adviceData.scheme.map((item, index) => {
-                  return <p>{item.treatment.map((it, ii) => {
-                    return (it.treatmentStr && it.treatmentStr.length > 0 ?
-                      <div className={style.pushMessageDes}>{it.treatmentStr}</div> : '')
-                    })}</p>
-                  })
+                adviceData.scheme && adviceData.scheme.map((item0, index0) => {
+                  return <p>
+                    {item0.treatment.map((item1, index1) => {
+                      return item1.meditionDetails.map((item2, index2) => {
+                      return <p>{
+                          item2.treatment.map((item3, index3) => {
+                            return(item3.treatmentStr && item3.treatmentStr.length > 0 ?
+                              <div className={style.pushMessageDes}>{item3.treatmentStr}</div> : '')
+                          })
+                        }</p>
+                      })
+                    })}
+                  </p>
+                })
               }
               {
                 adviceData&&adviceData.adviceInput && <div dangerouslySetInnerHTML={{__html: adviceData.adviceInput}} className={style.pushMessageDes}></div>

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

@@ -50,7 +50,7 @@ class RadioDrop extends Component{
       if(hideTag){
         return classNames(style['no-tag'],ext,setFontColorSize(isExtBlue?2:''));
       }
-      return classNames(style['selected-tag'],editBorder,setFontColorSize());
+      return classNames(style['selected-tag'],ext,editBorder,setFontColorSize());
     }else{
       if(hideTag){
         return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor')
@@ -154,7 +154,7 @@ class RadioDrop extends Component{
     if(!show&&tmpDom){
       $(tmpDom).parent().prev().attr({"contentEditable":true})
     }
-    return <div className={style['container']} ref = {this.$cont}>
+    return <div className={`${style['container']} prefixUnsetColor`} ref = {this.$cont}>
       <div className={this.getClass()}
            onBlur={this.handleEditLabel}
            contentEditable={this.state.editable}

+ 8 - 4
src/components/RadioInpDrop/index.jsx

@@ -38,13 +38,17 @@ class RadioInpDrop extends Component{
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
-    if(hideTag){
-      return classNames(style['no-tag'],ext);
-    }
     if(value){
+      if(hideTag){
+        return classNames(style['no-tag'],ext,setFontColorSize());
+      }
       return classNames(style['selected-tag'],setFontColorSize());
+    }else{
+      if(hideTag){
+        return classNames(style['no-tag'],ext,setFontColorSize(2));
+      }
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(2,6));
     }
-    return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
   }
   handleSelect(item){
     const {handleSelect,ikey,value,placeholder,mainSaveText} = this.props;

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

@@ -32,5 +32,6 @@
   word-break: break-all;
   /**ff26必需**/
   min-height: 22px;
+  font-size: unset;
   vertical-align: middle;
 }

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

@@ -354,6 +354,9 @@ class SpreadDrop extends Component{
     if(value||(showDefaulted&&value===undefined&&defaulted)){
       return classNames(style['selected-tag'],blueBorder,setFontColorSize());
     }
+    if(!value){
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(2,6));
+    }
     return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
   }
   ifDefault(){

+ 3 - 0
src/components/SpreadDrop/index.less

@@ -6,4 +6,7 @@
   .selected-tag{
     cursor: pointer;
   }
+  .ext {
+    color: @extBlue !important;
+  }
 }

+ 38 - 36
src/components/Treat/DrugTreat/index.jsx

@@ -6,6 +6,7 @@ import info2 from './../img/info2.png';
 import info3 from './../img/info3.png';
 import drugIcon from './../img/drug.png';
 import more from '@common/images/addItem1.png';
+import HasInfoItem from '@common/components/HasInfoItem'
 import $ from "jquery";
 
 class DrugTreat extends Component {
@@ -22,10 +23,9 @@ class DrugTreat extends Component {
         this.handleMouseLeaveImg = this.handleMouseLeaveImg.bind(this);
         this.getImg = this.getImg.bind(this);
     }
-
-    handleSelect(index,ii) {
+    handleSelect(position) {
         const { selectDrug } = this.props;
-        selectDrug && selectDrug(index,ii);
+        selectDrug && selectDrug(position);
     }
     handleMouseEnterDrug(ii, index, it) {
         this.setState({
@@ -48,10 +48,10 @@ class DrugTreat extends Component {
             hasEnterImg: false
         })
     }
-    setOtherRecommend(item, index) {
+    setOtherRecommend( position) {
         this.showTreatDesc();
         const { setOtherRecommend } = this.props;
-        setOtherRecommend && setOtherRecommend(item, index);
+        setOtherRecommend && setOtherRecommend(position);
     }
     setDrugInfo(item) {
         const { setDrugInfo } = this.props;
@@ -79,47 +79,49 @@ class DrugTreat extends Component {
     }
 
     render(){
-        const { treatment,showDrugInfo } = this.props
+        const { treatmentPlan,showDrugInfo } = this.props
         const { currentImg, currentIndex, hasEnterImg } = this.state
         return(
-            treatment && treatment.length > 0 && <div className={style['drug-box']}>
-                <h3 className={style['drug-title']}><img className={style['drug-icon']} src={drugIcon}/> 常用药物治疗</h3>
+            treatmentPlan && treatmentPlan.length > 0 && <div className={style['drug-box']}>
+                <h3 className={style['drug-title']}><img className={style['drug-icon']} src={drugIcon}/> 推荐药物</h3>
                 {/* 查看药物说明书 (添加数据查看数据用)*/}
                 {/* <div> <input onInput={this.handleInputDrug.bind(this)} style={{border:'1px solid #000'}} type="text"/><button onClick = {this.searchDrug.bind(this)}>搜索药品说明</button></div> */}
-                {treatment.map((item, index) => {
-                    return(<div className={style['drug-content']}>
-                        <div  className={style['drug-name-box']}>
-                            <span style={item.drugsForbidden === '2'? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}>{index + 1 + '. ' }{item.bigdrugsName}<span>{item.subdrugsName && '('+item.subdrugsName+')'}</span>:&nbsp;</span>
-                            {item.medicitionsList.map((it, ii) => {
-                                return ((it.isShow == 1 || it.selected) &&<span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
-                                              onMouseLeave = {this.handleMouseLeaveDrug}
-                                              className={style['drug-name-wrapper']} 
-                                        >
-                                            <span className={style['drug-name']}  
-                                                // onDoubleClick={() =>{this.setDrugInfo(it);showDrugInfo();}}  //药品说明双击显示(现在为点击图标显示)
-                                                onClick={()=>{it.forbidden === '2' ? '' : this.handleSelect(index,ii)}} 
-                                                style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : it.selected ? {color: '#3B9ED0', borderBottom: '1px solid #3B9ED0'}:''}
+                {treatmentPlan.map((item0, index0) =>{
+                    return(<div className={`${style['diag-content-box']} clearfix`}>
+                        <div className={style['diag-content-title']}><i  className={style['diag-content-circle']}></i>{item0.title}</div>
+                        {item0.meditionDetails.map((item1,index1) => {
+                            return (<div  className={`${style['diag-content']} clearfix`}>
+                                {item1.description&&<div className={style['diag-content-description']}>{item1.description}</div>}
+                                
+                                {item1.treatment.map((item2,index2)=>{
+                                    return (<div className={`${style['drug-item']} clearfix`}>
+                                        <div  className={style['drug-name-box']}>
+                                            <span style={item2.drugsForbidden === '2'? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}>{index2 + 1 + '. ' }<span>{item2.subdrugsName}</span>:&nbsp;</span>
+                                            {item2.medicitionsList.map((item3, index3) => {
+                                                return ((item3.isShow == 1 || item3.selected) &&  <HasInfoItem 
+                                                    item = {item3}
+                                                    setDrugInfo = {this.setDrugInfo}
+                                                    position = {[index0, index1, index2, index3]}
+                                                    handleSelect = {this.handleSelect}
                                                 >
-                                                {it.medicitionName}
-                                            </span>
-                                            {<img className={style['info-img']}  
-                                              title='点击i图标可查看详细说明'
-                                              style ={currentIndex === index ? (ii === currentImg ? {display: "inline-block"} : {display: "none"}) : {display: "none"}}
-                                              src={currentIndex === index ? (ii === currentImg ? (hasEnterImg ? info3 : info2) : info2): info2} 
-                                              onMouseEnter={this.handleMouseEnterImg.bind(this, ii, index)}
-                                              onMouseLeave = {this.handleMouseLeaveImg}
-                                              onClick={this.setDrugInfo.bind(this,it)}/>}
-                                        {it.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: it.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3',filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}
-                                        {/*<span  style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{it.rate}</span>*/}
 
-                                    </span>)
+                                                </HasInfoItem>
+                                                )
+
+                                            })}
+                                        </div>
+                                        {<div className={style['drug-more']} onClick={this.setOtherRecommend.bind(this, [index0,index1,index2])} ><img className={style['info-img-more']} src={more} />更多同类药</div> }
+                                </div>)
                             })}
 
-                        </div>
-                        {<div className={style['drug-more']} onClick={() =>this.setOtherRecommend(item, index)} ><img className={style['info-img-more']} src={more} />更多同类药</div> }
-                        
+
+                            </div>)
+
+                        })}
                     </div>)
                 })}
+                
+                
             </div>
         )
     }

+ 31 - 1
src/components/Treat/DrugTreat/index.less

@@ -12,7 +12,7 @@
     float: left;
     margin: 10px;
 }
-.drug-content {
+.drug-item {
     position: relative;
     line-height: 36px;
     border-bottom: 1px dashed #D2D2D2;
@@ -68,4 +68,34 @@
 .drug-content{zoom:1}
 .drug-more:hover {
     color: #3B9ED0;
+}
+
+.diag-content-box{
+    border:1px solid #D2D2D2;
+    margin: 10px 0;
+    padding: 10px 10px 0 10px;
+}
+.diag-content-title{
+    color: #3B9ED0;
+    line-height: 16px;
+    position: relative;
+    margin: 0 0 10px 0;
+}
+.diag-content-circle{
+    position: relative;
+    display: inline-block;
+    width:4px;
+    height:4px;
+    background: #3B9ED0;
+    border-radius: 50%;
+    top: -4px;
+    margin-right: 6px;
+}
+.diag-content {
+    margin: 10px 0 20px 0;
+}
+.diag-content-description{
+    color: #333333;
+    font-weight: 600;
+    margin: 5px 0 10px 0;
 }

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

@@ -1,6 +1,11 @@
 .general-wrapper {
     position: relative;
     padding: 10px 0 0 0;
+    font-size: unset;
+    color: #000;
+    div,span,p {
+        font-size: unset;
+    }
 }
 .general-title-box {
     height: 36px;
@@ -26,4 +31,5 @@
 .follow-up-box {
     border-bottom: 1px dotted  #D2D2D2;
     line-height: 36px;
+    font-size: unset;
 }

+ 24 - 3
src/components/Treat/GeneralTreat/index.jsx

@@ -1,18 +1,39 @@
 import React, { Component } from 'react';
 import style from './index.less';
+import up from '@common/images/slide-up.png';
+import down from '@common/images/slide-down.png';
+import $ from 'jquery';
+import config from '@config/index';
 
 class GeneralTreat extends Component {
     constructor(props){
         super(props);
+        this.state = {
+            slideUp: false
+        }
+        this.$content = React.createRef();
     }
 
+    slideToggle() {
+        const { slideUp } = this.state
+        $(this.$content.current).slideToggle(config.slideTime);
+        this.setState({
+            slideUp: !slideUp
+        })
+    }
     render() {
-        const { icon, titleStyle,titleBg, filter, title, generalTreat } = this.props
+        const { icon, titleStyle,titleBg, filter, title, generalTreat,hasFold } = this.props
+        const { slideUp } = this.state
         return(
+           
             generalTreat && generalTreat.content && generalTreat.content.length > 0 && <div className={style['general-wrapper']}>
                 <div className={style['general-title-box']} style={titleStyle}></div>
-                <div className={style['general-title']} ><img className={style['general-icon']} src={icon}/>{title}</div>
-                <div className={style['general-item']} dangerouslySetInnerHTML={{__html: generalTreat.content}}>
+                <div className={`${style['general-title']} ${'clearfix'}`}  onClick={hasFold?this.slideToggle.bind(this):''}>
+                    <img className={style['general-icon']} src={icon}/>
+                    {title}
+                    {hasFold && <img  className={style['slide-toggle']} src={slideUp?up:down} alt="展开/收起"/>}
+                </div>
+                <div ref={this.$content} className={hasFold?style['general-item-hide']:style['general-item-show']}  dangerouslySetInnerHTML={{__html: generalTreat.content}}>
                 </div>
 
             </div>

+ 18 - 1
src/components/Treat/GeneralTreat/index.less

@@ -23,12 +23,29 @@
     float: left;
     margin: 10px;
 }
-.general-item {
+.general-item-hide {
     -webkit-touch-callout: none;
     -webkit-user-select: none;
     -khtml-user-select: none;
     -moz-user-select: none;
     -ms-user-select: none;
     user-select: none;
+    display: none;
     line-height: 36px;
+}
+.general-item-show {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+    display: block;
+    line-height: 36px;
+}
+.slide-toggle {
+    position: relative;
+    float: right;
+    top: 8px;
+    right: 10px;
 }

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

@@ -82,7 +82,7 @@ class Treat extends Component {
                     <div onMouseDown={this.setTreatBox} id="dragModalTitle" className={style['treat-title']}>治疗方案 ({treatItem.name})</div>
 
                     <div className={style['treat-inner-box']}>
-                        <GeneralTreat icon={generalIcon} title='一般治疗'   generalTreat={generalTreat}></GeneralTreat>
+                        <GeneralTreat icon={generalIcon} title='一般治疗' hasFold="true"  generalTreat={generalTreat}></GeneralTreat>
                         {hasFollowUp && <FollowUp icon={followUpIcon} title='回访时间' noTitle='true'  setFollowUp={setFollowUp} followUp = {followUp} isRead={isRead}></FollowUp>}
                         {/* 回访时间 */}
                         {/* {followUp && <div>回访时间: 
@@ -93,7 +93,7 @@ class Treat extends Component {
                         </div>} */}
                         { drugHistory && (drugHistory['慢病用药内容'] && drugHistory['慢病用药内容'].length > 0 || drugHistory['普通病用药内容'] && drugHistory['普通病用药内容'].length > 0) &&<DrugHistory icon={drugIcon} 
                             titleStyle={{background:'#EAF7FA',opacity:'1', filter:'alpha(opacity=100);',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=100);'}}
-                            title='上次用药情况' 
+                            title='上次用药' 
                             drugHistory={drugHistory}  
                             showDrugInfo = {showDrugInfo} 
                             setDrugInfo={ setDrugInfo }>
@@ -106,7 +106,7 @@ class Treat extends Component {
                             showDrugInfo = {showDrugInfo} 
                             setDrugInfo={ setDrugInfo }>
                         </AdverseReactions>}
-                        <DrugTreat treatment={ treatment } 
+                        <DrugTreat treatmentPlan={ treatment } 
                                 selectDrug={selectDrug} 
                                 setOtherRecommend={ setOtherRecommend } 
                                 showDrugInfo = {showDrugInfo}
@@ -119,7 +119,7 @@ class Treat extends Component {
                     <div className={style['bottom']}>
                         <span className={style['prescription-btn']} onClick={this.handlePrescription}>开处方</span> <span className={style['determine-btn']} onClick={this.handleDetermine}>确定</span>
                     </div>
-                    {treatDesc && <TreatDesc 
+                    {<TreatDesc 
                     treatment={treatment} 
                     treatDesc={treatDesc} 
                     selectDrug={selectDrug} 

+ 33 - 72
src/components/TreatDesc/index.jsx

@@ -7,65 +7,49 @@ import info1 from './img/info1.png';
 import info2 from './img/info2.png';
 import info3 from './img/info3.png';
 import packUp from './img/packUp.png';
+import HasInfoItem from '@common/components/HasInfoItem'
 
 class TreatDesc extends Component {
     constructor(props){
         super(props);
-        this.state = {
-            currentIndex: -1,
-            hasEnterImg: false
-        }
+      
         this.hideTreatDesc = this.hideTreatDesc.bind(this);
         this.handleSelect= this.handleSelect.bind(this);
-        this.handleMouseEnterDrug = this.handleMouseEnterDrug.bind(this)
-        this.handleMouseLeaveDrug = this.handleMouseLeaveDrug.bind(this)
-        this.handleMouseEnterImg = this.handleMouseEnterImg.bind(this)
-        this.handleMouseLeaveImg = this.handleMouseLeaveImg.bind(this)
+        this.setDrugInfo = this.setDrugInfo.bind(this)
+        this.getPosition = this.getPosition.bind(this)
 
     }
+  
+    handleSelect(position) {
 
-    handleMouseEnterDrug( index, item) {
-        // console.log('item', item)
-        // const drugNameWidth = parseInt($('#'+item.medicitionName)[0].offsetWidth)
-        
-        // const imgLeft = drugNameWidth/2-10
-        // console.log('imgLeft', imgLeft)
-        // $('#'+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
-        })
-    }
-    handleSelect(index,ii) {
         const { selectDrug } = this.props;
-        selectDrug && selectDrug(index,ii);
+        selectDrug && selectDrug(position);
+    }
+    setDrugInfo(item) {
+        const { setDrugInfo } = this.props;
+        setDrugInfo && setDrugInfo({name: item.medicitionName, type: 8, position: 5});
     }
     hideTreatDesc() {
         $('#treatDescBox').css({'display': 'none'});
         $('#treatDescBox').animate({'display': 'none'}, 500);
         $('#dragModalWrap').animate({'margin-left': '-340px','left':'50%'}, 500);
     }
+    getPosition(index) {
+        const {position} =this.props.treatDesc
+       const newPos = position.slice()
+       newPos.push(index)
+        return newPos
+    }
 
     render(){
         const  { treatment, treatDesc, setDrugInfo} = this.props
-        const { title, basic, otherDrugIndex, drugDesc} = treatDesc
-        const { currentIndex, hasEnterImg } = this.state
+        const { title, basic, position, drugDesc} = treatDesc
+        let treatmentItem
+        if(position) {
+           treatmentItem = treatment[position[0]].meditionDetails[position[1]].treatment[position[2]]
+        }
         return (treatment && treatment.length >0 && <div  className={style['treat-desc-box']+" "+"clearfix" }>
+
             {title && title === '药品推荐' ? <div className={style['similar-drug-box']} id='treatDescBox'>
                 {/* { basic && basic.length > 0 && <div> //推荐依据不需要展示
                     <h3 className={style['recommend-title']}>推荐依据</h3>
@@ -74,41 +58,18 @@ class TreatDesc extends Component {
                         </div>)
                     })}
                 </div> } */}
-                { otherDrugIndex > -1 && <div  className={style['similar-drug-wrapper'] +" "+"clearfix" }>
-                        <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={'同类药物(' + treatment[otherDrugIndex].bigdrugsName + ')'}>同类药物({treatment[otherDrugIndex].bigdrugsName})</span>  <img src={packUp} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
+                {position&&<div  className={style['similar-drug-wrapper'] +" "+"clearfix" }>
+                        <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={treatmentItem.subdrugsName}>{treatmentItem.subdrugsName}</span>  <img src={packUp} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
                         <div  className={style['similar-drug'] +" "+"clearfix" }>
-                        {treatment[otherDrugIndex].medicitionsList.map((item, index) =>{
-                            return (<span className={style['drug-name-box']}
-                                onMouseEnter={this.handleMouseEnterDrug.bind(this, index, item )}
-                                onMouseLeave = {this.handleMouseLeaveDrug}
-                                id={item.medicitionName}
-                            >
-                                <span className={style['drug-name']} 
-                                    // onDoubleClick={() =>{setDrugInfo(item);showDrugInfo();}} 
-                                    onClick={()=>{item.forbidden === '2' ? '' : this.handleSelect(otherDrugIndex,index)}} 
-                                    style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : item.selected ? {color: '#3B9ED0'}:''}
-                                    >
-                                    {item.medicitionName}
-                                </span>
-                                {<img className={style['info-img']}  
-                                    title='点击i图标可查看详细说明'
-                                    style ={currentIndex === index ? {display: "inline-block"} : {display: "none"}}
-                                    src={currentIndex === index ?  (hasEnterImg ? info3 : info2) : info2} 
-                                    onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
-                                    onMouseLeave = {this.handleMouseLeaveImg}
-                                    onClick={() =>{setDrugInfo({name: item.medicitionName, type: 8, position: 5})}}
-                                    />}
+                        {treatmentItem.medicitionsList.map((item, index) =>{
+                            return  <HasInfoItem 
+                            item = {item}
+                            setDrugInfo = {this.setDrugInfo}
+                            position = {this.getPosition(index)}
+                            handleSelect = {this.handleSelect}
+                        >
 
-                            {/* {<img className={style['info-img']}
-                                title='点击i图标可查看详细说明'
-                                src={currentIndex === index ? info1 : info}
-                                onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
-                                onMouseLeave = {this.handleMouseLeaveImg}
-                                onClick={() =>{setDrugInfo(item,8,5);showDrugInfo();}}/>} */}
-                            {item.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: item.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}
-                            {/*<span  style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{item.rate}</span>*/}
-                            
-                        </span>)
+                        </HasInfoItem>
                         })}
                     </div> 
                 </div>}

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

@@ -38,7 +38,6 @@
 }
 .similar-drug-wrapper {
     position: absolute;
-    
     width: 260px;
     left: 680px;
     height: 100%;
@@ -46,6 +45,7 @@
     background: #fff;
     padding: 40px  0px 20px 20px;
     box-shadow: 2px 0px 5px -2px #7d7c7c;
+    line-height: 36px;
 }
 .similar-drug {
     padding: 20px 20px 0 0;

+ 6 - 1
src/config/index.js

@@ -43,5 +43,10 @@ export default {
     textReg:new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])"), //包含中英文或数字
     slideTime:400,      //右侧指标推送展开/收起动画时间
     recoverTagNum:3,    //可回退标签的个数
-    regPreAndAft:/[^\u4e00-\u9fa5|0-9|a-z|A-Z|Ⅰ|Ⅱ|Ⅲ|Ⅳ|Ⅴ|Ⅵ|Ⅶ|Ⅷ|Ⅸ|Ⅹ]+$|^[^\u4e00-\u9fa5|0-9|a-z|A-Z|Ⅰ|Ⅱ|Ⅲ|Ⅳ|Ⅴ|Ⅵ|Ⅶ|Ⅷ|Ⅸ|Ⅹ]+/g  //搜索去掉前后的标点
+    regPreAndAft:/[^\u4e00-\u9fa5|0-9|a-z|A-Z|Ⅰ|Ⅱ|Ⅲ|Ⅳ|Ⅴ|Ⅵ|Ⅶ|Ⅷ|Ⅸ|Ⅹ]+$|^[^\u4e00-\u9fa5|0-9|a-z|A-Z|Ⅰ|Ⅱ|Ⅲ|Ⅳ|Ⅴ|Ⅵ|Ⅶ|Ⅷ|Ⅸ|Ⅹ]+/g,  //搜索去掉前后的标点
+    ruleTypeMap:{     //大数据推送参数featureType对应
+      '22':'1,2',
+      '11':'3',
+      '8':'4,5'
+    }
 };

+ 2 - 1
src/containers/AdviceContainer.js

@@ -11,7 +11,8 @@ function mapStateToProps(state) {
         isFirstMainDiag:  state.treat.isFirstMainDiag,
         followUp: state.pushMessage.advice.followUp,
         hasFollowUp: state.pushMessage.advice.hasFollowUp,
-        typeConfig: state.typeConfig.mode
+        typeConfig: state.typeConfig.mode,
+        typeConfig: state.typeConfig
     })
 }
 

+ 1 - 0
src/containers/AssistCheck.js

@@ -28,6 +28,7 @@ function mapStateToProps(state) {//console.log(state)
         allCheck: state.assistCheck.allCheck,
         msgObj: state.assistCheck.msgObj,
         checkedListImport: state.assistCheck.checkedListImport,
+        typeConfig: state.typeConfig
     }
 }
 

+ 1 - 0
src/containers/CheckBody.js

@@ -23,6 +23,7 @@ function mapStateToProps(state){
     span:checkBody.span,
     searchInEnd:checkBody.searchInEnd,      //是否在搜索末尾插入结果
     importLabel:checkBody.importLabel,    //需高亮的标签id
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/ChronicInfo.js

@@ -29,6 +29,7 @@ function mapStateToProps(state){
     wholeScaleItems:assessResult.wholeScaleItems,     //全部量表中已加入病例的量表
     addedScaleIds:assessResult.addedScaleIds,      //已加入的量表id
     slideUp:pushMessage.slideUp,    //是否收起指标推送模块
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/CurrentIll.js

@@ -40,6 +40,7 @@ function mapStateToProps(state) {
         isChronic:mainSuit.chronicDesease?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
         readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
         hasMain,      //是否有主诉
+        typeConfig: state.typeConfig
     }
 }
 

+ 2 - 1
src/containers/Diagnosis.js

@@ -6,7 +6,8 @@ import { SHOW_SEARCH,  HIDE_SEARCH } from '@store/types/diagnosticSearch';
 function mapStateToProps(state) {
     return {
         show: state.diagnosticSearch.show,
-        windowHeight:state.homePage.windowHeight
+        windowHeight:state.homePage.windowHeight,
+        typeConfig: state.typeConfig
     }
 }
 

+ 0 - 1
src/containers/DiagnosticItem.js

@@ -28,7 +28,6 @@ function mapDispatchToProps(dispatch) {
                 type: GET_DIAGNOSTIC_STR
             });
             dispatch(isAddMainSuit())
-            console.log('item', item)
             // dispatch(addDiagnostic(item))
             dispatch(getConceptDetail({type:7,name: item.name, position: 1},false,true,true))
         },

+ 1 - 0
src/containers/Inspect.js

@@ -35,6 +35,7 @@ function mapStateToProps(state) {//console.log(state)
     inspectVal: state.inspect.inspectVal,
     message: state.patInfo.message,
     hospitalMsg: state.homePage.sysConfig || {},
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/MainSuit.js

@@ -40,6 +40,7 @@ function mapStateToProps(state) {
     items:state.historyTemplates.items,
     showHisBox:mainSuit.showHisBox,
     readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/OtherHistory.js

@@ -27,6 +27,7 @@ function mapStateToProps(state){
     editClear:otherHistory.editClear,       //编辑状态
     isRead:state.homePage.isRead,
     readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
+    typeConfig: state.typeConfig
   }
 }
 

+ 4 - 6
src/containers/Treat.js

@@ -35,18 +35,16 @@ function mapDispatchToProps(dispatch) {
             dispatch({type: CHANGE_REACT, it, index})
         },
       
-        selectDrug: (index, ii)=>{
+        selectDrug: (position)=>{
             dispatch ({
                 type: SELECT_DRUG,
-                index: index,
-                ii: ii
+                indexList: position,
             })
         },
-        setOtherRecommend: (item, index) => {
+        setOtherRecommend: (position) => {
             dispatch ({
                 type: SET_OTHER_DRUG,
-                item: item,
-                index: index,
+                position
             })
             //推荐依据不展示
             // dispatch(getRecommendBasic(item))

+ 125 - 32
src/store/actions/pushMessage.js

@@ -45,7 +45,6 @@ function getAdviceStr(advice) {
 	const check = advice.check || '';
 	const followUp = advice.followUp || '';
 	let AdviceStr = advice.AdviceStr || '';
-
 	if(assay || check) {
 		AdviceStr = assay + check  +'; ' + AdviceStr;
 	}
@@ -56,13 +55,35 @@ function getAdviceStr(advice) {
 		AdviceStr = AdviceStr + '回访时间:'+followUp + '后回访,不适随诊' + ';';
 	}
 	for (let i = 0; i < scheme.length; i++) {
-		for (let j = 0; j < scheme[i].treatment.length; j++) {
-			if(scheme[i].treatment[j].treatmentStr === '') {
-				AdviceStr = AdviceStr + scheme[i].treatment[j].treatmentStr
-			} else {
-				AdviceStr = AdviceStr  + scheme[i].treatment[j].treatmentStr + ', '
+		for(let j = 0; j < scheme[i].treatment.length; j++){
+			for(let k = 0; k < scheme[i].treatment[j].meditionDetails.length; k++) {
+				for(let l = 0; l < scheme[i].treatment[j].meditionDetails[k].treatment.length; l++) {
+					const treatmentItem = scheme[i].treatment[j].meditionDetails[k].treatment[l]
+					if(treatmentItem.treatmentStr === '') {
+						AdviceStr += treatmentItem.treatmentStr
+					}else {
+						AdviceStr += treatmentItem.treatmentStr + ', '
+					}
+				}
 			}
+
 		}
+
+
+
+
+
+
+
+		// for (let j = 0; j < scheme[i].treatment.length; j++) {
+		// 	if(scheme[i].treatment[j].treatmentStr === '') {
+		// 		AdviceStr = AdviceStr + scheme[i].treatment[j].treatmentStr
+		// 	} else {
+		// 		AdviceStr = AdviceStr  + scheme[i].treatment[j].treatmentStr + ', '
+		// 	}
+		// }
+
+
 	}
 	if(AdviceStr.slice(AdviceStr.length-2) == ', ') {
 		AdviceStr = AdviceStr.slice(0, AdviceStr.length-2)
@@ -84,22 +105,29 @@ export const addScheme = (state, action) => {
   const treatment = action.treatment;
   const treatItem = {};
   treatItem.name = action.title;
-  const scheme = res.advice.scheme || [];
+  let scheme = res.advice.scheme || [];
   let isRepeat = false; 
   let RepeatIndex;
   let SelectedDrugNum = 0 	//选中的药品数量
   for (let i = 0; i < treatment.length; i++) {
-		let treatmentStr = '';
-		let drugList = []
-    for (let j = 0; j < treatment[i].medicitionsList.length; j++) {
-      if(treatment[i].medicitionsList[j].selected) {
-				treatmentStr = treatmentStr + treatment[i].medicitionsList[j].medicitionName + ', '
-				drugList.push({conceptId: treatment[i].medicitionsList[j].conceptId, conceptName: treatment[i].medicitionsList[j].medicitionName })
-				SelectedDrugNum++
+		for(let j = 0; j < treatment[i].meditionDetails.length; j++) {
+			for(let k = 0; k < treatment[i].meditionDetails[j].treatment.length; k++) {
+				let treatmentStr = '';
+				let drugList = []
+				for(let l = 0; l < treatment[i].meditionDetails[j].treatment[k].medicitionsList.length; l++) {
+					const drugItem = treatment[i].meditionDetails[j].treatment[k].medicitionsList[l]
+					if(drugItem.selected) {
+						treatmentStr = treatmentStr + drugItem.medicitionName + ', '
+						drugList.push({conceptId: drugItem.conceptId, conceptName: drugItem.medicitionName })
+						SelectedDrugNum++
+					}
+					
+				}
+				treatment[i].meditionDetails[j].treatment[k].treatmentStr = treatmentStr.substring(0,treatmentStr.length-2)
+				treatment[i].meditionDetails[j].treatment[k].drugList = drugList
 			}
-	}
-	treatment[i].treatmentStr = treatmentStr.substring(0,treatmentStr.length-2)
-	treatment[i].drugList = drugList
+		}
+	
   }
   if(SelectedDrugNum > 0) { //如果有选中的药品,滚动到医嘱框
 	document.getElementById("adviceBox").scrollIntoView(true)
@@ -119,22 +147,76 @@ export const addScheme = (state, action) => {
   })
   if (isRepeat) {
 	 //将同类药添加到一起
-	for (let i = 0; i < scheme[RepeatIndex].treatment.length; i++) {
-		for (let j = 0; j < treatment.length; j++) {
-			if (scheme[RepeatIndex].treatment[i].id === treatment[j].id && scheme[RepeatIndex].treatment[i].bigdrugsName === treatment[j].bigdrugsName && scheme[RepeatIndex].treatment[i].subdrugsName === treatment[j].subdrugsName) {
-				for(let z = 0; z < treatment[j].medicitionsList.length; z++) {
-					if(treatment[j].medicitionsList[z].selected) {
-						if(scheme[RepeatIndex].treatment[i].treatmentStr !== '') {
-							scheme[RepeatIndex].treatment[i].treatmentStr = scheme[RepeatIndex].treatment[i].treatmentStr + ', ' + treatment[j].medicitionsList[z].medicitionName 
-						} else {
-							scheme[RepeatIndex].treatment[i].treatmentStr = scheme[RepeatIndex].treatment[i].treatmentStr + '' + treatment[j].medicitionsList[z].medicitionName
+	const schemeTreatmentCopy = scheme[RepeatIndex].treatment.slice()
+	 for (let i = 0; i < scheme[RepeatIndex].treatment.length; i++) {
+		for(let x = 0; x < treatment.length; x++) {
+			const hasNoCont = scheme[RepeatIndex].treatment.findIndex(item => item.title === treatment[x].title) 
+			if(hasNoCont === -1) {
+				if(treatment[x].title != scheme[RepeatIndex].treatment[i].title) {
+					const treatmentCopy = JSON.parse(JSON.stringify(treatment[x]))
+					for(let o = 0; o < treatmentCopy.meditionDetails.length; o++) {
+						for(let p = 0; p < treatmentCopy.meditionDetails[o].treatment.length; p++) {
+							treatmentCopy.meditionDetails[o].treatment[p].treatmentStr = ""
+						}
+
+					}
+					schemeTreatmentCopy.splice(x, 0, treatmentCopy)
+				}
+			}
+		}
+			
+	 }
+	 scheme[RepeatIndex].treatment = schemeTreatmentCopy
+	 for (let i = 0; i < scheme[RepeatIndex].treatment.length; i++) {
+		const schemeTreatmentCopy2 = scheme[RepeatIndex].treatment[i].meditionDetails.slice()
+
+			for(let x = 0; x < treatment.length; x++) {
+				if(treatment[x].title === scheme[RepeatIndex].treatment[i].title) {
+				for(let j = 0; j < scheme[RepeatIndex].treatment[i].meditionDetails.length; j++) {
+					for(let y = 0; y < treatment[x].meditionDetails.length;y++) {
+							const hasNoCont =  scheme[RepeatIndex].treatment[i].meditionDetails.findIndex(item => item.description === treatment[x].meditionDetails[y].description)  
+							if(hasNoCont === -1) {
+								schemeTreatmentCopy2.splice(y, 0, treatment[x].meditionDetails[y])
+							}
 						}
-						scheme[RepeatIndex].treatment[i].drugList.push({conceptId: treatment[j].medicitionsList[z].conceptId, conceptName: treatment[j].medicitionsList[z].medicitionName })
+				}
 
+			}
+		}
+		scheme[RepeatIndex].treatment[i].meditionDetails = schemeTreatmentCopy2
+
+	 }
+	for (let i = 0; i < scheme[RepeatIndex].treatment.length; i++) {
+		for(let j = 0; j < scheme[RepeatIndex].treatment[i].meditionDetails.length; j++) {
+			for(let k = 0; k < scheme[RepeatIndex].treatment[i].meditionDetails[j].treatment.length; k++) {
+				const schemeItem = scheme[RepeatIndex].treatment[i].meditionDetails[j].treatment[k]
+
+				for(let x = 0; x < treatment.length; x++) {
+					for(let y = 0; y < treatment[x].meditionDetails.length;y++) {
+						for(let z = 0; z < treatment[x].meditionDetails[y].treatment.length; z++) {
+							let treatItem = treatment[x].meditionDetails[y].treatment[z]
+							if(schemeItem.id === treatItem.id && schemeItem.bigdrugsName === treatItem.bigdrugsName && schemeItem.subdrugsName === treatItem.subdrugsName) {
+								for(let w = 0; w < treatItem.medicitionsList.length; w++) {
+									const medicitionsItem = treatItem.medicitionsList[w]
+									if(medicitionsItem.selected) {
+										if(schemeItem.treatmentStr !== '') {
+											schemeItem.treatmentStr += ', ' +medicitionsItem.medicitionName
+										} else {
+											schemeItem.treatmentStr += '' +medicitionsItem.medicitionName
+										}
+										schemeItem.drugList.push({conceptId: medicitionsItem.conceptId, conceptName: medicitionsItem.medicitionName })
+									}
+								}
+							}
+						}
 					}
 				}
+
+
+				
 			}
 		}
+
 	}
 
 //    let repeatDiag = res.advice.scheme[RepeatIndex].treatment
@@ -147,10 +229,16 @@ export const addScheme = (state, action) => {
 //    }
 //    repeatDiag = repeatDiag.concat(action.treatment)
   } else {
+	  	loop: 
 		for (let i = 0; i < treatItem.treatment.length; i++) {
-			for (let j = 0; j < treatItem.treatment[i].medicitionsList.length; j++) {
-				if(treatItem.treatment[i].medicitionsList[j].selected) {
-					res.advice.scheme = scheme.concat(treatItem)
+			for(let j = 0; j < treatItem.treatment[i].meditionDetails.length; j++) {
+				for(let k = 0; k < treatItem.treatment[i].meditionDetails[j].treatment.length; k++) {
+					for(let l = 0; l < treatItem.treatment[i].meditionDetails[j].treatment[k].medicitionsList.length; l++) {
+						if(treatItem.treatment[i].meditionDetails[j].treatment[k].medicitionsList[l].selected) {
+							res.advice.scheme = scheme.concat(treatItem)
+							break loop;
+						}
+					}
 				}
 			}
 		}
@@ -164,13 +252,18 @@ export const addScheme = (state, action) => {
   return res;
 }
 
+
 //获取开单到医嘱的药品列表
 function getDrugList(scheme) {
 	const drugList = [];
 	for(let i = 0 ;  i < scheme.length; i++) {
 		for(let j = 0; j <scheme[i].treatment.length; j++ ) {
-			for (let z = 0; z < scheme[i].treatment[j].drugList.length; z++) {
-				drugList.push(scheme[i].treatment[j].drugList[z]);
+			for(let k = 0; k < scheme[i].treatment[j].meditionDetails.length; k++) {
+				for(let l = 0; l < scheme[i].treatment[j].meditionDetails[k].treatment.length; l++) {
+					for (let m = 0; m < scheme[i].treatment[j].meditionDetails[k].treatment[l].drugList.length; m++) {
+						drugList.push(scheme[i].treatment[j].meditionDetails[k].treatment[l].drugList[m]);
+					}
+				}
 			}
 		}
 	}

+ 6 - 4
src/store/actions/treat.js

@@ -17,10 +17,12 @@ export const clearTreat = (state, action) => {
     res.generalTreat = '';
     res.surgeryTreat = '';
     res.drugHistory = {};
+    res.treatDesc = {title: "药品推荐"}
     res.treatment = [];
     res.adversReactionList=[];
     res.hasFollowUp = false;
     res.followUp = '';
+    console.log('res', res)
     return res
 }
 
@@ -32,6 +34,7 @@ export const clearAllTreat = (state, action) => {
     res.drugHistory = {};
     res.treatment = [];
     res.adversReactionList=[];
+    res.treatDesc = {title: "药品推荐"}
     res.hasFollowUp = false;
     res.followUp = '';
     res.followUpList = [];
@@ -54,9 +57,8 @@ export const setTreatment = (state, action) => {
 export const selectDrug = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
     const drugTreat = res.treatment.slice();
-    const index = action.index  //药品类的索引
-    const ii = action.ii   //药品索引
-    const selectItem = drugTreat[index].medicitionsList[ii]
+    const indexList = action.indexList  //药品索引列表
+    const selectItem = drugTreat[indexList[0]].meditionDetails[indexList[1]].treatment[indexList[2]].medicitionsList[indexList[3]]
     const selected =  selectItem.selected//所选择药品的选择状态
     selectItem.selected = !selected;
     return res
@@ -68,7 +70,7 @@ export const setOtherDrug = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
     res.treatDesc = {};
     res.treatDesc.title = '药品推荐';
-    res.treatDesc.otherDrugIndex = action.index;
+    res.treatDesc.position = action.position;
     return res
 }
 

+ 5 - 2
src/store/async-actions/fetchModules.js

@@ -2,7 +2,7 @@ import {json,expJson} from '@utils/ajax';
 import {SET,PRESET} from '@types/checkBody';
 import {SETDATA} from '@store/types/otherHistory';
 import store from '@store';
-import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText,checkFullfillText,deepClone,filterDataArr} from '@utils/tools';
+import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText,checkFullfillText,deepClone,filterDataArr,pushAllDataList} from '@utils/tools';
 import  Notify from '@commonComp/Notify';
 import {billing} from '@store/async-actions/pushMessage';
 import {SETOTHERHISTORY,ISREAD} from "../types/homePage";
@@ -261,8 +261,11 @@ export function getAssessData(disId,disName){
       disType:1,
       diag:disName,
       diseaseName:disName,
-      featureType:11,
+      featureType:'11',
+      ruleType:config.ruleTypeMap['11'],
       lis:emrData.lis,
+      other: emrData.other,
+      pasts: emrData.other,
       sex:emrData.sex,
       age:emrData.age,
       pacs:emrData.pacs,

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

@@ -50,6 +50,7 @@ export async function getCommSymptomPush(){//获取大数据推送症状
         "diag": emrData.dis,
         "lis": emrData.lis,
         "other": emrData.other,
+        "pasts": emrData.other,
         "pacs": emrData.pacs,
         "sex": emrData.sex,
         "vital":emrData.vital,

+ 2 - 1
src/store/async-actions/patInfo.js

@@ -2,7 +2,7 @@ import {get, post, json} from "../../utils/ajax";
 import {GET_PATIENT_MESSAGE,GET_HOSPITAL_MESSAGE} from "../types/patInfo";
 import {CONFIRM_TYPE} from "../types/typeConfig";
 import {getInfos} from '@store/actions/getInfoByUuid';
-import {getUrlArgObject,pushAllDataList} from '@utils/tools';
+import {getUrlArgObject,pushAllDataList,getAllDataList,storageLocal} from '@utils/tools';
 import {getInitModules,getCommonList} from '@store/async-actions/homePage.js';
 import store from '@store'
 import {ISREAD,MODI_LOADING,SETPRE,SETPREDATA} from "../types/homePage";
@@ -82,6 +82,7 @@ export const initPersonInfo = (dispatch, getState) => {
 export const initHistoryDetails = (dispatch) => {
     let baseList = store.getState();
     let state = baseList.patInfo.message;
+    storageLocal.remove('emrParam');
     return (dispatch) => {
         json('/inquiryInfo/readInquiry', {
             "doctorId": state.doctorId,

+ 67 - 119
src/store/async-actions/treat.js

@@ -9,107 +9,14 @@ import { SAVE_FOLLOW_UP } from "@store/types/pushMessage";
 import {MODI_LOADING} from '@store/types/homePage.js';
 import { SHOW_TREAT} from '@store/types/treat.js';
 import Notify from '@commonComp/Notify';
+import {getChronic} from '@store/async-actions/homePage.js';
+import config from "@config/index";
 
 const api={
     pushTreatment:'/push/pushTreatment',
     getConceptDetail:'/conceptDetail/getConceptDetail'
 }
 
-// export const addDiagnostic = (item) => {
-//         return (dispatch, getState) => {
-//             const state = getState();
-//             let url = api.pushTreatment;
-//             const emrData = getEMRParams();
-//             const diagnosticList = state.diagnosticList.diagnosticList;
-//             let diag = '';
-//             if(diagnosticList) {
-//                 for (let i = 0; i < diagnosticList.length; i++ ) {
-//                     if(i ===0 ) {
-//                         diag = diag + diagnosticList[i].name;
-//                     } else {
-//                         diag = diag + ',' + diagnosticList[i].name;
-//                     }
-
-//                 }
-//             }
-//             if (item.type === 1) {
-//                 diag = diag + ',' + item.name
-//             } else {
-//                 diag = diag + ',' + item.name
-//             }
-//             const params = {
-//                 "age": emrData.age,
-//                 "featureType": "8",
-//                 "diag": diag,
-//                 "diseaseName":  item.name,
-//                 "lis": emrData.lis,
-//                 "other": emrData.other,
-//                 "pacs": emrData.pacs,
-//                 "sex": emrData.sex,
-//                 "symptom": emrData.current + emrData.main,
-//                 "vital": emrData.vital,
-//                 "patientId": emrData.patientId,
-//                 "hosCode": emrData.hosCode,
-//                 "adverseReactions": "string",
-//                 "scaleName": "string",
-//             };
-//             //判断是否走慢病系统
-//             const isChronic = state.diagnosticList.chronicMagItem ||state.mainSuit.chronicDesease;
-//             // const isChronic = true
-//             if (isChronic) {
-//                 let chronicList = JSON.parse(storageLocal.get('chronic'));
-//                 if(!chronicList){
-//                     getChronic().then(() =>{
-//                     chronicList = JSON.parse(storageLocal.get('chronic'));
-//                         for(let i=0; i<chronicList.length; i++){
-//                             if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){ //判断某个病是否为慢病
-//                                 params.disType = 1
-//                             }
-//                         }
-//                         hasTreatment(dispatch, state,item,url,params)
-
-//                     });
-//                 } else {
-//                     for(let i=0; i<chronicList.length; i++){
-//                         if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){
-//                             params.disType = 1
-//                         }
-//                     }
-//                     hasTreatment(dispatch, state, item,url,params)
-//                 }
-//             } else {
-//                 hasTreatment(dispatch, state, item,url,params)
-//             }
-            
-            
-//         }
-
-// }
-
-// //判断是否存在治疗方案
-// function hasTreatment(dispatch, state,item,url, params) {
-//     const itemTreat = JSON.parse(JSON.stringify(item))
-//     json(url, params).then((data) =>{
-//         if (data.data.data) {
-//             itemTreat.treat = data.data.data
-//             dispatch({
-//                 type: ADD_TREAT,
-//                 item: itemTreat
-//             })
-//         } else {
-//             item.treat = null
-//             dispatch({
-//                 type: ADD_TREAT,
-//                 item: itemTreat
-//             })
-//         }
-        
-
-//     }).catch((e) =>{
-//         console.log(e)
-//     })
-// }
-
 export const getTreatResult = (item) =>{
     return (dispatch, getState) => {
         dispatch({
@@ -136,10 +43,12 @@ export const getTreatResult = (item) =>{
         const params = {
             "age": emrData.age,
             "featureType": "8",
+            "ruleType":config.ruleTypeMap["8"],
             "diag": diag,
             "diseaseName":  item.name,
             "lis": emrData.lis,
             "other": emrData.other,
+            "pasts": emrData.other,
             "pacs": emrData.pacs,
             "sex": emrData.sex,
             "symptom": emrData.current + emrData.main,
@@ -148,17 +57,56 @@ export const getTreatResult = (item) =>{
             "hosCode": emrData.hosCode
         };
         // const params = {
-        //         "age": 20,
-        //         "diag": ",糖尿病",
-        //         "disType": 1,
-        //         "diseaseId":21773,
-        //         "featureType": "8",
-        //         "lis": [
-                  
-        //         ],
-        //         "sex": 3,
-        //         "symptom": "恶心,呕吐",
-        //         "vital": ""
+        //     "disType":"1",
+        //     "age":28,
+        //     "diag":"2型糖尿病性肾病,1型糖尿病,糖尿病肾病",
+        //     "diseaseName":"2型糖尿病",
+        //     "featureType":"8",
+        //     "hosCode":"A001",
+        //     "lis":[
+        //         {
+        //             "name":"糖化血红蛋白测定",
+        //             "detailName":"糖化血红蛋白(HbA1c)",
+        //             "uniqueName":"糖化血红蛋白测定--糖化血红蛋白(HbA1c)",
+        //             "source":"0",
+        //             "minValue":4,
+        //             "otherValue":"",
+        //             "maxValue":6,
+        //             "units":"%",
+        //             "value":"5"
+        //         },
+        //         {
+        //             "name":"空腹葡萄糖测定",
+        //             "detailName":"葡萄糖(GLU)",
+        //             "uniqueName":"空腹葡萄糖测定--葡萄糖(GLU)",
+        //             "source":"0",
+        //             "minValue":3.9,
+        //             "otherValue":"",
+        //             "maxValue":6.1,
+        //             "units":"mmol/L",
+        //             "value":"5"
+        //         },
+        //         {
+        //             "name":"肝功能测定",
+        //             "detailName":"谷丙转氨酶(ALT)",
+        //             "uniqueName":"肝功能测定--谷丙转氨酶(ALT)",
+        //             "source":"0",
+        //             "minValue":5,
+        //             "otherValue":"",
+        //             "maxValue":40,
+        //             "units":"U/L",
+        //             "value":"180"
+        //         }
+        //     ],
+        //     "lisOrder":"",
+        //     "lisString":"",
+        //     "other":"",
+        //     "otherOrder":"",
+        //     "pacs":"",
+        //     "pacsOrder":"",
+        //     "sex":1,
+        //     "symptom":"患者患有2型糖尿病近来出现泡沫尿",
+        //     "vital":"体温40℃"
         // }
         const isChronic = state.diagnosticList.chronicMagItem ||state.mainSuit.chronicDesease;
         // const isChronic = true
@@ -203,35 +151,35 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
                 treat = data.data.data || {}
             }
             if(treat) {
-                let { treatment, commonTreatment, surgeryTreatment, drugHistory, adverseReactions, followUp} = treat
+                let { treatmentPlan, commonTreatment, surgeryTreatment, drugHistory, adverseEvent, followUp} = treat
                 if(!(commonTreatment || surgeryTreatment ||
-                    ( treatment &&treatment.length >0 ||
+                    ( treatmentPlan &&treatmentPlan.length >0 ||
                         drugHistory&&drugHistory.length >0 || 
-                        adverseReactions&&adverseReactions.length >0 ||
-                        !!followUp ||treatment&&treatment.length >0))) {
+                        adverseEvent&&adverseEvent.length >0 ||
+                        !!followUp ||treatmentPlan&&treatmentPlan.length >0))) {
                             Notify.info('暂无数据'); 
                             return
                 } 
                 dispatch({type: SHOW_TREAT})
                 dispatch({
                      type: SET_TREATMENT,
-                     treatment: treatment,
+                     treatment: treatmentPlan,
                      generalTreat: commonTreatment,
                      surgeryTreat: surgeryTreatment,
                      drugHistory: drugHistory,
                  })
-                 if (adverseReactions) { //如何之前存过不良反应,则替换成之前的不良反应
+                 if (adverseEvent) { //如何之前存过不良反应,则替换成之前的不良反应
                      const allAdversReactionList = state.treat.allAdversReactionList
                      if(allAdversReactionList) {
                          for(let i = 0; i < allAdversReactionList.length; i++) {
                              if(item.conceptId == allAdversReactionList[i].conceptId) {    //判断是否存过不良反应
-                                 for (let j = 0; j < adverseReactions.length; j++) { //判断不良反应是否有相同的不良反应,如果有,替换
+                                 for (let j = 0; j < adverseEvent.length; j++) { //判断不良反应是否有相同的不良反应,如果有,替换
                                      for(let z = 0; z < allAdversReactionList[i].adversReactionList.length; z++) {
-                                         if(adverseReactions[j].conceptId == allAdversReactionList[i].adversReactionList[z].conceptId && adverseReactions[j].name == allAdversReactionList[i].adversReactionList[z].name) {
+                                         if(adverseEvent[j].conceptId == allAdversReactionList[i].adversReactionList[z].conceptId && adverseEvent[j].name == allAdversReactionList[i].adversReactionList[z].name) {
                                              for(let x = 0; x < allAdversReactionList[i].adversReactionList[z].details.length; x++) {
-                                                 for(let y = 0; y < adverseReactions[j].details.length; y++) {//判断每一项是否选择过
-                                                     if(allAdversReactionList[i].adversReactionList[z].details[x].name == adverseReactions[j].details[y].name && allAdversReactionList[i].adversReactionList[z].details[x].select) {
-                                                         adverseReactions[j].details[y].select = allAdversReactionList[i].adversReactionList[z].details[x].select
+                                                 for(let y = 0; y < adverseEvent[j].details.length; y++) {//判断每一项是否选择过
+                                                     if(allAdversReactionList[i].adversReactionList[z].details[x].name == adverseEvent[j].details[y].name && allAdversReactionList[i].adversReactionList[z].details[x].select) {
+                                                        adverseEvent[j].details[y].select = allAdversReactionList[i].adversReactionList[z].details[x].select
                                                      }
                                                  }
                                              }
@@ -243,7 +191,7 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
                      }
                      
                  } else {
-                     adverseReactions = []
+                    adverseEvent = []
                  }
                  if(isChronic) {
                      let chronicList = JSON.parse(storageLocal.get('chronic'));
@@ -277,7 +225,7 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
                  }
                  dispatch({
                      type: SET_ADVERSE_REACTIONS,
-                     adversReactionList: adverseReactions
+                     adversReactionList: adverseEvent
                  })
             } else {
                 Notify.info('暂无数据');

+ 66 - 58
src/utils/tools.js

@@ -1337,69 +1337,77 @@ function setPosition (e,dom,setHighter){
  *      2体征颜色单独处理不需要设置
  */
 const setFontColorSize = (flg,pacs) => {
-  const classNameSelect = ['largeFontSize','middleFontSize','simpleFontSize','simpleLightColor','simpleColor','selectColor']
-  const state = store.getState();
-  let readConfig = state.typeConfig.readConfig
-  let mainType = readConfig==-1?state.typeConfig.typeConfig:readConfig;
-  let font = mainType[3],colour = mainType[4],classStr = '';
-  if(font == 1&&colour == 1){//字体加大颜色加深
-    if(flg == 2){
-      if(pacs == 1){
-        classStr = `largeFontSize pdright`
-      }else if(pacs == 2){
-        classStr = `largeFontSize widthChangeed`
-      }else if(pacs == 3){
-        classStr = `largeFontSize middleImg`
-      }else if(pacs == 4){
-        classStr = `largeFontSize titleWidth`
-      }else if(pacs == 5){
-        classStr = `largeFontSize specialSize`
+  // setTimeout(() => {
+    const classNameSelect = ['largeFontSize','middleFontSize','simpleFontSize','simpleLightColor','simpleColor','selectColor']
+    const state = store.getState();
+    let readConfig = state.typeConfig.readConfig
+    let mainType = readConfig==-1?state.typeConfig.typeConfig:readConfig;
+    let font = mainType[3],colour = mainType[4],classStr = '';
+    if(font == 1&&colour == 1){//字体加大颜色加深
+      if(flg == 2){
+        if(pacs == 1){
+          classStr = `largeFontSize pdright`
+        }else if(pacs == 2){
+          classStr = `largeFontSize widthChangeed`
+        }else if(pacs == 3){
+          classStr = `largeFontSize middleImg`
+        }else if(pacs == 4){
+          classStr = `largeFontSize titleWidth`
+        }else if(pacs == 5){
+          classStr = `largeFontSize specialSize`
+        }else if(pacs == 6){
+          classStr = `largeFontSize selectColor`
+        }else{
+          classStr = `largeFontSize`
+        }
+      }else if(flg == 1){
+        classStr = `selectColor largeFontSize`
       }else{
-        classStr = `largeFontSize`
+        classStr = `selectColor largeFontSize`
       }
-    }else if(flg == 1){
-      classStr = `selectColor largeFontSize`
-    }else{
-      classStr = `selectColor largeFontSize`
-    }
-  }else if(font == 0&&colour == 1){//标准字体颜色加黑
-    if(flg == 2){
-      classStr = `simpleFontSize`
-    }else if(flg == 1){
-      classStr = `selectColor simpleFontSize`
-    }else{
-      classStr = `selectColor simpleFontSize`
-    }
-  }else if(font == 1&&colour == 0){//大字体标准颜色
-    if(flg == 2){
-      if(pacs == 1){
-        classStr = `largeFontSize pdright`
-      }else if(pacs == 2){
-        classStr = `largeFontSize widthChangeed`
-      }else if(pacs == 3){
-        classStr = `largeFontSize middleImg`
-      }else if(pacs == 4){
-        classStr = `largeFontSize titleWidth`
-      }else if(pacs == 5){
-        classStr = `largeFontSize specialSize`
+    }else if(font == 0&&colour == 1){//标准字体颜色加黑
+      if(flg == 2){
+        if(pacs == 6){
+          classStr = `simpleFontSize selectColor`
+        }else{
+          classStr = `simpleFontSize`
+        }
+      }else if(flg == 1){
+        classStr = `selectColor simpleFontSize`
       }else{
-        classStr = `largeFontSize`
+        classStr = `selectColor simpleFontSize`
+      }
+    }else if(font == 1&&colour == 0){//大字体标准颜色
+      if(flg == 2){
+        if(pacs == 1){
+          classStr = `largeFontSize pdright`
+        }else if(pacs == 2){
+          classStr = `largeFontSize widthChangeed`
+        }else if(pacs == 3){
+          classStr = `largeFontSize middleImg`
+        }else if(pacs == 4){
+          classStr = `largeFontSize titleWidth`
+        }else if(pacs == 5){
+          classStr = `largeFontSize specialSize`
+        }else{
+          classStr = `largeFontSize`
+        }
+      }else if(flg == 1){
+        classStr = `simpleLightColor largeFontSize`
+      }else{
+        classStr = `simpleColor largeFontSize`
+      }
+    }else{//都是标准的
+      if(flg == 2){
+        classStr = `simpleFontSize`
+      }else if(flg == 1){
+        classStr = `simpleLightColor simpleFontSize`
+      }else{
+        classStr = `simpleColor simpleFontSize`
       }
-    }else if(flg == 1){
-      classStr = `simpleLightColor largeFontSize`
-    }else{
-      classStr = `simpleColor largeFontSize`
-    }
-  }else{//都是标准的
-    if(flg == 2){
-      classStr = `simpleFontSize`
-    }else if(flg == 1){
-      classStr = `simpleLightColor simpleFontSize`
-    }else{
-      classStr = `simpleColor simpleFontSize`
     }
-  }
-  return classStr;
+    return classStr;
+  // }, 0);
 }
 module.exports = {
     getIds,

+ 2 - 0
src/utils/utils.js

@@ -218,9 +218,11 @@ export async function getBigPush(type,symData,save){
     "age": emrData.age,
     "hosCode": emrData.hosCode,
     "featureType": type,  //类型1:症状,4:查体,5:化验,6:辅检,7:诊断
+    "ruleType":config.ruleTypeMap[type],
     "diag": emrData.dis,
     "lis": emrData.lis,
     "other": emrData.other,
+    "pasts": emrData.other,
     "pacs": emrData.pacs,
     "sex": emrData.sex,
     "vital":emrData.vital,