Browse Source

全科历史病历二次诊断添加成功后清空输入框

liucf 6 years ago
parent
commit
dadd20f674
2 changed files with 7 additions and 2 deletions
  1. 6 2
      src/components/Emergency/index.jsx
  2. 1 0
      src/components/Emergency/index.less

+ 6 - 2
src/components/Emergency/index.jsx

@@ -93,14 +93,18 @@ class EmergencyHis extends Component{
   handleAdd(){
     const {chooseItem,index} = this.state;
     const {addSecond,data} = this.props;
-    console.log("添加成功")
     if(chooseItem.trim()){
       // 添加接口
       const item = {
         name:chooseItem,
         id:data[index].inquiryId
       }
-      addSecond&&addSecond(item)
+      addSecond&&addSecond(item);
+      this.searInp.current.value = "";
+      this.setState({
+        valChange:true,
+        chooseItem:''
+      });
     }
   }
 

+ 1 - 0
src/components/Emergency/index.less

@@ -35,6 +35,7 @@
     display: inline-block;
     vertical-align: top;
     position: relative;
+    padding-top: 57px;
     .no-data{
       font-size: 18px;
       position: absolute;