|
@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
|
|
import OtherHistory from "../components/OtherHistory";
|
|
import OtherHistory from "../components/OtherHistory";
|
|
import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SELECTOTHERSEARCHDATA,SETDATA,SETTEXTMODEVALUE,OTHEREDICLEAR} from '@types/otherHistory';
|
|
import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SELECTOTHERSEARCHDATA,SETDATA,SETTEXTMODEVALUE,OTHEREDICLEAR} from '@types/otherHistory';
|
|
import {HIDE,RESET,ISREAD,SEARCH_DROP_LOCATION} from '@store/types/homePage.js';
|
|
import {HIDE,RESET,ISREAD,SEARCH_DROP_LOCATION} from '@store/types/homePage.js';
|
|
-import {getModule} from '@store/async-actions/fetchModules.js';
|
|
|
|
|
|
+import {getModule,setOtherHisModule} from '@store/async-actions/fetchModules.js';
|
|
import {billing} from '@store/async-actions/pushMessage';
|
|
import {billing} from '@store/async-actions/pushMessage';
|
|
import {fullfillText} from '@common/js/func';
|
|
import {fullfillText} from '@common/js/func';
|
|
import {didPushParamChange,filterDataArr} from '@utils/tools.js';
|
|
import {didPushParamChange,filterDataArr} from '@utils/tools.js';
|
|
@@ -37,29 +37,7 @@ function mapDispatchToProps(dispatch,store){
|
|
return {
|
|
return {
|
|
setInitData(){
|
|
setInitData(){
|
|
//先获取最近记录,没有的话显示模板
|
|
//先获取最近记录,没有的话显示模板
|
|
- dispatch((dispatch,getStore)=>{
|
|
|
|
- const state = getStore();
|
|
|
|
- const initData = state.homePage.initData;
|
|
|
|
- const mode = state.typeConfig.typeConfig;
|
|
|
|
- const model = JSON.parse(JSON.stringify(initData.otherHisModel)); //查体模板
|
|
|
|
- const arr = JSON.parse(JSON.stringify(initData.otherHis||null)); //最近其他史数据
|
|
|
|
- const arrSave = JSON.parse(JSON.stringify(initData.otherHisSave||null)); //最近其他史saveText
|
|
|
|
- const selects = JSON.parse(JSON.stringify(initData.otherSelecteds||null)); //其他史杂音类选中项
|
|
|
|
- const isHis = initData.otherIsHis; //是否是历史数据
|
|
|
|
- const onlyOneText = arr&&arr.length==1&&arr[0].tagType==8&&!(arr[0].name||arr[0].value); //是否只有一个自由文本标签
|
|
|
|
- const listObj = isHis&&(mode==1||(!onlyOneText&&mode==0))?{newArr:arr,saveText:arrSave||[]}:fullfillText(model);
|
|
|
|
- dispatch({
|
|
|
|
- type:SETDATA,
|
|
|
|
- data:listObj.newArr,
|
|
|
|
- selecteds:selects,
|
|
|
|
- period:initData.period,
|
|
|
|
- save:listObj.saveText,
|
|
|
|
- isEmpty:false
|
|
|
|
- });
|
|
|
|
- dispatch({
|
|
|
|
- type:ISREAD
|
|
|
|
- })
|
|
|
|
- });
|
|
|
|
|
|
+ dispatch(setOtherHisModule());
|
|
//右侧推送
|
|
//右侧推送
|
|
setTimeout(function(){ //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
|
|
setTimeout(function(){ //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
|
|
if(didPushParamChange()){ //操作后内容有变化才推送
|
|
if(didPushParamChange()){ //操作后内容有变化才推送
|