Skip to content

Commit

Permalink
A 应用管理添加描述信息过滤 #130
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Jun 25, 2020
1 parent 4307f25 commit 7fe2cf5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions spug_web/src/pages/deploy/app/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ class ComTable extends React.Component {
if (store.f_name) {
data = data.filter(item => item['name'].toLowerCase().includes(store.f_name.toLowerCase()))
}
if (store.f_desc) {
data = data.filter(item => item['desc'] && item['desc'].toLowerCase().includes(store.f_desc.toLowerCase()))
}

return (
<Table
Expand Down
5 changes: 4 additions & 1 deletion spug_web/src/pages/deploy/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ export default observer(function () {
return (
<AuthCard auth="deploy.app.view">
<SearchForm>
<SearchForm.Item span={8} title="应用名称">
<SearchForm.Item span={6} title="应用名称">
<Input allowClear onChange={e => store.f_name = e.target.value} placeholder="请输入"/>
</SearchForm.Item>
<SearchForm.Item span={6} title="描述信息">
<Input allowClear onChange={e => store.f_desc = e.target.value} placeholder="请输入"/>
</SearchForm.Item>
<SearchForm.Item span={8}>
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
</SearchForm.Item>
Expand Down
1 change: 1 addition & 0 deletions spug_web/src/pages/deploy/app/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Store {
@observable ext2Visible = false;

@observable f_name;
@observable f_desc;

fetchRecords = () => {
this.isFetching = true;
Expand Down

0 comments on commit 7fe2cf5

Please sign in to comment.