Browse Source

Squashed commit of the following:

commit f96df5b81cb4f1a89188a0b2d9bbf188183c064d
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Wed Jan 30 15:20:06 2019 +0800

    治疗方案样式

commit 692d36bf0ba1c8aa1eaa10f995b0e09875f83dc0
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Wed Jan 30 15:18:20 2019 +0800

    修改治疗方案样式

commit 859a7364a96569f6aa92360efbce5a19b40681cb
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Wed Jan 30 14:32:44 2019 +0800

    修改治疗方案小标题样式

commit 99789b23f06c18e5b588552066faf7f2ccacf198
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Wed Jan 30 14:07:48 2019 +0800

    修改治疗方案同类药物

commit aae1d5e66e5e1918046aa52bf800dc66c3cf44df
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Wed Jan 30 14:00:40 2019 +0800

    修改弹窗IE8不居中

commit 0d947f0d5e8965ce807bb6ee5a7e9cbd4b79d2fb
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 20:30:39 2019 +0800

    治疗方案高度自适应

commit c000d83fb6ac5f265951c0e1377b627d24d2da10
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 17:27:30 2019 +0800

    修改治疗方案边框

commit 135ef48b82fc3fccb54c65871b5ee983162c81a5
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 15:58:28 2019 +0800

    导入化验结果,第一次添加诊断为主诉时不往主诉添加字符串

commit 24c6ec0c46d66ddb61e864c1f56474f04abaf402
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 15:56:03 2019 +0800

    治疗方案标题添加疾病名称

commit b7f19c39c781941189b98ebb52c2cbe6bff6dad0
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 15:22:37 2019 +0800

    修改第一次添加诊断为复诊,化验和辅检不为空时不往主诉加字符串

commit 799eef5c34a21f9d90bc82a40240838cf10ba601
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 14:41:20 2019 +0800

    ie8治疗方案遮罩

commit fee35d5473b69aafb5335759006a93fea8d14145
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 14:05:16 2019 +0800

    治疗方案遮罩IE8

commit eee1ac639dc3d91aa4145aa145234e01c8d4cbf6
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 14:04:58 2019 +0800

    修改右侧推送字体大小

commit a157eec90e73d0ca3554bc5ab04f60e3ef4a660e
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Tue Jan 29 13:26:56 2019 +0800

    修改化验项开单逗号问题

commit 29b2499b796085a682a936d82c97decc35edf891
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Fri Jan 25 13:50:07 2019 +0800

    修改版本信息和免责声明位置

# Conflicts:
#	src/components/Treat/index.jsx
#	src/components/Treat/index.less
#	src/store/async-actions/diagnosticList.js
#	src/store/async-actions/treat.js
liucf 6 years ago
parent
commit
6df92ea9dd

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

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

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

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

@@ -9,6 +9,7 @@
     margin: 10px;
 }
 .drug-content {
+    position: relative;
     line-height: 36px;
     border-bottom: 1px dashed #D2D2D2;
 }
@@ -31,10 +32,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>
 

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

@@ -1,7 +1,19 @@
 .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;
 }

+ 14 - 16
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,16 +38,14 @@ 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>
-            <div className={style['treat-mask']}>
-            </div>
+            <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  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-inner-box']}>
                         <GeneralTreat icon={generalIcon} title='一般治疗'   generalTreat={generalTreat}></GeneralTreat>
                         <DrugTreat treatment={ treatment } 
@@ -55,15 +53,13 @@ class Treat extends Component {
                                 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} 
@@ -71,12 +67,14 @@ class Treat extends Component {
                     showDrugInfo = {showDrugInfo}
                     showDrug = {showDrug}
                     >
-                </TreatDesc>}
+                    </TreatDesc>}
+                </div>
+                
+                
                 {showDrug && drugInfo && <DrugInfo drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>}
             </div>
                 
             
-        </div>
         
         )
     }

+ 32 - 17
src/components/Treat/index.less

@@ -1,15 +1,18 @@
 @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;
-    z-index: 301;
+    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;
@@ -24,12 +27,22 @@
     -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;
@@ -43,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;
@@ -65,6 +79,7 @@
     border-radius: 4px;
     text-align: center;
     cursor: pointer;
+    top: 20px;
 }
 
 .prescription-btn {

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

@@ -7,7 +7,7 @@
     margin-left: -425px;
     margin-top: -340px;
     background: #fff;
-    z-index: 103;
+    z-index: 303;
     
 }
 .drug-desc-wrapper {

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

+ 2 - 1
src/containers/Treat.js

@@ -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,
     }
 }
  

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

@@ -79,3 +79,9 @@ export const hideDrugInfo = (state, action) => {
     return res;
 }
 
+export const setTreatInfo = (state, action) => {
+    const res = Object.assign({}, state);
+    res.treatItem = action.treatItem;
+    return res;
+}
+

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

@@ -4,12 +4,11 @@ import {ISREAD} from "../types/homePage";
 export const isAddMainSuit = () =>{
     return (dispatch, getState) => {
         const state = getState();
-        console.log('state',state);
         if(state.diagnosticList.diagnosticList.length === 1 && state.diagnosticList.diagnosticList[0].type === 2) {
             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.labelList && state.inspect.labelList.length === 0 && state.inspect.inspectStrPlus && state.inspect.inspectStrPlus.length === 0
                                     
             if(isAddMainSuitFlag) {
                 dispatch({

+ 6 - 3
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 { 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';
 
@@ -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,7 +130,7 @@ export const getTreatResult = (item) =>{
                      treat = data.data.data.treat || {}
                 }
                 if(treat) {
-                    return dispatch({
+                   dispatch({
                         type: SET_TREATMENT,
                         treatment: treat.treatment,
                         generalTreat: treat.commonTreatment,
@@ -134,7 +138,6 @@ export const getTreatResult = (item) =>{
                     })
                 }
                 
-            return
         }).catch((e) =>{
             console.log(e)
         })

+ 4 - 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, 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, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic } from '../actions/treat'
 const initState = {
     show: false, //治疗方案显示隐藏
     showDrugInfo: false, //药品信息显示隐藏
@@ -191,6 +191,8 @@ 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);
         default:
             return state
     }

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

@@ -10,3 +10,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等)