From c01a806c88ea5d1b73d82ab68327783d166bfde4 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Fri, 15 Sep 2023 17:14:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawer/index.jsx | 19 +++++++++++++++++-- src/components/topBar/index.jsx | 9 ++++++++- src/pages/statisticsTable.jsx | 17 +++++++++++++++-- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/components/drawer/index.jsx b/src/components/drawer/index.jsx index e102ee1..bb17ffb 100644 --- a/src/components/drawer/index.jsx +++ b/src/components/drawer/index.jsx @@ -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..b0f0fb6 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 { @@ -81,7 +82,6 @@ export class TopBar extends React.Component { this.setState({ open: false, confirmLoading: false, - description: '', }); message.success('版本记录成功,请重新刷新页面', 2, 3); } else { @@ -114,6 +114,9 @@ export class TopBar extends React.Component { } else { arr = [...data.companyTree]; } + arr.map((item, index) => { + item.icon = ; + }); this.setState({ rootTreeData: arr, }); @@ -160,6 +163,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, @@ -231,6 +237,7 @@ export class TopBar extends React.Component { onChange={this.onRootChange} loadData={this.onRootLoadData} treeData={rootTreeData} + treeIcon /> 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} 条`, + }} + /> + ; ); -- 2.40.0.windows.1 From e0c1b1c3b54ecef28cf2b7817529b823e9afd9ed Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Fri, 22 Sep 2023 09:44:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=B2=97=E4=BD=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawer/index.jsx | 2 +- src/pages/company.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/drawer/index.jsx b/src/components/drawer/index.jsx index bb17ffb..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, }); diff --git a/src/pages/company.jsx b/src/pages/company.jsx index eafb603..6687a4e 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; } -- 2.40.0.windows.1 From 9f661db803bb5c56697ee4276b4e8dc596b193a5 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 15 Nov 2023 17:08:50 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E6=9D=83?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/company.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/company.jsx b/src/pages/company.jsx index 6687a4e..99fd85e 100644 --- a/src/pages/company.jsx +++ b/src/pages/company.jsx @@ -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)} -- 2.40.0.windows.1 From 1a676ab4a8d8196844687ec47e263810a7025d28 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Tue, 19 Dec 2023 16:28:37 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E5=88=87=E6=8D=A2=20?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/topBar/index.jsx | 12 ++++++------ src/pages/user.jsx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/topBar/index.jsx b/src/components/topBar/index.jsx index b0f0fb6..fa3b8d7 100644 --- a/src/components/topBar/index.jsx +++ b/src/components/topBar/index.jsx @@ -30,6 +30,7 @@ export class TopBar extends React.Component { this.state = { fclasslist: [], rootTreeData: [], //根节点异步树 + treeLoadedKeys: [], treeExpandedKeys: [], requestData: { fclass: '0', @@ -66,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 + @@ -131,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 = @@ -191,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 (
@@ -211,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, 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) => { -- 2.40.0.windows.1