diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index c0a8417..c2d96ac 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -31,6 +31,7 @@ const index: FunctionComponent = (props) => { const [i18n, setI18n] = useState({}); const [showTotalCell, setShowTotalCell] = useState(false); const [isDetailTable, setIsDetailTable] = useState(false); + const [showSee, setShowSee] = useState(false); const [sumRowlistUrl, setSumRowlistUrl] = useState(""); const [tableScrollHeight, setTableScrollHeight] = useState(0); const [payload, setPayload] = useState(""); @@ -57,6 +58,7 @@ const index: FunctionComponent = (props) => { sumRowlistUrl = "", payload = {}, calcDetail, + showSee = false, fixed = true, tableScrollHeight, sumRow, @@ -65,6 +67,7 @@ const index: FunctionComponent = (props) => { setSumRowlistUrl(sumRowlistUrl); setShowTotalCell(showTotalCell); setIsDetailTable(calcDetail); + setShowSee(showSee); setI18n(i18nRes); setPayload(payload); setFixed(fixed); @@ -82,8 +85,8 @@ const index: FunctionComponent = (props) => { width: optWidth || 120, render: (__, record) => ( - {optWidth && ( <> @@ -215,8 +218,8 @@ const index: FunctionComponent = (props) => { const handleFormulaTd = (dataIndex: string) => { window.parent.postMessage({ type: "turn", payload: { id: "FORMULA", params: { dataIndex } } }, "*"); }; - const handleEdit = (id: string) => { - window.parent.postMessage({ type: "turn", payload: { id: "EDIT", params: { id } } }, "*"); + const handleEdit = (id: string, showSee: boolean) => { + window.parent.postMessage({ type: "turn", payload: { id: "EDIT", params: { id, showSee } } }, "*"); }; const handleLockEmp = (params: any) => { window.parent.postMessage({ type: "turn", payload: { id: "LOCKEMP", params } }, "*"); @@ -264,7 +267,7 @@ const index: FunctionComponent = (props) => { x: 1200, y: `calc(100vh - ${tableScrollHeight || (!showTotalCell ? 165 : 200)}px)` }} - columns={!isDetailTable ? columns : _.filter(columns, (o) => o.dataIndex !== "operate")} + columns={!isDetailTable || showSee ? columns : _.filter(columns, (o) => o.dataIndex !== "operate")} footer={() => (!isDetailTable ? : null)} pagination={ !_.isNil(pageInfo)