mirror of https://github.com/openspug/spug
improve component SearchForm
parent
dc5028ee3a
commit
73d859aadb
|
@ -3,45 +3,49 @@
|
|||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.searchForm :global(.ant-form-item) {
|
||||
display: flex;
|
||||
}
|
||||
:global(.ant-form-item) {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.searchForm :global(.ant-form-item-control-wrapper) {
|
||||
flex: 1;
|
||||
}
|
||||
:global(.ant-form-item-control-wrapper) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.searchForm :global(.ant-form-item-label) {
|
||||
padding-right: 8px;
|
||||
:global(.ant-form-item-label) {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
:global(.ant-form-item-control) {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.statisticsCard {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.statisticsCard span {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
display: inline-block;
|
||||
line-height: 22px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
span {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
display: inline-block;
|
||||
line-height: 22px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.statisticsCard p {
|
||||
font-size: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0;
|
||||
}
|
||||
p {
|
||||
font-size: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.statisticsCard em {
|
||||
background-color: #e8e8e8;
|
||||
position: absolute;
|
||||
height: 56px;
|
||||
width: 1px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
em {
|
||||
background-color: #e8e8e8;
|
||||
position: absolute;
|
||||
height: 56px;
|
||||
width: 1px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tableCard {
|
||||
|
|
|
@ -79,7 +79,11 @@ export function human_time(date) {
|
|||
const hour = now.getHours() < 10 ? '0' + now.getHours() : now.getHours();
|
||||
const minute = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes();
|
||||
const second = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds();
|
||||
return `${human_date()} ${hour}:${minute}:${second}`
|
||||
return `${hour}:${minute}:${second}`
|
||||
}
|
||||
|
||||
export function human_datetime(date) {
|
||||
return `${human_date(date)} ${human_time(date)}`
|
||||
}
|
||||
|
||||
// 生成唯一id
|
||||
|
|
|
@ -12,9 +12,9 @@ import Ext1Form from './Ext1Form';
|
|||
import Ext2Form from './Ext2Form';
|
||||
import Approve from './Approve';
|
||||
import ComTable from './Table';
|
||||
import http from 'libs/http';
|
||||
import { http, includes } from 'libs';
|
||||
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 moment from 'moment';
|
||||
|
||||
|
@ -74,14 +74,26 @@ class Index extends React.Component {
|
|||
</Breadcrumb>
|
||||
<SearchForm>
|
||||
<SearchForm.Item span={6} title="发布环境">
|
||||
<Select allowClear value={store.f_env_id} onChange={v => store.f_env_id = v} placeholder="请选择">
|
||||
<Select
|
||||
allowClear
|
||||
showSearch
|
||||
value={store.f_env_id}
|
||||
filterOption={(i, o) => includes(o.children, i)}
|
||||
onChange={v => store.f_env_id = v}
|
||||
placeholder="请选择">
|
||||
{envStore.records.map(item => (
|
||||
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</SearchForm.Item>
|
||||
<SearchForm.Item span={6} title="应用名称">
|
||||
<Select allowClear value={store.f_app_id} onChange={v => store.f_app_id = v} placeholder="请选择">
|
||||
<Select
|
||||
allowClear
|
||||
showSearch
|
||||
value={store.f_app_id}
|
||||
filterOption={(i, o) => includes(o.children, i)}
|
||||
onChange={v => store.f_app_id = v}
|
||||
placeholder="请选择">
|
||||
{appStore.records.map(item => (
|
||||
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
|
||||
))}
|
||||
|
|
Loading…
Reference in New Issue