|
@@ -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()
|
|
|
}
|