添加线下对比表格
This commit is contained in:
parent
dba9cf3206
commit
33c7f9d270
|
|
@ -47,7 +47,15 @@ const OCTable: FC = (props) => {
|
|||
const showDifference = record[`${item["dataIndex"]}_type`] === "number";
|
||||
const { acctResultValue, excelResultValue } = record[item["dataIndex"]] || {};
|
||||
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"]}>
|
||||
<span>{lanObj["系统值"]}:</span>
|
||||
<span>{acctResultValue}</span>
|
||||
|
|
@ -80,14 +88,18 @@ const OCTable: FC = (props) => {
|
|||
const sizeChange = (pageobj: IPage) => {
|
||||
};
|
||||
const onChange = (pageobj: IPage) => {
|
||||
setPageInfo({ ...pageInfo, ...pageobj });
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "turn",
|
||||
payload: { id: "PAGEINFO", params: { ...pageInfo, ...pageobj } }
|
||||
},
|
||||
"*"
|
||||
);
|
||||
const { pageNum, size: pageSize } = pageobj;
|
||||
setPageInfo((prevState) => {
|
||||
const { size } = prevState;
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "turn",
|
||||
payload: { id: "PAGEINFO", params: { ...pageInfo, pageNum: size === pageSize ? pageNum : 1, size: pageSize } }
|
||||
},
|
||||
"*"
|
||||
);
|
||||
return { ...pageInfo, current: size === pageSize ? pageNum : 1, size: pageSize };
|
||||
});
|
||||
};
|
||||
return <Table
|
||||
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)
|
||||
};
|
||||
},
|
||||
layout: {
|
||||
direction: "LR",
|
||||
getVGap: () => 10,
|
||||
getHGap: () => 80
|
||||
},
|
||||
onReady: (graph: any) => {
|
||||
graph.on("node:click", (evt: any) => {
|
||||
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"]
|
||||
};
|
||||
// @ts-ignore
|
||||
return !_.isEmpty(dataSource) ? <DecompositionTreeGraph {...config} /> : null;
|
||||
}, [dataSource]);
|
||||
return component;
|
||||
|
|
|
|||
Loading…
Reference in New Issue