add mock: reportlist
parent
2cb4684130
commit
e71abc0c0b
|
|
@ -233,84 +233,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"RuleListItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"disabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"desc": {
|
||||
"type": "string"
|
||||
},
|
||||
"callNo": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"status": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "datetime"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "datetime"
|
||||
},
|
||||
"progress": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RuleList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/RuleListItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"description": "列表的内容总数",
|
||||
"format": "int32"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"FakeCaptcha": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"LoginParams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
24
doc/api.md
24
doc/api.md
|
|
@ -216,19 +216,33 @@ request:
|
|||
},
|
||||
```
|
||||
|
||||
## 日志页面
|
||||
## 反馈页面
|
||||
|
||||
### 获取日志列表 `GET /admin/loglist`
|
||||
### 获取反馈列表 `GET /admin/reportlist`
|
||||
|
||||
request:
|
||||
data:
|
||||
|
||||
```json
|
||||
{
|
||||
"pageIndex": 1,
|
||||
"size": 10,
|
||||
"page": 1,
|
||||
"total": 24,
|
||||
"success": true,
|
||||
"data": [
|
||||
{
|
||||
"name": "晓洋",
|
||||
"phone": "13333333333",
|
||||
"time": "2024-03-07T17:52:48.523303",
|
||||
"text": "你们为什么修不好天选3的PD充电?"
|
||||
},
|
||||
// ...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 日志页面
|
||||
|
||||
### 获取日志列表 `GET /admin/loglist`
|
||||
|
||||
data:
|
||||
|
||||
```json
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
[
|
||||
{
|
||||
"name": "晓洋",
|
||||
"phone": "13333333333",
|
||||
"time": "2024-03-07T17:52:48.523303",
|
||||
"text": "你们为什么修不好天选3的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋1",
|
||||
"phone": "13333333334",
|
||||
"time": "2024-03-07T17:53:48.523303",
|
||||
"text": "你们为什么修不好天选4的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋2",
|
||||
"phone": "13333333335",
|
||||
"time": "2024-03-07T17:54:48.523303",
|
||||
"text": "你们为什么修不好天选5的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋3",
|
||||
"phone": "13333333336",
|
||||
"time": "2024-03-07T17:55:48.523303",
|
||||
"text": "你们为什么修不好天选6的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋4",
|
||||
"phone": "13333333337",
|
||||
"time": "2024-03-07T17:56:48.523303",
|
||||
"text": "你们为什么修不好天选7的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋5",
|
||||
"phone": "13333333338",
|
||||
"time": "2024-03-07T17:57:48.523303",
|
||||
"text": "你们为什么修不好天选8的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋6",
|
||||
"phone": "13333333339",
|
||||
"time": "2024-03-07T17:58:48.523303",
|
||||
"text": "你们为什么修不好天选9的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋7",
|
||||
"phone": "13333333330",
|
||||
"time": "2024-03-07T17:59:48.523303",
|
||||
"text": "你们为什么修不好天选0的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋8",
|
||||
"phone": "13333333331",
|
||||
"time": "2024-03-07T18:52:48.523303",
|
||||
"text": "你们为什么修不好天选1的PD充电?"
|
||||
},
|
||||
{
|
||||
"name": "晓洋9",
|
||||
"phone": "13333333332",
|
||||
"time": "2024-03-07T19:52:48.523303",
|
||||
"text": "你们为什么修不好天选2的PD充电?"
|
||||
}
|
||||
]
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import loglist from './loglist.json';
|
||||
import sheet from './sheet.json';
|
||||
import sheetlist from './sheetlist.json';
|
||||
import reportlist from './reportlist.json';
|
||||
|
||||
module.exports = {
|
||||
'GET /admin/stats': {
|
||||
|
|
@ -48,6 +49,12 @@ module.exports = {
|
|||
total: 24,
|
||||
data: loglist,
|
||||
},
|
||||
'GET /admin/reportlist': {
|
||||
success: true,
|
||||
page: 1,
|
||||
total: 24,
|
||||
data: reportlist,
|
||||
},
|
||||
'GET /api/currentUser': {
|
||||
data: {
|
||||
name: 'Serati Ma',
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ const Logs: React.FC = () => {
|
|||
request={async (params = {} as Record<string, any>) =>
|
||||
request<{
|
||||
data: LogsItem[];
|
||||
}>('http://127.0.0.1:8000/admin/loglist', {
|
||||
}>('/admin/loglist', {
|
||||
params,
|
||||
})
|
||||
}
|
||||
pagination={{
|
||||
pageSize: 5,
|
||||
pageSize: 10,
|
||||
}}
|
||||
metas={{
|
||||
title: {
|
||||
|
|
@ -40,10 +40,10 @@ const Logs: React.FC = () => {
|
|||
return (
|
||||
<div>
|
||||
{'于 ' +
|
||||
moment(row.time).format('lll') +
|
||||
moment(row.time).format('YYYY-M-D HH:mm:ss') +
|
||||
' ' +
|
||||
transInfo(row.operation, 'operation') +
|
||||
'了 ' +
|
||||
'了' +
|
||||
transInfo(row.target, 'target') +
|
||||
':' +
|
||||
row.prev.info +
|
||||
|
|
@ -61,26 +61,46 @@ const Logs: React.FC = () => {
|
|||
],
|
||||
search: false,
|
||||
},
|
||||
// status: {
|
||||
// // 自己扩展的字段,主要用于筛选,不在列表中显示
|
||||
// title: '更改部分',
|
||||
// valueType: 'select',
|
||||
// valueEnum: {
|
||||
// all: { text: '全部', status: 'Default' },
|
||||
// open: {
|
||||
// text: '未解决',
|
||||
// status: 'Error',
|
||||
// },
|
||||
// closed: {
|
||||
// text: '已解决',
|
||||
// status: 'Success',
|
||||
// },
|
||||
// processing: {
|
||||
// text: '解决中',
|
||||
// status: 'Processing',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
operation: {
|
||||
// 自己扩展的字段,主要用于筛选,不在列表中显示
|
||||
title: '操作',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
all: { text: '全部', status: 'Default' },
|
||||
add: {
|
||||
text: '增加',
|
||||
status: '0',
|
||||
},
|
||||
delete: {
|
||||
text: '删除',
|
||||
status: '1',
|
||||
},
|
||||
change: {
|
||||
text: '更改',
|
||||
status: '2',
|
||||
},
|
||||
},
|
||||
},
|
||||
target: {
|
||||
// 自己扩展的字段,主要用于筛选,不在列表中显示
|
||||
title: '操作对象',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
all: { text: '全部', status: 'Default' },
|
||||
dutyTable: {
|
||||
text: '值班表',
|
||||
status: '0',
|
||||
},
|
||||
dutyInfo: {
|
||||
text: '值班信息',
|
||||
status: '1',
|
||||
},
|
||||
conclusion: {
|
||||
text: '值班总结',
|
||||
status: '2',
|
||||
},
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const operationMap: { [key: number]: string } = {
|
||||
0: '增加',
|
||||
1: '删除',
|
||||
2: '修改',
|
||||
2: '更改',
|
||||
};
|
||||
|
||||
const targetMap: { [key: number]: string } = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue