瀏覽代碼

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

zhouna 6 年之前
父節點
當前提交
2a770d6266

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

@@ -49,11 +49,11 @@ class DrugTreat extends Component {
                                 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();}} 
+                                            // 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();}}/>} */}
+                                        {<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>)

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

@@ -27,7 +27,7 @@
 .close-drug-desc {
     position: absolute;
     right: 0;
-    width: 30px;
+    width: 40px;
 }
 .drug-desc-item {
     padding: 5px 0;

+ 11 - 8
src/components/TreatDesc/index.jsx

@@ -39,14 +39,17 @@ class TreatDesc extends Component {
                 { 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 ? '' : ', '}                   
-                        <span className={style['drug-name']} 
-                              onDoubleClick={() =>{setDrugInfo(item);showDrugInfo();}} 
-                              onClick={()=>{item.forbidden === '2' ? '' : this.handleSelect(otherDrugIndex,index)}} 
-                              style={item.selected ? {color: '#3B9ED0'}:''}>
-                            {item.medicitionName}
-                        </span>
+                        return (<span   style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)'} : ''}>
+                        {index === 0 ? '' : ', '}     
+                        <span className={style['drug-name-box']}>
+                            <span className={style['drug-name']} 
+                                onDoubleClick={() =>{setDrugInfo(item);showDrugInfo();}} 
+                                onClick={()=>{item.forbidden === '2' ? '' : this.handleSelect(otherDrugIndex,index)}} 
+                                style={item.selected ? {color: '#3B9ED0'}:''}>
+                                {item.medicitionName}
+                            </span>
+                        </span>              
+                        
                         {/* {item.showInfo && item.showInfo==='1'&& <img className={style['info-img']} src={info} />} */}
                         {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={{border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}, 使用率{item.rate}
                         

+ 7 - 2
src/components/TreatDesc/index.less

@@ -46,11 +46,16 @@
     background: #fff;
     padding: 60px 20px 80px;
 }
-
-.drug-name {
+.drug-name-box {
     display: inline-block;
     height: 30px;
 }
+.drug-name {
+    border-bottom: 1px solid #666;
+    display: inline-block;
+    cursor: pointer;
+    
+}
 .info-img {
     width: 12px;
     margin: 0 3px -1px;