Explorar o código

切换模式时清空主诉常见症状

liucf %!s(int64=6) %!d(string=hai) anos
pai
achega
b5164dc44b
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      src/components/Banner/index.jsx

+ 10 - 2
src/components/Banner/index.jsx

@@ -12,6 +12,7 @@ import Emergency from '@containers/Emergency';
 import {getAllHis} from '@store/async-actions/fetchModules.js';
 import {timestampToTime} from '@utils/tools.js';
 import {dragBox} from '@utils/drag';
+import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
 
 class Banner extends Component {
   constructor(props){
@@ -51,8 +52,10 @@ class Banner extends Component {
   }
 
   confirmType(){
-    const {typeConfig,confirmType} = this.props;
+    const {typeConfig,confirmType,clearCommS} = this.props;
     const mode = this.state.mode;
+    // 清空主诉常见症状
+    clearCommS();
     if(mode==typeConfig){
       this.closeConfigModal()
       return;
@@ -142,7 +145,12 @@ const mapDispatchToProps = function(dispatch){
   return {
     getAllRecord(item){
       dispatch(getAllHis(item));
-    }
+    },
+    clearCommS:()=>{//清除主诉常见症状
+      dispatch({
+        type: CLEAR_COMSYMPTOMS
+      })
+    },
   }
 }
 // export default Banner;