瀏覽代碼

文本模式切换模块调病历分析(2976)

zhangxc 5 年之前
父節點
當前提交
83c4b941bc
共有 1 個文件被更改,包括 13 次插入1 次删除
  1. 13 1
      src/common/components/Textarea/index.jsx

+ 13 - 1
src/common/components/Textarea/index.jsx

@@ -7,6 +7,8 @@ import {getFeature} from '@store/async-actions/fetchModules';
 import {getAllDataList,getAllDataStringList,ifOtherClear,setFontColorSize} from "@utils/tools.js";
 import store from '@store';
 import $ from "jquery";
+import {SET_CURRENT_MODULE} from '@types/homePage';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
 
 class Textarea extends Component {
   constructor(props) {
@@ -25,7 +27,9 @@ class Textarea extends Component {
     this.handleBlur = this.handleBlur.bind(this);
   }
   handleFocus(e){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
-    const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark} = this.props;
+    const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark,title} = this.props;
+    const state = store.getState()
+    const moduleName = state.homePage.moduleName
     //黏贴时去掉html格式
     const that = this;
     let txt = '';
@@ -56,6 +60,14 @@ class Textarea extends Component {
       this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
       handleInput&&handleInput({text});
     }*/
+    if(moduleName != title) {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:title
+      })
+      store.dispatch(getMRAnalyse())
+    }
+
 
   }
   handleInput(e){