瀏覽代碼

引用病例推送检查重复调用

zhouna 6 年之前
父節點
當前提交
d67b5e9cf9
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 4 2
      src/components/HistoryCaseContainer/index.jsx
  2. 4 2
      src/components/PushContainer/index.jsx

+ 4 - 2
src/components/HistoryCaseContainer/index.jsx

@@ -6,7 +6,7 @@ import {initItemList} from "@store/async-actions/historyTemplates";
 import {visibleHistory,showHistory} from "@store/actions/historyTemplates";
 import store from '@store';
 import { ConfirmModal } from '@commonComp';
-import { pushAllDataList } from '@utils/tools';
+import { pushAllDataList,didPushParamChange } from '@utils/tools';
 import { CONFIRM_TYPE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
 import { dragBox } from '@utils/drag';
@@ -23,7 +23,9 @@ class HistoryCaseContainer extends React.Component {
         store.dispatch(showHistory(false))
         store.dispatch({type: CONFIRM_TYPE, confirmType: baseObj.sign});
         pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
-        store.dispatch(billing())
+        if(didPushParamChange()){
+          store.dispatch(billing())
+        }
         dragBox('hisWrapMove','closeHis','del')
     }
     close(){

+ 4 - 2
src/components/PushContainer/index.jsx

@@ -10,7 +10,7 @@ import {billing} from '@store/async-actions/pushMessage';
 import TemplateContainer from '@components/TemplateContainer';
 import TemplateItems from '@components/TemplateItems';
 import PushItemsContainer from '@containers/PushItemsContainer';
-import { pushAllDataList,getWindowInnerHeight } from '@utils/tools';
+import { pushAllDataList,getWindowInnerHeight,didPushParamChange } from '@utils/tools';
 import CopyRightContainer from "@containers/CopyRightContainer";
 import MedicalInfoContainer from '@containers/MedicalInfoContainer';
 import ScaleSearchContainer from '@containers/ScaleSearchContainer';
@@ -230,7 +230,9 @@ class PushContainer extends Component {
                     let typeConfig = part.type;
                     store.dispatch(keepPushData(part,'part'))                 //引用数据的存储,用于保存模板是判断数据是否变化
                     pushAllDataList(typeConfig,'push',part,'template')       //引用
-                    store.dispatch(billing())
+                    if(didPushParamChange()){
+                      store.dispatch(billing())
+                    }
                 }
             })
             store.dispatch(changeVisible(false))