|
@@ -2,21 +2,13 @@ import React from "react";
|
|
|
import { connect } from "react-redux";
|
|
|
import Banner from "../components/Banner";
|
|
|
import { SHOW_CONFIG_MODAL, CLOSE_CONFIG_MODAL, CHANGE_TYPE, CONFIRM_TYPE } from "../store/types/typeConfig";
|
|
|
-import { BILLING_ADVICE} from '@store/types/pushMessage';
|
|
|
|
|
|
-import {pushAllDataList} from '@utils/tools';
|
|
|
-import {saveMode,getOtherHisRecord} from '@store/async-actions/fetchModules';
|
|
|
+import {saveMode} from '@store/async-actions/fetchModules';
|
|
|
import config from "@config/index";
|
|
|
-import { initItemList } from '@store/async-actions/tabTemplate';
|
|
|
-import { allCheckedShow } from '@store/actions/tabTemplate';
|
|
|
import {Notify} from '@commonComp';
|
|
|
-import {SETOTHERHISTORY} from "../store/types/homePage";
|
|
|
|
|
|
function mapStateToProps(state) {
|
|
|
return {
|
|
|
- disVisible:state.copyRight.disVisible,
|
|
|
- copyVisible:state.copyRight.copyVisible,
|
|
|
- //failed:state.typeConfig.failed,
|
|
|
typeConfig:state.typeConfig.typeConfig||config.defaultValue.mode,
|
|
|
visible:state.typeConfig.visible
|
|
|
};
|
|
@@ -37,36 +29,11 @@ function mapDispatchToProps(dispatch) {
|
|
|
//保存模式切换结果
|
|
|
dispatch(saveMode(confirmType)).then((res)=>{
|
|
|
if(res.data.code=='0'&&res.data.data){
|
|
|
- //清空所有数据
|
|
|
- pushAllDataList('','clear');
|
|
|
+ //切换后只会影响下一个点的模块(主诉、现病史、其他史)是否有模板
|
|
|
dispatch({type: CONFIRM_TYPE, confirmType});
|
|
|
- //切换模式是要重新获取其他史数据
|
|
|
- dispatch({
|
|
|
- type:SETOTHERHISTORY,
|
|
|
- data:[],
|
|
|
- save:[],
|
|
|
- otherIsHis:false
|
|
|
- });
|
|
|
- dispatch(getOtherHisRecord()); //获取其他史最近记录
|
|
|
Notify.success("模式切换成功");
|
|
|
- dispatch(initItemList(confirmType,1));//切换模式调用模板接口
|
|
|
- dispatch(allCheckedShow(false)) //全选反选显示重置
|
|
|
- dispatch({//推送重置
|
|
|
- type: BILLING_ADVICE,
|
|
|
- determine:[],
|
|
|
- doubt:[],
|
|
|
- possible:[],
|
|
|
- vigilant: [],
|
|
|
- likely:[],
|
|
|
- lab: [],
|
|
|
- pacs:[],
|
|
|
- setPushEmergency:[],
|
|
|
- setPushEmergencyIdx:''
|
|
|
- });
|
|
|
}else{
|
|
|
Notify.error(res.data.msg+",请稍后再试");
|
|
|
- //dispatch({type:MODE_CHANGE_FAIL,data:true}); //保存失败弹窗提示
|
|
|
- //alert('模式保存失败')
|
|
|
}
|
|
|
});
|
|
|
|