From 9de66a0534b07fbd3a7dfc13c83d74f5199b9ddb Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 29 Apr 2020 17:46:07 +0800 Subject: [PATCH] =?UTF-8?q?A=20=E6=B7=BB=E5=8A=A0=E4=B8=BB=E6=9C=BA?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=BF=9E=E6=8E=A5=E5=9C=B0=E5=9D=80=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=A1=B9=20#61?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/host/Table.js | 3 +++ spug_web/src/pages/host/index.js | 9 ++++++--- spug_web/src/pages/host/store.js | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/spug_web/src/pages/host/Table.js b/spug_web/src/pages/host/Table.js index 0595490..5543c5b 100644 --- a/spug_web/src/pages/host/Table.js +++ b/spug_web/src/pages/host/Table.js @@ -78,6 +78,9 @@ class ComTable extends React.Component { if (store.f_zone) { data = data.filter(item => item['zone'].toLowerCase().includes(store.f_zone.toLowerCase())) } + if (store.f_host) { + data = data.filter(item => item['hostname'].toLowerCase().includes(store.f_host.toLowerCase())) + } return ( diff --git a/spug_web/src/pages/host/index.js b/spug_web/src/pages/host/index.js index ebae285..5f13a3a 100644 --- a/spug_web/src/pages/host/index.js +++ b/spug_web/src/pages/host/index.js @@ -14,17 +14,20 @@ export default observer(function () { return ( - + - + store.f_name = e.target.value} placeholder="请输入"/> - + + store.f_host = e.target.value} placeholder="请输入"/> + + diff --git a/spug_web/src/pages/host/store.js b/spug_web/src/pages/host/store.js index a1f9269..9bb731c 100644 --- a/spug_web/src/pages/host/store.js +++ b/spug_web/src/pages/host/store.js @@ -16,6 +16,7 @@ class Store { @observable f_name; @observable f_zone; + @observable f_host; fetchRecords = () => { this.isFetching = true;