mirror of https://github.com/openspug/spug
A 应用管理添加描述信息过滤 #130
parent
4307f252ea
commit
7fe2cf599f
|
@ -127,6 +127,9 @@ class ComTable extends React.Component {
|
||||||
if (store.f_name) {
|
if (store.f_name) {
|
||||||
data = data.filter(item => item['name'].toLowerCase().includes(store.f_name.toLowerCase()))
|
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 (
|
return (
|
||||||
<Table
|
<Table
|
||||||
|
|
|
@ -18,9 +18,12 @@ export default observer(function () {
|
||||||
return (
|
return (
|
||||||
<AuthCard auth="deploy.app.view">
|
<AuthCard auth="deploy.app.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="应用名称">
|
<SearchForm.Item span={6} title="应用名称">
|
||||||
<Input allowClear onChange={e => store.f_name = e.target.value} placeholder="请输入"/>
|
<Input allowClear onChange={e => store.f_name = e.target.value} placeholder="请输入"/>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
|
<SearchForm.Item span={6} title="描述信息">
|
||||||
|
<Input allowClear onChange={e => store.f_desc = e.target.value} placeholder="请输入"/>
|
||||||
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={8}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
|
|
|
@ -19,6 +19,7 @@ class Store {
|
||||||
@observable ext2Visible = false;
|
@observable ext2Visible = false;
|
||||||
|
|
||||||
@observable f_name;
|
@observable f_name;
|
||||||
|
@observable f_desc;
|
||||||
|
|
||||||
fetchRecords = () => {
|
fetchRecords = () => {
|
||||||
this.isFetching = true;
|
this.isFetching = true;
|
||||||
|
|
Loading…
Reference in New Issue