Просмотр исходного кода

Merge remote-tracking branch 'origin/dev/zhangxc1' into dev/otherHis

# Conflicts:
#	src/store/async-actions/treat.js
zhouna 6 лет назад
Родитель
Сommit
3385c2c2a4

+ 4 - 1
src/common/components/ConfirmModal/index.jsx

@@ -68,6 +68,7 @@ const defaultProps = {
     cancelBorderColor: '#414141',
     cancelBg: '#fff',
     width: '300px',
+    height: '200px',
 };
 
 class ConfirmModal extends Component {
@@ -123,10 +124,12 @@ class ConfirmModal extends Component {
             closable, 
             noFooter
         } = this.props;
+        const marginLeft = -parseInt(width)/2
+        const marginTop = -parseInt(height)/2
         return (
             <NewPortal visible={visible}>
                 <div className={styles['modal-wrapper']} id='confirm'>
-                    <div className={styles[['modal']]} style = {{width: width, height:height}}>
+                    <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, height:height, marginTop:marginTop}}>
                         <div className={styles['modal-title']} style={{background: titleBg}}>{title ? title : ''} {closable ? <img onClick={this.closeModal} className={styles['modal-close']} src = {close}/> : false}</div>
                         <div className={styles['modal-content']}>{children}</div>
                         {noFooter ? '' : <div className={styles['modal-operator']+' clearfix'}>

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

@@ -2,7 +2,6 @@
     position: fixed;
     top: 50%;
     left: 50%;
-    transform: translate(-50%,-50%);
     margin: auto;
     border-radius: 5px;
     background: #fff;

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

@@ -79,7 +79,6 @@ class CopyRight extends Component {
 
     return (
       <div className={style["container"]}>
-        {disContent.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: disContent.data.data[1].description}}></div>}
         <div className={style["copy"]}>
           版本信息:{" "}
           <a href="javascript:;" onClick={showCopyModal}>
@@ -88,7 +87,7 @@ class CopyRight extends Component {
           {hasNewVersion && <span>new</span>} &copy;<b>朗通医疗</b>
           <div className={style['disclaimer']} onClick={showDisclatmerModal}>免责声明</div>
         </div>
-        <div
+        {copyVisible && <div
           className={style["copyModal"]}
           style={copyVisible ? { display: "block" } : { display: "none" }}
         >
@@ -101,8 +100,8 @@ class CopyRight extends Component {
             </div>
             <div className={style["content"]}>{copyContent}</div>
           </div>
-        </div>
-        <div
+        </div>}
+       {disVisible && <div
           className={style["disModal"]}
           style={disVisible ? { display: "block" } : { display: "none" }}
         >
@@ -112,7 +111,7 @@ class CopyRight extends Component {
             <div className={style["content"]}>{this.disclatmerContent()}</div>
             <div className={style["btnBox"]}><span  className={style["btn"]} onClick={closeDisclatmerModal}>确定</span></div>
           </div>
-        </div>
+        </div>}
       </div>
     );
   }

+ 10 - 3
src/components/CopyRight/index.less

@@ -50,21 +50,28 @@
         position: fixed;
         width: 820px;
         left: 50%;
+        top: 20%;
         margin-left: -410px;
         background: #fff;
-        top: 65px;
-       
+        height: 60%;
+        padding: 80px 0 40px;
         img{
           float: right;
           margin: -5px 5px 0px 0px;
           cursor: pointer;
         }
         .header {
+          position: absolute;
+          width: 100%;
+          top: 0;
           font-size: 14px;
           padding: 10px 0px 10px 10px;
           border-bottom: 1px solid #EAEDF1;
         }
         .now{
+          position: absolute;
+          width: 100%;
+          top: 35px;
           font-size: 18px;
           padding: 15px 10px;
           border-bottom:1px solid #EAEDF1;
@@ -75,8 +82,8 @@
           }
         }
         .content {
+          height: 100%;
           padding: 10px;
-          max-height: 400px;
           overflow-y: auto;
         }
       }

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

@@ -88,7 +88,7 @@ class DiagnosticList extends Component {
                                     <span className={style['diag-name']} onClick={()=>{this.handleClickDiag(item)}}>{item.name}<span></span></span> 
                                     {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
                                     <span className={style['treat']}
-                                          style ={{ color: hasTreat ?'' : 'gray', border: hasTreat ?'' : '1px solid gray'}}
+                                          style ={{ color: hasTreat ?'' : 'gray', border: hasTreat ?'1px solid #3B9ED0' : '1px solid gray'}}
                                           onClick={() =>{hasTreat && this.showTreat(item)}}>
                                           治疗方案
                                     </span>

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

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

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

@@ -7,7 +7,7 @@ import tipsImg from "../../common/images/tips.png";
 import vigilantImg from "../../common/images/vigilant.png";
 import showImg from "../../common/images/show.png";
 import hideImg from "../../common/images/close.png";
-import CopyRightContainer from "@containers/CopyRightContainer";
+
 import PushDiag from "./PushDiag";
 import DiagnosticItem from "@containers/DiagnosticItem";
 import $ from "jquery";
@@ -95,7 +95,6 @@ class PushItems extends Component {
       showAdd,
       showTips
     } = this;
-
     let assayNum = 0;
     let assayHide = assay.map((item, index) => {
       assayNum = assayNum + item.name.length + 2;
@@ -355,8 +354,9 @@ class PushItems extends Component {
             </div>
           </div>
         </div>
-
-        <CopyRightContainer />
+        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data[1].description}}></div>}
+        
+        
       </div>
     );
   }

+ 17 - 11
src/components/PushItems/index.less

