master
This commit is contained in:
parent
6d2b0d8b1e
commit
0688be7bff
|
|
@ -12,7 +12,6 @@ import styles from "@/pages/atdTable/components/index.less";
|
||||||
interface OwnProps {
|
interface OwnProps {
|
||||||
dataIndex?: string;
|
dataIndex?: string;
|
||||||
title?: string;
|
title?: string;
|
||||||
lockStatus?: string;
|
|
||||||
dataType?: string;
|
dataType?: string;
|
||||||
onHandleFormulatd?: any;
|
onHandleFormulatd?: any;
|
||||||
i18n?: any;
|
i18n?: any;
|
||||||
|
|
@ -23,7 +22,7 @@ interface OwnProps {
|
||||||
type Props = OwnProps;
|
type Props = OwnProps;
|
||||||
|
|
||||||
const customTableTitle: FunctionComponent<Props> = (props) => {
|
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 = {}) => {
|
const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => {
|
||||||
window.parent.postMessage(
|
window.parent.postMessage(
|
||||||
|
|
@ -37,26 +36,16 @@ const customTableTitle: FunctionComponent<Props> = (props) => {
|
||||||
return (
|
return (
|
||||||
// th-width-lock
|
// th-width-lock
|
||||||
<div className={classnames(styles["expand-th"])}>
|
<div className={classnames(styles["expand-th"])}>
|
||||||
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>{title}</div>
|
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>
|
||||||
{
|
{title}
|
||||||
!!lockStatus && !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
|
|
||||||
})}/>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
{!calcDetail && (
|
||||||
|
<div className={styles["toogle-lock-tool"]}>
|
||||||
|
<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>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue