From 267ac3b8bc41edc514c8e4befc9d2c006fd1182f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 30 Jun 2023 14:21:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=9B=E5=BE=AE=E8=96=AA=E8=B5=84=E6=A0=B8?= =?UTF-8?q?=E7=AE=97iframe=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/atdTable/components/index.less | 22 ++--- src/pages/payrollFilesTable/index.tsx | 105 ++++++++++++++--------- 2 files changed, 78 insertions(+), 49 deletions(-) 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)}> + 删除档案 + + } + ] + }} + > + + + } ; } }