添加线下对比表格

release/2.19.1.2503.01-业务线个税
黎永顺 2 years ago
parent dba9cf3206
commit 33c7f9d270

@ -47,7 +47,15 @@ const OCTable: FC = (props) => {
const showDifference = record[`${item["dataIndex"]}_type`] === "number"; const showDifference = record[`${item["dataIndex"]}_type`] === "number";
const { acctResultValue, excelResultValue } = record[item["dataIndex"]] || {}; const { acctResultValue, excelResultValue } = record[item["dataIndex"]] || {};
return <div className={styles["comparison-column-item-container"]} return <div className={styles["comparison-column-item-container"]}
onClick={() => console.log(formulaDesc)}> onClick={() => {
window.parent.postMessage(
{
type: "turn",
payload: { id: "FORMULA", params: { formulaDesc } }
},
"*"
);
}}>
<div className={styles["comparison-single-row"]}> <div className={styles["comparison-single-row"]}>
<span>{lanObj["系统值"]}</span> <span>{lanObj["系统值"]}</span>
<span>{acctResultValue}</span> <span>{acctResultValue}</span>
@ -80,14 +88,18 @@ const OCTable: FC = (props) => {
const sizeChange = (pageobj: IPage) => { const sizeChange = (pageobj: IPage) => {
}; };
const onChange = (pageobj: IPage) => { const onChange = (pageobj: IPage) => {
setPageInfo({ ...pageInfo, ...pageobj }); const { pageNum, size: pageSize } = pageobj;
setPageInfo((prevState) => {
const { size } = prevState;
window.parent.postMessage( window.parent.postMessage(
{ {
type: "turn", type: "turn",
payload: { id: "PAGEINFO", params: { ...pageInfo, ...pageobj } } payload: { id: "PAGEINFO", params: { ...pageInfo, pageNum: size === pageSize ? pageNum : 1, size: pageSize } }
}, },
"*" "*"
); );
return { ...pageInfo, current: size === pageSize ? pageNum : 1, size: pageSize };
});
}; };
return <Table return <Table
rowKey="id" className={styles.tableWrapper} rowKey="id" className={styles.tableWrapper}

@ -82,6 +82,11 @@ const index: FunctionComponent<Props> = (props) => {
show: (g_level === 0 && !_.isEmpty(dataSource.children)) || getStorageIds(dataSource.children).includes(id) show: (g_level === 0 && !_.isEmpty(dataSource.children)) || getStorageIds(dataSource.children).includes(id)
}; };
}, },
layout: {
direction: "LR",
getVGap: () => 10,
getHGap: () => 80
},
onReady: (graph: any) => { onReady: (graph: any) => {
graph.on("node:click", (evt: any) => { graph.on("node:click", (evt: any) => {
if (_.isEmpty(evt.target.attrs) || JSON.stringify(evt.target.attrs).indexOf("cursor") !== -1) return; if (_.isEmpty(evt.target.attrs) || JSON.stringify(evt.target.attrs).indexOf("cursor") !== -1) return;
@ -93,6 +98,7 @@ const index: FunctionComponent<Props> = (props) => {
}, },
behaviors: ["drag-canvas", "zoom-canvas", "drag-node"] behaviors: ["drag-canvas", "zoom-canvas", "drag-node"]
}; };
// @ts-ignore
return !_.isEmpty(dataSource) ? <DecompositionTreeGraph {...config} /> : null; return !_.isEmpty(dataSource) ? <DecompositionTreeGraph {...config} /> : null;
}, [dataSource]); }, [dataSource]);
return component; return component;

Loading…
Cancel
Save