Prechádzať zdrojové kódy

修改量表计算公式性别年龄不可修改样式

zhangxc 5 rokov pred
rodič
commit
251f2d9caf

+ 11 - 6
src/components/ChronicInfo/index.jsx

@@ -408,14 +408,19 @@ class ChronicInfo extends React.Component{
                                     if(item.controlType==0){//单选
                                       return <tr>
                                         <td>
-                                          <span>{'请选择'+item.name+':'}</span>
+                                          <span>{item.isShow == '0' ? item.name+':' : '请选择'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          {Array.isArray(item.details)&&item.details.map((ii,ind)=>{
+                                        {Array.isArray(item.details)&&item.isShow == '0'&&item.details.map((ii,ind)=>{
+                                            return <div className={style["chooseItem"]}>
+                                                      {ii.state == 1 && ii.detailName}
+                                                  </div>
+                                          })}
+                                          {Array.isArray(item.details)&&item.isShow != '0'&&item.details.map((ii,ind)=>{
                                             return <div className={style["chooseItem"]}>
                                                     <Radio label={ii.detailName}
                                                              isSelect={ii.state == 1}
-                                                             handleClick={item.isShow == '0' ? '' : this.handleForRadio.bind(this,v.conceptId,details,idd,ind)}>
+                                                             handleClick={this.handleForRadio.bind(this,v.conceptId,details,idd,ind)}>
                                                       </Radio>
                                                   </div>
                                           })}
@@ -424,13 +429,13 @@ class ChronicInfo extends React.Component{
                                     }else if(item.controlType==2){//输入框
                                       return <tr>
                                         <td>
-                                          <span>{'请输入'+item.name+':'}</span>
+                                          <span>{item.isShow == '0' ? item.name+':':'请输入'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          <input type="text" placeholder="请输入" readonly={item.isShow == '0'} value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>
+                                          {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入"  value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>}
                                         </td>
                                         <td>
-                                          <span>{item.uint}</span>
+                                          {item.isShow != '0'&&<span>{item.uint}</span>}
                                         </td>
 
                                       </tr>

+ 11 - 0
src/components/ChronicInfo/index.less

@@ -165,6 +165,7 @@
   .dis-name {
     position: relative;
     cursor: pointer;
+    border-bottom: 1px solid #1E1E1E
   }
   .info-img {
     position: absolute;
@@ -173,4 +174,14 @@
     left: 50%;
     margin-left: -7px;
     cursor: pointer;
+}
+.itemInp {
+  padding: 0 0 0 5px;
+  border:1px solid #E2E2E2;
+}
+.itemInp:focus {
+  border:1px solid #3B9ED0;
+}
+table {
+  line-height: 30px;
 }