|
@@ -10,14 +10,16 @@ import {
|
|
|
} from "../store/types/print";
|
|
|
import {saveMessage,clearMessages} from "../store/async-actions/print";
|
|
|
import {saveTemplateDetail} from '@store/async-actions/tabTemplate';
|
|
|
-import {saveClickNum} from '@store/async-actions/homePage';
|
|
|
+import {saveClickNum,getInitModules} from '@store/async-actions/homePage';
|
|
|
|
|
|
// function mapStateToProps({print}) {
|
|
|
function mapStateToProps(state) {
|
|
|
const {print,homePage} = state;
|
|
|
return ({
|
|
|
print,
|
|
|
- winWidth:homePage.windowWidth
|
|
|
+ winWidth:homePage.windowWidth,
|
|
|
+ chronicMagItem: state.diagnosticList.chronicMagItem,//慢病疾病
|
|
|
+ chronicDesease:state.mainSuit.chronicDesease,//主诉存的慢病
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -47,8 +49,12 @@ function mapDispatchToProps(dispatch) {
|
|
|
dispatch(saveClickNum);
|
|
|
dispatch(() => saveMessage())
|
|
|
},
|
|
|
- clear: () => {
|
|
|
- clearMessages()
|
|
|
+ clear: (flag) => {
|
|
|
+ clearMessages();
|
|
|
+ // 清除时如果是慢病模板则重新获取模板
|
|
|
+ if(flag){
|
|
|
+ dispatch(getInitModules);
|
|
|
+ }
|
|
|
},
|
|
|
saveDataAll(val,sex){
|
|
|
dispatch(saveTemplateDetail(val,sex))
|