master
This commit is contained in:
parent
6d2b0d8b1e
commit
0688be7bff
|
|
@ -12,7 +12,6 @@ import styles from "@/pages/atdTable/components/index.less";
|
|||
interface OwnProps {
|
||||
dataIndex?: string;
|
||||
title?: string;
|
||||
lockStatus?: string;
|
||||
dataType?: string;
|
||||
onHandleFormulatd?: any;
|
||||
i18n?: any;
|
||||
|
|
@ -23,7 +22,7 @@ interface OwnProps {
|
|||
type Props = OwnProps;
|
||||
|
||||
const customTableTitle: FunctionComponent<Props> = (props) => {
|
||||
const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail } = props;
|
||||
const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail } = props;
|
||||
|
||||
const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => {
|
||||
window.parent.postMessage(
|
||||
|
|
@ -37,26 +36,16 @@ const customTableTitle: FunctionComponent<Props> = (props) => {
|
|||
return (
|
||||
// th-width-lock
|
||||
<div className={classnames(styles["expand-th"])}>
|
||||
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>{title}</div>
|
||||
{
|
||||
!!lockStatus && !calcDetail &&
|
||||
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>
|
||||
{title}
|
||||
</div>
|
||||
{!calcDetail && (
|
||||
<div className={styles["toogle-lock-tool"]}>
|
||||
{
|
||||
lockStatus === "UNLOCK" &&
|
||||
<Icon type="icon-piliangsuoding" title={i18n["点击锁定所有解锁的项目值"]}
|
||||
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/>
|
||||
}
|
||||
{
|
||||
lockStatus === "LOCK" &&
|
||||
<Icon type="icon-piliangjiesuo" title={i18n["点击解锁所有锁定的项目值"]}
|
||||
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/>
|
||||
}
|
||||
<Icon type="icon-pilianggengxin" title={i18n["批量更新"]}
|
||||
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", {
|
||||
pattern, salaryItemName: title, dataType
|
||||
})}/>
|
||||
<Icon type="icon-piliangsuoding" title={i18n["点击锁定所有解锁的项目值"]} onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")} />
|
||||
<Icon type="icon-piliangjiesuo" title={i18n["点击解锁所有锁定的项目值"]} onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")} />
|
||||
<Icon type="icon-pilianggengxin" title={i18n["批量更新"]} onClick={() => handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", { pattern, salaryItemName: title, dataType })} />
|
||||
</div>
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue