Bläddra i källkod

弹窗修改完成

Luolei 6 år sedan
förälder
incheckning
79613add9d

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

@@ -15,7 +15,7 @@ class Treat extends Component {
     constructor(props){
         super(props);
         this.state = {
-          zIndex:301
+          zIndex:301,
         }
         this.hideTreat = this.hideTreat.bind(this);
         this.handlePrescription = this.handlePrescription.bind(this);
@@ -45,20 +45,18 @@ class Treat extends Component {
         const {  showDrugInfo } = this.props;
         showDrugInfo && showDrugInfo();
     }
-    setTreatBox(idx){
-      this.setState({
-        zIndex:idx == 300?300 : 500
-      })
+    setTreatBox(){
+      $('#treatWrapper').css({'z-index': 302});
+      $('#drugWrapper').css({'z-index': 301});
     }
     render(){
-        const { generalTreat, treatment, treatItem, surgeryTreat, selectDrug, drugInfo, treatDesc, setOtherRecommend, setDrugInfo, showDrug, showDrugInfo,hideDrugInfo, title, drugInfoList, hideDrugInfoMore} = this.props;
-        const { setDrugInfoMore } = this.props
-        const { zIndex } = this.state
+        const {setDrugInfoMore,treatIndex,treatIndexSet, generalTreat, treatment, treatItem, surgeryTreat, selectDrug, drugInfo, treatDesc, setOtherRecommend, setDrugInfo, showDrug, showDrugInfo,hideDrugInfo, title, drugInfoList, hideDrugInfoMore} = this.props;
+        const { zIndex,show } = this.state
         return(
             <div   className={style['treat-wrapper']}>
                 <div className={style['treat-mask']} onClick={this.hideTreat}>
                 </div>
-                <div id="treatWrapper" className={style['treat-box']}  onselectstart="return false" style={{zIndex:zIndex}}>
+                <div id="treatWrapper" className={style['treat-box']}  onselectstart="return false">
                     <img className={style.close} onClick={this.hideTreat} src={close}/>
                     <div onMouseDown={this.setTreatBox} id="dragTreatTitle" className={style['treat-title']}>治疗方案 ({treatItem.name})</div>
 
@@ -88,7 +86,7 @@ class Treat extends Component {
                     </TreatDesc>}
                 </div>
                 
-                {showDrug && drugInfo && <DrugInfo setTreatBox={this.setTreatBox} drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>}
+                {showDrug && drugInfo && <DrugInfo setTreatBox={this.setTreatBox} treatIndexSet={treatIndexSet} drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>}
                 {/* 查询多个药品说明书 (添加数据查看药品说明书用)*/}
                 {/* {showDrug && <DrugInfo drugInfoList = {drugInfoList} hideDrugInfoMore = {hideDrugInfoMore}></DrugInfo>} */}
             </div>

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

@@ -43,7 +43,7 @@
     z-index: 301;
     padding-top: 40px;
     padding-bottom: 80px;
-    box-shadow: 2px 0px 5px -2px #ccc;
+    box-shadow: 0px 0px 5px -2px #7d7c7c;
 }
 .treat-title {
     width: 100%;

+ 5 - 8
src/components/TreatDesc/DrugInfo/index.jsx

@@ -10,7 +10,7 @@ class DrugInfo extends Component {
         super(props);
         this.state = {
             currentIndex: 0,
-            zIndex:301
+            zIndex:302
         }
         this.setDragBox = this.setDragBox.bind(this)
     }
@@ -47,16 +47,13 @@ class DrugInfo extends Component {
         }
     }
     setDragBox(){
-      const {zIndex,setTreatBox} = this.props
-      setTreatBox(300)
-      this.setState({
-        zIndex:zIndex+10
-      })
+      $('#treatWrapper').css({'z-index': 301});
+      $('#drugWrapper').css({'z-index': 302});
     }
     render() {
         const { drugInfo, hideDrugInfo, drugInfoList,hideDrugInfoMore } = this.props
-        const { currentIndex,zIndex } = this.state
-        return (<div className={style['drug-info-wrapper']} id="drugWrapper" style={{zIndex:zIndex}}>
+        const { currentIndex } = this.state
+        return (<div className={style['drug-info-wrapper']} id="drugWrapper">
                 <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/>
                 <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.title}说明书  </h3>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']} id='drugDesc' onScroll={this.handleScrollModal.bind(this,  drugInfo.drugDesc)}>

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

@@ -9,7 +9,7 @@
     background: #fff;
     z-index: 303;
     padding: 40px 0 60px;
-    box-shadow: 2px 0px 5px -2px #ccc;
+    box-shadow: 0px 0px 5px -2px #7d7c7c;
 }
 .drug-desc-wrapper {
     height: 100%;

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

@@ -59,6 +59,7 @@ class TreatDesc extends Component {
         $('#treatDescBox').css({'display': 'none'});
         $('#treatDescBox').animate({'display': 'none'}, 500);
         $('#treatWrapper').animate({'margin-left': '-340px','left':'50%'}, 500);
+        
     }
 
     render(){

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

@@ -45,7 +45,7 @@
     top: 0;
     background: #fff;
     padding: 60px 20px 80px;
-    box-shadow: 2px 0px 5px -2px #ccc;
+    box-shadow: 2px 0px 5px -2px #7d7c7c;
 }
 .drug-name-box {
     display: inline-block;

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

@@ -15,4 +15,3 @@ export const SET_TREAT_INFO = 'SET_TREAT_INFO' //设置治疗方案信息(name
 export const SET_DRUG_INFO_LIST = 'SET_DRUG_INFO_LIST' //查询多个药品说明书(添加数据时查看药品说明用)
 export const IS_FIRST_MAIN_DIAG = 'IS_FIRST_MAIN_DIAG' //是否为主诊断第一次开单
 export const CLEAR_FIRST_MAIN_DIAG = 'CLEAR_FIRST_MAIN_DIAG' //回读清空是否为主诊断第一次开单
-