@@ -55,7 +55,7 @@
         }
       }
       div{
-        font-size: 12px;
+        font-size: 14px;
         padding:6px 15px;
         span{
           cursor: pointer;
@@ -66,7 +66,7 @@
   .show {
     float: right;
     color:  #58ACD7;;
-    font-size: 12px;
+    font-size: 14px;
     cursor: pointer;
     img {
       width: 12px;
@@ -77,7 +77,7 @@
     float: right;
     text-align: right;
     color: #58ACD7;
-    font-size: 12px;
+    font-size: 14px;
     cursor: pointer;
     clear: both;
     img {
@@ -120,7 +120,7 @@
       }
     }
     div{
-      font-size: 12px;
+      font-size: 14px;
       padding:6px 15px;
       ul{
         .firstLi{
@@ -142,14 +142,14 @@
             padding: 0px 0px 0px 0px;
             margin-top: -2px;
             span{
-              font-size: 12px;
-              line-height: 12px;
+              font-size: 14px;
+              line-height: 14px;
               display: inline-block;
               margin: 6px;
               input[type='checkbox']{
                 float: left;
-                width: 12px;
-                height: 12px;
+                width: 14px;
+                height: 14px;
                 margin-right: 2px;
                 background-color: #fff;
                 -webkit-appearance:none;
@@ -183,7 +183,7 @@
       }
     }
     .content{
-      font-size: 12px;
+      font-size: 14px;
       padding:6px 15px;
       .title {
         font-size: 14px;
@@ -191,7 +191,7 @@
         margin-bottom:10px;
         a{
           display: inline-block;
-          font-size: 12px;
+          font-size: 14px;
           color: #3B9ED0;
           width: 42px;
           /*height: 20px;
@@ -210,7 +210,7 @@
           border: 1px solid #3B9ED0;
           border-radius: 4px;
           text-align: center;
-          font-size: 12px;
+          font-size: 14px;
           color: #3B9ED0;
           line-height: 18px;
           margin: 0 10px -2px;
@@ -340,3 +340,9 @@
 .billing {
   color: #3B9ED0;
 }
+.disTips {
+  padding: 10px 20px 0;
+  font-size: 10px;
+  color: #979797;
+  text-align: center;
+}

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

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

+ 22 - 17
src/components/Treat/DrugTreat/index.jsx

@@ -28,9 +28,10 @@ class DrugTreat extends Component {
         setDrugInfo && setDrugInfo(item);
     }
     showTreatDesc() {
-        $('#treatWrapper').animate({'width': '940px'}, 500);
-        $('#treatDescBox').animate({'width': '260px'}, 500);
+        $('#treatDescBox').css({'display': 'block'});
         $('#treatWrapper').animate({'margin-left': '-470px'}, 300);
+        $('#treatDescBox').animate({'width': '260px'}, 500);
+        
     }
     
 
@@ -42,21 +43,25 @@ class DrugTreat extends Component {
                 <h3 className={style['drug-title']}><img className={style['drug-icon']} src={drugIcon}/> 常用药物治疗</h3>
                 {treatment.map((item, index) => {
                     return(<div className={style['drug-content']}>
-                        {index + 1 + '. ' }{item.drugsName}:&nbsp;
-                        {item.medicitionsList.map((it, ii) => {
-                            return ((it.isShow == 1 || it.selected) && <span style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)'} : ''}>
-                                    {ii === 0 ? '' : ', '}
-                                    <span className={style['drug-name']}  
-                                          onDoubleClick={() =>{this.setDrugInfo(it);showDrugInfo();}} 
-                                          onClick={()=>{it.forbidden === '2' ? '' : this.handleSelect(index,ii)}} style={it.selected ? {color: '#3B9ED0', borderBottom: '1px solid #3B9ED0'}:''}>
-                                        {it.medicitionName}
-                                    </span>
-                                    {/* {it.showInfo && it.showInfo==='1'&& <img className={style['info-img']} src={info} onClick={() =>{this.setDrugInfo(it);showDrugInfo();}}/>} */}
-                                    {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={{border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}, 使用率{it.rate}
-                                    
-                                </span>)
-                        })}
-                        {<span className={style['drug-more']} onClick={() =>this.setOtherRecommend(item, index)} ><img className={style['info-img']} src={more} />更多同类药</span> }
+                        <div  className={style['drug-name-box']}>
+                            {index + 1 + '. ' }{item.drugsName}:&nbsp;
+                            {item.medicitionsList.map((it, ii) => {
+                                return ((it.isShow == 1 || it.selected) && <span style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)'} : ''}>
+                                        {ii === 0 ? '' : ', '}
+                                        <span className={style['drug-name']}  
+                                            onDoubleClick={() =>{this.setDrugInfo(it);showDrugInfo();}} 
+                                            onClick={()=>{it.forbidden === '2' ? '' : this.handleSelect(index,ii)}} style={it.selected ? {color: '#3B9ED0', borderBottom: '1px solid #3B9ED0'}:''}>
+                                            {it.medicitionName}
+                                        </span>
+                                        {/* {it.showInfo && it.showInfo==='1'&& <img className={style['info-img']} src={info} onClick={() =>{this.setDrugInfo(it);showDrugInfo();}}/>} */}
+                                        {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={{border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}, 使用率{it.rate}
+                                        
+                                    </span>)
+                            })}
+
+                        </div>
+                        {<div className={style['drug-more']} onClick={() =>this.setOtherRecommend(item, index)} ><img className={style['info-img']} src={more} />更多同类药</div> }
+                        
                     </div>)
                 })}
             </div>

+ 10 - 2
src/components/Treat/DrugTreat/index.less

@@ -2,6 +2,7 @@
     background: #EAF7FA;
     height: 36px;
     line-height: 36px;
+    font-weight: bold;
 }
 .drug-icon {
     width: 16px;
@@ -9,6 +10,7 @@
     margin: 10px;
 }
 .drug-content {
+    position: relative;
     line-height: 36px;
     border-bottom: 1px dashed #D2D2D2;
 }
@@ -31,10 +33,16 @@
     text-align: center;
 }
 .drug-more {
-    display: inline-block;
     cursor: pointer;
-    float: right;
     color: #3B9ED0;
+    position: absolute;
+    right: 0;
+    top: 50%;
+    margin-top: -18px;
+}
+.drug-name-box {
+    float: left;
+    width: 530px;
 }
 .drug-content:after{display:block;clear:both;content:"";visibility:hidden;height:0}
 .drug-content{zoom:1}

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

@@ -7,10 +7,11 @@ class GeneralTreat extends Component {
     }
 
     render() {
-        const { icon, titleBg, filter, title, generalTreat } = this.props
+        const { icon, titleStyle,titleBg, filter, title, generalTreat } = this.props
         return(
             generalTreat && generalTreat.length > 0 && <div className={style['general-wrapper']}>
-                <div className={style['general-title']} style={{background: titleBg,filter:filter}}><img className={style['general-icon']} src={icon}/>{title}</div>
+                <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}}>
                 </div>
 

+ 13 - 0
src/components/Treat/GeneralTreat/index.less

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

+ 18 - 15
src/components/Treat/index.jsx

@@ -7,8 +7,8 @@ import DrugInfo from '@components/TreatDesc/DrugInfo';
 import Notify from '@commonComp/Notify'
 import close from './img/close.png';
 import generalIcon from './img/general.png';
-
 import surgicalIcon from './img/surgical.png';
+import $ from "jquery";
 
 class Treat extends Component {
     constructor(props){
@@ -38,29 +38,28 @@ class Treat extends Component {
     }
 
     render(){
-        const { generalTreat, treatment, surgeryTreat, selectDrug, drugInfo, treatDesc, setOtherRecommend, setDrugInfo, showDrug, showDrugInfo,hideDrugInfo, title} = this.props;
+        const { generalTreat, treatment, treatItem, surgeryTreat, selectDrug, drugInfo, treatDesc, setOtherRecommend, setDrugInfo, showDrug, showDrugInfo,hideDrugInfo, title} = this.props;
         return(
-        <div className={style['treat-mask']}>
-            <div  id='treatWrapper' className={style['treat-wrapper']}>
-                
-                <div className={style['treat-box']}>
-                    <p className={style['treat-title']}>治疗方案 <img onClick={this.hideTreat} src={close}/></p>
+            <div   className={style['treat-wrapper']}>
+                <div className={style['treat-mask']}>
+                </div>
+                <div id='treatWrapper' className={style['treat-box']}>
+                    <div className={style['treat-title']}>治疗方案 ({treatItem.name})<img onClick={this.hideTreat} src={close}/></div>
+
                     <div className={style['treat-inner-box']}>
-                        <GeneralTreat icon={generalIcon} title='一般治疗' titleBg='rgba(47,199,156,0.1)' filter='progid:DXImageTransform.Microsoft.gradient(startColorstr=#192FC79C,endColorstr=#192FC79C)' generalTreat={generalTreat}></GeneralTreat>
+                        <GeneralTreat icon={generalIcon} title='一般治疗'   generalTreat={generalTreat}></GeneralTreat>
                         <DrugTreat treatment={ treatment } 
                                 selectDrug={selectDrug} 
                                 setOtherRecommend={ setOtherRecommend } 
                                 showDrugInfo = {showDrugInfo}
                                 setDrugInfo={ setDrugInfo }>
-                        </DrugTreat>
-                        <GeneralTreat icon={surgicalIcon} title='手术治疗' titleBg='#FAEAEA' generalTreat={surgeryTreat}></GeneralTreat>
+                        </DrugTreat> 
+                        <GeneralTreat icon={surgicalIcon} title='手术治疗' titleStyle={{background:'#FAEAEA',opacity:'1', filter:'alpha(opacity=100);',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=100);'}} titleBg='#FAEAEA' generalTreat={surgeryTreat}></GeneralTreat>
                     </div>
                     <div className={style['bottom']}>
                         <span className={style['prescription-btn']} onClick={this.handlePrescription}>开处方</span> <span className={style['determine-btn']} onClick={this.handleDetermine}>确定</span>
                     </div>
-                    
-                </div>
-                {treatDesc && <TreatDesc 
+                    {treatDesc && <TreatDesc 
                     treatment={treatment} 
                     treatDesc={treatDesc} 
                     selectDrug={selectDrug} 
@@ -68,11 +67,15 @@ class Treat extends Component {
                     showDrugInfo = {showDrugInfo}
                     showDrug = {showDrug}
                     >
-                </TreatDesc>}
+                    </TreatDesc>}
+                </div>
+                
+                
                 {showDrug && drugInfo && <DrugInfo drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>}
             </div>
+                
             
-        </div>
+        
         )
     }
 }

+ 37 - 18
src/components/Treat/index.less

@@ -1,31 +1,48 @@
 @import "~@less/mixin.less";
 .treat-wrapper{
     position: fixed;
-    background: #fff;
-    z-index: 102;
-    left: 50%;
-    top: 50%;
-    width: 680px;
-    height: 680px;
-    margin-left: -340px;
-    margin-top: -340px;
+    width: 100%;
+    height: 100%;
+    left: 0;
+    top: 0;
+    // background: #fff;
+    // left: 50%;
+    // top: 25%;
+    // width: 680px;
+    // margin-left: -340px;
+    // margin-top: -340px;
+    // z-index: 301;
+    z-index: 300;
 }
 .treat-mask {
     position: fixed;
-    background: rgba(0, 0, 0, 0.5);
     width: 100%;
     height: 100%;
     top: 0;
     left: 0;
-    z-index: 9999;
+    z-index: 300;
+    background: #000;
+    opacity: 0.6;
+    filter:alpha(opacity=60);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
 }
 .treat-box {
+    position: fixed;
+    background: #fff;
     width: 680px;
-    float: left;
-    border-right: 1px solid #e0e2e4;
-    padding-bottom: 100px;
+    left: 50%;
+    top: 20%;
+    height: 60%;
+    margin-left: -340px;
+    z-index: 301;
+    padding-top: 40px;
+    padding-bottom: 80px;
 }
 .treat-title {
+    width: 100%;
+    position: absolute;
+    top: 0px;
+    background: #fff;
     height: 40px;
     line-height: 40px;
     border-bottom: 1px solid #e0e2e4;
@@ -39,18 +56,19 @@
     }
 }
 .treat-inner-box {
-    width: 680px;
-    height: 540px;
+    width: 100%;
+    height: 100%;
     padding: 10px 20px 0 20px;
-    overflow: hidden;
+
     overflow-y: auto;
 }
 
 .bottom {
     position: absolute;
-    bottom: 20px;
-    height: 40px;
+    width: 100%;
+    height: 80px;
     line-height: 40px;
+    background: #fff;
 }
 .prescription-btn,.determine-btn {
     position: absolute;
@@ -61,6 +79,7 @@
     border-radius: 4px;
     text-align: center;
     cursor: pointer;
+    top: 20px;
 }
 
 .prescription-btn {

+ 6 - 0
src/components/TreatDesc/DrugInfo/index.jsx

@@ -17,6 +17,12 @@ class DrugInfo extends Component {
                         return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{item.title}</span> <span className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></span> </div>
                     })}
                 </div> }
+                { !drugInfo || (drugInfo && drugInfo.drugDesc.length === 0) && <div className={style['drug-desc-wrapper']}>
+                    <div>
+                        该药品暂无说明
+                    </div>
+                    
+                </div> }
 
         </div>)
     }

