Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b5f617a594 | |
|
|
0dbb7a240c | |
|
|
6b4fdabeb7 | |
|
|
b851f5e2b9 |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -52,7 +52,7 @@ export const OrgChartComponent = memo((props, ref) => {
|
|||
.layout('top')
|
||||
.linkUpdate(function (d, i, arr) {
|
||||
d3.select(this)
|
||||
.attr('stroke', '#66BAF5')
|
||||
.attr('stroke', '#dcdddc')
|
||||
.attr('stroke-width', 1)
|
||||
.style('stroke-dasharray', '3, 3');
|
||||
})
|
||||
|
|
|
|||
|
|
@ -22,10 +22,9 @@ const { TextArea } = Input;
|
|||
import moment from 'moment';
|
||||
import 'moment/locale/zh-cn';
|
||||
import locale from 'antd/lib/date-picker/locale/zh_CN';
|
||||
import { HomeOutlined } from '@ant-design/icons';
|
||||
import { HomeOutlined, FolderOpenOutlined } from '@ant-design/icons';
|
||||
moment.locale('zh-cn');
|
||||
import { getLabel } from '../../util/i18n.js';
|
||||
import { SmileOutlined } from '@ant-design/icons';
|
||||
|
||||
export class TopBar extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -116,7 +115,11 @@ export class TopBar extends React.Component {
|
|||
arr = [...data.companyTree];
|
||||
}
|
||||
arr.map((item, index) => {
|
||||
item.icon = <HomeOutlined />;
|
||||
if (item.type == '1') {
|
||||
item.icon = <HomeOutlined />;
|
||||
} else {
|
||||
item.icon = <FolderOpenOutlined />;
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
rootTreeData: arr,
|
||||
|
|
@ -165,7 +168,11 @@ export class TopBar extends React.Component {
|
|||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
data.companyTree.map((item, index) => {
|
||||
item.icon = <HomeOutlined />;
|
||||
if (item.type == '1') {
|
||||
item.icon = <HomeOutlined />;
|
||||
} else {
|
||||
item.icon = <FolderOpenOutlined />;
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
fclasslist: data.fclasslist,
|
||||
|
|
@ -197,7 +204,7 @@ export class TopBar extends React.Component {
|
|||
return (
|
||||
<div className={style.topbarWrapper}>
|
||||
<Row>
|
||||
<Col span={6}>
|
||||
{/* <Col span={6}>
|
||||
{getLabel(547293, labelData)}:
|
||||
<Select
|
||||
defaultValue="0"
|
||||
|
|
@ -228,7 +235,7 @@ export class TopBar extends React.Component {
|
|||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Col>
|
||||
</Col> */}
|
||||
<Col span={6}>
|
||||
{getLabel(547294, labelData)}:
|
||||
<TreeSelect
|
||||
|
|
@ -280,8 +287,6 @@ export class TopBar extends React.Component {
|
|||
<Option value="4">{getLabel(547465, labelData)}</Option>
|
||||
</Select>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{ marginTop: '15px' }}>
|
||||
<Col span={6}>
|
||||
<Checkbox
|
||||
style={{ marginTop: '5px' }}
|
||||
|
|
@ -304,8 +309,10 @@ export class TopBar extends React.Component {
|
|||
/>
|
||||
</Tooltip>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{ marginTop: '15px' }}>
|
||||
<Col span={16}>
|
||||
{this.state.requestData.fclass == '0' && (
|
||||
{/* {this.state.requestData.fclass == '0' && (
|
||||
<span>
|
||||
<Button
|
||||
type="primary"
|
||||
|
|
@ -336,7 +343,7 @@ export class TopBar extends React.Component {
|
|||
{getLabel(547313, labelData)}
|
||||
</Button>
|
||||
</span>
|
||||
)}
|
||||
)} */}
|
||||
|
||||
<Button
|
||||
type="primary"
|
||||
|
|
|
|||
|
|
@ -44,13 +44,16 @@ export default function companyPage() {
|
|||
|
||||
// 点击节点
|
||||
const onNodeClick = (node) => {
|
||||
if (node.ftype == '2') {
|
||||
const params = {
|
||||
rootId: node.id,
|
||||
fclass: topbar.state.requestData.fclass,
|
||||
id: infoRef.current,
|
||||
};
|
||||
drawerCom.showDrawer(params);
|
||||
if (node.ftype == '1') {
|
||||
window.open(
|
||||
`/spa/portal/static/index.html#/main/portal/portal-6-3?subId=${node.fobjid}`,
|
||||
'_blank',
|
||||
);
|
||||
} else if (node.ftype == '2') {
|
||||
window.open(
|
||||
`/spa/portal/static/index.html#/main/portal/portal-5-3?depId=${node.fobjid}`,
|
||||
'_blank',
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -96,12 +99,14 @@ export default function companyPage() {
|
|||
|
||||
// 获取部门图片
|
||||
function getDepartmentImage(fisvitual) {
|
||||
return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`;
|
||||
return `./img/back/back.png`;
|
||||
//return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`;
|
||||
}
|
||||
|
||||
// 获取分部图片
|
||||
function getSubcompanyImage(fisvitual) {
|
||||
return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`;
|
||||
//return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`;
|
||||
return `./img/back/back.png`;
|
||||
}
|
||||
|
||||
// 多语言获取
|
||||
|
|
@ -132,9 +137,9 @@ export default function companyPage() {
|
|||
// ButtonContent渲染
|
||||
const buttonContentRender = ({ node, state }) => {
|
||||
if (node.children) {
|
||||
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#66BAF5"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;">ˆ</div> </div>`;
|
||||
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#1f0ea3"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;">ˆ</div> </div>`;
|
||||
} else {
|
||||
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#66BAF5"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;transform:rotate(180deg)">ˆ</div> </div>`;
|
||||
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#1f0ea3"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;transform:rotate(180deg)">ˆ</div> </div>`;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -164,6 +169,7 @@ export default function companyPage() {
|
|||
const nodeContentRender = (d, i, arr, state) => {
|
||||
let fclass = topbar.state.requestData.fclass;
|
||||
let statisticsStyle = fclass == 0 ? 'block' : 'none';
|
||||
let staffStyle = d.data.staffNum == 0 ? 'none' : 'inline-block';
|
||||
if (d.data.ftype == 0) {
|
||||
return `<div style="text-align: center;">
|
||||
<div style="display: inline-block; margin-left: 5px;">
|
||||
|
|
@ -171,11 +177,12 @@ export default function companyPage() {
|
|||
font-size: 24px;
|
||||
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
color: #1f0ea3;
|
||||
line-height: 28px;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 10px;
|
||||
">${d.data.fname}</div>
|
||||
">${d.data.fname}(${d.data.onJobNum})</div>
|
||||
|
||||
</div>
|
||||
</div>`;
|
||||
} else if (d.data.ftype == 1) {
|
||||
|
|
@ -192,7 +199,9 @@ export default function companyPage() {
|
|||
</div>
|
||||
|
||||
<div style="display: ${statisticsStyle}">
|
||||
<span style="color:red">${d.data.staffNum}</span> /
|
||||
<span style="color:red;display: ${staffStyle}">${
|
||||
d.data.staffNum
|
||||
} /</span>
|
||||
<span style="color:green">${d.data.onJobNum}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -214,7 +223,9 @@ export default function companyPage() {
|
|||
</div>
|
||||
|
||||
<div style="display: ${statisticsStyle}">
|
||||
<span style="color:red">${d.data.staffNum}</span> /
|
||||
<span style="color:red;display: ${staffStyle}">${
|
||||
d.data.staffNum
|
||||
} /</span>
|
||||
<span style="color:green">${d.data.onJobNum}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -488,14 +499,14 @@ export default function companyPage() {
|
|||
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
|
||||
onZoomBehavior={(value) => handleZoomBehavior(value)}
|
||||
/>
|
||||
<TimeLine
|
||||
{/* <TimeLine
|
||||
ref={(r) => (timeLine = r)}
|
||||
onClick={(timeline) => {
|
||||
timeLineSearch(timeline);
|
||||
}}
|
||||
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
|
||||
labelData={labelData}
|
||||
/>
|
||||
/> */}
|
||||
<Spin size="large" spinning={spinning}>
|
||||
<OrgChartComponent
|
||||
setChart={(chart) => (orgChart = chart)}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 144px;
|
||||
background-color: #555;
|
||||
background-color: #1f0ea3;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default function userPage() {
|
|||
// 获取数据
|
||||
useEffect(() => {
|
||||
document.cookie =
|
||||
'ecology_JSessionid=aaav03Zyuvq3A9TG0PEdz; JSESSIONID=aaav03Zyuvq3A9TG0PEdz; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=62316935-a99b-4cbf-a23f-0ac9c37db0da';
|
||||
'ecology_JSessionid=aaaqP0tTaKbFM9rJ6fQjz; JSESSIONID=aaaqP0tTaKbFM9rJ6fQjz; loginuuids=1; Systemlanguid=7; languageidweaver=7; loginidweaver=sysadmin;';
|
||||
d3.json(
|
||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
||||
).then((data) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue