泛微薪资核算iframe表格

custom-新弘农业/V2-薪资核算表格添加序号列
黎永顺 2 years ago
parent 0f21ec8e1c
commit 0223e54156

@ -1,7 +1,7 @@
import * as React from "react";
import { useEffect } from "react";
import { ConfigProvider } from "antd";
import styles from "./index.less";
import styles from "../index.less";
export default ({ children, style = {} }: any) => {
useEffect(() => {

@ -144,6 +144,7 @@ const AntdTable: FC<ITableProps> = (props) => {
result.dataIndex = item.column;
result.oldWidth = result.width;
result.width = "150px";
result.ellipsis = true;
if (result.children) {
result.width = (result.children.length * 150) + "px";
result.children.map((child: any) => {
@ -195,6 +196,7 @@ const AntdTable: FC<ITableProps> = (props) => {
</span>;
child.dataIndex = child.column;
child.width = "150px";
child.ellipsis = true;
child.render = (text: string) => {
return <span className={styles.contentSpan}>
<span>{text}</span>
@ -238,7 +240,9 @@ const AntdTable: FC<ITableProps> = (props) => {
setDataSource([]);
const data: any = exceptStr(event.data);
if (!_.isEmpty(data)) {
getPCDataList({ ...data, ...pageParams });
const { selectedRowKeys, ...extraData } = data;
getPCDataList({ ...extraData, ...pageParams });
if (selectedRowKeys) setSelected(selectedRowKeys);
}
};
@ -275,7 +279,8 @@ const AntdTable: FC<ITableProps> = (props) => {
dataSource={dataSource}
size="small"
bordered
rowSelection={tab === "PC" && usertab === "SA" ? rowSelection : undefined}
// rowSelection={tab === "PC" && usertab === "SA" ? rowSelection : undefined}
rowSelection={rowSelection}
pagination={{
...paginationFun(pageParams, sizeChange, onChange),
size: "default"
@ -298,7 +303,7 @@ const AntdTable: FC<ITableProps> = (props) => {
<Table.Summary fixed>
<Table.Summary.Row>
{
_.map(totalColumns, (item, index) => {
_.map([{},...totalColumns], (item, index) => {
if (index === 0) {
return <Table.Summary.Cell index={0}><Text type="danger"></Text></Table.Summary.Cell>;
}

Loading…
Cancel
Save