Inspect.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. searchType,
  21. resetLabel,
  22. delOnePic,
  23. } from '@store/actions/inspect';
  24. import {
  25. billing,
  26. embedPush,
  27. getConceptDetail,
  28. getMRAnalyse
  29. } from '@store/async-actions/pushMessage';
  30. import {HIDEDROP} from '@types/homePage';
  31. function mapStateToProps(state) {//console.log(state)
  32. return {
  33. list: state.inspect.list,
  34. labelList: state.inspect.labelList,
  35. fillActive: state.inspect.fillActive,
  36. shType: state.inspect.shType,
  37. getExcelDataList: state.inspect.getExcelDataList,
  38. labelListActive: state.inspect.labelListActive,
  39. inspectList: state.homePage.inspectList,
  40. windowHeight: state.homePage.windowHeight,
  41. windowWidth: state.homePage.windowWidth,
  42. inspectVal: state.inspect.inspectVal,
  43. message: state.patInfo.message,
  44. labelListBig: state.inspect.labelListBig,
  45. labelListSmall: state.inspect.labelListSmall,
  46. hospitalMsg: state.homePage.sysConfig || {},
  47. typeConfig: state.typeConfig
  48. }
  49. }
  50. function mapDispatchToProps(dispatch) {
  51. return {
  52. detailClick(val){
  53. dispatch(searchType(val))
  54. },
  55. setContext(obj){
  56. dispatch(setContext(obj))
  57. },
  58. handleDelConfirm(obj){
  59. dispatch(delOnePic(obj))
  60. },
  61. handleChangeValue(val) {
  62. dispatch(getSearchList(val))
  63. },
  64. getInfomation(item) {
  65. dispatch(getConceptDetail(item))
  66. },
  67. handleSign(arr,id, idx, type) {
  68. dispatch(resetLabel(arr))
  69. // dispatch(setLabel(idx, type))
  70. // dispatch(getSublableList(id))
  71. // dispatch(getMRAnalyse())
  72. },
  73. handleLabelSub(e, id, idx) {
  74. dispatch(fillActived(id, idx))
  75. // e.stopPropagation()
  76. },
  77. handleClear(e, idx) {
  78. e.stopPropagation();
  79. dispatch(clearLabel(idx))
  80. },
  81. handleConfirm(e, idx, time, arr) {
  82. e.stopPropagation();
  83. dispatch(checkValueIsChange(idx, time, arr))
  84. },
  85. changeActivePart(idx, value) {
  86. dispatch(fillActiveDetail(idx, value))
  87. },
  88. handleCloseExcel(idx) {
  89. dispatch(delExcelLis(idx));
  90. dispatch(getMRAnalyse())
  91. },
  92. delPartItem(idx) {
  93. dispatch(delPartItem(idx))
  94. dispatch(getMRAnalyse())
  95. },
  96. setTipValue(item,value) {
  97. dispatch(setTip(item,value))
  98. },
  99. //右侧推送
  100. fetchPushInfos(obj) {
  101. //调右侧推送
  102. dispatch(embedPush(obj));
  103. },
  104. hideAllDrop(){
  105. dispatch({
  106. type:HIDEDROP
  107. });
  108. },
  109. }
  110. }
  111. const InspectAction = connect(mapStateToProps, mapDispatchToProps)(Inspect);
  112. export default InspectAction;