Explorar el Código

bug2418,2417引用后需要等接口返回才能推送

luolei hace 5 años
padre
commit
8edc675d5e

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

@@ -65,9 +65,6 @@ class HistoryCaseContainer extends React.Component {
         //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
         //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
         store.dispatch(getHistempDetail(activeHis));
-        if(didPushParamChange()){
-          store.dispatch(billing());
-        }
         const {handleQuoteClick} = this.props;
         handleQuoteClick&&handleQuoteClick();
         dragBox('hisWrapMove','closeHis','del');

+ 10 - 10
src/components/PushContainer/index.jsx

@@ -229,16 +229,16 @@ class PushContainer extends Component {
     } else if (this.state.type == 4) {        //模板引入
       const { items } = this.props;
       store.dispatch(setPageView(this.state.id))
-      items && items.map((part) => {
-        if (this.state.id == part.id) {
-          let typeConfig = part.type;
-          // store.dispatch(keepPushData(part, 'part'))//引用数据的存储,用于保存模板是判断数据是否变化
-          // pushAllDataList(typeConfig, 'push', part, 'template')//引用
-          if (didPushParamChange()) {
-            store.dispatch(billing())
-          }
-        }
-      })
+      // items && items.map((part) => {
+      //   if (this.state.id == part.id) {
+      //     let typeConfig = part.type;
+      //     // store.dispatch(keepPushData(part, 'part'))//引用数据的存储,用于保存模板是判断数据是否变化
+      //     // pushAllDataList(typeConfig, 'push', part, 'template')//引用
+      //     // if (didPushParamChange()) {
+      //       // store.dispatch(billing())
+      //     // }
+      //   }
+      // })
       store.dispatch(changeVisible(false))
     }
   }

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

@@ -12,7 +12,7 @@ import DiagnosticItem from "@containers/DiagnosticItem";
 import store from "@store";
 import {addLabel} from '@store/actions/inspect';
 import {addAssistLabel} from '@store/actions/assistCheck';
-import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
+import {windowEventHandler,getCurrentDate,getWindowInnerHeight,didPushParamChange} from '@utils/tools'
 import {ConfirmModal} from '@commonComp';
 import ChronicInfo from '@containers/ChronicInfo';//慢病推送模块
 import RecommendInspect from './RecommendInspect';
@@ -147,7 +147,6 @@ class PushItems extends Component {
       }
     });
   }
-
   setDataIdx(index){
     this.setState({
       idx:index+''

+ 4 - 2
src/store/async-actions/historyTemplates.js

@@ -1,8 +1,9 @@
 import axios from '@utils/ajax';
-import { pushAllDataList } from '@utils/tools';
+import { pushAllDataList,didPushParamChange } from '@utils/tools';
 import { initHistory } from '@store/actions/historyTemplates';
 import Notify from '@commonComp/Notify';
 import store from '@store';
+import { billing } from '@store/async-actions/pushMessage';
 
 export const initItemList = (item) => {
   let baseList = store.getState();
@@ -40,7 +41,8 @@ export const getHistempDetail = (item) => {
                 // let tmpList = tmpData.inquiryDetailList
                 // tmpData.detailList = tmpList
                 // console.log(tmpData)
-                pushAllDataList(item.sign,'push',tmpData,'history')       //引用                
+                pushAllDataList(item.sign,'push',tmpData,'history')       //引用     
+                store.dispatch(billing());
             }else{
                 // console.log(data)
                 Notify.error(data.msg);

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

@@ -38,7 +38,7 @@ export const billing = (mdata,boxMark) => {
     hosCode: emrData.hosCode
   };
   let savePm = Object.assign({},params);
-   delete savePm.featureType;
+  delete savePm.featureType;
   storageLocal.set('emrParam',savePm);      //推送数据存储,用作推送前对比是否有变,有变才推送
     json(url, params).then((data) => {
         let {dis, lab, pacs,vitalIds,moduleVital} = data.data.data||{};

+ 4 - 1
src/store/async-actions/tabTemplate.js

@@ -13,8 +13,10 @@ import store from '@store';
 import {
   getAllDataList,
   getAllDataStringList,
-  pushAllDataList
+  pushAllDataList,
+  didPushParamChange
 } from '@utils/tools';
+import { billing } from '@store/async-actions/pushMessage';
 
 export const initItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
@@ -169,6 +171,7 @@ export const setPageView = (id) => { //获取模板结构化数据
       if (data.code == 0) {
         //模板列表不筛选模式后,单个模式引用时看本身的模式
         pushAllDataList(data.data.type, 'push', data.data, 'template')//引用
+        store.dispatch(billing())
       } else {
         Notify.error(data.msg);
       }

+ 1 - 1
src/utils/tools.js

@@ -6,7 +6,7 @@ import {CLEARCHECKBODY,SET} from '@store/types/checkBody';
 import {clearAssistData,addAssistLabel} from '@store/actions/assistCheck';
 import {clearAllLabel,addLabel} from '@store/actions/inspect';
 import {CLEAR_ALL_DIAG} from '@store/types/diagnosticList';
-import {CLEAR_ALL_PUSH_MESSAGE, SET_TIPS,BILLING_ADVICE} from '@store/types/pushMessage';
+import {CLEAR_ALL_PUSH_MESSAGE, SET_TIPS,BILLING_ADVICE,PUSHCHANGE} from '@store/types/pushMessage';
 import {ISREAD, SETREADDITEMS} from "../store/types/homePage";
 import {CLEAR_FIRST_MAIN_DIAG, CLEAR_ALL_TREAT} from "../store/types/treat";
 import {tabChange} from '@store/actions/tabTemplate';