diff --git a/src/pages/atdTable/components/index.less b/src/pages/atdTable/components/index.less index 928ff6c..184ec20 100644 --- a/src/pages/atdTable/components/index.less +++ b/src/pages/atdTable/components/index.less @@ -187,6 +187,18 @@ } } + .ant-dropdown-menu-title-content { + a { + font-size: 12px; + color: #333; + } + + a:hover { + color: #00a9ff; + text-decoration: underline; + } + } + .ant-popover-inner { min-width: 106px } @@ -194,16 +206,6 @@ .ant-popover-inner-content { padding: 0; - .ant-menu { - .ant-menu-item { - border-right: none; - height: 30px; - line-height: 30px; - text-align: center; - padding: 0; - font-size: 12px; - } - } } } } diff --git a/src/pages/payrollFilesTable/index.tsx b/src/pages/payrollFilesTable/index.tsx index dd02c76..301c0dc 100644 --- a/src/pages/payrollFilesTable/index.tsx +++ b/src/pages/payrollFilesTable/index.tsx @@ -1,6 +1,6 @@ import React, { FC, useEffect, useState } from "react"; -import { Button, Dropdown, Menu, Space, Spin, Table, Typography } from "antd"; -import { DownOutlined } from "@ant-design/icons"; +import { Button, Dropdown, Space, Spin, Table, Typography } from "antd"; +import { MoreOutlined } from "@ant-design/icons"; import { convertColumns, exceptStr, paginationFun } from "@/utils/common"; import styles from "@/pages/atdTable/components/index.less"; import { defaultPage, IPage } from "@/common/types"; @@ -33,7 +33,8 @@ const payrollFilesTable: FC = (props) => { pageInfo, showOperateBtn, selectedKey, - selectedRowKeys + selectedRowKeys, + salaryArchiveDelete } = data; const { current: pageNum, pageSize: size, total } = pageInfo; setDataSource(dataSource); @@ -69,27 +70,38 @@ const payrollFilesTable: FC = (props) => { > 编辑 + - - - - - - - - } + + } + ] + }} placement="bottomRight" + overlayClassName={styles.moreIconWrapper} > - 更多 + ; } else if (selectedKey === "fixed") { @@ -113,27 +125,25 @@ const payrollFilesTable: FC = (props) => { )}> 编辑 + - - - - - - - - } + + } + ] + }} placement="bottomRight" + overlayClassName={styles.moreIconWrapper} > - 更多 + ; } else { @@ -151,6 +161,23 @@ const payrollFilesTable: FC = (props) => { onClick={() => handleMenuClick({ key: "view" }, r as string)}> 查看 + { + salaryArchiveDelete === "1" && + handleMenuClick({ key: "deleteAchives" }, r?.id)}> + 删除档案 + + } + ] + }} + > + + + } ; } }