|
@@ -31,6 +31,7 @@ function modulesParseJson(data){
|
|
|
export const getInitModules= (dispatch,getStore)=>{
|
|
|
const state = getStore();
|
|
|
const {message} = state.patInfo;
|
|
|
+ const {allModules} = state.homePage;
|
|
|
const chronicMagItem = state.diagnosticList.chronicMagItem;
|
|
|
const chronicId = chronicMagItem?chronicMagItem.id:'';//诊断为慢病复诊时储存慢病信息到store
|
|
|
const param = {
|
|
@@ -41,7 +42,9 @@ export const getInitModules= (dispatch,getStore)=>{
|
|
|
}
|
|
|
// return json(api.getModules,{age:message.patientAge,sexType:message.sex}).then((res) => {
|
|
|
return json(api.getModules,param).then((res) => {
|
|
|
- dispatch(initHistoryDetails(message)); //历史病历回读
|
|
|
+ if(allModules.length == 0){//模板为空才回读
|
|
|
+ dispatch(initHistoryDetails(message)); //历史病历回读
|
|
|
+ }
|
|
|
if (res.data.code == '0') {
|
|
|
const newObj = modulesParseJson(res.data.data);
|
|
|
const initData = newObj.json;
|