diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index dfab050..c524647 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -141,7 +141,7 @@ const index: FunctionComponent = (props) => { {text} handleDiagramTd(item?.dataIndex, record?.id)} /> - {record.lockItems.includes(item.dataIndex) ? : null} + {record.lockItems && record.lockItems.includes(item.dataIndex) ? : null} ); @@ -150,9 +150,6 @@ const index: FunctionComponent = (props) => { } }); }; - const handleDiagramTd = (salaryItemId: string, acctEmpId: string) => { - window.parent.postMessage({ type: "turn", payload: { id: "DIAGRAM", params: { salaryItemId, acctEmpId } } }, "*"); - }; const handleFormulaTd = (dataIndex: string) => { window.parent.postMessage({ type: "turn", payload: { id: "FORMULA", params: { dataIndex } } }, "*"); }; @@ -224,6 +221,9 @@ const index: FunctionComponent = (props) => { } /> ); + const handleDiagramTd = (salaryItemId: string, acctEmpId: string) => { + window.parent.postMessage({ type: "turn", payload: { id: "DIAGRAM", params: { salaryItemId, acctEmpId } } }, "*"); + }; }; export default index;