bug处理
This commit is contained in:
parent
632f42bf07
commit
f90fda8bfb
|
|
@ -17,21 +17,15 @@ interface OwnProps {
|
||||||
i18n?: any;
|
i18n?: any;
|
||||||
pattern?: number;
|
pattern?: number;
|
||||||
calcDetail?: boolean; //查看详情页面
|
calcDetail?: boolean; //查看详情页面
|
||||||
|
children?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Props = OwnProps;
|
type Props = OwnProps;
|
||||||
|
|
||||||
const customTableTitle: FunctionComponent<Props> = (props) => {
|
const customTableTitle: FunctionComponent<Props> = (props) => {
|
||||||
const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail } = props;
|
const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail, children } = props;
|
||||||
|
|
||||||
const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => {
|
const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => {
|
||||||
window.parent.postMessage(
|
window.parent.postMessage({ type: "turn", payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } } }, "*");
|
||||||
{
|
|
||||||
type: "turn",
|
|
||||||
payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } }
|
|
||||||
},
|
|
||||||
"*"
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
// th-width-lock
|
// th-width-lock
|
||||||
|
|
@ -39,7 +33,7 @@ const customTableTitle: FunctionComponent<Props> = (props) => {
|
||||||
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>
|
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>
|
||||||
{title}
|
{title}
|
||||||
</div>
|
</div>
|
||||||
{!calcDetail && (
|
{!calcDetail && _.isEmpty(children) && (
|
||||||
<div className={styles["toogle-lock-tool"]}>
|
<div className={styles["toogle-lock-tool"]}>
|
||||||
<Icon type="icon-piliangsuoding" title={i18n["点击锁定所有解锁的项目值"]} onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")} />
|
<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-piliangjiesuo" title={i18n["点击解锁所有锁定的项目值"]} onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")} />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue