Commit 4bbd842b authored by 陈前坚's avatar 陈前坚

perf: 默认错误类型

parent 37bf2d2e
......@@ -33,7 +33,7 @@ const ServiceLog = () => {
const [endTime, setEndTime] = useState(
moment(new Date(), 'YYYY-MM-DD HH:mm:ss'), // 默认值,当前时间
);
const [logType, setLogType] = useState(0); // 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const [logType, setLogType] = useState(-1); // 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const [searchWord, setSearchWord] = useState(''); // 关键字
// 计算时间间隔(分钟)
......@@ -154,15 +154,15 @@ const ServiceLog = () => {
post(`${PUBLISH_SERVICE}/LogCenter${url}`, {
// 获取日志表数据时PageSize设置为200,其他接口默认值20
PageSize: url === '/GetOMSLog' ? 200 : 20,
// DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'),
// DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'),
// IP: '',
// Module: url === '/GetOMSLog' ? searchWord : '',
// LogType: url === '/GetOMSLog' ? +logType : '',
// Description: '',
// LoginName: '',
// UserName: '',
// StaticsType: +timeInterval,
DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'),
DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'),
IP: '',
Module: url === '/GetOMSLog' ? searchWord : '',
LogType: +logType,
Description: '',
LoginName: '',
UserName: '',
StaticsType: +timeInterval,
})
.then(res => {
if (res.code === 0) {
......@@ -255,7 +255,7 @@ const ServiceLog = () => {
<Button onClick={() => setTime(24 * 60, '3')}>1</Button>
<Button onClick={() => setTime(24 * 7 * 60, '4')}>1</Button>
<span style={{ marginLeft: '20px' }}>返回状态:</span>
<Select defaultValue="正常" onChange={changeStatus}>
<Select defaultValue="错误" onChange={changeStatus}>
<Option value="9999">全部</Option>
<Option value="0">正常</Option>
<Option value="-1">错误</Option>
......
......@@ -33,7 +33,7 @@ const ServiceLog = () => {
const [endTime, setEndTime] = useState(
moment(new Date(), 'YYYY-MM-DD HH:mm:ss'), // 默认值,当前时间
);
const [logType, setLogType] = useState(0); // 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const [logType, setLogType] = useState(-1); // 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const [searchWord, setSearchWord] = useState(''); // 关键字
// 计算时间间隔(分钟)
......@@ -154,15 +154,15 @@ const ServiceLog = () => {
post(`${PUBLISH_SERVICE}/LogCenter${url}`, {
// 获取日志表数据时PageSize设置为200,其他接口默认值20
PageSize: url === '/GetOMSLog' ? 200 : 20,
// DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'),
// DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'),
// IP: '',
// Module: url === '/GetOMSLog' ? searchWord : '',
// LogType: url === '/GetOMSLog' ? +logType : '',
// Description: '',
// LoginName: '',
// UserName: '',
// StaticsType: +timeInterval,
DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'),
DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'),
IP: '',
Module: url === '/GetOMSLog' ? searchWord : '',
LogType: +logType,
Description: '',
LoginName: '',
UserName: '',
StaticsType: +timeInterval,
})
.then(res => {
if (res.code === 0) {
......@@ -255,7 +255,7 @@ const ServiceLog = () => {
<Button onClick={() => setTime(24 * 60, '3')}>1</Button>
<Button onClick={() => setTime(24 * 7 * 60, '4')}>1</Button>
<span style={{ marginLeft: '20px' }}>返回状态:</span>
<Select defaultValue="正常" onChange={changeStatus}>
<Select defaultValue="错误" onChange={changeStatus}>
<Option value="9999">全部</Option>
<Option value="0">正常</Option>
<Option value="-1">错误</Option>
......
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