Inspect.js 2.9 KB

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