Merge branch 'master' into feature/2.9.42310.01-薪资项目拓扑图
This commit is contained in:
commit
db6bbd8bfa
|
|
@ -136,7 +136,7 @@ const index: FunctionComponent<Props> = (props) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
columnWidth: 60, hideSelectAll: isDetailTable,
|
columnWidth: 60, columnTitle: isDetailTable ? "序号" : "",
|
||||||
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ?
|
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ?
|
||||||
<span>{index + 1}</span> : originNode),
|
<span>{index + 1}</span> : originNode),
|
||||||
selectedRowKeys: selectedRowKeys,
|
selectedRowKeys: selectedRowKeys,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,42 @@ const ReportTable: FC = (props) => {
|
||||||
return {
|
return {
|
||||||
...child, ellipsis: true,
|
...child, ellipsis: true,
|
||||||
render: (text: string, record: any) => {
|
render: (text: string, record: any) => {
|
||||||
|
if(child.dataIndex?.endsWith("increase")){
|
||||||
|
let lowerLimitIndex = child.dataIndex.replace("increase", "lowerLimit");
|
||||||
|
let upperLimitIndex = child.dataIndex.replace("increase", "upperLimit");
|
||||||
|
let rowData = record[child.dataIndex].split(",").join("");
|
||||||
|
if (isNaN(parseFloat(rowData))) {
|
||||||
|
return record[child.dataIndex]
|
||||||
|
}
|
||||||
|
if (!isNaN(parseFloat(record[lowerLimitIndex])) && parseFloat(rowData) < parseFloat(record[lowerLimitIndex])) {
|
||||||
|
return <Button type="link" block onClick={() => {
|
||||||
|
window.parent.postMessage(
|
||||||
|
{
|
||||||
|
type: "turn",
|
||||||
|
payload: { id: "PIVOTCHART", params: { record } }
|
||||||
|
},
|
||||||
|
"*"
|
||||||
|
);
|
||||||
|
}}>
|
||||||
|
<Text type="success">{rowData}</Text>
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
if (!isNaN(parseFloat(record[upperLimitIndex])) && parseFloat(rowData) > parseFloat(record[upperLimitIndex])) {
|
||||||
|
return <Button type="link" block onClick={() => {
|
||||||
|
window.parent.postMessage(
|
||||||
|
{
|
||||||
|
type: "turn",
|
||||||
|
payload: { id: "PIVOTCHART", params: { record } }
|
||||||
|
},
|
||||||
|
"*"
|
||||||
|
);
|
||||||
|
}}>
|
||||||
|
<Text type="danger">{rowData}</Text>
|
||||||
|
</Button>
|
||||||
|
} else {
|
||||||
|
return `${rowData}`
|
||||||
|
}
|
||||||
|
}
|
||||||
return <Button type="link" block onClick={() => {
|
return <Button type="link" block onClick={() => {
|
||||||
window.parent.postMessage(
|
window.parent.postMessage(
|
||||||
{
|
{
|
||||||
|
|
@ -75,7 +111,7 @@ const ReportTable: FC = (props) => {
|
||||||
{
|
{
|
||||||
_.map(totalColumns, (item, index) => {
|
_.map(totalColumns, (item, index) => {
|
||||||
return <Table.Summary.Cell index={index} key={index} align="center">
|
return <Table.Summary.Cell index={index} key={index} align="center">
|
||||||
<Text type="danger">{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
|
<Text>{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
|
||||||
</Table.Summary.Cell>;
|
</Table.Summary.Cell>;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue