|
@@ -2,31 +2,29 @@ import {connect} from 'react-redux';
|
|
|
import ChronicInfo from '../components/ChronicInfo';
|
|
|
import {SHOW_TABLE_LIST,HIDE_TABLE_LIST, SET_CHRONIC_PUSHS} from '@store/types/pushMessage';
|
|
|
import {getTableList,getScaleInfo,getTips} from '../store/async-actions/pushMessage';
|
|
|
-import {ADD_ASSESS_ITEMS,SET_SAVE_ASSESS_DATA,SET_CHRONIC_CALCU_RESULT,ADD_WHOLE_SCALE_ITEMS} from "@types/assessResult";
|
|
|
+import {ADD_ASSESS_ITEMS,SET_SAVE_ASSESS_DATA,SET_CHRONIC_CALCU_RESULT,ADD_WHOLE_SCALE_ITEMS,SET_CALCU_VALUES} from "@types/assessResult";
|
|
|
import {saveMessage} from "../store/async-actions/print";
|
|
|
import {saveClickNum} from '@store/async-actions/homePage';
|
|
|
import { getFormulaResult } from '@store/async-actions/fetchModules'
|
|
|
import {deepClone} from '@utils/tools';
|
|
|
import Notify from '@commonComp/Notify';
|
|
|
-import {SET_CALCU_VALUES} from "../store/types/pushMessage";
|
|
|
|
|
|
function mapStateToProps(state){
|
|
|
const {pushMessage,assessResult} = state;
|
|
|
return{
|
|
|
chronicMagItem: state.diagnosticList.chronicMagItem,//慢病疾病
|
|
|
- chronicPushItems: pushMessage.chronicPushItems, //慢病右侧推送
|
|
|
+ data:pushMessage.chronicPushItems, //慢病右侧推送
|
|
|
tableList: pushMessage.tableList,
|
|
|
showList: pushMessage.showList,
|
|
|
showHide: pushMessage.showHide,
|
|
|
scaleInfo: pushMessage.scaleInfo,//量表内容
|
|
|
chronicDesease:state.mainSuit.chronicDesease,//主诉存的慢病
|
|
|
update:assessResult.update1,
|
|
|
- cupdate:pushMessage.update,
|
|
|
formulaResult:pushMessage.formulaResult, //量表信息
|
|
|
indexs:assessResult.wholeIndexs,
|
|
|
wholeResults:assessResult.wholeResults, //整体评估可能结果
|
|
|
- calcuResult:pushMessage.calcuResult, //计算公式结果
|
|
|
- calcuValues:pushMessage.calcuValues, //计算公式填的值
|
|
|
+ calcuResult:assessResult.calcuResult, //计算公式结果
|
|
|
+ calcuValues:assessResult.calcuValues, //计算公式填的值
|
|
|
wholeScaleItems:assessResult.wholeScaleItems, //全部量表中已加入病例的量表
|
|
|
}
|
|
|
}
|
|
@@ -84,10 +82,13 @@ function mapDispatchToProps(dispatch){
|
|
|
setChronicPush(data,id,calcuItem) {
|
|
|
dispatch({
|
|
|
type: SET_CHRONIC_PUSHS,
|
|
|
- data: data,
|
|
|
- calcuItem,
|
|
|
+ data: data
|
|
|
+ });
|
|
|
+ dispatch({
|
|
|
+ type:SET_CALCU_VALUES,
|
|
|
+ data:calcuItem,
|
|
|
id
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 计算公式计算
|
|
|
calcuFormula(item) {
|
|
@@ -95,12 +96,12 @@ function mapDispatchToProps(dispatch){
|
|
|
const {param,chronicPushItems} = item;
|
|
|
getFormulaResult(param).then((res)=>{
|
|
|
if(+res.data.code==0){
|
|
|
- const data = chronicPushItems;
|
|
|
+ //const data = chronicPushItems;
|
|
|
const result = res.data.data.result;
|
|
|
- const content = data[param.ppIndex].details[param.pIndex].content;
|
|
|
- content.result = result;
|
|
|
+ /*const content = data[param.ppIndex].details[param.pIndex].content;
|
|
|
+ content.result = result;*/
|
|
|
dispatch({
|
|
|
- type: SET_CALCU_VALUES,
|
|
|
+ type: SET_CHRONIC_CALCU_RESULT,
|
|
|
result:deepClone(result),
|
|
|
id:item.param.disId
|
|
|
})
|