Commit 8155e397 authored by 皮倩雯's avatar 皮倩雯

fix: '日志管理优化'

parent 5d1d94c9
Pipeline #74733 failed with stages
......@@ -295,84 +295,75 @@ const LogCenter = () => {
setFilteredValue(filters.code, filters.statusCode);
};
return (
<div className={styles.omsLog}>
<Row className={styles.head}>
<Col span={24}>
<span style={{ lineHeight: 2, marginLeft: '7px' }}>时间:</span>
<RangePicker
locale={locale}
showTime
format="YYYY-MM-DD HH:mm:ss"
onChange={changeTime}
value={allTime}
allowClear={false}
/>
{/* <Button onClick={() => setTime(1)} style={{ marginLeft: '20px' }}>
近1小时
</Button>
<Button onClick={() => setTime(24)}>近1天</Button>
<Button onClick={() => setTime(24 * 7)}>近1周</Button>
<Button onClick={() => setTime(14 * 24)}>近2周</Button>
<Button onClick={() => setTime(30 * 24)}>近1月</Button> */}
<span style={{ marginLeft: '20px' }}>接口名称:</span>
<Input
style={{ width: '200px' }}
placeholder="请输入接口名称"
onChange={e => {
setRequestUrl(e.target.value);
}}
value={requestUrl}
allowClear
/>
<span style={{ marginLeft: '20px' }}>接口标签:</span>
<Input
style={{ width: '200px' }}
placeholder="请输入接口标签"
onChange={e => {
setLabel(e.target.value);
}}
value={label}
allowClear
/>
<Button
type="primary"
style={{ marginLeft: '10px' }}
onClick={() => {
setPageSize(20);
setCurrentPage(1);
getTableList(1, 20);
setShowSearchStyle(true);
}}
>
查询
</Button>
<Button
icon={<SyncOutlined className={styles.icon} />}
onClick={handleReset}
style={{
marginLeft: '25px',
verticalAlign: 'middle',
marginTop: '-3px',
}}
>
重置
</Button>
</Col>
</Row>
<Spin spinning={loading} tip="loading">
<div className={styles.table}>
<Table
size="small"
bordered
columns={columns}
dataSource={keepTableList}
scroll={{ x: 'max-content', y: 'calc(100vh - 225px)' }}
pagination={false}
onChange={onChangeInput}
/>
</div>
<div className={styles.centerLog}>
<div className={styles.head}>
<span style={{ lineHeight: 2, marginLeft: '7px' }}>时间:</span>
<RangePicker
locale={locale}
showTime
format="YYYY-MM-DD HH:mm:ss"
onChange={changeTime}
value={allTime}
allowClear={false}
/>
<span style={{ marginLeft: '20px' }}>接口名称:</span>
<Input
style={{ width: '200px' }}
placeholder="请输入接口名称"
onChange={e => {
setRequestUrl(e.target.value);
}}
value={requestUrl}
allowClear
/>
<span style={{ marginLeft: '20px' }}>接口标签:</span>
<Input
style={{ width: '200px' }}
placeholder="请输入接口标签"
onChange={e => {
setLabel(e.target.value);
}}
value={label}
allowClear
/>
<Button
type="primary"
style={{ marginLeft: '10px' }}
onClick={() => {
setPageSize(20);
setCurrentPage(1);
getTableList(1, 20);
setShowSearchStyle(true);
}}
>
查询
</Button>
<Button
icon={<SyncOutlined className={styles.icon} />}
onClick={handleReset}
style={{
marginLeft: '25px',
verticalAlign: 'middle',
marginTop: '-3px',
}}
>
重置
</Button>
</div>
<div className={styles.table}>
<Table
size="small"
bordered
columns={columns}
dataSource={keepTableList}
scroll={{ x: 'max-content', y: 'calc(100vh - 225px)' }}
pagination={false}
onChange={onChangeInput}
loading={loading}
/>
</div>
<div className={styles.footer}>
<Pagination
style={{ display: 'flex', justifyContent: 'end', padding: '10px' }}
total={total}
showTotal={(aa, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`}
pageSizeOptions={[10, 20, 40, 100]}
......@@ -382,7 +373,7 @@ const LogCenter = () => {
pageSize={pageSize}
showSizeChanger
/>
</Spin>
</div>
<Modal
title="详细信息"
visible={modalVisible}
......
.omsLog {
.centerLog {
width: 100%;
height: 100%;
.head {
padding: 10px;
background: white;
margin-bottom: 2px;
min-width: 1030px;
}
.chart {
padding: 16px;
background: white;
width: 100%;
height: 52px;
}
.table {
border-top: 1px solid #f0eded;
// overflow: auto;//不要这个,pagination否则无法固定底部
.ant-table-thead tr th {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
background-color: #f6f9fe;
}
.ant-table-body {
height: calc(100vh - 208px);
border-right: white;
overflow: auto !important;
// .ant-table-tbody{
// overflow: scroll !important;
// }
}
.ant-table-cell {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-pagination {
z-index: 999;
border-top: 1px solid #f0eded;
}
.ant-table.ant-table-small {
width: 99%;
margin: 10px auto;
}
.ant-table-pagination {
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
height: calc(100% - 95px);
width: 100%;
background-color: white;
padding: 10px;
overflow: hidden;
margin-bottom: 3px;
}
.ant-spin-container {
.footer{
width: 100%;
height: 42px;
background-color: white;
display: flex;
justify-content: flex-end;
padding: 10px;
}
.icon {
margin-top: -5px !important;
vertical-align: text-bottom;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment