master
This commit is contained in:
parent
4e231ec401
commit
45862052c7
|
|
@ -240,8 +240,8 @@ const index: FunctionComponent<Props> = (props) => {
|
|||
};
|
||||
const rowSelection = {
|
||||
columnWidth: 50,
|
||||
columnTitle: isDetailTable ? "序号" : "",
|
||||
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ? <span>{index + 1}</span> : originNode),
|
||||
columnTitle: isDetailTable && _.isNil(showSee) ? "序号" : "",
|
||||
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && _.isNil(showSee) ? <span>{index + 1}</span> : originNode),
|
||||
selectedRowKeys,
|
||||
preserveSelectedRowKeys: true,
|
||||
onChange: (rowKeys: React.Key[]) => {
|
||||
|
|
|
|||
|
|
@ -434,6 +434,58 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
|
|||
return col;
|
||||
})
|
||||
];
|
||||
} else if (type === "attendanceView") {
|
||||
return [
|
||||
..._.map(initialState, (g) => {
|
||||
let col = { ...g, ellipsis: true };
|
||||
switch (g.dataIndex) {
|
||||
case "operate":
|
||||
col = {
|
||||
...col,
|
||||
width: 176,
|
||||
fixed: "right" // render: (__: string, record: any) => {
|
||||
// let items: MenuProps["items"] = [
|
||||
// {
|
||||
// key: "DeleteList",
|
||||
// label: i18n?.["删除"],
|
||||
// onClick: () => postMessageToParent("DEL", record)
|
||||
// },
|
||||
// {
|
||||
// key: "Log",
|
||||
// label: i18n?.["操作日志"],
|
||||
// onClick: () => postMessageToParent("log", record)
|
||||
// }
|
||||
// ];
|
||||
// isSpecial && items.shift();
|
||||
// return (
|
||||
// <Space>
|
||||
// <Button type="link" onClick={() => postMessageToParent("EDIT", record)}>
|
||||
// {i18n?.["编辑"]}
|
||||
// </Button>
|
||||
// {isSpecial ? (
|
||||
// <Button type="link" onClick={() => postMessageToParent("DEL", record)}>
|
||||
// {i18n?.["删除"]}
|
||||
// </Button>
|
||||
// ) : (
|
||||
// <Button type="link" onClick={() => postMessageToParent("VIEW", record)}>
|
||||
// {i18n?.["查看明细"]}
|
||||
// </Button>
|
||||
// )}
|
||||
// <Dropdown menu={{ items }} placement="bottomRight">
|
||||
// <Button type="link" icon={<MoreOutlined />} />
|
||||
// </Dropdown>
|
||||
// </Space>
|
||||
// );
|
||||
// }
|
||||
};
|
||||
break;
|
||||
default:
|
||||
col = { ...col };
|
||||
break;
|
||||
}
|
||||
return col;
|
||||
})
|
||||
];
|
||||
}
|
||||
return initialState;
|
||||
}, [initialState, type, i18n, extraParams]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue