File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
spug_web/src/pages/system/login Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ export default observer(function () {
2222 < SearchForm . Item span = { 8 } title = "账户名称" >
2323 < Input allowClear value = { store . f_name } onChange = { e => store . f_name = e . target . value } placeholder = "请输入" />
2424 </ SearchForm . Item >
25+ < SearchForm . Item span = { 8 } title = "登录IP" >
26+ < Input allowClear value = { store . f_ip } onChange = { e => store . f_ip = e . target . value } placeholder = "请输入" />
27+ </ SearchForm . Item >
2528 </ SearchForm >
2629 < ComTable />
2730 </ AuthDiv >
Original file line number Diff line number Diff line change @@ -10,11 +10,13 @@ class Store {
1010 @observable records = [ ] ;
1111 @observable isFetching = false ;
1212
13+ @observable f_ip ;
1314 @observable f_name ;
1415 @observable f_status = '' ;
1516
1617 @computed get dataSource ( ) {
1718 let records = this . records ;
19+ if ( this . f_ip ) records = records . filter ( x => includes ( x . ip , this . f_ip ) ) ;
1820 if ( this . f_name ) records = records . filter ( x => includes ( x . username , this . f_name ) ) ;
1921 if ( this . f_status ) records = records . filter ( x => String ( x . is_success ) === this . f_status ) ;
2022 return records
You can’t perform that action at this time.
0 commit comments