Commit c216bc99 authored by 皮倩雯's avatar 皮倩雯

登录日志界面功能优化

parent 92f9f736
Pipeline #32372 passed with stages
in 27 minutes 3 seconds
......@@ -27,6 +27,7 @@ const LoginLog = () => {
const [endTime, setEndTime] = useState(
moment(new Date(), 'YYYY-MM-DD HH:mm:ss'), // 默认值当前时间
);
const [filteredValue,setFilteredValue] =useState([])
const columns = [
// {
......@@ -46,6 +47,7 @@ const LoginLog = () => {
key: 'LoginName',
filters: LoginNameFilters,
onFilter: (value, record) => record.LoginName === value,
filteredValue
},
{
title: '用户名',
......@@ -53,6 +55,7 @@ const LoginLog = () => {
key: 'ShowName',
filters: ShowNameFilters,
onFilter: (value, record) => record.ShowName === value,
filteredValue
},
{
title: '系统类型',
......@@ -60,6 +63,7 @@ const LoginLog = () => {
key: 'SystemType',
filters: SystemTypeFilters,
onFilter: (value, record) => record.SystemType === value,
filteredValue
},
// {
// title: '终端',
......@@ -131,6 +135,11 @@ const LoginLog = () => {
};
const handleReset = () =>{
setStartTime(moment().startOf('week'))
setFilteredValue([])
}
const onChangeInput =(filters) =>{
console.log('filters',filters);
setFilteredValue(filters.LoginName,filters.ShowName,filters.SystemType)
}
return (
<>
......@@ -183,6 +192,7 @@ const LoginLog = () => {
showQuickJumper: true,
showSizeChanger: true,
}}
onChange={onChangeInput}
/>
</div>
</Spin>
......
......@@ -143,6 +143,7 @@ const UserManage = () => {
const [currentOrgArea, setCurrentOrgArea] = useState('');
const [currentOrgDistinct, setCurrentOrgDistinct] = useState('');
const [saveExtentFlag, setSaveExtentFlag] = useState(0);
const [filteredValue,setFilteredValue] =useState([]);
const { Search } = Input;
const setRowClassName = record =>
record.userID === selectColor.userID ? styles.clickRowStyle : '';
......@@ -186,6 +187,7 @@ const UserManage = () => {
width: 150,
ellipsis: true,
filters: orgFilters,
filteredValue,
onFilter: (value, record) => record.OUName === value,
},
{
......@@ -1130,6 +1132,7 @@ const UserManage = () => {
let res = newres.data;
setTreeLoading(false);
setSearchWord('');
setFilteredValue([])
// 第一次加载,默认选择第一个组织
onSelect([res[0].id], false);
} else {
......@@ -1146,6 +1149,10 @@ const UserManage = () => {
message.error(err);
});
};
const onChangeInput = (filters) =>{
setFilteredValue(filters.OUName);
}
// 更改机构范围
const submitExtent = (extent, areaName) => {
if (extent) {
......@@ -1335,6 +1342,7 @@ const UserManage = () => {
showQuickJumper: true,
showSizeChanger: true,
}}
onChange={onChangeInput}
/>
</div>
......
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