diff --git a/src/components/topBar/index.jsx b/src/components/topBar/index.jsx index 6a82d68..f8a9913 100644 --- a/src/components/topBar/index.jsx +++ b/src/components/topBar/index.jsx @@ -28,7 +28,9 @@ export class TopBar extends React.Component { root: '0', level: '3', fisvitual: '0', + isvitual: '0', }, + colSpan: props.type == 'user' ? 5 : 4, }; } @@ -81,7 +83,7 @@ export class TopBar extends React.Component { return (
- + 数据日期: - + 维度: - + 显示层级: this.handleFormChange({ isvitual: value })} + > + + + + + )} + {/* this.handleFormChange({fisvitual: e.target.checked ? "1": "0"})}>显示虚拟组织 */} diff --git a/src/pages/company.jsx b/src/pages/company.jsx index 6b0e224..067b0f9 100644 --- a/src/pages/company.jsx +++ b/src/pages/company.jsx @@ -86,11 +86,11 @@ export default function companyPage() { useEffect(() => { d3.json( // "/company/data" - '/api/bs/hrmorganization/orgchart/companyData?fclass=0&root=0&date=' + + '/api/bs/hrmorganization/orgchart/companyData?fclass=0&isvitual=0&root=0&date=' + moment(new Date()).format('YYYY-MM-DD'), ).then((data) => { setData(data.data); - setHasRight(data.hasRight); + setHasRight(data?.hasRight); }); }, [true]); @@ -331,6 +331,7 @@ export default function companyPage() { onSearch={(requestData) => { handleSearch(requestData); }} + type="company" url="/api/bs/hrmorganization/orgchart/getCondition?type=company" /> { document.cookie = - 'ecology_JSessionId=abcs4Umove2Bhcz57t6oy; JSESSIONID=abcs4Umove2Bhcz57t6oy; ecology_JSessionid=abcs4Umove2Bhcz57t6oy; languageidweaver=7; loginuuids=1; i_like_gitea=6a881aa47092d822; lang=zh-CN; loginidweaver=1; __randcode__=0ee558a3-ceee-4a97-bea3-00f47801e62a'; + 'ecology_JSessionid=aaa1QNMWge48Bh-3oq6oy; JSESSIONID=aaa1QNMWge48Bh-3oq6oy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=f7afbede-58e5-484e-bd5e-cc38d51ea68c'; d3.json( // "/user/data" '/api/bs/hrmorganization/orgchart/userData?fclass=0&root=0&date=' + @@ -474,6 +474,7 @@ export default function userPage() { setRequestRes(requestData); handleSearch(requestData); }} + type="user" url="/api/bs/hrmorganization/orgchart/getCondition?type=user" />