组织管理页面开发
parent
13aed53204
commit
95a20db11c
@ -1,10 +1,521 @@
|
|||||||
@import '~@/utils/utils.less';
|
@import '~@/utils/utils.less';
|
||||||
|
|
||||||
.frameContent {
|
.staffInfoContainer {
|
||||||
|
min-height: 100vh;
|
||||||
|
// background-color: #f5f6fa;
|
||||||
|
|
||||||
|
.announcementBar {
|
||||||
|
background: #e6f7ff;
|
||||||
|
border: 1px solid #91d5ff;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 6px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.announcement {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.announcementLabel {
|
||||||
|
background-color: #fef3c7;
|
||||||
|
color: #92400e;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-right: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.anticon {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollContainer {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollContent {
|
||||||
|
display: inline-block;
|
||||||
|
animation: scroll 30s linear infinite;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainContent {
|
||||||
|
// padding: 12px;
|
||||||
|
|
||||||
|
.contentCard {
|
||||||
|
.ant-card-head {
|
||||||
|
.ant-card-head-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.treeCard {
|
||||||
|
height: 600px;
|
||||||
|
border: 1px solid #e8e8e8;
|
||||||
|
border-radius: 8px;
|
||||||
|
|
||||||
|
.treeHeader {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.treeContainer {
|
||||||
|
height: 520px;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
/* 自定义滚动条样式 */
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: #d9d9d9;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #bfbfbf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.orgTree {
|
||||||
|
.ant-tree-treenode {
|
||||||
|
padding: 2px 0;
|
||||||
|
|
||||||
|
.ant-tree-node-content-wrapper {
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
padding: 4px 8px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #f0f9ff;
|
||||||
|
transform: translateX(2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ant-tree-node-selected {
|
||||||
|
background-color: #e6f7ff !important;
|
||||||
|
box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-tree-iconEle {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-tree-title {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tree节点标题样式 */
|
||||||
|
.tree-node-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
|
||||||
|
.node-title {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 8px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node-count {
|
||||||
|
color: #999;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: auto;
|
||||||
|
background: #f0f0f0;
|
||||||
|
padding: 1px 6px;
|
||||||
|
border-radius: 10px;
|
||||||
|
min-width: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchCard {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid #e8e8e8;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||||
|
|
||||||
|
.ant-card-body {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 搜索表单容器样式 */
|
||||||
|
.searchFormContainer {
|
||||||
|
.searchForm {
|
||||||
|
.ant-form-item {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.ant-form-item-label {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
|
||||||
|
label {
|
||||||
|
color: #333 !important;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input,
|
||||||
|
.ant-select-selector,
|
||||||
|
.ant-picker {
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: #4c7bff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&.ant-select-focused .ant-select-selector,
|
||||||
|
&.ant-picker-focused {
|
||||||
|
border-color: #2d5cf6;
|
||||||
|
box-shadow: 0 0 0 2px rgba(45, 92, 246, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-select-selection-placeholder,
|
||||||
|
.ant-input::placeholder,
|
||||||
|
.ant-picker-input input::placeholder {
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 搜索按钮样式 */
|
||||||
|
.searchButton {
|
||||||
|
background: linear-gradient(135deg, #2d5cf6 0%, #4c7bff 100%);
|
||||||
|
border: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: white;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
box-shadow: 0 2px 8px rgba(45, 92, 246, 0.3);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 16px;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: linear-gradient(135deg, #4c7bff 0%, #6b8fff 100%);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 4px 12px rgba(45, 92, 246, 0.4);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 重置按钮样式 */
|
||||||
|
.resetButton {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
color: #666;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 16px;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
border-color: #4c7bff;
|
||||||
|
color: #2d5cf6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anticon {
|
||||||
|
color: #ff7875;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 展开按钮样式 */
|
||||||
|
.expandButton {
|
||||||
|
color: #2d5cf6;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 0 8px;
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: #4c7bff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actionBar {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.totalInfo {
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exportButton {
|
||||||
|
background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
|
||||||
border: none;
|
border: none;
|
||||||
display: block;
|
color: white;
|
||||||
margin: 0;
|
border-radius: 8px;
|
||||||
padding: 0;
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
// margin-top: -8px;
|
||||||
|
height: 35px;
|
||||||
|
padding: 0 16px;
|
||||||
|
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: linear-gradient(135deg, #73d13d 0%, #95de64 100%);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.anticon {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.addButton {
|
||||||
|
background: linear-gradient(135deg, #fa8c16 0%, #ffa940 100%);
|
||||||
|
border: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 14px;
|
||||||
|
box-shadow: 0 4px 12px rgba(250, 140, 22, 0.3);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
// margin-top: -8px;
|
||||||
|
height: 35px;
|
||||||
|
padding: 0 16px;
|
||||||
|
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: linear-gradient(135deg, #ffa940 0%, #ffc069 100%);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 6px 20px rgba(250, 140, 22, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tableCard {
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||||
|
padding-bottom: 10px;
|
||||||
|
|
||||||
|
.ant-table-wrapper {
|
||||||
|
max-height: 600px;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
/* 自定义滚动条样式 */
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: #d9d9d9;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #bfbfbf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-thead>tr>th {
|
||||||
|
background-color: #fafafa;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody>tr {
|
||||||
|
&:hover>td {
|
||||||
|
background-color: #f5f5f5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
>td {
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginationWrapper {
|
||||||
|
margin-top: 20px;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
.ant-pagination {
|
||||||
|
.ant-pagination-total-text {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-pagination-item {
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&.ant-pagination-item-active {
|
||||||
|
background-color: #2d5cf6;
|
||||||
|
border-color: #2d5cf6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-pagination-prev,
|
||||||
|
.ant-pagination-next {
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainContent {
|
||||||
|
// padding: 12px;
|
||||||
|
|
||||||
|
.contentCard {
|
||||||
|
.ant-card-head {
|
||||||
|
.ant-card-head-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actionBar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.totalInfo {
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.ant-card-body {
|
||||||
|
padding: 12px 24px 0px 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes scroll {
|
||||||
|
0% {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 响应式设计
|
||||||
|
@media (max-width: 1200px) {
|
||||||
|
.staffInfoContainer {
|
||||||
|
.mainContent {
|
||||||
|
.searchCard {
|
||||||
|
.ant-row {
|
||||||
|
.ant-col {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自定义主题色
|
||||||
|
.ant-btn-primary {
|
||||||
|
background-color: #2d5cf6;
|
||||||
|
border-color: #2d5cf6;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background-color: #4c7bff;
|
||||||
|
border-color: #4c7bff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-tree .ant-tree-node-selected {
|
||||||
|
background-color: #e6f7ff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-select-focused .ant-select-selector,
|
||||||
|
.ant-input-affix-wrapper-focused,
|
||||||
|
.ant-input:focus,
|
||||||
|
.ant-input-focused {
|
||||||
|
border-color: #2d5cf6 !important;
|
||||||
|
box-shadow: 0 0 0 2px rgba(45, 92, 246, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标签样式优化
|
||||||
|
.ant-tag {
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按钮组间距调整
|
||||||
|
.ant-space-item {
|
||||||
|
.ant-btn+.ant-btn {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表格链接按钮样式
|
||||||
|
.ant-btn-link {
|
||||||
|
padding: 0 4px;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Button, Col, Form, Row, DatePicker, Space } from 'antd';
|
||||||
|
import { ClearOutlined, SearchOutlined } from '@ant-design/icons';
|
||||||
|
import styles from "../DeptMaintain.less";
|
||||||
|
|
||||||
|
const FormItem = Form.Item;
|
||||||
|
const DeptMaintainRenderSimpleForm = (props) => {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const { submitButtons, handleSearch, handleFormReset, params } = props;
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
form.setFieldsValue({
|
||||||
|
year: params?.year,
|
||||||
|
});
|
||||||
|
}, [params]);
|
||||||
|
|
||||||
|
const onFinish = values => {
|
||||||
|
const searchParams = {
|
||||||
|
...values,
|
||||||
|
year: values.year ? values.year.format('YYYY') : undefined,
|
||||||
|
};
|
||||||
|
handleSearch && handleSearch(searchParams);
|
||||||
|
};
|
||||||
|
|
||||||
|
const myhandleFormReset = () => {
|
||||||
|
form.resetFields();
|
||||||
|
handleFormReset && handleFormReset();
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.searchFormContainer}>
|
||||||
|
<Form
|
||||||
|
form={form}
|
||||||
|
onFinish={onFinish}
|
||||||
|
layout="vertical"
|
||||||
|
className={styles.searchForm}
|
||||||
|
>
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col span={6}>
|
||||||
|
<Form.Item
|
||||||
|
name="year"
|
||||||
|
label="年份"
|
||||||
|
>
|
||||||
|
<DatePicker
|
||||||
|
picker="year"
|
||||||
|
placeholder="请选择年份"
|
||||||
|
style={{ width: '100%' }}
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={18}>
|
||||||
|
<Form.Item label=" " colon={false}>
|
||||||
|
<Space size="middle">
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
htmlType="submit"
|
||||||
|
icon={<SearchOutlined />}
|
||||||
|
className={styles.searchButton}
|
||||||
|
>
|
||||||
|
查询
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={myhandleFormReset}
|
||||||
|
icon={<ClearOutlined />}
|
||||||
|
className={styles.resetButton}
|
||||||
|
>
|
||||||
|
重置
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
export default DeptMaintainRenderSimpleForm;
|
Loading…
Reference in New Issue