|
@@ -5,7 +5,7 @@ import {SETCURRENTTEXTMODEVALUE} from '@store/types/currentIll';
|
|
|
import {SETOTHERTEXTMODEVALUE} from '@store/types/otherHistory';
|
|
|
import {SETCHECKTEXTMODEVALUE} from '@store/types/checkBody';
|
|
|
import BlockInp from '@common/components/BlockInp';
|
|
|
-import {didPushParamChange,isAllPartClear} from '@utils/tools';
|
|
|
+import {didPushParamChange,isAllPartClear,getAllDataList,getAllDataStringList,isAllClear} from '@utils/tools';
|
|
|
import {embedPush} from '@store/async-actions/pushMessage';
|
|
|
|
|
|
function mapStateToProps(state){
|
|
@@ -21,7 +21,7 @@ const actionsType={
|
|
|
'3':SETOTHERTEXTMODEVALUE,
|
|
|
'4':SETCHECKTEXTMODEVALUE,
|
|
|
};
|
|
|
-function mapDispatchToProps(dispatch,store){
|
|
|
+function mapDispatchToProps(dispatch){
|
|
|
return {
|
|
|
handleInput(obj){ //自由模式值保存
|
|
|
dispatch({
|
|
@@ -29,9 +29,15 @@ function mapDispatchToProps(dispatch,store){
|
|
|
text:obj.text
|
|
|
})
|
|
|
},
|
|
|
- handlePush(){
|
|
|
- if(didPushParamChange()) {
|
|
|
- dispatch(embedPush());
|
|
|
+ handlePush(obj={}){
|
|
|
+ const {boxMark,isFocus,state} = obj;
|
|
|
+ const notClear=state?isAllClear(getAllDataStringList(state)):false;
|
|
|
+ if(isFocus&&(boxMark==='1'||boxMark==='2')&&!notClear){
|
|
|
+ dispatch(embedPush({mode:+boxMark+1}));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!isFocus&&didPushParamChange()) { //输入的情况
|
|
|
+ dispatch(embedPush({mode:+boxMark+3}));
|
|
|
}
|
|
|
}
|
|
|
}
|