mirror of https://github.com/openspug/spug
F 修复过滤条件在页面切换后未正常显示的问题
parent
9215fb846c
commit
56bd21b09b
|
@ -15,7 +15,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="alarm.alarm.view">
|
<AuthCard auth="alarm.alarm.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="任务名称">
|
<SearchForm.Item span={8} title="任务名称">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="alarm.contact.view">
|
<AuthCard auth="alarm.contact.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="姓名">
|
<SearchForm.Item span={8} title="姓名">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="alarm.group.view">
|
<AuthCard auth="alarm.group.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="组名称">
|
<SearchForm.Item span={8} title="组名称">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="config.app.view">
|
<AuthCard auth="config.app.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="应用名称">
|
<SearchForm.Item span={8} title="应用名称">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="config.env.view">
|
<AuthCard auth="config.env.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="环境名称">
|
<SearchForm.Item span={8} title="环境名称">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="config.src.view">
|
<AuthCard auth="config.src.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="服务名称">
|
<SearchForm.Item span={8} title="服务名称">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -90,7 +90,7 @@ class Index extends React.Component {
|
||||||
</Select>
|
</Select>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={7} title="Key">
|
<SearchForm.Item span={7} title="Key">
|
||||||
<Input allowClear 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={3}>
|
<SearchForm.Item span={3}>
|
||||||
<Button type="primary" icon="sync" onClick={this.handleRefresh}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={this.handleRefresh}>刷新</Button>
|
||||||
|
|
|
@ -19,10 +19,10 @@ export default observer(function () {
|
||||||
<AuthCard auth="deploy.app.view">
|
<AuthCard auth="deploy.app.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={6} title="应用名称">
|
<SearchForm.Item span={6} title="应用名称">
|
||||||
<Input allowClear 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={6} title="描述信息">
|
<SearchForm.Item span={6} title="描述信息">
|
||||||
<Input allowClear onChange={e => store.f_desc = e.target.value} placeholder="请输入"/>
|
<Input allowClear value={store.f_desc} onChange={e => store.f_desc = e.target.value} placeholder="请输入"/>
|
||||||
</SearchForm.Item>
|
</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>
|
||||||
|
|
|
@ -16,6 +16,7 @@ import http from 'libs/http';
|
||||||
import envStore from 'pages/config/environment/store';
|
import envStore from 'pages/config/environment/store';
|
||||||
import appStore from 'pages/config/app/store'
|
import appStore from 'pages/config/app/store'
|
||||||
import store from './store';
|
import store from './store';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
class Index extends React.Component {
|
class Index extends React.Component {
|
||||||
|
@ -43,10 +44,12 @@ class Index extends React.Component {
|
||||||
content: (
|
content: (
|
||||||
<Form>
|
<Form>
|
||||||
<Form.Item label="截止日期" help={<div>将删除截止日期<span style={{color: 'red'}}>之前</span>的所有发布申请记录。</div>}>
|
<Form.Item label="截止日期" help={<div>将删除截止日期<span style={{color: 'red'}}>之前</span>的所有发布申请记录。</div>}>
|
||||||
<DatePicker style={{width: 200}} placeholder="请输入" onChange={val => this.setState({expire: val.format('YYYY-MM-DD')})}/>
|
<DatePicker style={{width: 200}} placeholder="请输入"
|
||||||
|
onChange={val => this.setState({expire: val.format('YYYY-MM-DD')})}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="保留记录" help="每个应用每个环境仅保留最新的N条发布申请,优先级高于截止日期">
|
<Form.Item label="保留记录" help="每个应用每个环境仅保留最新的N条发布申请,优先级高于截止日期">
|
||||||
<Input allowClear style={{width: 200}} placeholder="请输入保留个数" onChange={e => this.setState({count: e.target.value})} />
|
<Input allowClear style={{width: 200}} placeholder="请输入保留个数"
|
||||||
|
onChange={e => this.setState({count: e.target.value})}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
),
|
),
|
||||||
|
@ -66,21 +69,23 @@ class Index extends React.Component {
|
||||||
<AuthCard auth="deploy.request.view">
|
<AuthCard auth="deploy.request.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={6} title="发布环境">
|
<SearchForm.Item span={6} title="发布环境">
|
||||||
<Select allowClear onChange={v => store.f_env_id = v} placeholder="请选择">
|
<Select allowClear value={store.f_env_id} onChange={v => store.f_env_id = v} placeholder="请选择">
|
||||||
{envStore.records.map(item => (
|
{envStore.records.map(item => (
|
||||||
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
|
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={6} title="应用名称">
|
<SearchForm.Item span={6} title="应用名称">
|
||||||
<Select allowClear onChange={v => store.f_app_id = v} placeholder="请选择">
|
<Select allowClear value={store.f_app_id} onChange={v => store.f_app_id = v} placeholder="请选择">
|
||||||
{appStore.records.map(item => (
|
{appStore.records.map(item => (
|
||||||
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
|
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={8} title="申请时间">
|
<SearchForm.Item span={8} title="申请时间">
|
||||||
<DatePicker.RangePicker onChange={store.updateDate}/>
|
<DatePicker.RangePicker
|
||||||
|
value={store.f_s_date ? [moment(store.f_s_date), moment(store.f_e_date)] : undefined}
|
||||||
|
onChange={store.updateDate}/>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={4} style={{textAlign: 'right'}}>
|
<SearchForm.Item span={4} style={{textAlign: 'right'}}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -15,14 +15,14 @@ export default observer(function () {
|
||||||
<AuthCard auth="exec.template.view">
|
<AuthCard auth="exec.template.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="模板类型">
|
<SearchForm.Item span={8} title="模板类型">
|
||||||
<Select allowClear onChange={v => store.f_type = v} placeholder="请选择">
|
<Select allowClear value={store.f_type} onChange={v => store.f_type = v} placeholder="请选择">
|
||||||
{store.types.map(item => (
|
{store.types.map(item => (
|
||||||
<Select.Option value={item} key={item}>{item}</Select.Option>
|
<Select.Option value={item} key={item}>{item}</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={8} title="模版名称">
|
<SearchForm.Item span={8} title="模版名称">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -15,15 +15,15 @@ export default observer(function () {
|
||||||
<AuthCard auth="monitor.monitor.view">
|
<AuthCard auth="monitor.monitor.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={6} title="任务名称">
|
<SearchForm.Item span={6} title="任务名称">
|
||||||
<Input allowClear 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={6} title="任务类型">
|
<SearchForm.Item span={6} title="任务类型">
|
||||||
<Select allowClear onChange={v => store.f_type = v} placeholder="请选择">
|
<Select allowClear value={store.f_type} onChange={v => store.f_type = v} placeholder="请选择">
|
||||||
{store.types.map(item => <Select.Option key={item} value={item}>{item}</Select.Option>)}
|
{store.types.map(item => <Select.Option key={item} value={item}>{item}</Select.Option>)}
|
||||||
</Select>
|
</Select>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={6} title="任务状态">
|
<SearchForm.Item span={6} title="任务状态">
|
||||||
<Select allowClear onChange={v => store.f_status = v} placeholder="请选择">
|
<Select allowClear value={store.f_status} onChange={v => store.f_status = v} placeholder="请选择">
|
||||||
<Select.Option value={-3}>未激活</Select.Option>
|
<Select.Option value={-3}>未激活</Select.Option>
|
||||||
<Select.Option value={-2}>已激活</Select.Option>
|
<Select.Option value={-2}>已激活</Select.Option>
|
||||||
<Select.Option value={-1}>待检测</Select.Option>
|
<Select.Option value={-1}>待检测</Select.Option>
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="schedule.schedule.view">
|
<AuthCard auth="schedule.schedule.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={6} title="状态">
|
<SearchForm.Item span={6} title="状态">
|
||||||
<Select allowClear onChange={v => store.f_status = v} placeholder="请选择">
|
<Select allowClear value={store.f_status} onChange={v => store.f_status = v} placeholder="请选择">
|
||||||
<Select.Option value={-3}>未激活</Select.Option>
|
<Select.Option value={-3}>未激活</Select.Option>
|
||||||
<Select.Option value={-2}>已激活</Select.Option>
|
<Select.Option value={-2}>已激活</Select.Option>
|
||||||
<Select.Option value={-1}>待调度</Select.Option>
|
<Select.Option value={-1}>待调度</Select.Option>
|
||||||
|
@ -25,14 +25,14 @@ export default observer(function () {
|
||||||
</Select>
|
</Select>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={6} title="类型">
|
<SearchForm.Item span={6} title="类型">
|
||||||
<Select allowClear onChange={v => store.f_type = v} placeholder="请选择">
|
<Select allowClear value={store.f_type} onChange={v => store.f_type = v} placeholder="请选择">
|
||||||
{store.types.map(item => (
|
{store.types.map(item => (
|
||||||
<Select.Option value={item} key={item}>{item}</Select.Option>
|
<Select.Option value={item} key={item}>{item}</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</SearchForm.Item>
|
</SearchForm.Item>
|
||||||
<SearchForm.Item span={6} title="名称">
|
<SearchForm.Item span={6} title="名称">
|
||||||
<Input allowClear 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={6}>
|
<SearchForm.Item span={6}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
|
@ -4,20 +4,21 @@
|
||||||
* Released under the AGPL-3.0 License.
|
* Released under the AGPL-3.0 License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { observer } from 'mobx-react';
|
||||||
import { Input, Select, Button } from 'antd';
|
import { Input, Select, Button } from 'antd';
|
||||||
import { SearchForm, AuthCard } from 'components';
|
import { SearchForm, AuthCard } from 'components';
|
||||||
import ComTable from './Table';
|
import ComTable from './Table';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
|
|
||||||
export default function () {
|
export default observer(function () {
|
||||||
return (
|
return (
|
||||||
<AuthCard auth="system.account.view">
|
<AuthCard auth="system.account.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="账户名称">
|
<SearchForm.Item span={8} title="账户名称">
|
||||||
<Input allowClear 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="账户状态">
|
<SearchForm.Item span={8} title="账户状态">
|
||||||
<Select allowClear onChange={v => store.f_status = v} placeholder="请选择">
|
<Select allowClear value={store.f_status} onChange={v => store.f_status = v} placeholder="请选择">
|
||||||
<Select.Option value="true">正常</Select.Option>
|
<Select.Option value="true">正常</Select.Option>
|
||||||
<Select.Option value="false">禁用</Select.Option>
|
<Select.Option value="false">禁用</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -32,4 +33,4 @@ export default function () {
|
||||||
<ComTable/>
|
<ComTable/>
|
||||||
</AuthCard>
|
</AuthCard>
|
||||||
)
|
)
|
||||||
}
|
})
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default observer(function () {
|
||||||
<AuthCard auth="system.role.view">
|
<AuthCard auth="system.role.view">
|
||||||
<SearchForm>
|
<SearchForm>
|
||||||
<SearchForm.Item span={8} title="角色名称">
|
<SearchForm.Item span={8} title="角色名称">
|
||||||
<Input allowClear 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}>
|
<SearchForm.Item span={8}>
|
||||||
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
<Button type="primary" icon="sync" onClick={store.fetchRecords}>刷新</Button>
|
||||||
|
|
Loading…
Reference in New Issue