Compare commits
No commits in common. "a6d435a22faf1ef2b6cabb3bbb5144b7786a8e86" and "d6a42f60879c58b77ab8e563e070732a48765d3d" have entirely different histories.
a6d435a22f
...
d6a42f6087
|
|
@ -346,9 +346,10 @@ data:
|
|||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
}
|
||||
// ...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
前端显示的信息:"{op} 于 {time} 上传了{week}{shift}值班总结"
|
||||
|
|
|
|||
|
|
@ -4,80 +4,70 @@
|
|||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "3"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:49.523303",
|
||||
"week": "2",
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "1"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:50.523303",
|
||||
"week": "2",
|
||||
"shift": "2",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "2"
|
||||
},
|
||||
{
|
||||
"op": "晓洋",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:51.523303",
|
||||
"week": "7",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "3"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:52.523303",
|
||||
"week": "7",
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "1"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:53.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "3"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:54.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "3"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:55.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "3"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:56.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "3"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:57.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
"shift": "3"
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -3,7 +3,6 @@ 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, Space, Tag } from 'antd';
|
||||
import { Card } from 'antd';
|
||||
import moment from 'moment';
|
||||
import request from 'umi-request';
|
||||
import transConclusion, { ConclusionItem } from './conclusionItem';
|
||||
|
|
@ -33,42 +33,21 @@ 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: 'detail',
|
||||
dataIndex: ['time', 'week', 'shift'],
|
||||
search: false,
|
||||
render: (_, row) => {
|
||||
return (
|
||||
<div>
|
||||
{row.detail}
|
||||
{'于 ' +
|
||||
moment(row.time).format('YYYY-M-D HH:mm:ss') +
|
||||
' 上传了' +
|
||||
transConclusion(row.week, row.shift) +
|
||||
'值班总结'}
|
||||
</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,12 +34,15 @@ const Logs: React.FC = () => {
|
|||
search: false,
|
||||
},
|
||||
description: {
|
||||
dataIndex: ['operation', 'target', 'prev', 'curr'],
|
||||
dataIndex: ['time', 'operation', 'target', 'prev', 'curr'],
|
||||
search: false,
|
||||
render: (_, row) => {
|
||||
return (
|
||||
<div>
|
||||
{transInfo(row.operation, 'operation') +
|
||||
{'于 ' +
|
||||
moment(row.time).format('YYYY-M-D HH:mm:ss') +
|
||||
' ' +
|
||||
transInfo(row.operation, 'operation') +
|
||||
'了' +
|
||||
transInfo(row.target, 'target') +
|
||||
':' +
|
||||
|
|
@ -50,17 +53,6 @@ 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