master
This commit is contained in:
parent
c325d4ae4c
commit
4ad2bc0eba
|
|
@ -41,7 +41,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:global {
|
:global {
|
||||||
span.anticon-lock {
|
span.anticon-lock, span.anticon-question-circle {
|
||||||
color: #5d9cec;
|
color: #5d9cec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
import Icon from "@/lib/CustomIcon";
|
import Icon from "@/lib/CustomIcon";
|
||||||
import { LockOutlined, UnlockOutlined } from "@ant-design/icons";
|
import { LockOutlined, UnlockOutlined, QuestionCircleOutlined } from "@ant-design/icons";
|
||||||
import styles from "@/pages/atdTable/components/index.less";
|
import styles from "@/pages/atdTable/components/index.less";
|
||||||
|
|
||||||
interface OwnProps {
|
interface OwnProps {
|
||||||
|
|
@ -14,23 +14,29 @@ const CalcExplainFooter: FunctionComponent<Props> = (props) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles["explain-icon-area"]}>
|
<div className={styles["explain-icon-area"]}>
|
||||||
<div className={styles["icon-item"]}>
|
<div className={styles["icon-item"]}>
|
||||||
<Icon type="icon-piliangsuoding"/>
|
<Icon type="icon-piliangsuoding" />
|
||||||
<span>{i18n["批量锁定"]}</span>
|
<span>{i18n["批量锁定"]}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles["icon-item"]}>
|
<div className={styles["icon-item"]}>
|
||||||
<Icon type="icon-piliangjiesuo"/>
|
<Icon type="icon-piliangjiesuo" />
|
||||||
<span>{i18n["批量解锁"]}</span>
|
<span>{i18n["批量解锁"]}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles["icon-item"]}>
|
<div className={styles["icon-item"]}>
|
||||||
<LockOutlined/>
|
<LockOutlined />
|
||||||
<span>{i18n["当前状态锁定,右击解锁"]}</span>
|
<span>{i18n["当前状态锁定,右击解锁"]}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles["icon-item"]}>
|
<div className={styles["icon-item"]}>
|
||||||
<UnlockOutlined/>
|
<UnlockOutlined />
|
||||||
<span>{i18n["当前状态未锁定,右击锁定"]}</span>
|
<span>{i18n["当前状态未锁定,右击锁定"]}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{(i18n["反馈信息,右击删除反馈信息"] || i18n["反馈信息,右击设置反馈信息"]) && (
|
||||||
|
<div className={styles["icon-item"]}>
|
||||||
|
<QuestionCircleOutlined />
|
||||||
|
<span>{i18n["反馈信息,右击删除反馈信息"] || i18n["反馈信息,右击设置反馈信息"]}</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className={styles["icon-item"]}>
|
<div className={styles["icon-item"]}>
|
||||||
<Icon type="icon-pilianggengxin"/>
|
<Icon type="icon-pilianggengxin" />
|
||||||
<span>{i18n["批量更新"]}</span>
|
<span>{i18n["批量更新"]}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
import React, { FunctionComponent, useEffect, useState } from "react";
|
import React, { FunctionComponent, useEffect, useState } from "react";
|
||||||
import type { MenuProps } from "antd";
|
import type { MenuProps } from "antd";
|
||||||
import { Button, Dropdown, Space, Table, Typography } from "antd";
|
import { Button, Dropdown, Space, Table, Tooltip, Typography } from "antd";
|
||||||
import { LockOutlined, UnlockOutlined } from "@ant-design/icons";
|
import { DeleteOutlined, LockOutlined, QuestionCircleOutlined, SettingOutlined, UnlockOutlined } from "@ant-design/icons";
|
||||||
import CustomTableTitle from "@/pages/calcTable/customTableTitle";
|
import CustomTableTitle from "@/pages/calcTable/customTableTitle";
|
||||||
import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter";
|
import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter";
|
||||||
import CaclFixedTotal from "./calcFixedTotal";
|
import CaclFixedTotal from "./calcFixedTotal";
|
||||||
|
|
@ -131,41 +131,76 @@ const index: FunctionComponent<Props> = (props) => {
|
||||||
i18n: item.i18n,
|
i18n: item.i18n,
|
||||||
onCell: (record: any) => ({
|
onCell: (record: any) => ({
|
||||||
onContextMenu: (e: any) => {
|
onContextMenu: (e: any) => {
|
||||||
!item.calcDetail && e.preventDefault();
|
(!item.calcDetail || item.rightClickType) && e.preventDefault();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
render: (text: string, record: any) => {
|
render: (text: string, record: any) => {
|
||||||
const items: MenuProps["items"] = [
|
let items: MenuProps["items"] = !item.calcDetail
|
||||||
{
|
? [
|
||||||
label: item.i18n["锁定"],
|
{
|
||||||
key: "LOCK",
|
label: item.i18n["锁定"],
|
||||||
icon: <LockOutlined />,
|
key: "LOCK",
|
||||||
onClick: () =>
|
icon: <LockOutlined />,
|
||||||
handleLockEmp({
|
onClick: () =>
|
||||||
lockStatus: "LOCK",
|
handleLockEmp({
|
||||||
acctEmpId: record?.id,
|
lockStatus: "LOCK",
|
||||||
salaryItemId: item?.dataIndex
|
acctEmpId: record?.id,
|
||||||
})
|
salaryItemId: item?.dataIndex
|
||||||
},
|
})
|
||||||
{
|
},
|
||||||
label: item.i18n["解锁"],
|
{
|
||||||
key: "UNLOCK",
|
label: item.i18n["解锁"],
|
||||||
icon: <UnlockOutlined />,
|
key: "UNLOCK",
|
||||||
onClick: () =>
|
icon: <UnlockOutlined />,
|
||||||
handleLockEmp({
|
onClick: () =>
|
||||||
lockStatus: "UNLOCK",
|
handleLockEmp({
|
||||||
acctEmpId: record?.id,
|
lockStatus: "UNLOCK",
|
||||||
salaryItemId: item?.dataIndex
|
acctEmpId: record?.id,
|
||||||
})
|
salaryItemId: item?.dataIndex
|
||||||
}
|
})
|
||||||
];
|
}
|
||||||
|
]
|
||||||
|
: [];
|
||||||
|
item.rightClickType === "DELFEEDBACK" &&
|
||||||
|
(items = [
|
||||||
|
...items,
|
||||||
|
{
|
||||||
|
label: item.i18n["删除反馈"],
|
||||||
|
key: "DELFEEDBACK",
|
||||||
|
icon: <DeleteOutlined />,
|
||||||
|
onClick: () =>
|
||||||
|
handleDelFeedback({
|
||||||
|
acctEmpId: record?.id,
|
||||||
|
salaryItemId: item?.dataIndex
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
item.rightClickType === "SETFEEDBACK" &&
|
||||||
|
(items = [
|
||||||
|
...items,
|
||||||
|
{
|
||||||
|
label: item.i18n["设置反馈"],
|
||||||
|
key: "SETFEEDBACK",
|
||||||
|
icon: <SettingOutlined />,
|
||||||
|
onClick: () =>
|
||||||
|
handleSetFeedback({
|
||||||
|
acctEmpId: record?.id,
|
||||||
|
salaryItemId: item?.dataIndex
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]);
|
||||||
return (
|
return (
|
||||||
<Dropdown menu={{ items: !item.calcDetail ? items : [] }} trigger={["contextMenu"]} overlayClassName={styles.contextMenu} destroyPopupOnHide>
|
<Dropdown menu={{ items: !item.calcDetail || item.rightClickType ? items : [] }} trigger={["contextMenu"]} overlayClassName={styles.contextMenu} destroyPopupOnHide>
|
||||||
<span className={styles.contentSpan}>
|
<span className={styles.contentSpan}>
|
||||||
<span title={text} className={styles.contentTitle} style={{ color: `${record?.[item.dataIndex + "_color"]}` }}>
|
<span title={text} className={styles.contentTitle} style={{ color: `${record?.[item.dataIndex + "_color"]}` }}>
|
||||||
{text}
|
{text}
|
||||||
</span>
|
</span>
|
||||||
{record.lockItems && record.lockItems.includes(item.dataIndex) ? <LockOutlined title={item.i18n["锁定的项目值"]} /> : null}
|
{record.lockItems && record.lockItems.includes(item.dataIndex) ? <LockOutlined title={item.i18n["锁定的项目值"]} /> : null}
|
||||||
|
{!_.isEmpty(record[`${item.dataIndex}_feedback`]) ? (
|
||||||
|
<Tooltip title={record[`${item.dataIndex}_feedback`]}>
|
||||||
|
<QuestionCircleOutlined />
|
||||||
|
</Tooltip>
|
||||||
|
) : null}
|
||||||
</span>
|
</span>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
|
|
@ -183,6 +218,13 @@ const index: FunctionComponent<Props> = (props) => {
|
||||||
const handleLockEmp = (params: any) => {
|
const handleLockEmp = (params: any) => {
|
||||||
window.parent.postMessage({ type: "turn", payload: { id: "LOCKEMP", params } }, "*");
|
window.parent.postMessage({ type: "turn", payload: { id: "LOCKEMP", params } }, "*");
|
||||||
};
|
};
|
||||||
|
// 复旦大学附属医院二开-薪资核算项添加右击删除反馈的操作
|
||||||
|
const handleDelFeedback = (params: any) => {
|
||||||
|
window.parent.postMessage({ type: "turn", payload: { id: "DELFEEDBACK", params } }, "*");
|
||||||
|
};
|
||||||
|
const handleSetFeedback = (params: any) => {
|
||||||
|
window.parent.postMessage({ type: "turn", payload: { id: "SETFEEDBACK", params } }, "*");
|
||||||
|
};
|
||||||
const sizeChange = (pageobj: IPage) => {};
|
const sizeChange = (pageobj: IPage) => {};
|
||||||
const onChange = (pageobj: IPage) => {
|
const onChange = (pageobj: IPage) => {
|
||||||
setPageInfo(() => {
|
setPageInfo(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue