Bladeren bron

Merge remote-tracking branch 'origin/pro_zn' into dev/new1

# Conflicts:
#	src/store/async-actions/fetchModules.js
zhouna 6 jaren geleden
bovenliggende
commit
e5611470f2

+ 14 - 6
src/components/Banner/ModeChange/index.jsx

@@ -6,8 +6,15 @@ import sopen from '@images/btn-open.png'
 import sclose from '@images/btn-closed.png'
 
 class ModeChange extends Component {
+    constructor(props){
+      super(props);
+      this.getStyle=this.getStyle.bind(this);
 
-
+    }
+    getStyle(){
+        const {hideBtn} = this.props;
+        return hideBtn?'':style['fade'];
+    }
     render(){
         const {closeConfigModal, changeType, confirmType, mode,hideBtn} = this.props;
         const domNode = document.getElementById('root');
@@ -18,19 +25,20 @@ class ModeChange extends Component {
               <div className={style['content']}>
                 <div className={style['close']}>设置<img src={close} onClick={closeConfigModal} /></div>
                 <div className={style["oper"]}>
-                    <p>
+                    <p className={this.getStyle()}>
                       <span>开启模板智能推送:</span>
-                      {hideBtn?<a className={style['switch']} href="javascript:void(0)" onClick={()=>changeType(isOpen?'1':'0')}>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType(isOpen?'1':'0'):null}>
                         <img src={isOpen?sopen:sclose} alt=""/>
                         {isOpen?'开':'关'}
-                        </a>:(isOpen?'开':'关')}
+                        </a>
                     </p>
                 </div>
                 <div className={style["explain"]}>
                     <p>说明:</p>
-                    <p>该设置只针对问诊模块中的“主诉”、“现病史”、“其他史”功能;</p>
+                    <p>1.该设置只针对问诊模块中的“主诉”、“现病史”、“其他史”功能;</p>
+                    <p>2.慢病模式下,该模板智能推送的设置功能不可使用。</p>
                 </div>
-                {hideBtn?<div className={style['btn']} onClick={confirmType}><button>保存修改</button></div>:''}
+                {hideBtn?<div className={style['btn']} onClick={confirmType}><button>保存修改</button></div>:<div className={style['btn']} onClick={confirmType}><button>&nbsp;&nbsp;关闭&nbsp;&nbsp;</button></div>}
             </div>
         </div>
       </React.Fragment>,domNode)

+ 4 - 0
src/components/Banner/ModeChange/index.less

@@ -23,9 +23,13 @@
       background: #fff;
       .oper{
         margin: 20px 30px;
+        .fade{
+          opacity: .6;
+        }
       }
       .explain{
         margin: 50px 30px;
+        opacity: .6;
         p{
           font-size: 12px;
           line-height: 20px;

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

@@ -44,7 +44,7 @@ class CheckBody extends Component{
     return false;
   }
   getLabels(){
-    const {data,showArr,saveText,selecteds,importLabel} = this.props;
+    const {data,showArr,saveText,selecteds,importLabel,setHighter} = this.props;
     let arr = [],list=[];
     const {boxMark,showAll} = this.state;
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
@@ -60,7 +60,7 @@ class CheckBody extends Component{
     if(showData){
       list = showData;
       arr = list.map((it,i)=>{
-        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel});
+        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel,setHighter});
       });
     }
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮
@@ -118,4 +118,7 @@ class CheckBody extends Component{
   }
 }
 
+CheckBody.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default CheckBody;

+ 2 - 2
src/components/EMRContainer/index.jsx

