123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- import React from 'react';
- import { connect } from 'react-redux';
- import DiagnosticList from '@components/DiagnosticList';
- import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING,ADDDIAGMSG,EDITDIAGMSG} from '@store/types/diagnosticList';
- import {SHOW_TIPS_DETAILS,HIDE_TIPS_DETAILS} from '@store/types/pushMessage';
- import { getTreatResult } from '@store/async-actions/treat';
- import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
- import {embedPush, getAllConceptDetail, getConceptDetail, getMRAnalyse} from '../store/async-actions/pushMessage';
- import {keepPushData} from '@store/actions/tabTemplate';
- import { visibleHistory } from '@store/actions/historyTemplates'
- import {autoFillModules} from '@store/async-actions/fetchModules';
- import {SET_ASSESS_DATA} from '@types/assessResult';
- import {didPushParamChange} from '@utils/tools';
- function mapStateToProps(state) {//console.log(state)
- const {diagnosticList,assessResult,pushMessage } = state;
- let diagnC = diagnosticList.chronicMagItem;
- return {
- pushMessage: pushMessage,
- list: diagnosticList.diagnosticList,
- treatment: state.treat.show,
- isFirst: diagnosticList.isFirst,
- diagnosticStr: diagnosticList.diagnosticStr,
- showReferRecord: diagnosticList.showReferRecord,
- showHistoryCase: diagnosticList.showHistoryCase,
- items:state.historyTemplates.items,
- chronicMagItem: diagnC?diagnC:state.mainSuit.chronicDesease,
- typeConfig: state.typeConfig.mode,
- //wholeResults:assessResult.wholeResults,
- scaleInfo: pushMessage.scaleInfo,//量表内容
- showHide: pushMessage.showHide,
- loading: diagnosticList.loading&&!state.copyRight.loading,
- windowWidth: state.homePage.windowWidth
- }
- }
- function mapDispatchToProps(dispatch) {
- return {
- editDiagName(idx,name){ //获取评估内容数据
- dispatch({
- type:EDITDIAGMSG,
- idx:idx,
- name:name
- });
- },
- setAssess(data,disName){ //获取评估内容数据
- dispatch({
- type:SET_ASSESS_DATA,
- data:data,
- name:disName
- });
- },
- delDiagnostic: (item,idx) => {
- dispatch({
- type: DEL_DIAGNOSTIC,
- item: item,
- idx:idx
- });
- dispatch({
- type: GET_DIAGNOSTIC_STR
- });
- dispatch(getMRAnalyse())
- },
- delReact: (item) => {
- dispatch({
- type: DEL_REACT,
- item: item
- })
- },
- delFollowUp:(delItem) => {
- dispatch({
- type: DEL_FOLLOW_UP,
- delItem: delItem
- })
- },
- upDiagnostic: (index, id) => {
- dispatch({
- type: UP_DIAGNOSTIC,
- index: index
- });
- dispatch({
- type: GET_DIAGNOSTIC_STR
- });
- },
- downDiagnostic: (index, id) => {
- dispatch({
- type: DOWN_DIAGNOSTIC,
- index: index
- });
- dispatch({
- type: GET_DIAGNOSTIC_STR
- });
- },
- showTreat: () => {
- dispatch({
- type: SHOW_TREAT,
- })
- },
- getTreatResult: (item,idx) => {
- dispatch({
- type:ADDDIAGMSG,
- item:item,
- idx:idx
- });
- },
- getTips: (item) => {
- dispatch(getAllConceptDetail(item))
- },
- showTipsDetailsModal: () => {
- dispatch({
- type: SHOW_TIPS_DETAILS
- })
- },
- hideTipsDetailsModal: () => {
- dispatch({
- type: HIDE_TIPS_DETAILS
- })
- },
- getBilling: (obj) => {
- if (didPushParamChange()) {
- obj.action ='diag'
- dispatch(embedPush(obj))
- }
- },
- hideReferRecord: ()=>{
- dispatch({
- type: HIDE_REFER_RECORD
- })
- },
- showHistoryCaseModal: ()=> {
- dispatch({
- type: SHOW_HISTORY_CASE
- })
- },
- hideHistoryCaseModal: ()=> {
- dispatch({
- type: HIDE_HISTORY_CASE
- })
- },
- handleQuoteClick(data){
- dispatch(keepPushData(data,'his')) //历史病历引用
- // dispatch(activeHistory(idx))
- dispatch(visibleHistory(true))
- },
- autoFillModules(){
- dispatch(autoFillModules())//自动分发模板
- },
- }
- }
- const diagnosticListContainer = connect(
- mapStateToProps,
- mapDispatchToProps
- )(DiagnosticList)
- export default diagnosticListContainer;
|