+ 9 - 7
src/components/TreatDesc/DrugInfo/index.less

@@ -1,21 +1,23 @@
 .drug-info-wrapper {
     position: fixed;
-    width: 850px;
-    height: 680px;
+    width: 950px;
+    height: 70%;
     left: 50%;
-    top: 50%;
-    margin-left: -425px;
-    margin-top: -340px;
+    top: 15%;
+    margin-left: -475px;
     background: #fff;
-    z-index: 103;
+    z-index: 303;
+    padding: 40px 0 60px;
     
 }
 .drug-desc-wrapper {
-    height: 640px;
+    height: 100%;
     overflow-y: auto;
     padding: 0 40px;
 }
 .drug-title {
+    position: absolute;
+    top: 0;
     width: 100%;
     height: 40px;
     line-height: 40px;

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

@@ -17,17 +17,17 @@ class TreatDesc extends Component {
         selectDrug && selectDrug(index,ii);
     }
     hideTreatDesc() {
-        $('#treatWrapper').animate({'width': '680px'}, 500);
-        $('#treatDescBox').animate({'width': '0px'}, 500);
+        $('#treatDescBox').css({'display': 'none'});
+        $('#treatDescBox').animate({'display': 'none'}, 500);
         $('#treatWrapper').animate({'margin-left': '-340px'}, 500);
     }
 
     render(){
         const  { treatment, treatDesc, setDrugInfo, showDrugInfo} = this.props
         const { title, basic, otherDrugIndex, drugDesc} = treatDesc
-        return (treatment && treatment.length >0 && <div id='treatDescBox' className={style['treat-desc-box']}>
-            <h3 className={style['drug-desc-title']}>同类药物  <img src={close} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
-            {title && title === '药品推荐' ? <div>
+        return (treatment && treatment.length >0 && <div  className={style['treat-desc-box']}>
+            
+            {title && title === '药品推荐' ? <div className={style['similar-drug-box']} id='treatDescBox'>
                 {/* { basic && basic.length > 0 && <div> //推荐依据不需要展示
                     <h3 className={style['recommend-title']}>推荐依据</h3>
                     {basic.map((item, index) =>{
@@ -36,7 +36,8 @@ class TreatDesc extends Component {
                     })}
                     
                 </div> } */}
-                { otherDrugIndex > -1 && <div className={style['similar-drug']}>
+                { otherDrugIndex > -1 && <div  className={style['similar-drug']}>
+                    <h3 className={style['drug-desc-title']}>同类药物  <img src={close} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
                     {treatment[otherDrugIndex].medicitionsList.map((item, index) =>{
                         return (<span style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)'} : ''}>
                         {index === 0 ? '' : ', '}                   

+ 19 - 5
src/components/TreatDesc/index.less

@@ -4,8 +4,8 @@
     overflow: hidden;
 }
 .drug-desc-wrapper {
-    max-height: 650px;
-    overflow-y: scroll;
+  height: 100%;
+  overflow-y: auto
 }
 .drug-desc-title {
     height: 40px;
@@ -13,7 +13,10 @@
     border-bottom: 1px solid #e0e2e4;
     padding-left: 20px;
     width: 260px;
-    position: relative;
+    position: absolute;
+    background: #fff;
+    top: 0px;
+    margin-left: -20px;
 }
 .recommend-title, .drug-title {
     padding: 30px 0 15px 20px;
@@ -29,8 +32,19 @@
     position: absolute;
     right: 0px;
 }
+.similar-drug-box {
+    display: none;
+}
 .similar-drug {
-    padding: 20px;
+    position: absolute;
+    padding-top: 40px;
+    overflow-y: auto;
+    width: 260px;
+    left: 680px;
+    height: 100%;
+    top: 0;
+    background: #fff;
+    padding: 60px 20px 80px;
 }
 
 .drug-name {
@@ -48,4 +62,4 @@
     line-height: 16px;
     border-radius: 4px;
     text-align: center;
-}
+}

+ 6 - 2
src/containers/Treat.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import { connect } from 'react-redux';
 import Treat from '@components/Treat';
-import { SELECT_DRUG, SET_OTHER_DRUG, SET_DRUG_INFO, HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO } from '@store/types/treat.js';
+import { SELECT_DRUG, SET_OTHER_DRUG, SET_DRUG_INFO, CLEAR_DRUG_INFO,HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO } from '@store/types/treat.js';
 import { getInstroduce, getRecommendBasic } from '@store/async-actions/treat';
 import { ADD_SCHEME } from '@store/types/pushMessage.js'
 import { showDrugInfo } from '../store/actions/treat';
@@ -15,7 +15,8 @@ function mapStateToProps(state){
         surgeryTreat: treat.surgeryTreat,
         treatDesc: treat.treatDesc,
         drugInfo: treat.drugInfo,
-        showDrug: treat.showDrugInfo
+        showDrug: treat.showDrugInfo,
+        treatItem: treat.treatItem,
     }
 }
  
@@ -56,6 +57,9 @@ function mapDispatchToProps(dispatch) {
             })
         },
         hideDrugInfo: () =>{
+            dispatch({
+                type: CLEAR_DRUG_INFO
+            })
             dispatch({
                 type: HIDE_DRUG_INFO
             })

+ 0 - 1
src/containers/TreatDrug.js

@@ -4,7 +4,6 @@ import TreatDrug from '@components/TreatDrug';
 // import { ADD_DRUG } from '@stroe/types/treatDrug.js';
 
 function mapStateToProps(state){
-    console.log('state1111',state.treatDrug)
     return {
         treatDrugList: state.treatDrug
     }

+ 1 - 1
src/store/actions/pushMessage.js

@@ -190,7 +190,7 @@ export const addBilling = (state, action) => {
 		}
 	}
 	if(res.advice.assay  && res.advice.check !== '') {
-			if(res.advice.assay.substring(res.advice.assay.length-2,res.advice.assay.length-1) !== ', ') {
+			if(res.advice.assay.substring(res.advice.assay.length-2,res.advice.assay.length-1) !== ',') {
 				res.advice.assay = res.advice.assay + ', '
 			} 
 	}

+ 12 - 0
src/store/actions/treat.js

@@ -59,6 +59,12 @@ export const setDrugInfo = (state, action) => {
     return res
 }
 
+export const clearDrugInfo = (state, action) => {
+    const res = JSON.parse(JSON.stringify(state));
+    res.drugInfo.drugDesc = [];
+    return res
+}
+
 export const setRecommendBasic = (state, action) => {
     // const res = Object.assign({}, state)
     const res = JSON.parse(JSON.stringify(state));
@@ -79,3 +85,9 @@ export const hideDrugInfo = (state, action) => {
     return res;
 }
 
+export const setTreatInfo = (state, action) => {
+    const res = Object.assign({}, state);
+    res.treatItem = action.treatItem;
+    return res;
+}
+

+ 11 - 5
src/store/async-actions/diagnosticList.js

@@ -5,11 +5,17 @@ export const isAddMainSuit = () =>{
     return (dispatch, getState) => {
         const state = getState();
         if(state.diagnosticList.diagnosticList.length === 1 && state.diagnosticList.diagnosticList[0].type === 2) {
-            
-            if(state.mainSuit.data && state.mainSuit.data.length === 0 && state.mainSuit.saveText && (state.mainSuit.saveText.length === 0 || state.mainSuit.saveText.length === 1 &&  state.mainSuit.saveText[0] === '')) {
-              dispatch({
-                type:ISREAD
-              });
+            const isAddMainSuitFlag = state.mainSuit.data && state.mainSuit.data.length === 0 && state.mainSuit.saveText    //判断主诉和化验查体是否为空
+                                      && (state.mainSuit.saveText.length === 0 || state.mainSuit.saveText.length === 1 
+                                      &&  state.mainSuit.saveText[0] === '') && state.assistCheck && state.assistCheck.dataString.length === 0
+                                      && state.inspect.labelList && state.inspect.labelList.length === 0 && state.inspect.inspectStrPlus.length === 0
+            console.log('isAddMainSuitFlag', state.mainSuit.data && state.mainSuit.data.length === 0 && state.mainSuit.saveText    //判断主诉和化验查体是否为空
+            && (state.mainSuit.saveText.length === 0 || state.mainSuit.saveText.length === 1 
+            &&  state.mainSuit.saveText[0] === '')&& state.assistCheck && state.assistCheck.dataString.length === 0 && state.inspect.labelList && state.inspect.labelList.length === 0  && state.inspect.inspectStrPlus.length === 0  )                     
+            if(isAddMainSuitFlag) {
+                dispatch({
+                    type:ISREAD
+                });
                 dispatch({
                     type: SET_DIAG_TO_MAINSUIT,
                     data: state.diagnosticList.diagnosticStr

+ 10 - 7
src/store/async-actions/treat.js

@@ -1,7 +1,7 @@
 import { json } from "@utils/ajax";
 import { SET_TREAT } from '@store/types/diagnosticList';
-import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR} from '@store/types/diagnosticList';
-import { SET_DRUG_INFO, SET_TREATMENT, SET_RECOMMEND_BASIC } from '@store/types/treat';
+import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR} from '@store/types/diagnosticList'; 
+import { SET_DRUG_INFO, SET_TREATMENT, SET_TREAT_INFO, SET_RECOMMEND_BASIC } from '@store/types/treat';
 import {storageLocal,getEMRParams} from '@utils/tools';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 
@@ -27,7 +27,7 @@ export const addDiagnostic = (item) => {
                     } else {
                         diag = diag + ',' + diagnosticList[i].name;
                     }
-
+                    
                 }
             }
             if (item.type === 1) {
@@ -47,7 +47,7 @@ export const addDiagnostic = (item) => {
                 "symptom": emrData.current + emrData.main,
                 "vital": emrData.vital
             };
-
+            
             json(url, params).then((data) =>{
                 if (data.data.data) {
                     item.treat = data.data.data.treat
@@ -76,6 +76,10 @@ export const addDiagnostic = (item) => {
 
 export const getTreatResult = (item) =>{
     return (dispatch, getState) => {
+        dispatch({
+            type: SET_TREAT_INFO,
+            treatItem: item
+        })
         const state = getState();
         let url = api.push;
         if(+state.typeConfig.confirmType===1){
@@ -126,15 +130,14 @@ export const getTreatResult = (item) =>{
                      treat = data.data.data.treat || {}
                 }
                 if(treat) {
-                    return dispatch({
+                   dispatch({
                         type: SET_TREATMENT,
                         treatment: treat.treatment,
                         generalTreat: treat.commonTreatment,
                         surgeryTreat: treat.surgeryTreatment,
                     })
                 }
-                
-            return
+
         }).catch((e) =>{
             console.log(e)
         })

+ 6 - 2
src/store/reducers/treat.js

@@ -1,5 +1,5 @@
-import { SELECT_DRUG, SET_OTHER_DRUG, SET_DRUG_INFO, SHOW_TREAT, HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO, SET_GENERAL_TREAT, SET_TREATMENT, SET_SURGERY_TREAT, SET_RECOMMEND_BASIC } from '../types/treat'
-import { selectDrug, setOtherDrug, setDrugInfo, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic } from '../actions/treat'
+import { SELECT_DRUG, SET_TREAT_INFO, SET_OTHER_DRUG, SET_DRUG_INFO, CLEAR_DRUG_INFO,SHOW_TREAT, HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO, SET_GENERAL_TREAT, SET_TREATMENT, SET_SURGERY_TREAT, SET_RECOMMEND_BASIC } from '../types/treat'
+import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic } from '../actions/treat'
 const initState = {
     show: false, //治疗方案显示隐藏
     showDrugInfo: false, //药品信息显示隐藏
@@ -191,6 +191,10 @@ export default function(state=initState, action){
             return showDrugInfo(state, action);
         case HIDE_DRUG_INFO:
             return hideDrugInfo(state, action);
+        case SET_TREAT_INFO:
+            return setTreatInfo(state, action);
+        case CLEAR_DRUG_INFO:
+            return clearDrugInfo(state, action);
         default:
             return state
     }

+ 2 - 0
src/store/types/treat.js

@@ -1,6 +1,7 @@
 export const SELECT_DRUG = 'SELECT_DRUG';   //选则药品
 export const SET_OTHER_DRUG = 'SET_OTHER_DRUG'; //设置其他推荐
 export const SET_DRUG_INFO = 'SET_DRUG_INFO'; //设置药品说明
+export const CLEAR_DRUG_INFO = 'CLEAR_DRUG_INFO'; //清除药品说明
 export const SHOW_TREAT = 'SHOW_TREAT';
 export const HIDE_TREAT = 'HIDE_TREAT';
 export const CLEAR_TREAT = 'CLEAR_TREAT'; //清除治疗方案内容
@@ -10,3 +11,4 @@ export const SET_GENERAL_TREAT = 'SET_GENERAL_TREAT'; //设置一般治疗
 export const SET_SURGERY_TREAT = 'SET_SURGERY_TREAT'; //设置手术治疗
 export const SET_TREATMENT = 'SET_TREATMENT' //设置治疗方案
 export const SET_RECOMMEND_BASIC = 'SET_RECOMMEND_BASIC'//设置其他推荐推荐依据
+export const SET_TREAT_INFO = 'SET_TREAT_INFO' //设置治疗方案信息(name,id等)