Inspect.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import React from 'react';
  2. import {
  3. connect
  4. } from 'react-redux';
  5. import Inspect from '@components/Inspect';
  6. import {
  7. getSearchList,
  8. getSublableList,
  9. } from '@store/async-actions/inspect';
  10. import {
  11. setLabel,
  12. fillActived,
  13. fillActiveDetail,
  14. checkValueIsChange,
  15. delExcelLis,
  16. clearLabel,
  17. delPartItem,
  18. setContext,
  19. setTip
  20. } from '@store/actions/inspect';
  21. import {
  22. billing,
  23. getConceptDetail,
  24. getMRAnalyse
  25. } from '@store/async-actions/pushMessage';
  26. import {HIDEDROP} from '@types/homePage';
  27. function mapStateToProps(state) {//console.log(state)
  28. return {
  29. list: state.inspect.list,
  30. labelList: state.inspect.labelList,
  31. fillActive: state.inspect.fillActive,
  32. getExcelDataList: state.inspect.getExcelDataList,
  33. labelListActive: state.inspect.labelListActive,
  34. inspectList: state.homePage.inspectList,
  35. windowHeight: state.homePage.windowHeight,
  36. windowWidth: state.homePage.windowWidth,
  37. inspectVal: state.inspect.inspectVal,
  38. message: state.patInfo.message,
  39. hospitalMsg: state.homePage.sysConfig || {},
  40. typeConfig: state.typeConfig
  41. }
  42. }
  43. function mapDispatchToProps(dispatch, store) {
  44. return {
  45. setContext(obj){
  46. dispatch(setContext(obj))
  47. },
  48. handleChangeValue(val) {
  49. dispatch(getSearchList(val))
  50. },
  51. getInfomation(item) {
  52. dispatch(getConceptDetail(item))
  53. },
  54. handleSign(id, idx, type) {
  55. dispatch(setLabel(idx, type))
  56. dispatch(getSublableList(id))
  57. dispatch(getMRAnalyse())
  58. },
  59. handleLabelSub(e, id, idx) {
  60. dispatch(fillActived(id, idx))
  61. // e.stopPropagation()
  62. },
  63. handleClear(e, idx) {
  64. e.stopPropagation();
  65. dispatch(clearLabel(idx))
  66. },
  67. handleConfirm(e, idx, time, arr) {
  68. e.stopPropagation();
  69. dispatch(checkValueIsChange(idx, time, arr))
  70. },
  71. changeActivePart(idx, value) {
  72. dispatch(fillActiveDetail(idx, value))
  73. },
  74. handleCloseExcel(idx) {
  75. dispatch(delExcelLis(idx));
  76. },
  77. delPartItem(idx) {
  78. dispatch(delPartItem(idx))
  79. dispatch(getMRAnalyse())
  80. },
  81. setTipValue(idx,value) {
  82. dispatch(setTip(idx,value))
  83. },
  84. //右侧推送
  85. fetchPushInfos() {
  86. //调右侧推送
  87. dispatch(billing());
  88. },
  89. hideAllDrop(){
  90. dispatch({
  91. type:HIDEDROP
  92. });
  93. },
  94. }
  95. }
  96. const InspectAction = connect(mapStateToProps, mapDispatchToProps)(Inspect);
  97. export default InspectAction;