Explorar o código

化验辅检导入删除调病历分析(2973)

zhangxc %!s(int64=5) %!d(string=hai) anos
pai
achega
7c9fccefc9

+ 30 - 0
src/components/AssistCheck/index.jsx

@@ -9,6 +9,9 @@ import { dragBox } from '@utils/drag';
 import WrapModalBodyPac from '@containers/WrapModalBodyPac';
 import { getExcelList } from '@store/actions/inspect';
 import { host, prefix } from '@utils/config.js';
+import store from '@store';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
+import {SET_CURRENT_MODULE} from '@types/homePage';
 
 class AssistCheck extends React.Component {
   constructor(props){
@@ -33,12 +36,30 @@ class AssistCheck extends React.Component {
     }
     handleImportExcel() {
       this.inputRef.click();
+      const storeState = store.getState()
+      const {moduleName} = storeState.homePage
+      if(moduleName != '辅检') {
+        store.dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName:'辅检'
+        });
+        store.dispatch(getMRAnalyse());
+      }
     }
     showSlideImport(){
       let flg = this.state.importLis
       this.setState({
         importLis:!flg
       })
+      const storeState = store.getState()
+      const {moduleName} = storeState.homePage
+      if(moduleName != '辅检') {
+        store.dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName:'辅检'
+        });
+        store.dispatch(getMRAnalyse());
+      }
     }
 
     onClose() {
@@ -51,6 +72,15 @@ class AssistCheck extends React.Component {
       this.setState({
         hide: true
       })
+      const storeState = store.getState()
+      const {moduleName} = storeState.homePage
+      if(moduleName != '辅检') {
+        store.dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName:'辅检'
+        });
+        store.dispatch(getMRAnalyse());
+      }
     }
     closeInIcss(){
       this.setState({

+ 30 - 0
src/components/Inspect/index.jsx

@@ -10,6 +10,8 @@ import { host, prefix } from '@utils/config.js';
 import { isIE, getUrlArgObject,getCurrentDate,setFontColorSize } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
 import WrapModalBody from '@containers/WrapModalBody';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
+import {SET_CURRENT_MODULE} from '@types/homePage';
 
 
 (function ($) {
@@ -130,6 +132,7 @@ class Inspect extends React.Component {
                       }
                     }
                     store.dispatch(getExcelList(res.data));
+                    store.dispatch(getMRAnalyse());
                     fetchPushInfos && fetchPushInfos();
                     if (message && message.length != 0) {
                       that.setState({
@@ -155,6 +158,15 @@ class Inspect extends React.Component {
   }
   handleImportExcel() {
     this.inputRef.click();
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
   }
   cancel() {
     this.setState({ visible: false })
@@ -182,6 +194,15 @@ class Inspect extends React.Component {
     this.setState({
       hide: true
     })
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
   }
   onClose() {
     this.setState({
@@ -199,6 +220,15 @@ class Inspect extends React.Component {
     this.setState({
       importLis:!flg
     })
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
   }
   refreshScroller(){
     //滚动条对象

+ 1 - 0
src/containers/Inspect.js

@@ -75,6 +75,7 @@ function mapDispatchToProps(dispatch, store) {
     },
     handleCloseExcel(idx) {
       dispatch(delExcelLis(idx));
+      dispatch(getMRAnalyse())
     },
     delPartItem(idx) {
       dispatch(delPartItem(idx))

+ 4 - 1
src/store/reducers/wrapModalBody.js

@@ -8,6 +8,7 @@ import {
 } from '../types/wrapModalBody';
 import store from '@store';
 import { getStringPlus,  getPushLists,  getPushList} from '@utils/tools.js';
+import { getMRAnalyse } from '@store/async-actions/pushMessage';
 
 const initWrapModal = {
   list: [], //搜索的结果
@@ -48,7 +49,6 @@ export default (state = initWrapModal, action) => {
       }
       newState.getExcelData = excelDataLis
       tmpArr.push(excelDataLis)
-
       newState.hospitalInspect = [] //医院检索到的
       newState.hospitalInspectObj = {} //组对应的明细(单选多选全选)
       newState.selectGroupList = [] //选的组的明细可能有多个组
@@ -58,6 +58,9 @@ export default (state = initWrapModal, action) => {
       allState.pushItem = getPushList(tmpArr,tmpArr2);
       allState.pushItems = getPushLists(tmpArr,tmpArr2);
       allState.inspectStrPlus = getStringPlus(getPushLists(tmpArr,tmpArr2))
+      if(excelDataLis.lisExcelRes.length > 0) {
+        store.dispatch(getMRAnalyse())
+      }
 
       return newState;
   }

+ 4 - 1
src/store/reducers/wrapModalBodyPac.js

@@ -7,6 +7,7 @@ import {
 } from '../types/wrapModalBodyPac';
 import {getAllString} from '@utils/tools.js';
 import store from '@store';
+import { getMRAnalyse } from '@store/async-actions/pushMessage';
 
 const initSearchList = {
   list: [], //点击的结果
@@ -60,7 +61,9 @@ export default (state = initSearchList, action) => {
     newState.allCheck = false //全选反选
     newState.checkedList = [] //选中的小项
     newState.msgObj={name:'',patientNum:''}
-
+    if(importLis.length > 0) {
+      store.dispatch(getMRAnalyse())
+    }
     return newState;
   }
   if (action.type == SELECT_ONE_CHECKS) {