Commit f0a8e78b authored by 皮倩雯's avatar 皮倩雯
parents 17fe8003 5946debb
Pipeline #52556 waiting for manual action with stages
......@@ -142,6 +142,7 @@
"sortablejs": "^1.13.0",
"styled-components": "4.2.0",
"use-merge-value": "^1.0.2",
"react-color": "^2.19.3",
"voca": "^1.4.0"
},
"devDependencies": {
......
......@@ -37,8 +37,7 @@ const OmsLog = () => {
width: 150,
defaultSortOrder: 'descend',
sortDirections: ['descend', 'ascend'],
sorter: (a, b) =>
new Date(a.LogTime).getTime() - new Date(b.LogTime).getTime(),
sorter: (a, b) => new Date(a.LogTime).getTime() - new Date(b.LogTime).getTime(),
},
{
title: '接口名称',
......@@ -65,8 +64,8 @@ const OmsLog = () => {
width: 850,
ellipsis: 'true',
render: record => (
<Tooltip placement="left" title={decodeURI(record)}>
{decodeURI(record)}
<Tooltip placement="left" title={record}>
{record}
</Tooltip>
),
},
......@@ -110,10 +109,7 @@ const OmsLog = () => {
const searchStyle1 = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(label, 'g'),
`<span style='color:red'>${label}</span>`,
);
n = val.replace(new RegExp(label, 'g'), `<span style='color:red'>${label}</span>`);
} else {
n = val;
}
......@@ -180,10 +176,7 @@ const OmsLog = () => {
const setTime = time => {
setEndTime(moment(new Date(), 'YYYY-MM-DD HH:mm:ss'));
setStartTime(
moment(
new Date(new Date().getTime() - time * 60 * 60 * 1000),
'YYYY-MM-DD HH:mm:ss',
),
moment(new Date(new Date().getTime() - time * 60 * 60 * 1000), 'YYYY-MM-DD HH:mm:ss'),
);
};
const handleReset = () => {
......@@ -249,8 +242,8 @@ const OmsLog = () => {
<Button
type="primary"
style={{ marginLeft: '10px' }}
onClick={() =>{
getData()
onClick={() => {
getData();
setShowSearchStyle(true);
}}
>
......@@ -278,8 +271,7 @@ const OmsLog = () => {
dataSource={data}
scroll={{ x: 'max-content', y: 'calc(100vh - 230px)' }}
pagination={{
showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`,
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: 20,
showQuickJumper: true,
......
......@@ -60,10 +60,7 @@ const ServiceLog = () => {
message: '时间设置有误',
description: '起始时间应该早于结束时间',
});
} else if (
(startMonth !== endMonth && startYear === endYear) ||
startYear !== endYear
) {
} else if ((startMonth !== endMonth && startYear === endYear) || startYear !== endYear) {
notification.info({
message: '时间设置提示',
description: '不允许跨月份查询',
......@@ -133,14 +130,11 @@ const ServiceLog = () => {
},
];
// 模糊查询匹配的样式
const searchStyle = val => {
// 模糊查询匹配的样式
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(searchWord, 'g'),
`<span style='color:red'>${searchWord}</span>`,
);
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
} else {
n = val;
}
......@@ -242,12 +236,7 @@ const ServiceLog = () => {
const setTime = (time, value) => {
setTimeInterval(value);
setEndTime(moment(new Date(), 'YYYY-MM-DD HH:mm:ss'));
setStartTime(
moment(
new Date(new Date().getTime() - time * 60 * 1000),
'YYYY-MM-DD HH:mm:ss',
),
);
setStartTime(moment(new Date(new Date().getTime() - time * 60 * 1000), 'YYYY-MM-DD HH:mm:ss'));
};
// 设置返回状态
const changeStatus = value => {
......@@ -337,9 +326,7 @@ const ServiceLog = () => {
<Spin spinning={loading} tip="loading">
<Row style={{ background: 'white' }}>
<Col span={8} style={{ paddingTop: '8px', paddingLeft: '5px' }}>
<span style={{ fontSize: '14px', fontWeight: '600' }}>
访问量统计
</span>
<span style={{ fontSize: '14px', fontWeight: '600' }}>访问量统计</span>
<span style={{ paddingLeft: '60%' }}>间隔:</span>
<Select
defaultValue="每小时"
......@@ -355,14 +342,10 @@ const ServiceLog = () => {
</Select>
</Col>
<Col span={7} offset={1} style={{ paddingTop: '8px' }}>
<span style={{ fontSize: '14px', fontWeight: '600' }}>
接口调用频次统计
</span>
<span style={{ fontSize: '14px', fontWeight: '600' }}>接口调用频次统计</span>
</Col>
<Col span={7} offset={1} style={{ paddingTop: '8px' }}>
<span style={{ fontSize: '14px', fontWeight: '600' }}>
接口平均耗时统计
</span>
<span style={{ fontSize: '14px', fontWeight: '600' }}>接口平均耗时统计</span>
</Col>
</Row>
<Row className={styles.chart}>
......@@ -403,12 +386,7 @@ const ServiceLog = () => {
Path: { alias: '接口调用频次' },
}}
>
<Axis
name="Path"
label=""
title={{ offset: 20 }}
className={styles.fontColor}
/>
<Axis name="Path" label="" title={{ offset: 20 }} className={styles.fontColor} />
<Axis name="Count" title />
<Interval position="Path*Count" />
<Tooltip shared lock />
......@@ -442,8 +420,7 @@ const ServiceLog = () => {
dataSource={dataTable}
scroll={{ x: 'max-content', y: 'calc(100vh - 580px)' }}
pagination={{
showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`,
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: 20,
showQuickJumper: true,
......
.siteConfigContainer{
.siteConfigContainer {}
.mask {
position: fixed;
top: 0;
left: 0;
width: 100vh;
height: 100vh;
// z-index: 1;
}
.colorBox {
.colorSwatch {
display: flex;
justify-content: center;
width: 80px;
height: 30px;
line-height: 30px;
text-align: center;
border: 1px solid #ccc;
border-radius: 2px;
}
.popover {
position: absolute;
z-index: 2;
}
}
\ No newline at end of file
......@@ -260,22 +260,22 @@ const NewSelectUser = props => {
</div>
{/* 复选框模块 */}
<div className={styles.checkScrollBox}>
<Spin spinning={loading}>
<div className={styles.checkContainer}>
{allList.map((item, index) => (
<div className={styles.checkBoxContent} key={item.groupId}>
<CardCheck
cardMsg={item}
cardIndex={index}
callback={(val, newCheckList) => checkCallBack(val, newCheckList)}
checkList={checkList}
deleKey={deleKey}
delFlag={delFlag}
/>
</div>
))}
</div>
</Spin>
{/* <Spin spinning={loading}> */}
<div className={styles.checkContainer}>
{allList.map((item, index) => (
<div className={styles.checkBoxContent} key={item.groupId}>
<CardCheck
cardMsg={item}
cardIndex={index}
callback={(val, newCheckList) => checkCallBack(val, newCheckList)}
checkList={checkList}
deleKey={deleKey}
delFlag={delFlag}
/>
</div>
))}
</div>
{/* </Spin> */}
</div>
</div>
<div className={styles.tableRight}>
......
......@@ -70,15 +70,18 @@
.tableRight {
margin-left: 10px;
height: 100%;
.ant-spin-nested-loading {
height: 100%;
.ant-table {
height: 100%;
.ant-table-container {
height: 100%;
}
}
}
.ant-spin-nested-loading {
height: 100%;
.ant-table {
height: 100%;
.ant-table-container {
height: 100%;
}
}
}
}
.ant-table-body {
......
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