Inspect.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import React from 'react';
  2. import {connect} from 'react-redux';
  3. import Inspect from '@components/Inspect';
  4. import {getSearchList,getSublableList,getInstroduce } from '@store/async-actions/inspect';
  5. import {setLabel,fillActived,fillActiveDetail,checkValueIsChange,delExcelLis,clearLabel,delPartItem} from '@store/actions/inspect';
  6. import {billing} from '@store/async-actions/pushMessage';
  7. function mapStateToProps(state) {
  8. return {
  9. list:state.inspect.list,
  10. labelList:state.inspect.labelList,
  11. fillActive:state.inspect.fillActive,
  12. getExcelDataList:state.inspect.getExcelDataList,
  13. labelListActive:state.inspect.labelListActive,
  14. inspectList:state.homePage.inspectList,
  15. }
  16. }
  17. function mapDispatchToProps(dispatch, store) {
  18. return {
  19. handleChangeValue(val){
  20. dispatch(getSearchList(val))
  21. },
  22. getInfomation(id){
  23. dispatch(getInstroduce(id))
  24. },
  25. handleSign(id,idx,type){
  26. dispatch(setLabel(idx,type))
  27. dispatch(getSublableList(id))
  28. },
  29. handleLabelSub(e,id,idx){
  30. dispatch(fillActived(id,idx))
  31. // e.stopPropagation()
  32. },
  33. handleClear(e,idx){
  34. e.stopPropagation();
  35. dispatch(clearLabel(idx))
  36. },
  37. handleConfirm(e,idx,time,arr){
  38. e.stopPropagation();
  39. dispatch(checkValueIsChange(idx,time,arr))
  40. },
  41. changeActivePart(idx,value){
  42. console.log(idx,value)
  43. dispatch(fillActiveDetail(idx,value))
  44. },
  45. handleCloseExcel(idx){
  46. dispatch(delExcelLis(idx));
  47. },
  48. delPartItem(idx){
  49. dispatch(delPartItem(idx))
  50. },
  51. //右侧推送
  52. fetchPushInfos(){
  53. //调右侧推送
  54. dispatch(billing());
  55. }
  56. }
  57. }
  58. const InspectAction = connect(mapStateToProps, mapDispatchToProps)(Inspect);
  59. export default InspectAction;