@@ -55,7 +55,7 @@ class EMRContainer extends Component {
         const barStyle={background:'#777',width:'100%',marginLeft:'0'};
         return <div className={style['EMR-container']}
                     ref={this.$cont} id="addScrollEvent">
-          <ScrollArea speed={0.8}
+          <ScrollArea speed={1}
                       horizontal={false}
                       className={style["area"]}
                       verticalContainerStyle={contStyle}
@@ -67,7 +67,7 @@ class EMRContainer extends Component {
                 <CurrentIll></CurrentIll>
                 <OtherHistory></OtherHistory>
                 <div>
-                  <CheckBody></CheckBody>
+                  <CheckBody setHighter={this.setHighter}></CheckBody>
                 </div>
                 <Inspect setHighter={this.setHighter}></Inspect>
                 <AssistCheck setHighter={this.setHighter}></AssistCheck>

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

@@ -2,7 +2,7 @@ import React,{Component} from 'react';
 import classNames from 'classnames';
 import config from '@config/index.js';
 import style from './index.less';
-import {deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds,getPageCoordinate} from '@utils/tools.js';
+import {setPosition,deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds,getPageCoordinate} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import ScrollArea from 'react-scrollbar';
 import $ from 'jquery';
@@ -64,7 +64,7 @@ class SpreadDrop extends Component{
   }
   handleShow(e){//单击
     e&&e.stopPropagation();
-    const {ikey,handleShow,placeholder,flag,id,value,tagType,type,data,windowWidth} = this.props;
+    const {ikey,handleShow,placeholder,flag,id,value,tagType,type,data,windowWidth,setHighter} = this.props;
     let num = 0;//判断为五类切超出页面
     data && data.map((item)=>{
       if(item.formPosition != 1){
@@ -77,6 +77,8 @@ class SpreadDrop extends Component{
         left:windowWidth-listWidth-150
       })
     }
+    //高度超出时,增加左侧大容器padding
+    setPosition(e,this.$list.current,setHighter);
     // window.event? window.event.cancelBubble = true : e.stopPropagation();
      this.setStateInit();      //恢复初始选中状态
     const that = this;
@@ -349,7 +351,12 @@ class SpreadDrop extends Component{
       },this);
     }
   }
-
+  /*componentWillReceiveProps(nextProps){
+    const {setHighter} = this.props;
+    if(!nextProps.show){console.log(22)
+      setHighter&&setHighter(48);
+    }
+  }*/
   render(){
     const {placeholder,value,show,data,order} = this.props;
     const {tmpDom,left} = this.state

+ 2 - 1
src/containers/eleType.js

@@ -129,11 +129,12 @@ function multLabels(params){
 //多选标签展开型
 function multCheckLabels(params,tagType){
   const data = params.item;
-  const {i,boxMark,showArr,selecteds,importLabel} = params;
+  const {i,boxMark,showArr,selecteds,importLabel,setHighter} = params;
   let isHigh=importLabel&&importLabel.includes(data.id);
   const showInx = boxMark+"-"+i+'-0';
   return <SpreadDrop data={data.questionMapping}
                      ikey={showInx}
+                     setHighter={setHighter}
                      placeholder={data.name}
                      value={data.value}
                      copyType={data.copyType}

+ 1 - 1
src/store/async-actions/fetchModules.js

@@ -203,7 +203,7 @@ export function setOtherHisModule(){
     const otherModel = initData.otherHisModel;
     const block = Object.assign(JSON.parse(config.textLabel),{full:true});
     const mode = state.typeConfig.typeConfig;
-    const model = otherModel&&otherModel.length>0?[...otherModel]:[block];     //其他史模板,没有模板数据则显示一个空文本标签
+    const model = otherModel&&otherModel.length>0?deepClone(otherModel):[block];     //其他史模板,没有模板数据则显示一个空文本标签
     const arr = deepClone(initData.otherHis);        //最近其他史数据
     const arrSave = deepClone(initData.otherHisSave);    //最近其他史saveText
     const selects = initData.otherSelecteds?[...initData.otherSelecteds]:[];  //其他史杂音类选中项

+ 2 - 0
src/utils/tools.js

@@ -1379,6 +1379,8 @@ function setPosition (e,dom,setHighter){
     // console.log(wrapHt,clickHt,scrollHt,btmHt,contHt)
     if(btmHt<contHt){
       setHighter(contHt-btmHt+20);
+    }else{
+      setHighter&&setHighter(48);       //标签填写单连续点击弹出,未超出需要恢复
     }
     // $(e.target)[0].scrollIntoView(true);
   },10);