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

perf: 默认错误类型

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