import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { Spin, Button, Popconfirm, Badge } from 'antd'; import ProTable from '@ant-design/pro-table'; import './protable.less' import moment from 'moment'; import { getReportStatistic } from "../actions/infor" import UserModal from './infor/details'; const enforceTable = (props) => { const { dispatch, user, depData, depMessage, depLoading } = props const [rowSelected, setRowSelected] = useState([]) // const [regionId, setRegionId] = useState()//区域id // const [placeType, setPlaceType] = useState()//场所 // const [day, setDay] = useState([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])//日期 const [sitename, setSitename] = useState()//场所名称 const [counts, setCounts] = useState()//shuju const [modalVisible, setModalVisible] = useState(false); const [modalRecord, setModalRecord] = useState(); const [typecard, setTypecard] = useState(); //打开弹窗 const openModal = (type, record) => { setModalVisible(true); // setModalType(type); if (type == 'edit') { setModalRecord(record); } else { setModalRecord(null); } } //批量导出 const exports = (ids, counts) => { // console.log(user); let reportIds = []; if (ids.length) reportIds = ids else reportIds = (counts || {}).ids || []; superagent.post('/_report/http') .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { const resTextIs = res.text.split('/').pop() window.open( '/_api/' + `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) }) } const columns = [ { title: '桥梁代码', dataIndex: 'placeName', fixed: 'left', width: 120, options: 1, backgroundColor: "#ffffff", fieldProps: { onChange: (value, cs) => { setSitename(value.currentTarget.value) }, placeholder: '请输入道路名称进行搜索', getPopupContainer: (triggerNode) => triggerNode.parentNode, }, }, { title: '桥梁名称', search: false, dataIndex: 'containers', fixed: 'left', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '中心桩号', search: false, dataIndex: 'time2', valueType: 'dateRange', // align: 'right', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨越地物类型', search: false, dataIndex: 'time3', valueType: 'dateRange', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨越地物名称', search: false, dataIndex: 'time4', valueType: 'dateRange', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '收费性质', search: false, dataIndex: 'time5', valueType: 'dateRange', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '匝道编码', search: false, dataIndex: 'time6', valueType: 'dateRange', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '路段类型', search: false, dataIndex: 'time7', valueType: 'dateRange', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨越地物类型1', search: false, dataIndex: 'time8', valueType: 'dateRange', width: 120, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨越地物名称1', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '原桥梁代码', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '是否宽路窄桥', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '是否在长大桥梁目录中', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '是否跨省桥梁', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '互通类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '互通形式', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '互通交叉方式', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥梁分类', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥梁全长', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨径总长', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '主桥主跨', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '主桥孔数', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨径组合', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥梁性质', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '设计荷载等级', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '上部结构', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '上部结构材料', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥面铺装类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥面宽', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥面净宽', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥下净空', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '抗震等级', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '通航等级', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥台类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥墩类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '墩台防撞设施类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '伸缩缝类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '支座类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '弯坡斜特征', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '桥梁高度', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '人行道宽度', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '建设单位', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '建成时间', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '通车日期', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '改建时间', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '总造价', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '设计单位名称', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '施工单位名称', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '监理单位名称', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '建设性质', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '评定日期', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '技术状况评定', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '评定单位', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '主要病害位置', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '病害描述', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '采取管制措施', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '最近定期检查日期', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '管养单位性质', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '管养单位', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '监管单位', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '改造施工单位', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '是否部补助项目', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '工程性质', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '改造部位', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '改造完工日期', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '年份1', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨径组合1', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '投资1', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '年份2', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨径组合2', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '投资2', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '年份3', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨径组合3', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '投资3', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '年份4', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨径组合4', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '投资4', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '年份5', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '跨径组合5', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '投资5', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '计划资金类别', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '计划年度', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '计划文号', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '计划项目唯一编码', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '计划项目类型', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '计划项目名称', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '完工情况', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '完工年度', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '变更原因', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '变更时间', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '填报单位', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '备注', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '是否跨线桥', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '是否线外桥', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '是否危桥改造', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '所在区县', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '所在地市', search: false, dataIndex: 'time9', valueType: 'dateRange', width: 140, render: (dom, record) => { return record.address }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { title: '操作', dataIndex: 'creatTime', valueType: 'dateTimeRange', hideInSearch: true, width: 120, fixed: 'right', render: (dom, record) => { return
} }, { key: "direction", hideInTable: true, dataIndex: "direction", order: 6, renderFormItem: (item, { type, defaultRender, ...rest }, form,record) => { return (
); }, }, ] return (
{ finishedProductTable = c; }} style={{ width: "100% ", overflow: "auto", height: '760px' }} rowKey='id' onReset={(v) => { const { id } = depMessage[0] // console.log(id) // setRegionId(id) // setPlaceType(-1) // setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]) setSitename('') }} rowSelection={{ selectedRowKeys: rowSelected, onChange: (selectedRowKeys) => { setRowSelected(selectedRowKeys); }, }} columns={columns} dataSource={(counts || {}).rows || []} request={async (params) => { const query = { startDate: day[0], endDate: day[1], placeType: placeType, regionId: regionId, placeName: sitename, limit: params.pageSize, offset: ((params.current ? params.current : 1) - 1) * params.pageSize } setRowSelected([]); const res = await dispatch(getReportStatistic(query)); setCounts(res.payload.data) return { ...res, total: res.payload.data ? res.payload.data.count : 0 } }} search={{ defaultCollapsed: false, optionRender: (searchConfig, formProps, dom) => [ ...dom.reverse(), { props.exports(rowSelected, counts) }}> ], }} >
) } function mapStateToProps(state) { const { auth, depMessage } = state; const pakData = (dep) => { return dep.map((d) => { return { title: d.name, value: d.id, // children: d.type >= 2 ? [] : pakData(d.subordinate) children: pakData(d.subordinate) } }) } let depData = pakData(depMessage.data || []) return { user: auth.user, depMessage: depMessage.data || [], depLoading: depMessage.isRequesting, depData, }; } export default connect(mapStateToProps)(enforceTable);