diff --git a/public/img/department.png b/public/img/department.png new file mode 100644 index 0000000..eb3c3d5 Binary files /dev/null and b/public/img/department.png differ 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 })} + > +

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

+

描述:

+