|
@@ -21,17 +21,45 @@ function mapStateToProps(state){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const actionsType={
|
|
|
- '1':SETTEXTMODEVALUE,
|
|
|
- '2':SETCURRENTTEXTMODEVALUE,
|
|
|
- '3':SETOTHERTEXTMODEVALUE,
|
|
|
- '4':SETCHECKTEXTMODEVALUE,
|
|
|
+const actionsType = {
|
|
|
+ '1': SETTEXTMODEVALUE, // 主述
|
|
|
+ '2': SETCURRENTTEXTMODEVALUE, // 现病史
|
|
|
+ // '3': SETOTHERTEXTMODEVALUE, // 其他史
|
|
|
+ '4': SETCHECKTEXTMODEVALUE, // 查体
|
|
|
'13': SETPASTTEXTMODEVALUE, // 设置既往史
|
|
|
'14': SETPERSONALTEXTMODEVALUE, // 设置个人史
|
|
|
'15': SETFAMILYTEXTMODEVALUE, // 设置家族史
|
|
|
'16': SETMARRIAGETEXTMODEVALUE, // 设置婚育史
|
|
|
'17': SETMENSTRUATIONTEXTMODEVALUE, // 设置月经史
|
|
|
};
|
|
|
+
|
|
|
+const formatMode = mode => {
|
|
|
+ switch (mode) {
|
|
|
+ case '0':
|
|
|
+ return 'patientia'; // 非空切非输入状态
|
|
|
+ case '1':
|
|
|
+ return 'chief'; // 主述
|
|
|
+ case '2':
|
|
|
+ return 'symptom'; // 现代史
|
|
|
+ case '4':
|
|
|
+ return 'vital'; // 现代史
|
|
|
+ case '13':
|
|
|
+ return 'other'; //其他史
|
|
|
+ case '14':
|
|
|
+ return 'other'; //其他史
|
|
|
+ case '15':
|
|
|
+ return 'other'; //其他史
|
|
|
+ case '16':
|
|
|
+ return 'other'; //其他史
|
|
|
+ case '17':
|
|
|
+ return 'other'; //其他史
|
|
|
+ default:
|
|
|
+ return 'null';
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
function mapDispatchToProps(dispatch){
|
|
|
return {
|
|
|
handleInput(obj){ //自由模式值保存
|
|
@@ -42,13 +70,21 @@ function mapDispatchToProps(dispatch){
|
|
|
},
|
|
|
handlePush(obj={}){
|
|
|
const {boxMark,isFocus,state} = obj;
|
|
|
+ // console.log(boxMark, 'boxMark盒子标记');
|
|
|
const notClear=state?isAllClear(getAllDataStringList(state)):false;
|
|
|
- if(isFocus&&(boxMark==='1'||boxMark==='2')&&!notClear){
|
|
|
- dispatch(embedPush({mode:+boxMark+1}));
|
|
|
+ // if(isFocus&&(boxMark==='1'||boxMark==='2')&&!notClear){
|
|
|
+ // // dispatch(embedPush({mode:+boxMark+1}));
|
|
|
+ // dispatch(embedPush({ mode: +boxMark + 1, action: formatMode(boxMark) }));
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ if (isFocus && !notClear) {
|
|
|
+ // dispatch(embedPush({mode:+boxMark+1}));
|
|
|
+ dispatch(embedPush({ mode: +boxMark + 1, action: formatMode(boxMark) }));
|
|
|
return;
|
|
|
}
|
|
|
if(!isFocus&&didPushParamChange()) { //输入的情况
|
|
|
- dispatch(embedPush({mode:+boxMark+3}));
|
|
|
+ // dispatch(embedPush({mode:+boxMark+3}));
|
|
|
+ dispatch(embedPush({ mode: +boxMark + 100, action: formatMode(boxMark) }));
|
|
|
}
|
|
|
}
|
|
|
}
|