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