index.tsx 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. /*
  2. * @Author: code4eat awesomedema@gmail.com
  3. * @Date: 2023-01-04 14:12:31
  4. * @LastEditors: code4eat awesomedema@gmail.com
  5. * @LastEditTime: 2024-11-15 14:31:22
  6. * @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. import { ActionType, ProColumns, ProFormText } from '@ant-design/pro-components';
  10. import { Space, Dropdown, MenuProps, DatePicker } from 'antd';
  11. import { useEffect, useRef, useState } from 'react';
  12. import { getData, getRedirReportData, getSearchRowsReq } from './service';
  13. import './style.less';
  14. import { createFromIconfontCN, DownOutlined } from '@ant-design/icons';
  15. import exportTableToExcel from '@/utils/tableToExcel';
  16. import 'moment/locale/zh-cn';
  17. import locale from 'antd/es/date-picker/locale/zh_CN';
  18. import moment from 'moment';
  19. import { formatMoneyNumber } from '@/utils/format';
  20. import KCIMPagecontainer from '@/components/KCIMPageContainer';
  21. import { KCIMTable } from '@/components/KCIMTable';
  22. import { getStringWidth } from '@/utils/tooljs';
  23. import ExportProgressModal from './ExportProgressModal';
  24. import { getParamsDataBySysId } from '@/services/getDic';
  25. import { useModel, useParams } from '@umijs/max';
  26. const IconFont = createFromIconfontCN({
  27. scriptUrl: '',
  28. });
  29. interface Searchable {
  30. [key: string]: string;
  31. }
  32. let searchKeys: any[] = [];
  33. let totalTableData: any[] = [];
  34. let dataSource: any[] = [];
  35. let tableDataSearchKeywords: undefined | string = undefined;
  36. let currentPage = 0;
  37. let maxFetchCount = 0;
  38. let prevParams: any = null;
  39. function multiAttributeSearchOptimized(dataArray: any[], keys: any[], keywords: any[]) {
  40. // 确保关键词为非空数组
  41. if (!Array.isArray(keywords) || keywords.length === 0) {
  42. return dataArray;
  43. }
  44. const lowerCaseKeywords = keywords.map(kw => kw.toLowerCase());
  45. return dataArray.filter((item: { [x: string]: any; }) => {
  46. // 对每一项数据进行指定属性的搜索
  47. return keys.some((key: string | number) => {
  48. const value = item[key];
  49. // 确保属性存在且为字符串类型
  50. if (typeof value === 'string') {
  51. // 遍历每一个关键词,判断是否存在匹配
  52. return lowerCaseKeywords.some(keyword => value.toLowerCase().includes(keyword));
  53. }
  54. return false;
  55. });
  56. });
  57. }
  58. const ReportExport = ({ reportCode, propsParams, tableScrollH }: { reportCode: string, propsParams: any, tableScrollH: number }) => {
  59. const { reportCode: urlReportCode } = reportCode ? { reportCode } : useParams();
  60. const [tableColumn, set_tableColumn] = useState<ProColumns[] | any[]>([]);
  61. const [tableScrollX, set_tableScrollX] = useState<number>(1000);
  62. const { initialState, setInitialState } = useModel('@@initialState');
  63. const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>(propsParams ? propsParams.compute_date : (initialState ? initialState.computeDate : undefined));
  64. const [breadCrumbList, set_breadCrumbList] = useState<any[]>([]);
  65. const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>(propsParams ? { parameter: propsParams } : undefined);
  66. const tableRef = useRef<ActionType>();
  67. const [loading, set_loading] = useState(true);
  68. const [tableH, set_tableH] = useState(tableScrollH ? tableScrollH : 0);
  69. const [step, set_step] = useState(0);
  70. const [reportName, set_reportName] = useState('');
  71. const [pageSize, set_pageSize] = useState(20);
  72. const [openProcessModal, set_openProcessModal] = useState(false);
  73. const [searchRows, set_searchRows] = useState<any[]>([]);
  74. const [tableData, set_tableData] = useState<any[]>([]);
  75. const [searchType, set_searchType] = useState(0);
  76. const [pagination, set_pagination] = useState<any>(null);
  77. const reportJumphandle = (reportData: any) => {
  78. set_loading(true);
  79. set_searchRows([]);
  80. let parameter: { [key: string]: any } = {};
  81. const { redirectParameter = undefined } = reportData;
  82. const _step = step + 1;
  83. if (redirectParameter) {
  84. const tempArr = redirectParameter.split('|');
  85. tempArr.forEach((element: string) => {
  86. parameter[`${element}`] = reportData[`${element}`]
  87. });
  88. }
  89. set_breadCrumbList(
  90. [...breadCrumbList,
  91. {
  92. index: _step,
  93. name: reportData[`report_name`] || reportData[`redirectReportName`],
  94. params: {
  95. reportCode: reportData.redirectReportCode,
  96. parameter: {
  97. ...parameter
  98. }
  99. }
  100. }
  101. ]
  102. );
  103. set_step(_step);
  104. getSearchRows(reportData.redirectReportCode, parameter);
  105. totalTableData = [];
  106. currentPage = 0;
  107. dataSource = [];
  108. }
  109. const getSearchRows = async (code: string, others?: any) => {
  110. const resp = await getSearchRowsReq(code);
  111. if (resp) {
  112. const rows = resp.reportIndex ? resp.reportIndex : [];
  113. set_searchType(resp.indexType);
  114. set_searchRows(rows);
  115. const searchObject = rows.reduce((acc: { [x: string]: any; }, curr: { columnIndex: string | number; value: any; }) => {
  116. acc[curr.columnIndex] = '';
  117. return acc;
  118. }, {});
  119. set_tableDataFilterParams({ ...tableDataFilterParams, reportCode: code, parameter: { ...others, compute_date: currentComputeDate, ...searchObject, ...(reportCode ? tableDataFilterParams?.parameter : {}) } });
  120. }
  121. }
  122. const getTableData = async (params: any) => {
  123. if (!openProcessModal) {
  124. set_loading(true);
  125. }
  126. if (!params.reportCode || (JSON.stringify(prevParams) === JSON.stringify(params))) {
  127. // 参数相同,不执行请求
  128. return;
  129. }
  130. const { systemId } = JSON.parse(localStorage.getItem('currentSelectedTab') as string)
  131. const paramsData = await getParamsDataBySysId(systemId, '1806523783696224256');
  132. const pageSize = paramsData.value ? Number(paramsData.value) : 100;
  133. set_pageSize(pageSize);
  134. const { parameter = {}, current, reportCode } = params;
  135. searchKeys = [];
  136. let resp: any = undefined;
  137. if (step != 0) {
  138. //报表跳转
  139. resp = await getRedirReportData(
  140. { pageSize, current },
  141. reportCode,
  142. { ...parameter, compute_date: currentComputeDate, }
  143. );
  144. }
  145. if (step == 0) {
  146. //首次获取表格数据
  147. resp = await getData(
  148. { pageSize, current },
  149. urlReportCode as string,
  150. { ...parameter, compute_date: currentComputeDate, }
  151. );
  152. }
  153. if (resp) {
  154. prevParams = params;
  155. const { title, data: assignmentData, reportName, current, totalCount, totalPage, pageSize } = resp;
  156. set_reportName(reportName);
  157. let scrollX = 0;
  158. const columns: ProColumns[] = title.map((item: any, index: number) => {
  159. if (item.search) {
  160. searchKeys.push({ name: item.name, key: item.columnName });
  161. }
  162. const wid = (item.name.length * 17) > 100 ? (item.name.length * 17) : 100;
  163. scrollX = scrollX + wid;
  164. return {
  165. title: item.name,
  166. dataIndex: `${item.columnName}`,
  167. key: `${item.columnName}`,
  168. width: wid,
  169. ellipsis: true,
  170. fixed: item.freeze ? true : false,
  171. hideInTable: item.hide,
  172. align: (item.dataType == 3 || item.dataType == 2) ? 'right' : 'left',
  173. sorter: item.sortStatus ? (a: any, b: any) => {
  174. if (item.dataType == 3) {
  175. //数值
  176. return b[`${item.columnName}`] - (a[`${item.columnName}`]);
  177. } else {
  178. return b[`${item.columnName}`]?.localeCompare(a[`${item.columnName}`]);
  179. }
  180. } : undefined,
  181. renderText: (_: string | number, record: any) => {
  182. if (item.redirect) {
  183. if (item.redirectData && item.redirectData.length > 1) {
  184. const items: MenuProps['items'] = [
  185. ...(item.redirectData.map((a: any, index: number) => ({
  186. key: index,
  187. label: (
  188. <a onClick={() => reportJumphandle({ ...item, ...record, ...a })}>
  189. {a.redirectReportName}
  190. </a>
  191. ),
  192. })))
  193. ];
  194. return <Dropdown menu={{ items }}>
  195. <a onClick={(e) => e.preventDefault()}>
  196. <Space>
  197. {(item.dataType && item.dataType == 3 && _) && formatMoneyNumber(Number(Number(_).toFixed(item.decimalPlace ? item.decimalPlace : 2)))}
  198. {(item.dataType && item.dataType == 2 && _ && typeof _ == 'number') && `${(_ * 100).toFixed(item.decimalPlace ? item.decimalPlace : 2)}%`}
  199. {(item.dataType != 2 && item.dataType != 3) && _}
  200. <DownOutlined />
  201. </Space>
  202. </a>
  203. </Dropdown>
  204. } else {
  205. return <a className='active' onClick={() => reportJumphandle({ ...item.redirectData[0], ...record })}>
  206. {(item.dataType && item.dataType == 3 && _) && formatMoneyNumber(Number(Number(_).toFixed(item.decimalPlace ? item.decimalPlace : 2)))}
  207. {(item.dataType && item.dataType == 2 && _ && typeof _ == 'number') && `${(_ * 100).toFixed(item.decimalPlace ? item.decimalPlace : 2)}%`}
  208. {(item.dataType != 2 && item.dataType != 3) && _}
  209. </a>
  210. }
  211. }
  212. return <span >
  213. {(item.dataType && item.dataType == 3 && _) && formatMoneyNumber(Number(Number(_).toFixed(item.decimalPlace ? item.decimalPlace : 2)))}
  214. {(item.dataType && item.dataType == 2 && _ && typeof _ == 'number') && `${(_ * 100).toFixed(item.decimalPlace ? item.decimalPlace : 2)}%`}
  215. {(item.dataType != 2 && item.dataType != 3) && _}
  216. </span>
  217. }
  218. }
  219. });
  220. set_tableColumn([...columns]);
  221. set_tableScrollX(scrollX);
  222. const data = assignmentData.map((item: any) => {
  223. let rowData: { [key: string]: any } = {};
  224. item.forEach((b: any) => {
  225. const needTitle = title.filter((a: any) => a.code == b.code);
  226. if (needTitle.length > 0) {
  227. rowData[`${needTitle[0].columnName}`] = b.value
  228. }
  229. });
  230. return { ...item, ...rowData, id: Math.random(), columns }
  231. });
  232. const exportdata = assignmentData.map((item: any) => {
  233. let rowData: { [key: string]: any } = {};
  234. item.forEach((b: any) => {
  235. const needTitle = title.filter((a: any) => a.code == b.code);
  236. if (needTitle.length > 0) {
  237. if (needTitle[0].dataType == 2 && typeof b.value == 'number') {
  238. rowData[`${needTitle[0].columnName}`] = `${(b.value * 100).toFixed(needTitle[0].decimalPlace ? needTitle[0].decimalPlace : 2)}%`
  239. } else {
  240. rowData[`${needTitle[0].columnName}`] = b.value
  241. }
  242. }
  243. });
  244. return { ...item, ...rowData, id: Math.random(), columns }
  245. });
  246. if (openProcessModal) {
  247. totalTableData = [...totalTableData, ...exportdata];
  248. return {
  249. currentCount: totalTableData.length,
  250. totalCount,
  251. totalPage
  252. }
  253. }
  254. if (!openProcessModal) {
  255. set_tableData(data);
  256. dataSource = data;
  257. set_pagination({
  258. current,
  259. total: totalCount,
  260. pageSize: pageSize,
  261. totalPage: totalPage,
  262. })
  263. }
  264. } else {
  265. prevParams = undefined;
  266. if (!openProcessModal) {
  267. set_tableData([]);
  268. dataSource = [];
  269. set_pagination(false)
  270. }
  271. }
  272. if (!openProcessModal) {
  273. set_loading(false);
  274. }
  275. return openProcessModal ? { currentCount: 0, totalCount: 0 } : []
  276. }
  277. const handleResize = (e: any) => {
  278. const wH = e.target.innerHeight;
  279. const tableHeight = wH - 290;
  280. if (!reportCode) {
  281. set_tableH(tableHeight);
  282. }
  283. }
  284. function doResize() {
  285. setTimeout(() => {
  286. const ev: any = new Event('resize');
  287. window.dispatchEvent(ev);
  288. }, 0)
  289. }
  290. const exportHandle = () => {
  291. // set_openProcessModal(true);
  292. let headers: { [key: string]: any } = {};
  293. let data: any[] = [];
  294. tableColumn.forEach(a => {
  295. if (a.hideInTable != 1) {
  296. headers[`${a.dataIndex}`] = a.title;
  297. }
  298. });
  299. totalTableData.forEach(b => {
  300. let _temp: { [key: string]: any } = {};
  301. Object.keys(headers).forEach(key => {
  302. _temp[`${key}`] = b[`${key}`]
  303. });
  304. data.push(_temp);
  305. });
  306. //console.log({tableColumn,headers,tableData,data});
  307. const excelTableData = [
  308. ...data
  309. ];
  310. const _columns = tableColumn.filter(a => a.hideInTable != 1);
  311. exportTableToExcel(excelTableData, _columns as any[], reportName);
  312. currentPage = 0;
  313. maxFetchCount = 0;
  314. totalTableData = [];
  315. // tableRef.current?.reload();
  316. }
  317. const fetchExportData = async () => {
  318. currentPage = currentPage + 1;
  319. const resp: any = await getTableData({ ...tableDataFilterParams, current: currentPage });
  320. if (resp) {
  321. const { currentCount = 0, totalCount = 0, totalPage } = resp;
  322. maxFetchCount = totalPage;
  323. return { currentCount, totalCount };
  324. } else {
  325. return { currentCount: 0, totalCount: 0 };
  326. }
  327. };
  328. const handleCompletion = () => {
  329. set_openProcessModal(false);
  330. exportHandle();
  331. }
  332. //面包屑跳转
  333. const switchHandle = (data: any) => {
  334. set_loading(true);
  335. set_step(data.index);
  336. const _breadCrumbList = breadCrumbList.filter((a: any) => a.index <= data.index);
  337. set_breadCrumbList([..._breadCrumbList]);
  338. getSearchRows(data.params.reportCode);
  339. }
  340. const handleSearchChange = (e: any, node: any, index: number) => {
  341. const { value } = e.target;
  342. // 更新搜索内容
  343. set_searchRows((prevSearchRows) => {
  344. const updatedSearchRows = [...prevSearchRows];
  345. updatedSearchRows[index] = { ...updatedSearchRows[index], value };
  346. return updatedSearchRows;
  347. });
  348. };
  349. const handleReset = () => {
  350. set_searchRows((prevSearchRows) => {
  351. const newObj = prevSearchRows.map((row) => ({ ...row, value: '' }))
  352. const searchObject = newObj.reduce((acc, curr) => {
  353. acc[curr.columnIndex] = curr.value ? curr.value : '';
  354. return acc;
  355. }, {});
  356. set_tableDataFilterParams({ ...tableDataFilterParams, parameter: { ...( tableDataFilterParams.parameter), ...searchObject } });
  357. return newObj
  358. }
  359. );
  360. };
  361. const tableDataSearchHandle = () => {
  362. const searchObject = searchRows.reduce((acc, curr) => {
  363. acc[curr.columnIndex] = curr.value ? curr.value : '';
  364. return acc;
  365. }, {});
  366. set_tableDataFilterParams({
  367. ...tableDataFilterParams,
  368. parameter: { ...(tableDataFilterParams.parameter), ...searchObject }
  369. });
  370. }
  371. const tableDataColumnSearchHandle = () => {
  372. if (tableDataSearchKeywords) {
  373. // 确保 searchKeys 不为空
  374. if (searchKeys.length === 0) {
  375. set_tableData(dataSource);
  376. return;
  377. }
  378. const keys = searchKeys.map(a => a.key);
  379. const result = multiAttributeSearchOptimized(tableData, keys, [tableDataSearchKeywords as string]);
  380. set_tableData(result);
  381. } else {
  382. // 恢复到初始数据
  383. set_tableData(dataSource);
  384. }
  385. };
  386. useEffect(() => {
  387. // 在这里处理路由参数变化的逻辑
  388. set_loading(true);
  389. set_tableDataFilterParams(undefined);
  390. set_breadCrumbList([{
  391. name: '首页',
  392. index: 0,
  393. params: { reportCode: urlReportCode, parameter: { ...(reportCode ? tableDataFilterParams?.parameter : {}), compute_date: currentComputeDate } }
  394. }]);
  395. urlReportCode && getSearchRows(urlReportCode);
  396. }, [urlReportCode]);
  397. useEffect(() => {
  398. if (currentComputeDate) {
  399. const searchObject = searchRows.reduce((acc: { [x: string]: any; }, curr: { columnIndex: string | number; value: any; }) => {
  400. acc[curr.columnIndex] = '';
  401. return acc;
  402. }, {});
  403. set_tableDataFilterParams({ ...tableDataFilterParams, parameter: { ...(reportCode ? tableDataFilterParams?.parameter : {}), compute_date: currentComputeDate,...searchObject } });
  404. }
  405. }, [currentComputeDate]);
  406. useEffect(() => {
  407. if (tableDataFilterParams) {
  408. getTableData(tableDataFilterParams);
  409. }
  410. }, [tableDataFilterParams]);
  411. useEffect(() => {
  412. window.addEventListener('resize', (e) => handleResize(e)) //监听窗口大小改变
  413. doResize();
  414. return () => {
  415. window.removeEventListener('resize', (e) => handleResize(e))
  416. }
  417. }, [])
  418. return (
  419. <KCIMPagecontainer className='ReportTemplate' title={false} style={reportCode ? { border: 'none' } : {}}>
  420. <ExportProgressModal
  421. visible={openProcessModal}
  422. onCancel={() => set_openProcessModal(false)}
  423. fetchData={fetchExportData}
  424. onCompletion={handleCompletion}
  425. />
  426. {
  427. breadCrumbList.length > 1 && <div className='breadcrumb'>
  428. {
  429. breadCrumbList.map((item: any, index: number) => {
  430. return (
  431. <>
  432. <span className={index != step ? 'tab' : 'tab actived'} key={index} onClick={() => { index != step && switchHandle(item) }}>{item.name}</span>{index == breadCrumbList.length - 1 ? '' : <span style={{ color: '#7A8599' }}> / </span>}
  433. </>
  434. )
  435. })
  436. }
  437. </div>
  438. }
  439. <div className='contentWrap' style={reportCode ? { padding: 0 } : {}}>
  440. <div className='toolbar'>
  441. {(currentComputeDate && !reportCode) && (<div className='search'>
  442. <span>核算年月:</span>
  443. <DatePicker
  444. disabled={breadCrumbList.length>1}
  445. onChange={(data, dateString) => {
  446. set_currentComputeDate(dateString);
  447. setInitialState((s: any) => ({ ...s, computeDate: dateString }))
  448. }}
  449. allowClear={false}
  450. picker='month'
  451. locale={locale}
  452. autoComplete="off"
  453. value={moment(currentComputeDate, 'YYYY-MM')}
  454. format='YYYY-MM' placeholder="请选择核算年月" />
  455. <div style={{ display: (searchType == 1 && searchKeys.length > 0) ? 'flex' : 'none', flexDirection: 'row', alignItems: 'center', marginLeft: 16 }}>
  456. <span style={{ whiteSpace: 'nowrap' }}>检索:</span>
  457. <ProFormText
  458. noStyle
  459. // style={{width:(searchKeys.length)*20}}
  460. width={((searchKeys.length) * 100) > 675 ? 675 : (searchKeys.length) * 100}
  461. placeholder={searchKeys.reduce((prev, cur) => `${prev.length > 0 ? prev + '/' : prev}${cur.name}`, '')}
  462. fieldProps={{
  463. suffix:
  464. < IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataColumnSearchHandle()} />
  465. ,
  466. onChange: (e) => {
  467. if (e.target.value) {
  468. tableDataSearchKeywords = e.target.value
  469. } else {
  470. tableDataSearchKeywords = undefined;
  471. tableDataColumnSearchHandle();
  472. }
  473. },
  474. onPressEnter: (e) => tableDataColumnSearchHandle()
  475. }}
  476. />
  477. </div>
  478. <div style={{ display: (searchRows && searchRows.length > 0) ? 'flex' : 'none', flexDirection: 'row', alignItems: 'center', marginLeft: 8 }}>
  479. {/* <span style={{ whiteSpace: 'nowrap' }}>检索:</span> */}
  480. {
  481. (searchRows ? searchRows : []).map((node, index) => {
  482. return (
  483. <ProFormText
  484. key={index}
  485. noStyle
  486. width={150}
  487. // allowClear={false}
  488. style={{ marginRight: 8 }}
  489. placeholder={`${node.tips}`}
  490. fieldProps={{
  491. style: { marginRight: 8 },
  492. value: node.value,
  493. // suffix:
  494. // < IconFont type="iconsousuo" style={{ color: '#99A6BF' }}
  495. // />
  496. // ,
  497. onChange: (e) => {
  498. handleSearchChange(e, node, index)
  499. },
  500. }}
  501. />
  502. )
  503. })
  504. }
  505. </div>
  506. </div>)}
  507. {!reportCode && <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
  508. {searchType == 2 && <div className='searchBtn' onClick={() => handleReset()}>重置</div>}
  509. {searchType == 2 && <div className='searchBtn' onClick={() => tableDataSearchHandle()}>查询</div>}
  510. <div className='export' onClick={() => set_openProcessModal(true)}>导出</div>
  511. </div>}
  512. </div>
  513. <div className='ReportTemplateContent' style={reportCode ? { paddingTop: 0 } : {}}>
  514. {/* {(currentComputeDate&&(searchType == 0||searchType == 2) ) && <KCIMTable actionRef={tableRef} rowKey='id' columns={tableColumn as ProColumns[]}
  515. params={tableDataFilterParams}
  516. scroll={{ x: tableScrollX, y: tableH }}
  517. loading
  518. pagination={{ pageSizeOptions: [10, 20, 50, 100, 1000], showSizeChanger: true, pageSize }}
  519. request={(params, sort, filter) => getTableData(params)}
  520. />} */}
  521. {(currentComputeDate) && <KCIMTable actionRef={tableRef} rowKey='id' columns={tableColumn as ProColumns[]}
  522. // params={tableDataFilterParams}
  523. loading={loading}
  524. scroll={{ x: tableScrollX, y: tableH }}
  525. dataSource={tableData}
  526. pagination={searchType == 1 ? { pageSizeOptions: [10, 20, 50, 100, 1000], showSizeChanger: true, pageSize } : {
  527. ...pagination,
  528. onChange(page, pageSize) {
  529. getTableData({ ...tableDataFilterParams, current: page, pageSize });
  530. },
  531. }}
  532. />}
  533. </div>
  534. </div>
  535. </KCIMPagecontainer>
  536. )
  537. }
  538. export default ReportExport