DiagnosticList.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import React from 'react';
  2. import { connect } from 'react-redux';
  3. import DiagnosticList from '@components/DiagnosticList';
  4. import { ADD_DIAGNOSTIC, DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, GET_IS_FIRST, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE } from '@store/types/diagnosticList';
  5. import { getTreatResult } from '@store/async-actions/treat';
  6. import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
  7. import {billing, getTips} from '../store/async-actions/pushMessage';
  8. import {keepPushData} from '@store/actions/tabTemplate';
  9. import { showHistory,sortHistory,activeHistory,visibleHistory } from '@store/actions/historyTemplates'
  10. function mapStateToProps(state) {
  11. return {
  12. list: state.diagnosticList.diagnosticList,
  13. treatment: state.treat.show,
  14. isFirst: state.diagnosticList.isFirst,
  15. diagnosticStr: state.diagnosticList.diagnosticStr,
  16. showReferRecord: state.diagnosticList.showReferRecord,
  17. showHistoryCase: state.diagnosticList.showHistoryCase,
  18. items:state.historyTemplates.items,
  19. chronicMagItem: state.diagnosticList.chronicMagItem,
  20. }
  21. }
  22. function mapDispatchToProps(dispatch) {
  23. return {
  24. delDiagnostic: (item) => {
  25. dispatch({
  26. type: DEL_DIAGNOSTIC,
  27. item: item
  28. });
  29. dispatch({
  30. type: GET_DIAGNOSTIC_STR
  31. });
  32. },
  33. delReact: (item) => {
  34. dispatch({
  35. type: DEL_REACT,
  36. item: item
  37. })
  38. },
  39. delFollowUp:(delItem) => {
  40. dispatch({
  41. type: DEL_FOLLOW_UP,
  42. delItem: delItem
  43. })
  44. },
  45. upDiagnostic: (index, id) => {
  46. dispatch({
  47. type: UP_DIAGNOSTIC,
  48. index: index
  49. });
  50. dispatch({
  51. type: GET_DIAGNOSTIC_STR
  52. });
  53. },
  54. downDiagnostic: (index, id) => {
  55. dispatch({
  56. type: DOWN_DIAGNOSTIC,
  57. index: index
  58. });
  59. dispatch({
  60. type: GET_DIAGNOSTIC_STR
  61. });
  62. },
  63. getSearchResult:() => {
  64. dispatch(getSearchResult)
  65. },
  66. showTreat: () => {
  67. dispatch({
  68. type: SHOW_TREAT,
  69. })
  70. },
  71. getTreatResult: (item) => {
  72. dispatch(getTreatResult(item))
  73. },
  74. getTips: (diagItem) => {
  75. dispatch(getTips(diagItem))
  76. },
  77. getBilling: () => {
  78. dispatch(billing())
  79. },
  80. hideReferRecord: ()=>{
  81. dispatch({
  82. type: HIDE_REFER_RECORD
  83. })
  84. },
  85. showHistoryCaseModal: ()=> {
  86. dispatch({
  87. type: SHOW_HISTORY_CASE
  88. })
  89. },
  90. hideHistoryCaseModal: ()=> {
  91. dispatch({
  92. type: HIDE_HISTORY_CASE
  93. })
  94. },
  95. handleQuoteClick(data){
  96. dispatch(keepPushData(data,'his')) //历史病历引用
  97. // dispatch(activeHistory(idx))
  98. dispatch(visibleHistory(true))
  99. },
  100. }
  101. }
  102. const diagnosticListContainer = connect(
  103. mapStateToProps,
  104. mapDispatchToProps
  105. )(DiagnosticList)
  106. export default diagnosticListContainer;