Преглед на файлове

删除多余代码和推送调用

zhouna преди 6 години
родител
ревизия
dffa617718

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

@@ -53,8 +53,7 @@ class CheckBody extends Component{
   }
   handleClick(e){//让搜索框跟随鼠标点击移动
     // e.stopPropagation();
-    const {fetchPushInfos,totalHide,getSearchLocation} = this.props;
-    //fetchPushInfos&&fetchPushInfos();
+    const {totalHide,getSearchLocation} = this.props;
     this.getData();
     if(totalHide){
       return ;

+ 0 - 3
src/components/HistoryCaseContainer/index.jsx

@@ -16,9 +16,6 @@ class HistoryCaseContainer extends React.Component {
         super(props);
         this.close = this.close.bind(this);
     }
-    componentDidMount(){
-        // store.dispatch(initItemList());
-    }
     makeSure(){
         let baseList = store.getState();
         let baseObj = baseList.historyTemplates.activeHistory;

+ 1 - 2
src/components/OtherHistory/index.jsx

@@ -48,8 +48,7 @@ class OtherHistory extends Component{
   }
   handleClick(e){//让搜索框跟随鼠标点击移动
     //e.stopPropagation();
-    const {fetchPushInfos,getSearchLocation} = this.props;
-    //fetchPushInfos&&fetchPushInfos();
+    const {getSearchLocation} = this.props;
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
     this.getData();
     let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置

+ 0 - 1
src/containers/AssessResultHis.js

@@ -2,7 +2,6 @@ import React from 'react';
 import {connect} from 'react-redux';
 import AssessResultHis from '@components/AssessResult/AssessHis';
 import {ISREAD} from '@store/types/homePage.js';
-import {billing} from '@store/async-actions/pushMessage';
 import {getAssessHis,getIndexData} from '@store/async-actions/fetchModules';
 import {SET_ASSESS_DATA,SET_INDEX_DATA} from '@types/assessResult';
 import {SET_ASSESS_HISTORY_DATA,SET_ASSESS_HISTORY_LOADING} from '@types/assessResultHis';

+ 0 - 6
src/containers/CheckBody.js

@@ -3,7 +3,6 @@ import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
 import {HIDE,RESET,SETDROPSHOW,ISREAD,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
-import {billing} from '@store/async-actions/pushMessage';
 import {filterDataArr} from '@utils/tools.js';
 
 function mapStateToProps(state){ 
@@ -54,11 +53,6 @@ function mapDispatchToProps(dispatch){
         }
       });
     },
-    //右侧推送
-    fetchPushInfos(){
-      //调右侧推送
-      dispatch(billing());
-    },
     getSearchLocation(top,left){
       dispatch({
         type:SEARCH_DROP_LOCATION,

+ 3 - 1
src/containers/CurrentIll.js

@@ -94,7 +94,9 @@ function mapDispatchToProps(dispatch) {
         //文本模式下推送
         fetchPushInfos(){
           //调右侧推送
-          dispatch(billing());
+          if(didPushParamChange()) {
+            dispatch(billing());
+          }
         },
       handleInput(obj){    //文本模式值保存
         dispatch({

+ 6 - 5
src/containers/MainSuit.js

@@ -100,7 +100,9 @@ function mapDispatchToProps(dispatch) {
           })
         },
       pushMessage(data) {//结构模式右侧推送
-        dispatch(billing(data));
+        if(didPushParamChange()) {
+          dispatch(billing(data));
+        }
       },
       getSearchData:(item)=>{
         getSearch(item).then((res)=>{
@@ -149,7 +151,9 @@ function mapDispatchToProps(dispatch) {
       },
       fetchPushInfos(){//文本模式下推送
         //调右侧推送
-        dispatch(billing());
+        if(didPushParamChange()) {
+          dispatch(billing());
+        }
       },
       handleInput(obj){   //文本模式值保存
           dispatch({
@@ -202,9 +206,6 @@ function mapDispatchToProps(dispatch) {
           data:item
         })
       },
-      getBilling: () => {
-        dispatch(billing())
-      },
       autoFillModules() {//自动填充模板
         dispatch(autoFillModules())
       }

+ 3 - 1
src/containers/OtherHistory.js

@@ -66,7 +66,9 @@ function mapDispatchToProps(dispatch,store){
     //右侧推送
     fetchPushInfos(){
       //调右侧推送
-      dispatch(billing());
+      if(didPushParamChange()) {
+        dispatch(billing());
+      }
     },
     handleInput(obj){    //文本模式值保存
       dispatch({

+ 1 - 1
src/utils/tools.js

@@ -659,7 +659,7 @@ function didPushParamChange(){
     sex: emrData.sex,
     vital:emrData.vital,
     symptom: emrData.current + emrData.main,
-    hosCode:emrData.hospitalCode
+    hosCode:emrData.hosCode
   });
   if(newParams == oldParams){
       return false;