泛微薪资核算iframe表格

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

@ -1,5 +1,5 @@
import React, { FC, useEffect, useState } from "react";
import { Table, Typography } from "antd";
import { Button, Table, Typography } from "antd";
import { exceptStr } from "@/utils/common";
import styles from "@/pages/atdTable/components/index.less";
@ -22,9 +22,29 @@ const ReportTable: FC = (props) => {
if (!_.isEmpty(data)) {
const { columns, dataSource, countResult, showSum } = data;
setDataSource(dataSource);
setColumns(columns);
setShowSumrow(showSum);
setSumRow(countResult);
setColumns(_.map(columns, item => {
return {
...item,
children: _.map(item.children, child => {
return {
...child,
render: (text: string, record: any) => {
return <Button type="link" onClick={() => {
window.parent.postMessage(
{
type: "turn",
payload: { id: "PIVOTCHART", params: { record } }
},
"*"
);
}}>{text}</Button>;
}
};
})
};
}));
}
};
return <Table

Loading…
Cancel
Save