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

登录日志界面功能优化

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