From 8811793ff3fad4cbff2b0ed8403cba5a0fae372f Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 14 Jul 2022 23:50:53 +0800 Subject: [PATCH] =?UTF-8?q?A=20=E7=99=BB=E5=BD=95=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0IP=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/system/login/index.js | 3 +++ spug_web/src/pages/system/login/store.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/spug_web/src/pages/system/login/index.js b/spug_web/src/pages/system/login/index.js index 5f57366..11381b7 100644 --- a/spug_web/src/pages/system/login/index.js +++ b/spug_web/src/pages/system/login/index.js @@ -22,6 +22,9 @@ export default observer(function () { store.f_name = e.target.value} placeholder="请输入"/> + + store.f_ip = e.target.value} placeholder="请输入"/> + diff --git a/spug_web/src/pages/system/login/store.js b/spug_web/src/pages/system/login/store.js index 1ccf1d1..b3ab42b 100644 --- a/spug_web/src/pages/system/login/store.js +++ b/spug_web/src/pages/system/login/store.js @@ -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