Sfoglia il codice sorgente

修改治疗方案

zhangxc 6 anni fa
parent
commit
105488feef

BIN
src/components/DiagnosticList/img/delete.png


BIN
src/components/DiagnosticList/img/diagDown.png


BIN
src/components/DiagnosticList/img/diagUp.png


+ 7 - 3
src/components/DiagnosticList/index.jsx

@@ -82,12 +82,16 @@ class DiagnosticList extends Component {
                     {list && (list.length > 0) && list.map((item, index) => {
                         const hasTreat = item.treat && (item.treat.commonTreatment || item.treat.surgeryTreatment || item.treat.treatment.length>0)
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.id} >
-                                    {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img src={diagUp}/></span>}
-                                    {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img src={diagDown}/></span>}
+                                    {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
+                                    {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '主' : index+1}</span>
                                     <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']} onClick={() =>{this.showTreat(item)}}>治疗方案</span>
+                                    <span className={style['treat']}
+                                          style ={{ color: hasTreat ?'' : 'gray', border: hasTreat ?'' : '1px solid gray'}}
+                                          onClick={() =>{hasTreat && this.showTreat(item)}}>
+                                          治疗方案
+                                    </span>
                                     <img className={style['diag-del']} src={del_icon} onClick={()=>{this.handleDeleteItem(item.id)}}/>
                         </div>)
                     })}

+ 4 - 0
src/components/DiagnosticList/index.less

@@ -97,4 +97,8 @@
     font-size: 16px;
     color: #000000;
     line-height: 16px;
+}
+.diag-up, .diag-down, .diag-del {
+    width: 20px;
+    margin-bottom: 4px;
 }