Compare commits
2 Commits
d6a42f6087
...
a6d435a22f
| Author | SHA1 | Date |
|---|---|---|
|
|
a6d435a22f | |
|
|
136acf2731 |
|
|
@ -346,10 +346,9 @@ data:
|
|||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
}
|
||||
// ...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
前端显示的信息:"{op} 于 {time} 上传了{week}{shift}值班总结"
|
||||
|
|
|
|||
|
|
@ -4,70 +4,80 @@
|
|||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3"
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:49.523303",
|
||||
"week": "2",
|
||||
"shift": "1"
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:50.523303",
|
||||
"week": "2",
|
||||
"shift": "2"
|
||||
"shift": "2",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "晓洋",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:51.523303",
|
||||
"week": "7",
|
||||
"shift": "3"
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:52.523303",
|
||||
"week": "7",
|
||||
"shift": "1"
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:53.523303",
|
||||
"week": "2",
|
||||
"shift": "3"
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:54.523303",
|
||||
"week": "2",
|
||||
"shift": "3"
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:55.523303",
|
||||
"week": "2",
|
||||
"shift": "3"
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:56.523303",
|
||||
"week": "2",
|
||||
"shift": "3"
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:57.523303",
|
||||
"week": "2",
|
||||
"shift": "3"
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -3,6 +3,7 @@ export type ConclusionItem = {
|
|||
time: string;
|
||||
week: string;
|
||||
shift: string;
|
||||
detail: string;
|
||||
};
|
||||
|
||||
const weekMap: { [key: string]: string } = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { PageContainer, ProList } from '@ant-design/pro-components';
|
||||
import { Card } from 'antd';
|
||||
import { Card, Space, Tag } from 'antd';
|
||||
import moment from 'moment';
|
||||
import request from 'umi-request';
|
||||
import transConclusion, { ConclusionItem } from './conclusionItem';
|
||||
|
|
@ -33,21 +33,42 @@ const Logs: React.FC = () => {
|
|||
dataIndex: 'avatar',
|
||||
search: false,
|
||||
},
|
||||
subTitle: {
|
||||
dataIndex: ['week', 'shift'],
|
||||
render: (_, row) => {
|
||||
return (
|
||||
<Space size={0}>
|
||||
<Tag color="blue" key={row.op}>
|
||||
{transConclusion(row.week, row.shift)}
|
||||
</Tag>
|
||||
</Space>
|
||||
);
|
||||
},
|
||||
title: '值班时间',
|
||||
search: false,
|
||||
},
|
||||
description: {
|
||||
dataIndex: ['time', 'week', 'shift'],
|
||||
dataIndex: 'detail',
|
||||
search: false,
|
||||
render: (_, row) => {
|
||||
return (
|
||||
<div>
|
||||
{'于 ' +
|
||||
moment(row.time).format('YYYY-M-D HH:mm:ss') +
|
||||
' 上传了' +
|
||||
transConclusion(row.week, row.shift) +
|
||||
'值班总结'}
|
||||
{row.detail}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
extra: {
|
||||
dataIndex: 'time',
|
||||
render: (_: React.ReactNode, row: ConclusionItem) => {
|
||||
return (
|
||||
<div style={{ marginLeft: '3vh' }}>
|
||||
{moment(row.time).format('YYYY-M-D HH:mm:ss')}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
search: false,
|
||||
},
|
||||
actions: {
|
||||
render: () => [
|
||||
<a href="" target="_blank" rel="noopener noreferrer" key="view">
|
||||
|
|
|
|||
|
|
@ -34,15 +34,12 @@ const Logs: React.FC = () => {
|
|||
search: false,
|
||||
},
|
||||
description: {
|
||||
dataIndex: ['time', 'operation', 'target', 'prev', 'curr'],
|
||||
dataIndex: ['operation', 'target', 'prev', 'curr'],
|
||||
search: false,
|
||||
render: (_, row) => {
|
||||
return (
|
||||
<div>
|
||||
{'于 ' +
|
||||
moment(row.time).format('YYYY-M-D HH:mm:ss') +
|
||||
' ' +
|
||||
transInfo(row.operation, 'operation') +
|
||||
{transInfo(row.operation, 'operation') +
|
||||
'了' +
|
||||
transInfo(row.target, 'target') +
|
||||
':' +
|
||||
|
|
@ -53,6 +50,17 @@ const Logs: React.FC = () => {
|
|||
);
|
||||
},
|
||||
},
|
||||
extra: {
|
||||
dataIndex: 'time',
|
||||
render: (_: React.ReactNode, row: LogsItem) => {
|
||||
return (
|
||||
<div style={{ marginLeft: '3vh' }}>
|
||||
{moment(row.time).format('YYYY-M-D HH:mm:ss')}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
search: false,
|
||||
},
|
||||
actions: {
|
||||
render: () => [
|
||||
<a href="" target="_blank" rel="noopener noreferrer" key="view">
|
||||
|
|
|
|||
Loading…
Reference in New Issue