Browse Source

Merge remote-tracking branch 'origin/dev5.3.2' into dev/new1

# Conflicts:
#	src/components/NumberDrop/index.less
zhouna 5 years ago
parent
commit
f8e8806ec6

+ 24 - 22
src/common/components/EditableSpan/index.jsx

@@ -291,38 +291,40 @@ class EditableSpan extends Component{
     $(this.$span.current).attr({"contentEditable":true}).focus()
     $(this.$span.current).attr({"contentEditable":true}).focus()
   }
   }
   componentDidMount(){
   componentDidMount(){
-    const {value} = this.props;
-    const that = this;
+    const {preIsExt,afterIsExt,value} = this.props;
+    const br = preIsExt&&!afterIsExt;       //最后一个体征标签
+    const val = br&&!config.punctuationReg.test(value)?'':value;
     if(value){
     if(value){
-      this.$span.current.innerText?(this.$span.current.innerText = value||''):(this.$span.current.innerHTML = value||'');
-    }
-    if(isIE()){
-      // 左右移动没问题,但是输入过程中会失焦,并且有时光标在但是无法输入 
-      // $(this.$span.current)[0].addEventListener('DOMCharacterDataModified', function(e){that.onChange(e);}, false);
-      // 此方法会影响左右切换时光标消失
-      /*$(this.$span.current).onIe8Input(function(e){
-        this.onChange(e)
-      },this);*/
+      this.$span.current.innerText?(this.$span.current.innerText = val||''):(this.$span.current.innerHTML = val||'');
     }
     }
   }
   }
-  /*cancelSelect(e){//双击不选中
-    if(document.selection&&document.selection.empty){
-        document.selection.empty();
-      }else if (window.getSelection) {
-        var sel=window.getSelection();
-        sel.removeAllRanges();
-      }
-    }*/
   getClass(){
   getClass(){
-    const {full,value,saveText,i} = this.props;
+    const {full,value,saveText,i,preIsExt} = this.props;
     const preSelected = saveText[i-1];
     const preSelected = saveText[i-1];
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
-    //有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则灰显
-    const unselect = value.match(config.punctuationReg)||preSelected?'':style['unselect'];
+    //有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则查体中,有体征标记显示蓝色,否则灰显
+    const ext = preIsExt?style['ext']:style['unselect'];
+    const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
     return classNames(style['editable-span'],isFull,unselect);
     return classNames(style['editable-span'],isFull,unselect);
   }
   }
 
 
   render() {
   render() {
+    const {preIsExt,afterIsExt} = this.props;
+    const br = preIsExt&&!afterIsExt;       //最后一个体征标签
+    if(br){
+      return <React.Fragment>
+      <span className={this.getClass()}
+            contentEditable='true'
+            ref={this.$span}
+            onInput={this.onChange}
+            onFocus={this.handleFocus}
+            onBlur={this.handleBlur}
+            onKeyDown={this.handleKeydown}
+            onClick={this.handleClick}
+            onKeyUp={this.handleKeyup}></span>
+        <br/>
+      </React.Fragment>;
+    }
     return <span className={this.getClass()}
     return <span className={this.getClass()}
                  contentEditable='true'
                  contentEditable='true'
                  ref={this.$span}
                  ref={this.$span}

+ 3 - 0
src/common/components/EditableSpan/index.less

@@ -17,4 +17,7 @@
 }
 }
 .unselect{
 .unselect{
   color: @placeholder-color;
   color: @placeholder-color;
+}
+.ext{
+  color: @extBlue;
 }
 }

+ 5 - 4
src/common/components/InlineTag/index.jsx

@@ -58,16 +58,17 @@ class InlineTag extends Component {
     }
     }
   }
   }
   getStyle(){
   getStyle(){
-    const {hideTag,placeholder} = this.props;
-    const value = this.state.value;//this.$span.current&&this.$span.current.innerText.trim();
+    const {hideTag,placeholder,isExtBlue} = this.props;
+    const value = this.state.value;
+    const ext = isExtBlue?style['ext']:'';
     if(hideTag){
     if(hideTag){
       if(value){
       if(value){
         return classNames(style['selected-no-tag']);
         return classNames(style['selected-no-tag']);
       }
       }
-      return style['no-tag'];
+      return classNames(style['no-tag'],ext);
     }
     }
     if(!value||value.trim()==placeholder){
     if(!value||value.trim()==placeholder){
-      return classNames(style['gray']);
+      return classNames(style['gray'],ext);
     }
     }
     return style['selected-tag'];
     return style['selected-tag'];
   }
   }

+ 3 - 0
src/common/components/InlineTag/index.less

