Ver código fonte

Merge branch 'newVersion6.0' of http://192.168.2.236:10080/zhouna/newICSS into newVersion6.0

luolei 4 anos atrás
pai
commit
335108c4af

+ 6 - 1
src/components/AddAssistCheck/Textarea/index.jsx

@@ -3,7 +3,8 @@ import style from "./index.less";
 import config from '@config/index';
 import $ from 'jquery';
 import { setFontColorSize,moveEnd} from '@utils/tools';
-
+import store from '@store';
+import { embedPush } from '../../../store/async-actions/pushMessage'
 class Textarea extends Component {
   constructor(props) {
     super(props);
@@ -81,6 +82,10 @@ class Textarea extends Component {
     $(this.$dom.current).off("paste");
   }
   handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
+    store.dispatch(embedPush({
+      action: "pacs",
+      mode: 1
+    }))
     this.textInput.current.previousSibling.focus();
   }
   render() {

+ 22 - 1
src/components/AddInspect/SlidePic/index.jsx

@@ -10,7 +10,9 @@ import $ from 'jquery';
 import date1 from '../img/date1.png';
 import ScrollArea from 'react-scrollbar';
 import InspectName from '../InspectName';
-
+import store from '@store';
+import { embedPush } from '../../../store/async-actions/pushMessage'
+import config from '@config/index';
 import up from '@images/up.png';
 import down from '@images/down.png';
 
@@ -23,6 +25,7 @@ class SlideSelect extends Component {
       activeName:'',
       canEdit:true,
       style:'',
+      timer: null,
     };
     this.toTime = this.toTime.bind(this);
     this.handleSlide = this.handleSlide.bind(this);
@@ -118,6 +121,7 @@ class SlideSelect extends Component {
     })*/
   }
   handleInput(e,item,sign){
+    const tempTimer = this.state.timer
     const {setTipValue} = this.props
     setTipValue(item,e.target.value,sign)
     if(sign == 2){
@@ -126,6 +130,19 @@ class SlideSelect extends Component {
         style:type
       })
     }
+
+    // 延迟推送
+    clearTimeout(tempTimer)
+    let timer = setTimeout(() => {
+      store.dispatch(embedPush({
+        action: "lis",
+        mode: 1
+      }))
+      clearTimeout(tempTimer)
+    }, config.delayPushTime);
+    this.setState({
+      timer
+    })     
   }
   handleBlur(){
     const {handlePush} = this.props;
@@ -138,6 +155,10 @@ class SlideSelect extends Component {
     handlePush && handlePush({mode:8});       //右侧推送
   }
   setEdit(e){
+    store.dispatch(embedPush({
+      action: "lis",
+      mode: 1
+    }))
     $('.canEdit').blur().attr('disabled','disabled')
     $(e.target).removeAttr('disabled').focus()
   }

+ 17 - 9
src/components/PatInfo/index.jsx

@@ -1,9 +1,8 @@
 import React, { Component } from "react";
 import style from "./index.less";
 import Select from './Select/index'
-import {
-  timesYMDTime
-} from '@utils/tools';
+import {timesYMDTime} from '@utils/tools';
+import config from '@config/index';
 import Notify from '@commonComp/Notify';
 import { getHospitalInfo } from '@store/async-actions/historyTemplates';
 import store from '@store';
@@ -70,7 +69,8 @@ class PatInfo extends Component {
           maxlength: 50
         }
 
-      ]
+      ],
+      timer: null,
     }
     this.handleChange = this.handleChange.bind(this)
     this.handleSexChange = this.handleSexChange.bind(this)
@@ -93,6 +93,7 @@ class PatInfo extends Component {
   }
 
   handleChange(e){
+    const tempTimer = this.state.timer
     const { initPatInfoData } = this.props;    
     let { patientInfo } = this.state;
     let newInfo = Object.assign([], patientInfo);
@@ -112,13 +113,20 @@ class PatInfo extends Component {
       patientInfo: newInfo
     })
     initPatInfoData && initPatInfoData(newInfo)
-    // 年龄/科室改变时,默认推送
+    // 年龄/科室改变时,默认延迟推送
 
     if (patientItem.id === 'patientAge' || patientItem.id === 'hospitalDeptName') {
-      store.dispatch(embedPush({
-        action: "patientia",
-        mode: 1
-      }))
+      clearTimeout(tempTimer)
+      let timer =setTimeout(() => {
+        store.dispatch(embedPush({
+          action: "patientia",
+          mode: 1
+        }))
+        clearTimeout(tempTimer)
+      }, config.delayPushTime);
+      this.setState({
+        timer
+      })     
     } 
   }