mirror of https://github.com/openspug/spug
parent
eaaf105010
commit
8811793ff3
|
@ -22,6 +22,9 @@ export default observer(function () {
|
|||
<SearchForm.Item span={8} title="账户名称">
|
||||
<Input allowClear value={store.f_name} onChange={e => store.f_name = e.target.value} placeholder="请输入"/>
|
||||
</SearchForm.Item>
|
||||
<SearchForm.Item span={8} title="登录IP">
|
||||
<Input allowClear value={store.f_ip} onChange={e => store.f_ip = e.target.value} placeholder="请输入"/>
|
||||
</SearchForm.Item>
|
||||
</SearchForm>
|
||||
<ComTable/>
|
||||
</AuthDiv>
|
||||
|
|
|
@ -10,11 +10,13 @@ class Store {
|
|||
@observable records = [];
|
||||
@observable isFetching = false;
|
||||
|
||||
@observable f_ip;
|
||||
@observable f_name;
|
||||
@observable f_status = '';
|
||||
|
||||
@computed get dataSource() {
|
||||
let records = this.records;
|
||||
if (this.f_ip) records = records.filter(x => includes(x.ip, this.f_ip));
|
||||
if (this.f_name) records = records.filter(x => includes(x.username, this.f_name));
|
||||
if (this.f_status) records = records.filter(x => String(x.is_success) === this.f_status);
|
||||
return records
|
||||
|
|
Loading…
Reference in New Issue