瀏覽代碼

弹窗高度动态设置

Luolei 6 年之前
父節點
當前提交
e1240a8e9f

+ 1 - 1
src/components/AddAssistCheck/Textarea/index.jsx

@@ -50,7 +50,7 @@ class Textarea extends Component {
       <div className={style.divTextarea}
           contenteditable={true}
           ref={this.$dom}
-          onInput={this.handleInput}
+          onChange={this.handleInput}
       ></div>
     );
   }

+ 1 - 0
src/components/AddAssistCheck/index.jsx

@@ -111,6 +111,7 @@ class AddAssistCheck extends React.Component {
                     return (<li key={item.id}> 
                         <span style={{float:"left"}}>{item.name}:</span>
                         <p style={{float:"none",overflow:"hidden",marginRight:"215px",paddingLeft:'8px'}}>
+                        {/* <p className={styles.textareaWrap}> */}
                             {/* <textarea
                                 className={styles.divTextarea}
                                 onChange={(e)=>{

+ 6 - 0
src/components/AddAssistCheck/index.less

@@ -114,6 +114,12 @@
             font-family: inherit;
         }
     }
+    .textareaWrap {
+      float: none;
+      overflow: hidden;
+      margin-right: 215px;
+      padding-left: 8px;
+    }
 }
 .center {
     text-align: center;

+ 5 - 2
src/components/Inspect/index.jsx

@@ -40,7 +40,8 @@ class Inspect extends React.Component {
             visible:false,
             dom:[],
             isIE:isIE(),
-            ieVersion:null
+            ieVersion:null,
+            height:'-1'
         }
         this.handleImportExcel = this.handleImportExcel.bind(this)
         this.cancel = this.cancel.bind(this)
@@ -99,7 +100,8 @@ class Inspect extends React.Component {
                                 if (message.length != 0) {
                                     that.setState({
                                         visible:true,
-                                        dom:message
+                                        dom:message,
+                                        height:message.length
                                     })
                                 }
                                 $("#choose").val("");
@@ -183,6 +185,7 @@ class Inspect extends React.Component {
                     okText='删除' 
                     cancelText='确定' 
                     width="450"
+                    height={(this.state.height > 2 && this.state.height < 8)?((this.state.height * 30 + 120)+'px') : this.state.height > 8 ? '350px' : '200px'}
                     noFooter= {true}
                     close={this.cancel}>
                     <ul className={styles.excelList}>

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

@@ -65,5 +65,6 @@
     text-align: center;
     color: #fff;
     margin-bottom: 20px;
+    cursor: pointer;
 }
 

+ 0 - 1
src/store/async-actions/patInfo.js

@@ -68,7 +68,6 @@ export const initHistoryDetails = (dispatch) => {
 export const getPatientMessage = (dispatch, getState) => {
   const state = getState();
   const urlDatas = state.getInfoByUuid;
-  console.log(urlDatas)
   const params = {
     hospitalCode:urlDatas.hospitalId,
     hospitalDeptCode: urlDatas.deptNo,