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