@@ -14,6 +14,9 @@
 }
 }
 .gray{
 .gray{
    .tag;
    .tag;
+  &.ext{
+    color: @extBlue;
+  }
  }
  }
 .free-in{
 .free-in{
   display: inline-block;
   display: inline-block;

+ 3 - 2
src/common/components/NumberPan/index.jsx

@@ -59,6 +59,7 @@ class NumberPan extends Component{
   }
   }
   render(){
   render(){
     const select = this.handleSelect;
     const select = this.handleSelect;
+    const noString=this.props.noString;
     const domNode = document.getElementById('root');
     const domNode = document.getElementById('root');
     return <div className={style['panBox']}
     return <div className={style['panBox']}
                 style={this.getStyle()}
                 style={this.getStyle()}
@@ -70,7 +71,7 @@ class NumberPan extends Component{
           <td><button onMouseUp={select}>1</button></td>
           <td><button onMouseUp={select}>1</button></td>
           <td><button onMouseUp={select}>2</button></td>
           <td><button onMouseUp={select}>2</button></td>
           <td><button onMouseUp={select}>3</button></td>
           <td><button onMouseUp={select}>3</button></td>
-          <td><button onMouseUp={select}>/</button></td>
+          <td><button className={noString?style['disabled']:''} onMouseUp={noString?null:select}>/</button></td>
         </tr>
         </tr>
         <tr>
         <tr>
           <td><button onMouseUp={select}>4</button></td>
           <td><button onMouseUp={select}>4</button></td>
@@ -87,7 +88,7 @@ class NumberPan extends Component{
         <tr>
         <tr>
           <td><button onMouseUp={select}>.</button></td>
           <td><button onMouseUp={select}>.</button></td>
           <td><button onMouseUp={select}>0</button></td>
           <td><button onMouseUp={select}>0</button></td>
-          <td><button onMouseUp={select}>~</button></td>
+          <td><button className={noString?style['disabled']:''} onMouseUp={noString?null:select}>~</button></td>
           <td><button onMouseUp={this.handleClose.bind(this)} className={style['confirm']}>确定</button></td>
           <td><button onMouseUp={this.handleClose.bind(this)} className={style['confirm']}>确定</button></td>
         </tr>
         </tr>
       </table>
       </table>

+ 7 - 0
src/common/components/NumberPan/index.less

@@ -9,6 +9,13 @@
   td{
   td{
     width: 68px;
     width: 68px;
     height:44px;
     height:44px;
+    .disabled{
+      opacity: .4;
+      cursor: not-allowed;
+    }
+    .disabled:hover{
+      border: none;
+    }
   }
   }
   button{
   button{
     border:1px #fff solid;
     border:1px #fff solid;

BIN
src/common/images/addItem2.png


+ 3 - 2
src/common/less/variables.less

@@ -4,6 +4,7 @@
 @cyan: #00bcd4;
 @cyan: #00bcd4;
 @blue: #3B9ED0;
 @blue: #3B9ED0;
 @red:#ff0000;
 @red:#ff0000;
+@extBlue:#71A9FE;
 @tab-color:#3B9ED0;
 @tab-color:#3B9ED0;
 
 
 @ipt-color:#E9F5FA;
 @ipt-color:#E9F5FA;
@@ -139,7 +140,7 @@
    display: inline-block;
    display: inline-block;
    position: relative;
    position: relative;
   /* margin-right: 5px;*/
   /* margin-right: 5px;*/
-   padding: 0 3px 3px 0;
+   padding: 0 3px 3px 2px;
    color: @placeholder-color;
    color: @placeholder-color;
   cursor: pointer;
   cursor: pointer;
   &:before{
   &:before{
@@ -165,7 +166,7 @@
   position: relative;
   position: relative;
   /*margin-right: 5px;
   /*margin-right: 5px;
   padding: 0 3px 0;*/
   padding: 0 3px 0;*/
-  color: unset!important;
+  color: unset;
   border:none!important;
   border:none!important;
   &:before,&:after{
   &:before,&:after{
   content: ''!important;
   content: ''!important;

+ 3 - 1
src/components/CheckBody/index.jsx

@@ -60,7 +60,9 @@ class CheckBody extends Component{
     if(showData){
     if(showData){
       list = showData;
       list = showData;
       arr = list.map((it,i)=>{
       arr = list.map((it,i)=>{
-        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel,setHighter});
+        const preIsExt = list[i-1]&&list[i-1].specFlag===4?true:false;//前一个标签是否为体征标签
+        const afterIsExt = list[i+1]&&list[i+1].specFlag===4?true:false;//后一个标签是否为体征标签
+        return chooseType({item:it,preIsExt,afterIsExt,boxMark,i,showArr,saveText,selecteds,importLabel,setHighter});
       });
       });
     }
     }
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮

+ 1 - 1
src/components/CopyRight/index.less

@@ -10,7 +10,7 @@
     text-align: center;
     text-align: center;
   }
   }
     .copy{
     .copy{
-      padding: 10px 20px 20px 20px;
+      padding: 10px 20px 10px 20px;
       font-size: 12px;
       font-size: 12px;
       span {
       span {
         border: 1px solid #f00;
         border: 1px solid #f00;

+ 84 - 6
src/components/MultSpread/index.jsx

@@ -6,6 +6,7 @@ import RadioInpDrop from "@containers/RadioInpDrop";
 import InlineTag from '@containers/InlineTag';
 import InlineTag from '@containers/InlineTag';
 import Multiple from '@containers/Multiple';
 import Multiple from '@containers/Multiple';
 import addIcon from '@images/addItem.png';
 import addIcon from '@images/addItem.png';
+import addIcon1 from '@images/addItem2.png';
 import style from "./index.less";
 import style from "./index.less";
 import tools from '@utils/tools';
 import tools from '@utils/tools';
 import NumberUnitDrop from '@containers/NumberUnitDrop';
 import NumberUnitDrop from '@containers/NumberUnitDrop';
@@ -33,8 +34,16 @@ class MultSpread extends Component{
   constructor(props){
   constructor(props){
     super(props);
     super(props);
     this.state = {
     this.state = {
-      numDoms:[]
+      numDoms:[],
+      tall:0,       //升高
+      weight:0,     //体重
+      bmi:'',        //BMI
+      wrBmi:false,      //是否无效bmi值,是则要清空身高体重,不能用判断bmi是否为空来判断,因为初始就是为空
     };
     };
+    this.setBMIParam = this.setBMIParam.bind(this);
+    this.setBMI = this.setBMI.bind(this);
+    this.isBMIUseable = this.isBMIUseable.bind(this);
+    this.setBMIstate = this.setBMIstate.bind(this);
   }
   }
   getClass(){
   getClass(){
     const {saveText,ikey,showAdd} = this.props;
     const {saveText,ikey,showAdd} = this.props;
@@ -70,8 +79,64 @@ class MultSpread extends Component{
     const doms = this.state.numDoms;
     const doms = this.state.numDoms;
     doms[i+1]&&this.moveEnd(doms[i+1].current)
     doms[i+1]&&this.moveEnd(doms[i+1].current)
   }
   }
+  isBMIUseable(name,val){
+    const {tall,weight} = this.state;
+    //身高不能为0,否则分母为0,身高体重任何一个为空,则BMI清空
+    if((name==='tall'&&(!val||!weight))||(name==='weight'&&(!tall||!val))){
+      return false;
+    }
+    return true;
+  }
+  setBMIParam(name,val){        //设置bmi相关数据,身高、体重
+    const {tall,weight} = this.state;
+    const useable = this.isBMIUseable(name,val);
+    this.setState({
+      [name]:val
+    });
+    if(useable){
+      const result = name==='tall'?weight/Math.pow(val/100,2):val/Math.pow(tall/100,2);
+      this.setState({
+        bmi:result.toFixed(1),
+        wrBmi:false
+      })
+    }else{
+      this.setState({
+        bmi:'',
+        wrBmi:false
+      })
+    }
+  }
+  setBMI(val){
+    //手动修改BMI赋值,且身高体重清空
+    if(val===this.state.bmi){     //聚焦但未修改时
+      return ;
+    }
+    this.setState({
+      bmi:val,
+      wrBmi:true,
+      tall:0,
+      weight:0
+    });
+  }
+  setBMIstate(item){
+    //回读时bmi相关state赋值
+    const map={
+      BMI_SG:'tall',
+      BMI_TZ:'weight',
+      BMI_RES:'bmi',
+    };
+    const st = this.state;
+    const key = map[item.formulaCode];
+    //回读BMI相关项有值时,state赋值
+    if(key&&st[key]!==item.value){
+      this.setState({
+        [key]:item.value
+      });
+    }
+  }
   getLabels(){
   getLabels(){
-    const {data,ikey,showArr,copyId,selecteds,boxMark} = this.props;
+    const {data,ikey,showArr,copyId,selecteds,boxMark,isExtBlue} = this.props;
+    const {wrBmi,bmi} = this.state;
     let show = false;
     let show = false;
     let inx = '',count=0;
     let inx = '',count=0;
     const list = data.map((it,i)=>{
     const list = data.map((it,i)=>{
@@ -84,6 +149,7 @@ class MultSpread extends Component{
           const list = it.questionDetailList&&it.questionDetailList.length>0?it.questionDetailList:it.questionMapping;
           const list = it.questionDetailList&&it.questionDetailList.length>0?it.questionDetailList:it.questionMapping;
           return <RadioDrop data={list}
           return <RadioDrop data={list}
                             boxMark={boxMark}
                             boxMark={boxMark}
+                            isExtBlue={isExtBlue}
                             placeholder={it.name}
                             placeholder={it.name}
                             show={show}
                             show={show}
                             value = {it.value}
                             value = {it.value}
@@ -96,6 +162,7 @@ class MultSpread extends Component{
           return <Multiple data={dataList}
           return <Multiple data={dataList}
                            ikey={inx}
                            ikey={inx}
                            placeholder={it.name}
                            placeholder={it.name}
+                           isExtBlue={isExtBlue}
                            value={it.value}
                            value={it.value}
                            copyType={it.copyType}
                            copyType={it.copyType}
                            selecteds={selecteds ?selecteds[i]:[]}
                            selecteds={selecteds ?selecteds[i]:[]}
@@ -109,6 +176,7 @@ class MultSpread extends Component{
                                suffix={it.labelSuffix}
                                suffix={it.labelSuffix}
                                placeholder={it.name}
                                placeholder={it.name}
                                boxMark={ikey.substr(0,1)}
                                boxMark={ikey.substr(0,1)}
+                               isExtBlue={isExtBlue}
                                id={it.id}
                                id={it.id}
                                show={show}
                                show={show}
                                ikey={inx}
                                ikey={inx}
@@ -119,18 +187,26 @@ class MultSpread extends Component{
           return <InlineTag prefix={it.labelPrefix}
           return <InlineTag prefix={it.labelPrefix}
                             suffix={it.labelSuffix}
                             suffix={it.labelSuffix}
                             placeholder={it.name}
                             placeholder={it.name}
+                            isExtBlue={isExtBlue}
                             value={it.value}
                             value={it.value}
                             id={it.id}
                             id={it.id}
                             ikey={inx} hideTag={true}></InlineTag>;
                             ikey={inx} hideTag={true}></InlineTag>;
         case +it.controlType===7:
         case +it.controlType===7:
           const min = it.minValue;//!=null&&it.minValue!=undefined?it.minValue-1:undefined;
           const min = it.minValue;//!=null&&it.minValue!=undefined?it.minValue-1:undefined;
           const max = it.maxValue;//!=null&&it.maxValue!=undefined?+it.maxValue+1:undefined;
           const max = it.maxValue;//!=null&&it.maxValue!=undefined?+it.maxValue+1:undefined;
+          this.setBMIstate(it);
           return <NumberDrop prefix={it.labelPrefix}
           return <NumberDrop prefix={it.labelPrefix}
                              suffix={it.labelSuffix}
                              suffix={it.labelSuffix}
                              placeholder={it.name}
                              placeholder={it.name}
+                             isExtBlue={isExtBlue}
                              //inputRef = {this['$inp'+(count++)]}
                              //inputRef = {this['$inp'+(count++)]}
                              saveDoms={this.saveDoms.bind(this)}
                              saveDoms={this.saveDoms.bind(this)}
                              reFocus={this.setNextFocus.bind(this)}
                              reFocus={this.setNextFocus.bind(this)}
+                             setBMI={this.setBMI}
+                             wrBmi={wrBmi}
+                             bmi={bmi}
+                             setBMIParam={this.setBMIParam}
+                             formulaCode={it.formulaCode}
                              num = {count++}
                              num = {count++}
                              min={min}
                              min={min}
                              max={max}
                              max={max}
@@ -148,6 +224,7 @@ class MultSpread extends Component{
                              show={showArr&&showArr[inx]}
                              show={showArr&&showArr[inx]}
                              value = {it.value}
                              value = {it.value}
                              boxMark={boxMark}
                              boxMark={boxMark}
+                             isExtBlue={isExtBlue}
                              id={it.id}
                              id={it.id}
                              ikey={inx}
                              ikey={inx}
                              hideTag={true}></RadioInpDrop>;
                              hideTag={true}></RadioInpDrop>;
@@ -168,21 +245,22 @@ class MultSpread extends Component{
     }
     }
   }
   }
   getContClass(){
   getContClass(){
-    const {isImports,ikey,saveText} = this.props;
+    const {isImports,ikey,saveText,isExtBlue} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     const text = saveText&&saveText[+labelInx];
+    const ext = !text&&isExtBlue?style['ext']:'';
     const orgBorder = isImports&&!text?style['orange-border']:'';
     const orgBorder = isImports&&!text?style['orange-border']:'';
-    return classNames(orgBorder);
+    return classNames(orgBorder,ext);
   }
   }
   render(){
   render(){
-    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix} = this.props;
+    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue} = this.props;
     return (<div className={this.getContClass()}
     return (<div className={this.getContClass()}
                  style={{display:'inline-block'}}>
                  style={{display:'inline-block'}}>
       {textPrefix?<span>{textPrefix}</span>:''}
       {textPrefix?<span>{textPrefix}</span>:''}
       <div className={this.getClass()}>
       <div className={this.getClass()}>
       {this.getLabels()}
       {this.getLabels()}
       {textSuffix?<span>{textSuffix}</span>:''}
       {textSuffix?<span>{textSuffix}</span>:''}
-      {showAdd?<img src={addIcon} alt="添加血压项"
+      {showAdd?<img src={isExtBlue?addIcon1:addIcon} alt="复制该项"
                     className={style['add-icon']}
                     className={style['add-icon']}
                     onClick={()=>addLabelItem({ikey,copyId})}/>:''}
                     onClick={()=>addLabelItem({ikey,copyId})}/>:''}
     </div>
     </div>

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

@@ -1,6 +1,10 @@
 @import "~@less/variables.less";
 @import "~@less/variables.less";
+.ext>div{
+    color: @extBlue;
+}
 .container{
 .container{
   .tag;
   .tag;
+  padding: 0 3px 0 2px;
   cursor: unset;
   cursor: unset;
 }
 }
 .cont{
 .cont{

+ 3 - 2
src/components/Multiple/index.jsx

@@ -37,8 +37,9 @@ class Multiple extends react.Component{
   }
   }
 
 
   getClass(){
   getClass(){
-    const {show,value,hideTag,isImports} = this.props;
+    const {show,value,hideTag,isImports,isExtBlue} = this.props;
     const orgBorder = isImports&&!value?style['orange-border']:'';
     const orgBorder = isImports&&!value?style['orange-border']:'';
+    const ext = isExtBlue?style['ext']:'';
     if(show){
     if(show){
       $(this.$div.current).addClass(style['borderd']);
       $(this.$div.current).addClass(style['borderd']);
     }else{
     }else{
@@ -47,7 +48,7 @@ class Multiple extends react.Component{
     if(value){
     if(value){
       return hideTag?classNames(style['hide-tag'],orgBorder):classNames(style['selected-tag'],orgBorder);
       return hideTag?classNames(style['hide-tag'],orgBorder):classNames(style['selected-tag'],orgBorder);
     }
     }
-    return hideTag?'':classNames(style['tag'],orgBorder);
+    return hideTag?'':classNames(style['tag'],orgBorder,ext);
   }
   }
 
 
   getListClass(){
   getListClass(){

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

@@ -9,6 +9,9 @@
 .tag,.selected-tag{
 .tag,.selected-tag{
   cursor: pointer;
   cursor: pointer;
   line-height: 20px;
   line-height: 20px;
+  &.ext{
+    color: @extBlue!important;
+  }
 }
 }
 
 
 .selected-tag{
 .selected-tag{
@@ -21,4 +24,7 @@
   padding: 0;
   padding: 0;
   color: @text-color;
   color: @text-color;
   line-height: 22px;
   line-height: 22px;
+  &.ext{
+    color: @extBlue;
+  }
 }
 }

+ 39 - 5
src/components/NumberDrop/index.jsx

@@ -31,6 +31,7 @@ class NumberDrop extends Component{
     this.handleNumFocus = this.handleNumFocus.bind(this);
     this.handleNumFocus = this.handleNumFocus.bind(this);
     this.handleKeyDowm = this.handleKeyDowm.bind(this);
     this.handleKeyDowm = this.handleKeyDowm.bind(this);
     this.beyondArea = this.beyondArea.bind(this);
     this.beyondArea = this.beyondArea.bind(this);
+    this.emitBMIData = this.emitBMIData.bind(this);
   }
   }
   select(text){        //选中键盘上数字事件
   select(text){        //选中键盘上数字事件
     //placeholder修改后,第一次点击键盘触发blur后onClick不触发,原因未知,改为onMouseup可触发
     //placeholder修改后,第一次点击键盘触发blur后onClick不触发,原因未知,改为onMouseup可触发
@@ -64,11 +65,30 @@ class NumberDrop extends Component{
     }
     }
 
 
     handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
     handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+    //BMI相关数据上传
+    this.emitBMIData(text);
+  }
+  emitBMIData(text){
+    //手动修改BMI相关值时数据上传
+    const {setBMIParam,formulaCode,setBMI} = this.props;
+    if(formulaCode==="BMI_RES"){
+      setBMI&&setBMI(text);
+    }
+    if(text!==0&&(formulaCode==="BMI_SG"||formulaCode==="BMI_TZ")){
+      const map={
+        BMI_SG:'tall',
+        BMI_TZ:'weight'
+      };
+      setTimeout(function(){
+        setBMIParam&&setBMIParam(map[formulaCode],text);
+      });
+    }
   }
   }
   beyondArea(){
   beyondArea(){
     const {handleSelect,ikey,suffix,prefix,mainSaveText} = this.props;
     const {handleSelect,ikey,suffix,prefix,mainSaveText} = this.props;
     Notify.info("输入数值不符合规范,请重新输入!");
     Notify.info("输入数值不符合规范,请重新输入!");
     handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText});
     handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText});
+    this.emitBMIData('');
     this.setState({
     this.setState({
       placeholder:this.props.placeholder,
       placeholder:this.props.placeholder,
       hasSelect:false
       hasSelect:false
@@ -165,6 +185,7 @@ class NumberDrop extends Component{
     let text = val===placeholder?'':val;
     let text = val===placeholder?'':val;
     //e.target.innerText = '';      //避免出现重复输入值
     //e.target.innerText = '';      //避免出现重复输入值
     handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
     handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+    this.emitBMIData(text);
   }
   }
   handleSpanInp(e){   //数字框输入事件
   handleSpanInp(e){   //数字框输入事件
     e.stopPropagation();
     e.stopPropagation();
@@ -176,12 +197,13 @@ class NumberDrop extends Component{
     handleHide&&handleHide();
     handleHide&&handleHide();
   }
   }
   getClasses(){         //整个标签是否有值的状态
   getClasses(){         //整个标签是否有值的状态
-    const {hideTag,placeholder,isImports} = this.props;
+    const {hideTag,placeholder,isImports,isExtBlue} = this.props;
     const val = this.state.value;
     const val = this.state.value;
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
     const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
+    const ext = isExtBlue?style['ext']:'';
     const noTag = hideTag?style['no-tag']:'';
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag,orgBorder);
+    return className(isSelected,noTag,orgBorder,ext);
   }
   }
   getSpanClass(){       //将被替换的文字选中状态显示
   getSpanClass(){       //将被替换的文字选中状态显示
     const cls = this.props.show?style['blued']:style['nol'];
     const cls = this.props.show?style['blued']:style['nol'];
@@ -202,16 +224,27 @@ class NumberDrop extends Component{
     })
     })
   }
   }
   componentWillReceiveProps(nextProps){
   componentWillReceiveProps(nextProps){
+    //BMI存值
+    const {formulaCode,bmi,suffix,prefix,ikey,handleSelect,mainSaveText,wrBmi} = this.props;
+    if(formulaCode==="BMI_RES"&&nextProps.bmi!==bmi){
+      handleSelect&&handleSelect({ikey,text:nextProps.bmi,suffix,prefix,mainSaveText});
+    }
+    //手动修改BMI时身高体重清空
+    if(wrBmi!==nextProps.wrBmi&&(formulaCode==="BMI_SG"||formulaCode==="BMI_TZ")){
+      handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText});
+    }
+
     if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){
     if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){
       return
       return
     }
     }
     this.setState({
     this.setState({
       placeholder:nextProps.placeholder,
       placeholder:nextProps.placeholder,
       value:nextProps.value
       value:nextProps.value
-    })
+    });
   }
   }
   render(){
   render(){
-    const {prefix,suffix,show,value,handleHide,allClick} = this.props;
+    const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode} = this.props;
+    const val = formulaCode==="BMI_RES"?(+bmi===Infinity||isNaN(bmi)?'':bmi):value;
     const {placeholder,hasSelect} = this.state;
     const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses()}
     return <div className={this.getClasses()}
                 style={{position:'relative'}}
                 style={{position:'relative'}}
@@ -226,9 +259,10 @@ class NumberDrop extends Component{
             onBlur={this.numInpBlur}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
             onInput={this.handleSpanInp}
             className={this.getSpanClass()}
             className={this.getSpanClass()}
-            >&nbsp;{value||placeholder}</span>
+            >&nbsp;{val||placeholder}</span>
       <span>{suffix}</span>
       <span>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
       <NumberPan handleSelect={this.select.bind(this)}
+                 noString={formulaCode?true:false}
                  onClose={handleHide}
                  onClose={handleHide}
                  show={show}
                  show={show}
                  toClear={!hasSelect}/>
                  toClear={!hasSelect}/>

+ 5 - 2
src/components/NumberDrop/index.less

@@ -1,6 +1,9 @@
 @import "~@less/variables.less";
 @import "~@less/variables.less";
 .container{
 .container{
   .tag;
   .tag;
+  &.ext{
+    color: @extBlue!important;
+  }
   line-height: 22px;
   line-height: 22px;
   .blued{
   .blued{
     background: @blue;
     background: @blue;
@@ -9,7 +12,7 @@
   .nol,.blued{
   .nol,.blued{
     min-width:10px;
     min-width:10px;
     height: 22px;
     height: 22px;
-    /*vertical-align: text-bottom;*/
+    /*vertical-align: bottom;*/
     display:inline-block;
     display:inline-block;
     text-align:center;
     text-align:center;
     word-break:break-all;
     word-break:break-all;
@@ -33,6 +36,6 @@
     text-align:center;
     text-align:center;
     word-break:break-all;
     word-break:break-all;
     height: 22px;
     height: 22px;
-    /*vertical-align: text-bottom;*/
+    /*vertical-align: bottom;*/
   }
   }
 }
 }

+ 1 - 1
src/components/PushContainer/index.less

@@ -11,7 +11,7 @@
   // top: 50px;
   // top: 50px;
   // bottom: 10px;
   // bottom: 10px;
   // right: 10px;
   // right: 10px;
-  padding-bottom:50px;
+  padding-bottom:30px;
   border-left: 10px #e4e6e7 solid;
   border-left: 10px #e4e6e7 solid;
 }
 }
 .title{
 .title{

+ 3 - 3
src/components/PushItems/index.jsx

@@ -137,12 +137,12 @@ class PushItems extends Component {
   }
   }
 
 
   componentDidMount() {
   componentDidMount() {
-    const height = getWindowInnerHeight() - 170;
+    const height = getWindowInnerHeight() - 190;
     this.$cont.current.style.height = height + "px";
     this.$cont.current.style.height = height + "px";
 
 
     windowEventHandler('resize', ()=>{
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
       if(this.$cont.current){
-        const height = getWindowInnerHeight() - 170;
+        const height = getWindowInnerHeight() - 190;
         this.$cont.current.style.height = height + "px";
         this.$cont.current.style.height = height + "px";
       }
       }
     });
     });
@@ -277,7 +277,7 @@ class PushItems extends Component {
               tipsDiscalimer = {tipsDiscalimer}
               tipsDiscalimer = {tipsDiscalimer}
             ></TipsMsg>
             ></TipsMsg>
           </div>
           </div>
-         {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2').description}}></div>}
+         {tipsDiscalimer.data && <div  className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2').description}}></div>}
         </div>
         </div>
         {showTipsDetails && <DetailsModal  
         {showTipsDetails && <DetailsModal  
             showTipsDetails = {showTipsDetails}
             showTipsDetails = {showTipsDetails}

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

@@ -1,7 +1,7 @@
 @import "~@less/variables.less";
 @import "~@less/variables.less";
 .push-content-wrapper{
 .push-content-wrapper{
   // padding-top: 50px;
   // padding-top: 50px;
-  padding: 0px 15px ;
+  padding: 0px 15px 40px;
   line-height: 20px; 
   line-height: 20px; 
   width: @push-width;
   width: @push-width;
   overflow: hidden;
   overflow: hidden;
@@ -110,9 +110,12 @@
   
   
 }
 }
 .disTips {
 .disTips {
-  padding: 10px 20px 0px 10px;
+  padding: 0px 20px 0px 10px;
+  height: 32px;
+  line-height: 16px;
+  overflow-y: auto;
   background: #fff;
   background: #fff;
-  font-size: 10px;
+  font-size: 12px;
   color: #979797;
   color: #979797;
   text-align: center;
   text-align: center;
   position: absolute;
   position: absolute;

+ 6 - 6
src/components/RadioDrop/index.jsx

@@ -34,21 +34,21 @@ class RadioDrop extends Component{
     this.handleEditLabel = this.handleEditLabel.bind(this);
     this.handleEditLabel = this.handleEditLabel.bind(this);
   }
   }
   getClass(){
   getClass(){
-    const {value,hideTag,placeholder,show,isImports} = this.props;
-    const blueBorder = this.state.editable?style['blue-border']:'';
-    const orgBorder = isImports?style['orange-border']:'';
+    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const ext = isExtBlue?style['ext']:'';
+    const orgBorder = isImports?style['orange-border']:'';      //橙色框高亮
     if(show){
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
       $(this.$cont.current).addClass(style['borderd']);
     }else{
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
       $(this.$cont.current).removeClass(style['borderd']);
     }
     }
     if(hideTag){
     if(hideTag){
-      return style['no-tag'];
+      return classNames(style['no-tag'],ext);
     }
     }
     if(value){
     if(value){
-      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
+      return style['selected-tag'];
     }
     }
-    return classNames(style['tag'],orgBorder);
+    return classNames(style['tag'],orgBorder,ext);
   }
   }
   handleSelect(item){
   handleSelect(item){
     const {handleSelect,ikey,mainSaveText,value} = this.props;
     const {handleSelect,ikey,mainSaveText,value} = this.props;

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

@@ -10,8 +10,14 @@
   word-break: break-all;
   word-break: break-all;
   /*line-height: 20px;*/
   /*line-height: 20px;*/
 }
 }
+.no-tag{
+  color:inherit;
+}
 .tag{
 .tag{
   color:@placeholder-color;
   color:@placeholder-color;
+  &.ext{
+    color: @extBlue!important;
+  }
 }
 }
 .tag:before{
 .tag:before{
   content: '[';
   content: '[';

+ 6 - 6
src/components/RadioInpDrop/index.jsx

@@ -36,21 +36,21 @@ class RadioInpDrop extends Component{
     this.handleInnerInp = this.handleInnerInp.bind(this);
     this.handleInnerInp = this.handleInnerInp.bind(this);
   }
   }
   getClass(){
   getClass(){
-    const {value,hideTag,placeholder,show,isImports} = this.props;
-    const blueBorder = this.state.editable?style['blue-border']:'';
-    const orgBorder = isImports&&!value?style['orange-border']:'';
+    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const orgBorder = isImports&&!value?style['orange-border']:'';    //查体,是否橙色框高亮
+    const ext = isExtBlue?style['ext']:'';      //查体,是否是体征
     if(show){
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
       $(this.$cont.current).addClass(style['borderd']);
     }else{
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
       $(this.$cont.current).removeClass(style['borderd']);
     }
     }
     if(hideTag){
     if(hideTag){
-      return style['no-tag'];
+      return classNames(style['no-tag'],ext);
     }
     }
     if(value){
     if(value){
-      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
+      return style['selected-tag'];
     }
     }
-    return classNames(style['tag'],orgBorder);
+    return classNames(style['tag'],orgBorder,ext);
   }
   }
   handleSelect(item){
   handleSelect(item){
     const {handleSelect,ikey,value,placeholder,mainSaveText} = this.props;
     const {handleSelect,ikey,value,placeholder,mainSaveText} = this.props;

+ 3 - 0
src/components/RadioInpDrop/index.less

@@ -7,6 +7,9 @@
 .tag,.selected-tag,.no-tag{
 .tag,.selected-tag,.no-tag{
   display: inline-block;
   display: inline-block;
   cursor: pointer;
   cursor: pointer;
+  &.ext{
+    color: @extBlue;
+  }
   /*line-height: 20px;*/
   /*line-height: 20px;*/
 }
 }
 .tag{
 .tag{

+ 3 - 2
src/components/SpreadDrop/index.jsx

@@ -330,9 +330,10 @@ class SpreadDrop extends Component{
     });
     });
   }
   }
   getClass(){
   getClass(){
-    const {isImports,show,value} = this.props;
+    const {isImports,show,value,isExtBlue} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const blueBorder = this.state.editable?style['blue-border']:'';
     const orgBorder = isImports&&!value?style['orange-border']:'';
     const orgBorder = isImports&&!value?style['orange-border']:'';
+    const ext = isExtBlue?style['ext']:'';
     if(show){
     if(show){
       $(this.$div.current).addClass(style['borderd']);
       $(this.$div.current).addClass(style['borderd']);
     }else{
     }else{
@@ -341,7 +342,7 @@ class SpreadDrop extends Component{
     if(value){
     if(value){
       return classNames(style['selected-tag'],blueBorder);
       return classNames(style['selected-tag'],blueBorder);
     }
     }
-    return classNames(style['tag'],orgBorder);
+    return classNames(style['tag'],orgBorder,ext);
   }
   }
 
 
   componentDidMount(){
   componentDidMount(){

+ 3 - 0
src/components/SpreadDrop/index.less

@@ -41,6 +41,9 @@
 .tag,.selected-tag{
 .tag,.selected-tag{
   cursor: pointer;
   cursor: pointer;
   line-height: 20px;
   line-height: 20px;
+  &.ext{
+    color: @extBlue;
+  }
 }
 }
 
 
 .selected-tag{
 .selected-tag{

+ 9 - 0
src/containers/eleType.js

@@ -31,6 +31,7 @@ export function singleRadio(params){
       const list = data.questionDetailList&&data.questionDetailList.length>0?data.questionDetailList:data.questionMapping;
       const list = data.questionDetailList&&data.questionDetailList.length>0?data.questionDetailList:data.questionMapping;
       return <RadioDrop data={custom&&custom.length?[...custom,...list]:list}
       return <RadioDrop data={custom&&custom.length?[...custom,...list]:list}
                         placeholder={data.name}
                         placeholder={data.name}
+                        isExtBlue={data.specFlag===4?true:false}
                         show={showArr&&showArr[showInx]}
                         show={showArr&&showArr[showInx]}
                         value = {data.value}
                         value = {data.value}
                         boxMark={boxMark}
                         boxMark={boxMark}
@@ -45,6 +46,7 @@ export function singleRadio(params){
                      placeholder={data.name}
                      placeholder={data.name}
                      value={data.value}
                      value={data.value}
                      copyType={data.copyType}
                      copyType={data.copyType}
+                     isExtBlue={data.specFlag===4?true:false}
                      selecteds={selecteds ?selecteds[i]:[]}
                      selecteds={selecteds ?selecteds[i]:[]}
                      show={showArr&&showArr[showInx]}
                      show={showArr&&showArr[showInx]}
                      order={data.textGenerate}
                      order={data.textGenerate}
@@ -59,6 +61,7 @@ export function singleRadio(params){
       return <NumberUnitDrop prefix={data.labelPrefix}
       return <NumberUnitDrop prefix={data.labelPrefix}
                          suffix={data.labelSuffix}
                          suffix={data.labelSuffix}
                          placeholder={data.name}
                          placeholder={data.name}
+                         isExtBlue={data.specFlag===4?true:false}
                          formulaCode={data.formulaCode}
                          formulaCode={data.formulaCode}
                          boxMark={boxMark}
                          boxMark={boxMark}
                          id={data.id}
                          id={data.id}
@@ -71,6 +74,7 @@ export function singleRadio(params){
       return <InlineTag prefix={data.labelPrefix}
       return <InlineTag prefix={data.labelPrefix}
                         suffix={data.labelSuffix}
                         suffix={data.labelSuffix}
                         placeholder={data.name}
                         placeholder={data.name}
+                        isExtBlue={data.specFlag===4?true:false}
                         value={data.value}
                         value={data.value}
                         isImports={isHigh}
                         isImports={isHigh}
                         id={data.id}
                         id={data.id}
@@ -78,10 +82,12 @@ export function singleRadio(params){
     case 7:
     case 7:
       const min = data.minValue;//!=null&&data.minValue!=undefined?data.minValue-1:undefined;
       const min = data.minValue;//!=null&&data.minValue!=undefined?data.minValue-1:undefined;
       const max = data.maxValue;//!=null&&data.maxValue!=undefined?+data.maxValue+1:undefined;
       const max = data.maxValue;//!=null&&data.maxValue!=undefined?+data.maxValue+1:undefined;
+
       return <NumberDrop prefix={data.labelPrefix}
       return <NumberDrop prefix={data.labelPrefix}
                          suffix={data.labelSuffix}
                          suffix={data.labelSuffix}
                          min={min}
                          min={min}
                          max={max}
                          max={max}
+                         isExtBlue={data.specFlag===4?true:false}
                          placeholder={data.name}
                          placeholder={data.name}
                          boxMark={boxMark}
                          boxMark={boxMark}
                          id={data.id}
                          id={data.id}
@@ -95,6 +101,7 @@ export function singleRadio(params){
       return <RadioInpDrop data={data.questionDetailList}
       return <RadioInpDrop data={data.questionDetailList}
                            vals={data.vals}
                            vals={data.vals}
                         placeholder={data.name}
                         placeholder={data.name}
+                        isExtBlue={data.specFlag===4?true:false}
                         show={showArr&&showArr[showInx]}
                         show={showArr&&showArr[showInx]}
                         value = {data.value}
                         value = {data.value}
                         boxMark={boxMark}
                         boxMark={boxMark}
@@ -115,6 +122,7 @@ function multLabels(params){
                      showAdd = {+data.showAdd===1}
                      showAdd = {+data.showAdd===1}
                      copyId={data.id}
                      copyId={data.id}
                      fullData = {data}
                      fullData = {data}
+                     isExtBlue={data.specFlag===4?true:false}
                      showArr={showArr||{}}
                      showArr={showArr||{}}
                      update={Math.random()}
                      update={Math.random()}
                      boxMark={boxMark}
                      boxMark={boxMark}
@@ -138,6 +146,7 @@ function multCheckLabels(params,tagType){
                      placeholder={data.name}
                      placeholder={data.name}
                      value={data.value}
                      value={data.value}
                      copyType={data.copyType}
                      copyType={data.copyType}
+                     isExtBlue={data.specFlag===4?true:false}
                      selecteds={selecteds ?selecteds[i]:[]}
                      selecteds={selecteds ?selecteds[i]:[]}
                      show={showArr&&showArr[showInx]}
                      show={showArr&&showArr[showInx]}
                      order={data.textGenerate}
                      order={data.textGenerate}