ソースを参照

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

zhouna 6 年 前
コミット
58d128cb77

+ 2 - 2
src/components/Treat/DrugTreat/index.jsx

@@ -72,8 +72,8 @@ class DrugTreat extends Component {
         return(
             treatment && treatment.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>
+                {/* 查看药物说明书 (添加数据查看数据用)*/}
+                {/* <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']}>

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

@@ -76,9 +76,9 @@ class Treat extends Component {
                 </div>
                 
                 
-                {/* {showDrug && drugInfo && <DrugInfo drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>} */}
+                {showDrug && drugInfo && <DrugInfo drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>}
                 {/* 查询多个药品说明书 (添加数据查看药品说明书用)*/}
-                {showDrug && <DrugInfo drugInfoList = {drugInfoList} hideDrugInfoMore = {hideDrugInfoMore}></DrugInfo>}
+                {/* {showDrug && <DrugInfo drugInfoList = {drugInfoList} hideDrugInfoMore = {hideDrugInfoMore}></DrugInfo>} */}
             </div>
                 
             

+ 31 - 29
src/components/TreatDesc/DrugInfo/index.jsx

@@ -9,44 +9,46 @@ class DrugInfo extends Component {
 
     render() {
         const { drugInfo, hideDrugInfo, drugInfoList,hideDrugInfoMore } = this.props
-        // return (<div className={style['drug-info-wrapper']}>
-        //         <h3 className={style['drug-title']}>{drugInfo.title}说明书  <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/> </h3>
-        //         { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']}>
-        //             <div className={style['drug-title1']}>{drugInfo.title}说明书</div>
-        //             {drugInfo.drugDesc.map((item, index) =>{
-        //                 return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{item.title.trim()}</span> <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></div> </div>
-        //             })}
-        //         </div> }
-        //         { !drugInfo || (drugInfo && drugInfo.drugDesc.length === 0) && <div className={style['drug-desc-wrapper']}>
-        //             <div>
-        //                 该药品暂无说明
-        //             </div>
+        return (<div className={style['drug-info-wrapper']}>
+                <h3 className={style['drug-title']}>{drugInfo.title}说明书  <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/> </h3>
+                { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']}>
+                    <div className={style['drug-title1']}>{drugInfo.title}说明书</div>
+                    {drugInfo.drugDesc.map((item, index) =>{
+                        return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{item.title.trim()}</span> <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></div> </div>
+                    })}
+                </div> }
+                { !drugInfo || (drugInfo && drugInfo.drugDesc.length === 0) && <div className={style['drug-desc-wrapper']}>
+                    <div>
+                        该药品暂无说明
+                    </div>
                     
-        //         </div> }
+                </div> }
 
-        // </div>)
+        </div>)
 
-         return (<div className={style['drug-info-wrapper']}>
-                <h3 className={style['drug-title']}>说明书  <img src={close} onClick={hideDrugInfoMore} className={style['close-drug-desc']}/> </h3>
-                { drugInfoList && drugInfoList.length > 0 && <div className={style['drug-desc-wrapper']}>
-                    {drugInfoList.map((item,index) => {
-                        return <div>
-                            <h3 style={{height:' 50px', fontSize:'40px', fontWeight: '800'}}>{'【'+item.id+'】'}{item.name}说明书  </h3>
-                            {item.introduceDetailList&&item.introduceDetailList.length>0&&item.introduceDetailList.map((it, index) =>{
-                                return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{it.title.trim()}</span> <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: it.content}}></div> </div>
-                            })}
-                             <br/>
-                            <br/> <br/> <br/> <br/>
-                        </div>
+
+        //多个药品药品说明书(添加数据时查看药品说明书用)
+        //  return (<div className={style['drug-info-wrapper']}>
+        //         <h3 className={style['drug-title']}>说明书  <img src={close} onClick={hideDrugInfoMore} className={style['close-drug-desc']}/> </h3>
+        //         { drugInfoList && drugInfoList.length > 0 && <div className={style['drug-desc-wrapper']}>
+        //             {drugInfoList.map((item,index) => {
+        //                 return <div>
+        //                     <h3 style={{height:' 50px', fontSize:'40px', fontWeight: '800'}}>{'【'+item.id+'】'}{item.name}说明书  </h3>
+        //                     {item.introduceDetailList&&item.introduceDetailList.length>0&&item.introduceDetailList.map((it, index) =>{
+        //                         return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{it.title.trim()}</span> <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: it.content}}></div> </div>
+        //                     })}
+        //                      <br/>
+        //                     <br/> <br/> <br/> <br/>
+        //                 </div>
                         
                        
 
-                    })}
+        //             })}
                    
-                </div> }
+        //         </div> }
                
 
-        </div>)
+        // </div>)
 
 
     }