Przeglądaj źródła

Merge branch 'dev/new1' of http://192.168.2.236:10080/zhouna/newICSS into dev/new1

luolei 5 lat temu
rodzic
commit
84902f7c8b

+ 13 - 10
src/components/NumberDrop/index.jsx

@@ -92,24 +92,25 @@ class NumberDrop extends Component{
     this.emitBMIData('');
     this.setState({
       placeholder:this.props.placeholder,
-      hasSelect:false
+      hasSelect:false,
+      value:''
     });
   }
-  handleNumFocus(e){console.log('focus')
+  handleNumFocus(e){
     const {placeholder} = this.state;
-    const val = e.target.innerText.trim();//console.log(33,e.target.innerText,placeholder,e.target.innerText.trim() == placeholder)
+    const val = this.$span.current.innerText.trim();//console.log(33,e.target.innerText,placeholder,e.target.innerText.trim() == placeholder)
     if(val!=''&&val == placeholder){
       this.setState({
         placeholder:''
       });
     }
-    e.stopPropagation();
+    e&&e.stopPropagation();
     const {show,handleShow,ikey,id,patId,handleHide} = this.props;
     if(show) {
       handleHide && handleHide();
       return;
     }else{
-      this.$span.current.focus();
+      //this.$span.current.focus();
       this.setState({
         hasSelect:false,
         placeholder:''      //火狐26placeholder点击不隐藏bug修改
@@ -125,8 +126,10 @@ class NumberDrop extends Component{
       handleHide && handleHide();
     }
   }
-  handleNumClick(e){     //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
+  handleNumClick(e){    //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
     e.stopPropagation();
+    this.$span.current.focus();
+    //this.handleNumFocus();
     /*const {show,handleShow,ikey,id,patId,handleHide} = this.props;
     if(show) {
       handleHide && handleHide();
@@ -270,12 +273,12 @@ class NumberDrop extends Component{
     const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses(nospecial)}
                 style={{position:'relative'}}
-                onClick={allClick?this.handleNumClick:null}
+                /*onClick={allClick?this.handleNumClick:null}*/
                 onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
                 onMouseDown={this.handleMouseDown.bind(this)}>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{prefix}</span>
+      <span onClick={allClick?this.handleNumClick:null} className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{prefix}</span>
       <span onFocus={this.handleNumFocus}
-            onClick={allClick?null:this.handleNumClick}
+            onClick={e=>e.stopPropagation()}
             contentEditable={true}
             style={{minWidth:'10px',display:'inline-block',textAlign:'center'}}
             ref = {this.$span}
@@ -286,7 +289,7 @@ class NumberDrop extends Component{
             onInput={this.handleSpanInp}
             className={`${this.getSpanClass(nospecial)}`}
             >&nbsp;{val||placeholder}</span>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{suffix}</span>
+      <span onClick={allClick?this.handleNumClick:null} className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
                  noString={formulaCode?true:false}
                  onClose={handleHide}

+ 6 - 6
src/components/PushItems/DetailsModal/index.less

@@ -14,7 +14,7 @@
 
 .details-content-wrapper {
     position: fixed;
-    padding: 50px 0;
+    padding: 70px 0 50px 0;
     width: 80%;
     height: 80%;
     left: 10%;
@@ -35,10 +35,10 @@
     position: absolute;
     top: 0;
     width: 100%;
-    padding: 0 40px;
-    height: 50px;
-    line-height: 50px;
-    font-size: 32px;
+    padding: 0  40px;
+    height: 70px;
+    line-height: 70px;
+    font-size: 28px;
     font-weight: bold;
 }
 
@@ -87,7 +87,7 @@
 }
 .content-menu-box {
     position: absolute;
-    top: 50px;
+    top: 70px;
     right: 20px;
     width: 160px;
     height: 80%;

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

@@ -9,7 +9,7 @@
     top: 10%;
     margin-left: -475px;
     background: #fff;
-    padding: 50px 0 60px;
+    padding: 70px 0 50px 0;
     box-shadow: 0px 0px 5px -2px #7d7c7c;
     word-break: break-all;
     max-width: 100%;
@@ -35,9 +35,9 @@
     position: absolute;
     top: 0;
     width: 100%;
-    height: 50px;
-    line-height: 50px;
-    font-size: 32px;
+    height: 70px;
+    line-height: 70px;
+    font-size: 28px;
     font-weight: bold;
     padding: 0 40px;
     cursor: move;
@@ -95,7 +95,7 @@
 
 .content-menu-box {
     position: absolute;
-    top: 50px;
+    top: 70px;
     right: 20px;
     width: 160px;
     height: 80%;

+ 2 - 1
src/store/actions/otherHistory.js

@@ -169,7 +169,8 @@ export function changeTextLabel(state,action) {
           localStorage.setItem('radio'+item.id,JSON.stringify([li]));
         }
         //取消原选中状态
-        item.questionDetailList.find((it)=>it.selected==true).selected=false;
+        const sltItem = item.questionDetailList.find((it)=>it.selected==true);
+        sltItem?sltItem.selected=false:'';
       }
       item.labelPrefix = prefix||'';
       item.labelSuffix = suffix||'';