Преглед изворни кода

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

zhouna пре 5 година
родитељ
комит
862a6b395a

+ 12 - 2
src/common/components/ItemBox/index.jsx

@@ -48,7 +48,15 @@ class ItemBox extends Component {
       },this);
     }
   }
-
+componentWillReceiveProps(nextP){
+    if(nextP.children.length>1){
+      const that = this;
+      //数据渲染后更新滚动条
+      setTimeout(function(){
+        that.context.scrollArea.refresh();
+      });
+    }
+}
   render(){
     const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
     return <div className={style["box"]+" "+"clearfix"} >
@@ -59,5 +67,7 @@ class ItemBox extends Component {
     </div>
   }
 }
-
+ItemBox.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default ItemBox;

+ 3 - 0
src/common/components/Textarea/index.jsx

@@ -106,6 +106,9 @@ class Textarea extends Component {
     const isRead = this.props.isRead;
     if(next.isRead != isRead||(next.value!=this.props.value&&next.value&&next.value.indexOf("复诊")!=-1)){    //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
       this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
+      this.setState({
+        inpText:''
+      });
     }
   }
   componentDidMount(){

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

@@ -41,12 +41,12 @@ class Banner extends Component {
   }
 
   confirmType(){
-    const {typeConfig,confirmType,clearCommS,closeConfigModal} = this.props;
+    const {typeConfig,confirmType,clearCommS,closeConfigModal,readMode} = this.props;
     const mode = this.state.mode;
     // 清空主诉常见症状
     clearCommS();
-    if(mode==typeConfig){
-      closeConfigModal()
+    if(mode==typeConfig&&typeConfig==readMode){
+      closeConfigModal();
       return;
     }
     confirmType&&confirmType(mode);

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

@@ -114,16 +114,16 @@ class CurrentIll extends Component{
       }
     } 
   }
-  componentWillReceiveProps(nextProps){
+  //componentWillReceiveProps(nextProps){
     /*const contHeightDiff =  nextProps.data&&this.props.data&&nextProps.data.length!==this.props.data.length;
     const dataDiff = !!nextProps.data!==!!this.props.data;
     if(contHeightDiff||dataDiff){*/     //走慢病否,现病史消失滚动才出现bug修改
-    if(this.props.data&&this.props.data.length>0){
+   /* if(this.props.data&&this.props.data.length>0){
       return ;
     }
-      this.context.scrollArea.refresh();
+      this.context.scrollArea.refresh();*/
     //}
-  }
+  //}
   render(){
     const {hasMain,readMode,fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data} = this.props;
     const {forbidInput,boxLeft,boxTop} = this.state;
@@ -153,7 +153,7 @@ class CurrentIll extends Component{
   }
 }
 
-CurrentIll.contextTypes = {
+/*CurrentIll.contextTypes = {
   scrollArea: React.PropTypes.object
-};
+};*/
 export default CurrentIll;

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

@@ -72,7 +72,8 @@ class DiagnosticItem extends Component{
          addDiagnostic&&addDiagnostic(item);
          clearInput&&clearInput();
          hideSearch&&hideSearch();
-         document.getElementById("diagnosisResult").scrollIntoView(true)
+        this.context.scrollArea.refresh();
+         //document.getElementById("diagnosisResult").scrollIntoView(true)
     }
     handleMouseEnterDrug() {
         this.setState({
@@ -121,5 +122,7 @@ class DiagnosticItem extends Component{
                 </span>)
     }
 }
-
+DiagnosticItem.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default DiagnosticItem;

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

@@ -192,8 +192,8 @@ class HisList extends Component {
         <div className={style['filter-box']}>
           <span className={style['filter']}>筛选:</span>
           <span className={hasSecond==-1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,-1)}>默认</span>
-          <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有二次诊断</span>
-          <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有二次诊断</span>
+          <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有修正诊断</span>
+          <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有修正诊断</span>
         </div>
       </div>
       <div className={style['list']}>

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

@@ -190,7 +190,7 @@ class EmergencyHis extends Component{
                   </p>:''}
                   <div className={style['add-diag']}>
                     <div>
-                      <span>添加二次诊断:</span>
+                      <span>添加修正诊断:</span>
                       <input className={style['add-inp']} 
                             ref={this.searInp}
                             onInput={(e) => { 
@@ -202,7 +202,7 @@ class EmergencyHis extends Component{
                             disabled={data.length==0?true:false}/>
                       <span className={this.getBtnStyle()} onClick={!valChange?this.handleAdd:''}>确认添加</span>
                     </div>
-                    <p className={style['add-tip']}>说明:二次诊断只会对导出数据有影响(只为AI建模使用)并不会对真实病历产生任何影响!</p>
+                    <p className={style['add-tip']}>说明:修正诊断只会对导出数据有影响(只为AI建模使用)并不会对真实病历产生任何影响!</p>
                   </div>
                 </div>
               </div>

+ 4 - 1
src/components/Operation/index.jsx

@@ -284,7 +284,10 @@ class Operation extends Component {
       const chronicFlag = chronicMagItem || chronicDesease?true:false;
       clear(chronicFlag);
       //更新滚动条
-      this.context.scrollArea.refresh();
+      const that = this;
+      setTimeout(function(){
+        that.context.scrollArea.refresh();
+      });
     } else if (type == 3) {
       if (this.state.title.trim() == '') {
         Notify.error('请输入模板名称')

+ 1 - 0
src/containers/TypeConfigContainer.js

@@ -27,6 +27,7 @@ function mapStateToProps(state) {
     hasMain:ifHasData(main.data,main.saveText),
     hasCurrent:ifHasData(current.data,current.saveText),
     hasOther:ifHasData(other.data,other.saveText),
+    readMode:typeConfig.readMode,       //回读模式
   };
 }