From dc2e54528ac6d8d2a1cfc63a723bca3be0ac8f2b Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 28 Jun 2023 17:38:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84=E5=9B=BE?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/img/department.png | Bin 0 -> 1369 bytes src/components/timeline/index.jsx | 24 +++--- src/components/topBar/index.jsx | 117 ++++++++++++++++++++++++------ src/pages/company.jsx | 56 ++++---------- src/pages/user.jsx | 61 ++++++++-------- 5 files changed, 153 insertions(+), 105 deletions(-) create mode 100644 public/img/department.png diff --git a/public/img/department.png b/public/img/department.png new file mode 100644 index 0000000000000000000000000000000000000000..eb3c3d5f485698a9f64f0c6d71b42894b8a79d7c GIT binary patch literal 1369 zcmV-f1*ZCmP)Px)6G=otRCr$Pn_FxYRT#(r-^`X^i?q8~QIJT}ofaWdttQ|t&<%kSmXpsLqN0vZaxsdMdetHDa9{p<4RY? z5*FdYmA3j}SN4)dLLCr@8Xp1JF6ld0`NyWNJ)NtQZ1!0J1fmAd=A@9no4S@Y$6VrP zbRLKpZ-DSpE&+13<>)ZO+RHinN#h_bfMxrP>Los0a@b9B;OjyqWBVnb8o-9RF(#*R z>-Y=Wy)FKol*2*`mk5*$#6K+5hJAm1mDb9&^B|=(E7QzAnaJ}qP z-PV*!xbwDw6KpJp#^sAe;neeP+0Rcdm`#=?p^4*ISljB#8%v~2q1L2ZYR<=3Wy7ru#ZtyICK-4${phc)C zqAoKOd{Id25P1?nV85{*3_r^h#Av!^G<4UXjE$}JCV)tMH%NI^rWoS9c_dtSSjNV) z0Gyx0LPZfBHbcQ?A?+NICp*9m0Jk4aB>-N05h`_nV_!gUTpu-c?Fm8cb(trJK)}T; zz=23Y*V-2d0HXy2`$b6j;so8z3bZFXVELin0=~(KpX?GP^6SYCNF}!-cJ?XG`KMVRJYectk07Z3$UF&|3LF`pYR*(kIFw+USADbUyH2sis=Vo^4tF@4?!r<&+rd?#=e@3v6&#Ma75SPDWnWo2; zum4anUA}C+#aM;l9Tk$PigML=ZM^T#R~oKnG7ttJ6txINB>+Wu)AE{fsRQzgvk09n b`VRO91lhP>$d-bB00000NkvXXu0mjf*tdK8 literal 0 HcmV?d00001 diff --git a/src/components/timeline/index.jsx b/src/components/timeline/index.jsx index ae5fc01..d33bd0e 100644 --- a/src/components/timeline/index.jsx +++ b/src/components/timeline/index.jsx @@ -2,7 +2,7 @@ * @Author: Chengliang 1546584672@qq.com * @Date: 2023-06-25 16:33:21 * @LastEditors: Chengliang 1546584672@qq.com - * @LastEditTime: 2023-06-27 10:51:02 + * @LastEditTime: 2023-06-28 16:02:39 * @FilePath: /org-chart-frant/src/components/timeline/index.jsx * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -41,17 +41,17 @@ export default class TimeLine extends React.Component { // }); // }); const datas = [ - { key: 0, title: '当前版本', color: 'blue', time: '2022-01-09' }, - { key: 1, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 2, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 3, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 4, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 5, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 6, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 7, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 8, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 9, title: '测试', color: 'grey', time: '2022-01-09' }, - { key: 10, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 0, id: 0, title: '当前版本', color: 'blue', time: '' }, + { key: 1, id: 1, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 2, id: 2, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 3, id: 3, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 4, id: 4, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 5, id: 5, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 6, id: 6, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 7, id: 7, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 8, id: 8, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 9, id: 9, title: '测试', color: 'grey', time: '2022-01-09' }, + { key: 10, id: 10, title: '测试', color: 'grey', time: '2022-01-09' }, ]; this.setState({ timelineList: datas, diff --git a/src/components/topBar/index.jsx b/src/components/topBar/index.jsx index 5dba488..d295165 100644 --- a/src/components/topBar/index.jsx +++ b/src/components/topBar/index.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { QuestionCircleOutlined } from '@ant-design/icons'; import style from './index.less'; import { DatePicker, @@ -10,8 +11,13 @@ import { Dropdown, Menu, TreeSelect, + Tooltip, + Modal, + Input, + message, } from 'antd'; const { Option } = Select; +const { TextArea } = Input; import moment from 'moment'; import 'moment/locale/zh-cn'; import locale from 'antd/lib/date-picker/locale/zh_CN'; @@ -30,6 +36,9 @@ export class TopBar extends React.Component { level: '3', fisvitual: '0', }, + open: false, + confirmLoading: false, + description: '', }; } @@ -42,13 +51,35 @@ export class TopBar extends React.Component { this.setState({ requestData }); } + onChange = (e) => { + this.setState({ description: e.target.value }); + }; + /** - * 组织维度改变 + * 弹窗确认 */ - changeFclass() { - debugger; - this.getSeatchCondition(this.props.url); - } + handleOk = () => { + const { description, requestData } = this.state; + if (description.length == 0) { + return message.error('请填写描述信息'); + } + this.setState({ confirmLoading: true }); + setTimeout(() => { + this.setState({ open: false, confirmLoading: false, description: '' }); + message.success('版本记录成功,请重新刷新页面'); + }, 2000); + // let api = '/api/bs/hrmorganization/orgchart/synchronousData?flcass='+requestData.fclass+ '&description=' +description; + // fetch(api) + // .then((res) => res.json()) + // .then((data) => { + // if (data.code == 200) { + // this.setState({ open: false, confirmLoading: false,description:'' }); + // message.success('版本记录成功,请重新刷新页面'); + // } else { + // message.error('版本记录失败,请联系相关人员处理数据'); + // } + // }); + }; handleExportMenuClick(e) { this.props.onExport(e.key == '1' ? 'png' : 'pdf'); @@ -93,11 +124,10 @@ export class TopBar extends React.Component { setTimeout(() => { this.getNodeTreeNode(id); resolve(undefined); - }, 1000); + }, 500); }); onRootChange = (value) => { - debugger; let requestData = { ...this.state.requestData, root: value }; this.setState({ requestData }); }; @@ -140,9 +170,8 @@ export class TopBar extends React.Component { ); render() { - const { disabled } = this.props; - debugger; - const { rootTreeData } = this.state; + const { disabled, type } = this.props; + const { rootTreeData, open, confirmLoading } = this.state; return (
@@ -154,8 +183,17 @@ export class TopBar extends React.Component { style={{ width: 140 }} value={this.state.requestData.fclass} onChange={(value) => { - this.handleFormChange({ fclass: value }); - this.props.onSearch(this.state.requestData); + const requestData = { + fclass: value, + root: undefined, + level: '3', + fisvitual: '0', + }; + this.handleFormChange(requestData); + this.getSeatchCondition( + `/api/bs/hrmorganization/orgchart/getCondition?fclass=${value}&type=${this.props.type}`, + ); + this.props.onSearch(requestData); }} > {this.state.fclasslist.map((item) => ( @@ -182,6 +220,7 @@ export class TopBar extends React.Component { this.handleFormChange({ fisvitual: e.target.checked ? '1' : '0', @@ -190,6 +229,15 @@ export class TopBar extends React.Component { > 显示虚拟组织 + + + 显示层级: @@ -207,16 +255,18 @@ export class TopBar extends React.Component { - + {type == 'user' && ( + + )} + + this.setState({ open: false })} + > +

+ 提示:版本操作耗时较长,请谨慎操作(版本仅记录当前维度的数据) +

+

描述:

+