日志增加时间显示
This commit is contained in:
parent
2f4ac49b3b
commit
76a1c8aeba
File diff suppressed because one or more lines are too long
|
@ -2,6 +2,7 @@ import { useEffect } from 'react';
|
|||
import { Modal, Button, Spin } from 'antd';
|
||||
import { getJobLog } from '@/services/Jobs';
|
||||
import useRequest from '@/utils/useRequest';
|
||||
import moment from 'moment';
|
||||
|
||||
interface Props {
|
||||
visible: boolean;
|
||||
|
@ -17,7 +18,7 @@ export default (props: Props) => {
|
|||
useEffect(() => {
|
||||
fetchJobLog({ name, id });
|
||||
}, [])
|
||||
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title="查看日志"
|
||||
|
@ -31,7 +32,7 @@ export default (props: Props) => {
|
|||
{
|
||||
logsData?.data?.list?.map((item: API.Log, index: number) => (
|
||||
<>
|
||||
<div>{item.log}</div>
|
||||
<div>{moment(item.create_time).format('YYYY-MM-DD HH:mm:ss')} 【{item.log_type}】 {item.log}</div>
|
||||
{index === logsData?.data?.list?.length ? <br/> : null }
|
||||
</>
|
||||
))
|
||||
|
|
|
@ -242,6 +242,7 @@ declare namespace API {
|
|||
log_type: string;
|
||||
/** log */
|
||||
log: string;
|
||||
create_time: string;
|
||||
}
|
||||
|
||||
interface UserInfoDto {
|
||||
|
|
Loading…
Reference in New Issue