diff --git a/src/components/drawer/index.jsx b/src/components/drawer/index.jsx index e102ee1..bea0e32 100644 --- a/src/components/drawer/index.jsx +++ b/src/components/drawer/index.jsx @@ -311,7 +311,7 @@ export default class DrawerComponents extends React.Component { changeDetail = () => { const { detailType, params } = this.state; let type = detailType == 'chart' ? 'table' : 'chart'; - const showJob = params.fclass == '0' ? '1' : '0'; + const showJob = this.state.showJob ? '1' : '0'; this.setState({ detailType: type, }); @@ -342,7 +342,7 @@ export default class DrawerComponents extends React.Component { return ( ) ) : ( - +
+
`共 ${dataSource.length} 条`, + }} + /> + )} ); diff --git a/src/components/topBar/index.jsx b/src/components/topBar/index.jsx index 06b3f73..fa3b8d7 100644 --- a/src/components/topBar/index.jsx +++ b/src/components/topBar/index.jsx @@ -21,6 +21,7 @@ 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'; moment.locale('zh-cn'); export class TopBar extends React.Component { @@ -29,6 +30,7 @@ export class TopBar extends React.Component { this.state = { fclasslist: [], rootTreeData: [], //根节点异步树 + treeLoadedKeys: [], treeExpandedKeys: [], requestData: { fclass: '0', @@ -65,10 +67,6 @@ export class TopBar extends React.Component { return message.error('请填写描述信息'); } this.setState({ confirmLoading: true }); - // setTimeout(() => { - // this.setState({ open: false, confirmLoading: false, description: '' }); - // message.success('版本记录成功,请重新刷新页面'); - // }, 2000); let api = '/api/bs/hrmorganization/orgchart/versionRecord?fclass=' + requestData.fclass + @@ -81,7 +79,6 @@ export class TopBar extends React.Component { this.setState({ open: false, confirmLoading: false, - description: '', }); message.success('版本记录成功,请重新刷新页面', 2, 3); } else { @@ -114,6 +111,9 @@ export class TopBar extends React.Component { } else { arr = [...data.companyTree]; } + arr.map((item, index) => { + item.icon = ; + }); this.setState({ rootTreeData: arr, }); @@ -128,7 +128,7 @@ export class TopBar extends React.Component { */ onRootLoadData = (treeNode) => new Promise((resolve) => { - const { id } = treeNode.props; + const { id } = treeNode; setTimeout(() => { const { fclass } = this.state.requestData; let api = @@ -160,6 +160,9 @@ export class TopBar extends React.Component { fetch(url) .then((res) => res.json()) .then((data) => { + data.companyTree.map((item, index) => { + item.icon = ; + }); this.setState({ fclasslist: data.fclasslist, rootTreeData: data.companyTree, @@ -185,7 +188,7 @@ export class TopBar extends React.Component { render() { const { disabled, type } = this.props; - const { rootTreeData, open, confirmLoading } = this.state; + const { rootTreeData, open, confirmLoading, treeExpandedKeys } = this.state; return (
@@ -205,6 +208,9 @@ export class TopBar extends React.Component { hidedept: '0', }; this.handleFormChange(requestData); + this.setState({ + rootTreeData: [], + }); this.getNodeTreeNode( `/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${value}`, false, @@ -231,6 +237,7 @@ export class TopBar extends React.Component { onChange={this.onRootChange} loadData={this.onRootLoadData} treeData={rootTreeData} + treeIcon />
diff --git a/src/pages/company.jsx b/src/pages/company.jsx index eafb603..99fd85e 100644 --- a/src/pages/company.jsx +++ b/src/pages/company.jsx @@ -130,7 +130,7 @@ export default function companyPage() { if (d.data.ftype == 0) { return 220; } else if (d.data.ftype == 1) { - return 160; + return 144; } else if (d.data.ftype == 2) { return 144; } @@ -448,7 +448,7 @@ export default function companyPage() { handleChange(requestData); }} type="company" - url="/api/bs/hrmorganization/orgchart/getCondition?fclass=0&type=company" + url="/api/bs/hrmorganization/orgchart/getCondition?fclass=0&type=company&id=0" /> handleTopLayoutClick(progressBtn)} diff --git a/src/pages/statisticsTable.jsx b/src/pages/statisticsTable.jsx index 79b5c73..5c90376 100644 --- a/src/pages/statisticsTable.jsx +++ b/src/pages/statisticsTable.jsx @@ -2,7 +2,7 @@ * @Author: Chengliang 1546584672@qq.com * @Date: 2023-09-11 15:33:27 * @LastEditors: Chengliang 1546584672@qq.com - * @LastEditTime: 2023-09-13 17:49:16 + * @LastEditTime: 2023-09-15 11:39:05 * @FilePath: /org-chart-frant/src/pages/statisticsTable.jsx * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -81,7 +81,20 @@ const StatisticsTable = () => { return ( <>
-
; +
`共 ${dataSource.length} 条`, + }} + /> + ; ); diff --git a/src/pages/user.jsx b/src/pages/user.jsx index 0321098..a92b7ea 100644 --- a/src/pages/user.jsx +++ b/src/pages/user.jsx @@ -99,7 +99,7 @@ export default function userPage() { // 获取数据 useEffect(() => { document.cookie = - 'ecology_JSessionid=aaaQRFwOgYRXPc88EZiQy; JSESSIONID=aaaQRFwOgYRXPc88EZiQy; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=0418808b-1045-4624-bea6-5b308360da7b'; + 'ecology_JSessionid=aaahTt6JHXEIM-HoSW-Xy; JSESSIONID=aaahTt6JHXEIM-HoSW-Xy; Systemlanguid=7; languageidweaver=7; loginuuids=2773; __randcode__=a8294fa0-56d7-430f-a35b-139d73474682; loginidweaver=zhangxy16'; d3.json( '/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0', ).then((data) => {