Commit f68c2cf4 authored by 陈前坚's avatar 陈前坚

perf: 查找用户相关操作

parent ebe22401
Pipeline #22372 skipped with stages
......@@ -8,6 +8,7 @@ import {
Button,
notification,
message,
Tooltip,
Spin,
} from 'antd';
import { SwapRightOutlined } from '@ant-design/icons';
......@@ -51,13 +52,24 @@ const OmsLog = () => {
key: 'label',
width: 360,
},
{
title: '操作对象信息',
dataIndex: 'shortInfo',
key: 'shortInfo',
ellipsis: 'true',
render: record => (
<Tooltip placement="left" title={record}>
{record}
</Tooltip>
),
},
{
title: '优先级',
dataIndex: 'level',
key: 'level',
dataIndex: 'levelStr',
key: 'levelStr',
width: 100,
filters: levelFilters,
onFilter: (value, record) => record.level === value,
onFilter: (value, record) => record.levelStr === value,
render: record => {
if (record === '高') {
return <span style={{ color: '#ff7875' }}></span>;
......@@ -71,13 +83,6 @@ const OmsLog = () => {
return record;
},
},
{
title: '详情',
dataIndex: 'shortInfo',
key: 'shortInfo',
ellipsis: 'true',
// width: 300,
},
];
// 在起止时间任意一个变化后获取数据
useEffect(() => {
......@@ -103,9 +108,10 @@ const OmsLog = () => {
if (!res.root) {
setData([]);
} else {
// setData(res.root.filter(item => item.label!=="ServiceInput"&&item.label!=="ServiceReturn"));
setData(res.root);
// 过滤优先级
let arr1 = res.root.map(item => item.level);
let arr1 = res.root.map(item => item.levelStr);
arr1 = arr1.filter((value, index) => arr1.indexOf(value) === index);
setLevelFilters(arr1.map(item => ({ text: item, value: item })));
}
......
......@@ -3,7 +3,7 @@ import { Modal, Form, Input, notification, message } from 'antd';
import { updateUserPassword } from '@/services/userCenter/userManage/api';
const ChangePasswordModal = props => {
const { visible, currentUser, onCancel } = props;
const { visible, currentUser, onSelect, onCancel } = props;
const [passwordForm] = Form.useForm(); // 修改密码
useEffect(() => {
......@@ -34,6 +34,7 @@ const ChangePasswordModal = props => {
.then(res => {
if (res.code === 0) {
onCancel();
onSelect([`${currentUser.OUID}`]);
notification.success({
message: '提交成功',
duration: 2,
......
......@@ -920,6 +920,7 @@ const UserManage = () => {
<ChangePasswordModal
visible={passwordVisible}
currentUser={currentUser}
onSelect={onSelect}
onCancel={() => setPasswordVisible(false)}
/>
{/* 编辑用户 */}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment