Ver código fonte

清空重新获取其他史记录1301,查体主诉空提示1296,查体展开收起bug1176

zhouna 6 anos atrás
pai
commit
f895c55a5d

+ 7 - 14
src/components/CheckBody/index.jsx

@@ -36,7 +36,7 @@ class CheckBody extends Component{
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
     const moreText = filterDataArr([...saveText].splice(moreNum+1));     //被收起的标签中是否有有值得,有则不能再收起showMoreBtn?more:''
     const more = showAll?<span className={style['more']} onClick={this.showHide}>收起<img src={hideImg} /></span>:<span className={style['more']} onClick={this.showHide}>展开<img src={showImg} /></span>;
-    const showMoreBtn = data.length>config.showCheckNum&&(data.length>moreNum&&!data[0].full)&&!moreText;
+    const showMoreBtn = data.length>config.showCheckNum&&(data.length-1>moreNum&&!data[0].full)&&!moreText;
     let showArray = data.filter((it)=>{
       if(it.showInCheck)
         return it;
@@ -71,17 +71,14 @@ class CheckBody extends Component{
       }
       leftL = ele.offsetLeft+90
     }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL)
+    getSearchLocation(getPageCoordinate(e).boxTop,leftL);
     this.setState({
-      // boxLeft:getPageCoordinate(e).boxLeft,
-      // boxLeft:leftL,
-      // boxTop:getPageCoordinate(e).boxTop,
       tmpScroll: $("#addScrollEvent")[0].scrollTop,
       tmpTop:getPageCoordinate(e).boxTop
     });
     windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
       let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll
+      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll;
       getSearchLocation(boxTop,this.state.boxLeft)
     },$("#addScrollEvent")[0])
   }
@@ -93,18 +90,14 @@ class CheckBody extends Component{
   getData(){
     //第一次聚焦查体时,主诉有数据则调接口,主诉无数据则显示提示;其他时间查体模板数据不调接口
     const {hasMain,isEmpty} = this.props;
-
+    if(!hasMain&&isEmpty){
+      Notify.error("无法操作,请先输入主诉");
+      return;
+    }
     //无主诉提示在EditableSpan里
     //有主诉时且本身无数据,第一次点击获取数据,(不论获取成功与否)再点击不获取(直到刷新成空白页或清空)
     if(hasMain&&isEmpty!=false){
       this.props.getInit();
-      //隐藏区域有默认选中项,默认全部展开-有延迟,弃用
-      /*const that = this;
-      setTimeout(function(){
-        that.props.showAll&&that.setState({
-          showAll:true
-        });
-      },900)*/
 
     }
   }

+ 1 - 1
src/containers/AssistCheck.js

@@ -8,7 +8,7 @@ import { getSearchList,getInstroduce } from '@store/async-actions/assistCheck';
 import {ISREAD} from '@store/types/homePage.js';
 import {billing} from '@store/async-actions/pushMessage';
 
-function mapStateToProps(state) {console.log(state)
+function mapStateToProps(state) {
     return {
         list:state.assistCheck.list,
         assistLabel:state.assistCheck.assistLabel,

+ 2 - 0
src/containers/OperationContainer.js

@@ -11,6 +11,7 @@ import {
 import {saveMessage,clearMessages} from "../store/async-actions/print";
 import {saveTemplateDetail} from '@store/async-actions/tabTemplate';
 import {saveClickNum,getInitModules} from '@store/async-actions/homePage';
+import {getOtherHisRecord} from '@store/async-actions/fetchModules';
 
 // function mapStateToProps({print}) {
 function mapStateToProps(state) {
@@ -51,6 +52,7 @@ function mapDispatchToProps(dispatch) {
         },
         clear: (flag) => {
             clearMessages();
+            dispatch(getOtherHisRecord());      //清除后重新获取其他史记录
             // 清除时如果是慢病模板则重新获取模板
             if(flag){
                 dispatch(getInitModules);