feat: prolist in /admin/report
parent
e71abc0c0b
commit
54f7fe53a5
|
|
@ -14,6 +14,8 @@ export default [
|
||||||
{ path: '/admin', redirect: '/admin/dutyinfo' },
|
{ path: '/admin', redirect: '/admin/dutyinfo' },
|
||||||
{ path: '/admin/dutyinfo', name: '值班信息', component: './Admin/DutyInfo' },
|
{ path: '/admin/dutyinfo', name: '值班信息', component: './Admin/DutyInfo' },
|
||||||
{ path: '/admin/dutytable', name: '值班表管理', component: './Admin/DutyTable' },
|
{ path: '/admin/dutytable', name: '值班表管理', component: './Admin/DutyTable' },
|
||||||
|
{ path: '/admin/report', name: '反馈信息', component: './Admin/Report' },
|
||||||
|
{ path: '/admin/logs', name: '日志', component: './Admin/Logs' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -25,7 +27,6 @@ export default [
|
||||||
{ path: '/leader/conclusion', name: '值班总结', component: './Leader/Conclusion' },
|
{ path: '/leader/conclusion', name: '值班总结', component: './Leader/Conclusion' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ name: '日志', icon: 'clockCircle', path: '/logs', component: './Logs' },
|
|
||||||
{ name: '关于我们', icon: 'thunderbolt', path: '/about', component: './About' },
|
{ name: '关于我们', icon: 'thunderbolt', path: '/about', component: './About' },
|
||||||
{ path: '/', redirect: '/welcome' },
|
{ path: '/', redirect: '/welcome' },
|
||||||
{ path: '*', layout: false, component: './404' },
|
{ path: '*', layout: false, component: './404' },
|
||||||
|
|
|
||||||
|
|
@ -1,60 +1,70 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "晓洋",
|
"name": "晓洋",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333333",
|
"phone": "13333333333",
|
||||||
"time": "2024-03-07T17:52:48.523303",
|
"time": "2024-03-07T17:52:48.523303",
|
||||||
"text": "你们为什么修不好天选3的PD充电?"
|
"text": "你们为什么修不好天选3的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋1",
|
"name": "晓洋1",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333334",
|
"phone": "13333333334",
|
||||||
"time": "2024-03-07T17:53:48.523303",
|
"time": "2024-03-07T17:53:48.523303",
|
||||||
"text": "你们为什么修不好天选4的PD充电?"
|
"text": "你们为什么修不好天选4的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋2",
|
"name": "晓洋2",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333335",
|
"phone": "13333333335",
|
||||||
"time": "2024-03-07T17:54:48.523303",
|
"time": "2024-03-07T17:54:48.523303",
|
||||||
"text": "你们为什么修不好天选5的PD充电?"
|
"text": "你们为什么修不好天选5的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋3",
|
"name": "晓洋3",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333336",
|
"phone": "13333333336",
|
||||||
"time": "2024-03-07T17:55:48.523303",
|
"time": "2024-03-07T17:55:48.523303",
|
||||||
"text": "你们为什么修不好天选6的PD充电?"
|
"text": "你们为什么修不好天选6的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋4",
|
"name": "晓洋4",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333337",
|
"phone": "13333333337",
|
||||||
"time": "2024-03-07T17:56:48.523303",
|
"time": "2024-03-07T17:56:48.523303",
|
||||||
"text": "你们为什么修不好天选7的PD充电?"
|
"text": "你们为什么修不好天选7的PD充电?我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了我要气死了"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋5",
|
"name": "晓洋5",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333338",
|
"phone": "13333333338",
|
||||||
"time": "2024-03-07T17:57:48.523303",
|
"time": "2024-03-07T17:57:48.523303",
|
||||||
"text": "你们为什么修不好天选8的PD充电?"
|
"text": "你们为什么修不好天选8的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋6",
|
"name": "晓洋6",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333339",
|
"phone": "13333333339",
|
||||||
"time": "2024-03-07T17:58:48.523303",
|
"time": "2024-03-07T17:58:48.523303",
|
||||||
"text": "你们为什么修不好天选9的PD充电?"
|
"text": "你们为什么修不好天选9的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋7",
|
"name": "晓洋7",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333330",
|
"phone": "13333333330",
|
||||||
"time": "2024-03-07T17:59:48.523303",
|
"time": "2024-03-07T17:59:48.523303",
|
||||||
"text": "你们为什么修不好天选0的PD充电?"
|
"text": "你们为什么修不好天选0的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋8",
|
"name": "晓洋8",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333331",
|
"phone": "13333333331",
|
||||||
"time": "2024-03-07T18:52:48.523303",
|
"time": "2024-03-07T18:52:48.523303",
|
||||||
"text": "你们为什么修不好天选1的PD充电?"
|
"text": "你们为什么修不好天选1的PD充电?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "晓洋9",
|
"name": "晓洋9",
|
||||||
|
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||||
"phone": "13333333332",
|
"phone": "13333333332",
|
||||||
"time": "2024-03-07T19:52:48.523303",
|
"time": "2024-03-07T19:52:48.523303",
|
||||||
"text": "你们为什么修不好天选2的PD充电?"
|
"text": "你们为什么修不好天选2的PD充电?"
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ const Logs: React.FC = () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
render: (text, row) => [
|
render: () => [
|
||||||
<a href="" target="_blank" rel="noopener noreferrer" key="view">
|
<a href="" target="_blank" rel="noopener noreferrer" key="view">
|
||||||
查看
|
查看
|
||||||
</a>,
|
</a>,
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
import { PageContainer, ProList } from '@ant-design/pro-components';
|
||||||
|
import { Card, Space, Tag } from 'antd';
|
||||||
|
import moment from 'moment';
|
||||||
|
import request from 'umi-request';
|
||||||
|
import { ReportItem } from './reportItem';
|
||||||
|
|
||||||
|
const Logs: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<PageContainer>
|
||||||
|
<Card>
|
||||||
|
<ProList<ReportItem>
|
||||||
|
search={{
|
||||||
|
filterType: 'light',
|
||||||
|
}}
|
||||||
|
rowKey="name"
|
||||||
|
headerTitle="反馈列表"
|
||||||
|
request={async (params = {} as Record<string, any>) =>
|
||||||
|
request<{
|
||||||
|
data: ReportItem[];
|
||||||
|
}>('/admin/reportlist', {
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
pagination={{
|
||||||
|
pageSize: 10,
|
||||||
|
}}
|
||||||
|
metas={{
|
||||||
|
title: {
|
||||||
|
dataIndex: 'name',
|
||||||
|
title: '用户',
|
||||||
|
},
|
||||||
|
avatar: {
|
||||||
|
dataIndex: 'avatar',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
subTitle: {
|
||||||
|
dataIndex: 'phone',
|
||||||
|
render: (_, row) => {
|
||||||
|
return (
|
||||||
|
<Space size={0}>
|
||||||
|
<Tag color="blue" key={row.name}>
|
||||||
|
{row.phone}
|
||||||
|
</Tag>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
title: '联系方式',
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
dataIndex: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
extra: {
|
||||||
|
dataIndex: 'time',
|
||||||
|
render: (_, row) => {
|
||||||
|
return <div>{moment(row.time).format('YYYY-M-D HH:mm:ss')}</div>;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default Logs;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
export type ReportItem = {
|
||||||
|
name: string;
|
||||||
|
phone: string;
|
||||||
|
time: string;
|
||||||
|
text: string;
|
||||||
|
};
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { LogsItem } from '@/pages/Logs/logItem';
|
import { LogsItem } from '@/pages/Admin/Logs/logItem';
|
||||||
|
|
||||||
declare namespace API {
|
declare namespace API {
|
||||||
type CurrentUser = {
|
type CurrentUser = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue