You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
salary-management-oneself/src/pages/personnelReport/talentProfitTable/components/regionItem.tsx

53 lines
1.4 KiB
TypeScript

/*
* Author: 黎永顺
* name: 公司组件
* Description:
* Date: 2023/5/10
*/
import React, { FunctionComponent } from "react";
import { OrgChartNodeDataType } from "@/components/reactChart/interface";
import styles from "./index.less";
import classNames from "classnames";
interface OwnProps {
node: OrgChartNodeDataType;
}
type Props = OwnProps;
const RegionItem: FunctionComponent<Props> = (props) => {
const { node } = props;
const classes = classNames(styles["regionItemWrapper"], {
[styles["regionItemWrapperChild"]]: node.key === 20 || node.key === 21 || node.key === 22 || node.key === 23 || node.key === 24 || node.key === 25
});
return (
<div className={classes}>
<div className={styles.header}>{node?.label}</div>
<div className={styles.contBox}>
<div>
<div>
<span></span>
<span>{node?.operatingIncome}</span>
</div>
<div>
<span></span>
<span>{node?.operatingIncomePercent}</span>
</div>
</div>
<div>
<div>
<span></span>
<span>{node?.operatingProfit}</span>
</div>
<div>
<span></span>
<span>{node?.operatingProfitPercent}</span>
</div>
</div>
</div>
</div>
);
};
export default RegionItem;