refresh api

main
chunquansang 2 months ago
parent 208f5dd0bd
commit 81a925ff1b

@ -23,11 +23,14 @@
- **响应示例**
```json
{
"code": 200,
"message": "登录成功",
"data": {
"token": "xxx-xxx-xxx" // 登录成功返回的 token
}
"code": 200,
"success": true,
"data": {
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTc0MzA2ODU4NiwiaWF0IjoxNzQxNzcyNTg2LCJqdGkiOiI2MjNhNmUxM2Q3YjM0NmE4YTMzMGQ3ZGY5MTQ2YTliMCIsInVzZXJfaWQiOjF9.nhUnJuMDsQbKG96ma08bH17tWj-4PbQNUYx4vRzpbIQ",
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzQyMzc3Mzg2LCJpYXQiOjE3NDE3NzI1ODYsImp0aSI6ImMzMmU0ZWQ5ZWU5MTQ3Nzc5MmFkNjQ1ZmM3NmZlYmE4IiwidXNlcl9pZCI6MX0.2IFz-zWaQF7HeL-SrjNR4o1A-9BebPx3KG7_OU1Y4yg",
"status": "ok"
},
"errorMessage": ""
}
```
@ -43,6 +46,9 @@
```json
{
"code": 200,
"success": true,
"data": {},
"errorMessage": ""
}
```

@ -9,65 +9,84 @@
# 仪表盘模块Dashboard接口文档
## 一、设备状态分页列表接口
### 1.1 接口基本信息
- **接口地址**/api/dashboard/device-status/list
- **接口地址**/api/v1/device/device/
- **请求方式**GET
- **功能描述**:获取设备状态分页列表,支持条件查询
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------------|--------|----------|--------------------------|----------------|
| device_name | string | 否 | 设备名称(模糊查询) | "设备A" |
| device_id | string | 否 | 设备ID精确查询 | "DEV-001" |
| page | int | 是 | 分页页码 | 1 |
| page_size | int | 是 | 每页数量 | 10 |
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|---------------|--------|----------|--------------------------|----------------|
| device_name | string | 否 | 设备名称(模糊查询) | "设备A" |
| device_number | string | 否 | 设备ID精确查询 | "DEV-001" |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 1.3 响应参数
| 参数名 | 类型 | 说明 |
|--------------|----------|--------------------------|
| code | int | 响应码200为成功 |
| message | string | 响应信息 |
| data | object | 数据体 |
| ├─ total | int | 总记录数 |
| ├─ list | array | 设备状态列表 |
| └─ ├─ device_name | string | 设备名称 |
| └─ ├─ device_id | string | 设备ID |
| └─ ├─ device_location | string | 设备位置 |
| └─ ├─ device_status | int | 设备状态0=在线1=离线2=故障) |
| └─ └─ real_time_video_url | string | 实时视频路径 |
| 参数名 | 类型 | 说明 |
|---------------------------|----------|----------------------|
| code | int | 响应码200为成功 |
| errorMessage | string | 异常信息 |
| data | object | 数据体 |
| ├─ total | int | 总记录数 |
| ├─ data | array | 设备状态列表 |
| └─ ├─ device_name | string | 设备名称 |
| └─ ├─ device_id | string | 设备ID |
| └─ ├─ device_location | string | 设备位置 |
| └─ ├─ device_status | int | 设备状态0=在线1=离线2=故障) |
| └─ └─ real_time_video_url | string | 实时视频路径 |
### 1.4 响应示例
```json
{
"code": 200,
"message": "获取成功",
"success": true,
"data": {
"total": 50,
"list": [
"total": 21,
"data": [
{
"device_name": "工业机器人A",
"device_id": "DEV-001",
"device_location": "工厂1楼车间",
"device_status": 0,
"real_time_video_url": "https://xxx.com/real_time_001.mp4"
"id": 21,
"key": "21",
"device_number": "DEV-020",
"device_name": "Say Device",
"device_position": "Floor 6, Room 101",
"device_status": "online",
"url": "https://www.johnson-malone.com/",
"created_at": "2025-03-12 14:52:21",
"updated_at": "2025-03-12 14:52:21"
},
{
"id": 20,
"key": "20",
"device_number": "DEV-019",
"device_name": "Reality Device",
"device_position": "Floor 10, Room 105",
"device_status": "offline",
"url": "https://www.lewis.com/",
"created_at": "2025-03-12 14:52:21",
"updated_at": "2025-03-12 14:52:21"
}
]
}
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
}
```
![alt text](image-1.png)
## 二、设备历史视频列表接口
### 2.1 接口基本信息
- **接口地址**/api/dashboard/device-history-video/list
- **接口地址**/api/v1/device/device_history/
- **请求方式**GET
- **功能描述**:根据设备 ID 查询历史视频列表,支持日期时间过滤
### 2.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|------------|--------|----------|-----------------------------|----------------|
| device_id | string | 是 | 设备 ID关联设备详情 | "DEV-001" |
| start_time | string | 否 | 开始时间格式YYYY-MM-DD | "2025-03-01" |
| end_time | string | 否 | 结束时间格式YYYY-MM-DD | "2025-03-31" |
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|------------|--------|----------|-----------------------------|--------------|
| device_id | int | 是 | 设备 ID关联设备详情 | 1 |
| start_time | string | 否 | 开始时间格式YYYY-MM-DD | "2025-03-01" |
| end_time | string | 否 | 结束时间格式YYYY-MM-DD | "2025-03-31" |
### 2.3 响应参数
| 参数名 | 类型 | 说明 |
@ -83,17 +102,33 @@
### 2.4 响应示例
```json
{
"code": 200,
"message": "获取成功",
"data": {
"total": 15,
"list": [
{
"video_url": "https://xxx.com/history_001.mp4",
"record_time": "2025-03-10 14:30:00"
}
]
}
"code": 200,
"success": true,
"data": {
"total": 10,
"data": [
{
"id": 10,
"key": "10",
"video_url": "ftp://192.168.10.38/1.mp4",
"created_at": "2025-03-12 14:53:36",
"updated_at": "2025-03-12 14:53:36",
"device": 1
},
{
"id": 9,
"key": "9",
"video_url": "ftp://192.168.10.38/1.mp4",
"created_at": "2025-03-12 14:53:36",
"updated_at": "2025-03-12 14:53:36",
"device": 1
}
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
}
```
![alt text](image-2.png)
@ -102,24 +137,24 @@
## 一、撑杆监测分页列表接口
### 1.1 接口基本信息
- **接口地址**/api/pole-monitor/list
- **接口地址**/api/v1/record/record/
- **请求方式**GET
- **功能描述**:获取撑杆监测分页列表,支持多条件筛选
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------------|---------|----------|-----------------------------|----------------|
| carNo | string | 否 | 车号(精确/模糊查询) | "JZ20250301" |
| carType | string | 否 | 车型 | "货车" |
| carriageNo | string | 否 | 车厢号(精确查询) | "C001" |
| warnType | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" |
| faultType | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" |
| level | int | 否 | 等级1-3数值越大越严重 | 2 |
| review | boolean | 否 | 复核状态true=已复核false=未复核) | true |
| date | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" |
| page | int | 是 | 分页页码 | 1 |
| page_size | int | 是 | 每页数量 | 10 |
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|-----------------------|---------|----------|--------------------------|--------------|
| train_number | string | 否 | 车号(精确/模糊查询) | "JZ20250301" |
| train_model | string | 否 | 车型 | "货车" |
| train_carriage_number | string | 否 | 车厢号(精确查询) | "C001" |
| alarm_type | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" |
| fault_type | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" |
| level | int | 否 | 等级1-3数值越大越严重 | 2 |
| is_reviewed | boolean | 否 | 复核状态true=已复核false=未复核) | true |
| created_at | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
| type | string | 是 | 固定为 pole | pole |
### 1.3 响应参数
| 参数名 | 类型 | 说明 |
|------------------|----------|--------------------------|
@ -141,38 +176,61 @@
### 1.4 响应示例
```json
{
"code": 200,
"message": "获取成功",
"data": {
"total": 200,
"list": [
{
"id": "PM001",
"carNo": "JZ20250301",
"carType": "货车",
"carriageNo": "C001",
"warnType": "倾斜",
"faultType": "机械故障",
"level": 2,
"review": false,
"date": "2025-03-10 09:00:00"
}
]
}
"code": 200,
"success": true,
"data": {
"total": 8,
"data": [
{
"id": 19,
"key": "19",
"train_number": "pS399",
"train_model": "home",
"train_carriage_number": "C16",
"alarm_type": "candidate",
"fault_type": "several",
"level": 2,
"is_reviewed": false,
"created_at": "2025-03-12 14:46:55",
"updated_at": "2025-03-12 14:46:55",
"type": "pole"
},
{
"id": 16,
"key": "16",
"train_number": "vO272",
"train_model": "enough",
"train_carriage_number": "C49",
"alarm_type": "sing",
"fault_type": "scientist",
"level": 5,
"is_reviewed": true,
"created_at": "2025-03-12 14:46:54",
"updated_at": "2025-03-12 14:46:54",
"type": "pole"
}
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
}
```
![alt text](image-3.png)
## 二、撑杆监测详情接口
### 2.1 接口基本信息
- **接口地址**/api/pole-monitor/detail/{id}
- **接口地址**/api/v1/record/record_detail_list/
- **请求方式**GET
- **功能描述**:根据监测数据 ID 获取详细信息,包含图文列表及监测数据
### 2.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|--------|----------|--------------------------|--------------|
| id | string | 是 | 监测数据唯一标识(关联分页列表 ID | "PM001" |
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|-----|----------|--------------------------|-----|
| id | int | 是 | 监测数据唯一标识(关联分页列表 ID | 1 |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 2.3 响应参数
| 参数名 | 类型 | 说明 |
@ -201,30 +259,45 @@
### 2.4 响应示例
```json
{
"code": 200,
"message": "获取成功",
"data": {
"id": "PM001",
"carNo": "JZ20250301",
"carType": "货车",
"carriageNo": "C001",
"warnType": "倾斜",
"faultType": "机械故障",
"level": 2,
"review": false,
"date": "2025-03-10 09:00:00",
"image_list": [
{
"image_name": "pole_001.jpg",
"image_url": "https://xxx.com/pole_001.jpg",
"capture_time": "2025-03-10 09:01:30",
"length": 5.2,
"width": 0.3,
"height": 0.3,
"weight": 120.5
}
]
}
"code": 200,
"success": true,
"data": {
"total": 10,
"data": [
{
"id": 1,
"key": "1",
"name": "Christopher Lynch",
"video_url": "ftp://192.168.10.38/1.mp4",
"image_url": "https://picsum.photos/963/650",
"created_at": "2025-03-12 14:51:12",
"updated_at": "2025-03-12 14:51:12",
"length": 6.08,
"width": 0.81,
"height": 0.67,
"weight": 14.14,
"record": 1
},
{
"id": 2,
"key": "2",
"name": "Jon Williams",
"video_url": "ftp://192.168.10.38/1.mp4",
"image_url": "https://placekitten.com/603/345",
"created_at": "2025-03-12 14:51:12",
"updated_at": "2025-03-12 14:51:12",
"length": 6.57,
"width": 1.63,
"height": 2.04,
"weight": 26.9,
"record": 1
}
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
}
```
![alt text](image-4.png)
@ -237,18 +310,19 @@
- **功能描述**:获取外观监测分页列表,支持多条件筛选
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------------|---------|----------|-----------------------------|----------------|
| carNo | string | 否 | 车号(精确/模糊查询) | "JZ20250301" |
| carType | string | 否 | 车型 | "货车" |
| carriageNo | string | 否 | 车厢号(精确查询) | "C001" |
| warnType | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" |
| faultType | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" |
| level | int | 否 | 等级1-3数值越大越严重 | 2 |
| review | boolean | 否 | 复核状态true=已复核false=未复核) | true |
| date | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" |
| page | int | 是 | 分页页码 | 1 |
| page_size | int | 是 | 每页数量 | 10 |
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|-----------------------|---------|----------|--------------------------|--------------|
| train_number | string | 否 | 车号(精确/模糊查询) | "JZ20250301" |
| train_model | string | 否 | 车型 | "货车" |
| train_carriage_number | string | 否 | 车厢号(精确查询) | "C001" |
| alarm_type | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" |
| fault_type | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" |
| level | int | 否 | 等级1-3数值越大越严重 | 2 |
| is_reviewed | boolean | 否 | 复核状态true=已复核false=未复核) | true |
| created_at | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
| type | string | 是 | 固定为 appearance | appearance |
### 1.3 响应参数
| 参数名 | 类型 | 说明 |
@ -271,24 +345,45 @@
### 1.4 响应示例
```json
{
"code": 200,
"message": "获取成功",
"data": {
"total": 200,
"list": [
{
"id": "PM001",
"carNo": "JZ20250301",
"carType": "货车",
"carriageNo": "C001",
"warnType": "倾斜",
"faultType": "机械故障",
"level": 2,
"review": false,
"date": "2025-03-10 09:00:00"
}
]
}
"code": 200,
"success": true,
"data": {
"total": 5,
"data": [
{
"id": 17,
"key": "17",
"train_number": "zE074",
"train_model": "create",
"train_carriage_number": "C28",
"alarm_type": "decision",
"fault_type": "material",
"level": 4,
"is_reviewed": false,
"created_at": "2025-03-12 14:46:55",
"updated_at": "2025-03-12 14:46:55",
"type": "appearance"
},
{
"id": 14,
"key": "14",
"train_number": "Bp417",
"train_model": "ground",
"train_carriage_number": "C43",
"alarm_type": "market",
"fault_type": "rise",
"level": 2,
"is_reviewed": true,
"created_at": "2025-03-12 14:46:54",
"updated_at": "2025-03-12 14:46:54",
"type": "appearance"
}
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
}
```
![alt text](image-5.png)
@ -302,9 +397,11 @@
- **功能描述**:根据监测数据 ID 获取详细信息,包含视频列表及监测数据
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|--------|----------|--------------------------|--------------|
| id | string | 是 | 监测数据唯一标识(关联列表 ID | "AM001" |
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|-----|----------|--------------------------|-----|
| id | int | 是 | 监测数据唯一标识(关联列表 ID | 1 |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 1.3 响应参数
| 参数名 | 类型 | 说明 |
@ -334,31 +431,45 @@
### 1.4 响应示例
```json
{
"code": 200,
"message": "获取成功",
"data": {
"id": "AM001",
"carNo": "JZ20250302",
"carType": "客车",
"carriageNo": "C002",
"warnType": "变形",
"faultType": "结构损伤",
"level": 3,
"review": true,
"date": "2025-03-10 10:00:00",
"video_list": [
{
"video_name": "appearance_001.mp4",
"video_url": "https://xxx.com/appearance_001.mp4",
"capture_time": "2025-03-10 10:02:00",
"length": 6.5,
"width": 2.8,
"height": 3.2,
"volume": 58.24,
"weight": 8500.0
}
]
}
"code": 200,
"success": true,
"data": {
"total": 10,
"data": [
{
"id": 1,
"key": "1",
"name": "Christopher Lynch",
"video_url": "ftp://192.168.10.38/1.mp4",
"image_url": "https://picsum.photos/963/650",
"created_at": "2025-03-12 14:51:12",
"updated_at": "2025-03-12 14:51:12",
"length": 6.08,
"width": 0.81,
"height": 0.67,
"weight": 14.14,
"record": 1
},
{
"id": 2,
"key": "2",
"name": "Jon Williams",
"video_url": "ftp://192.168.10.38/1.mp4",
"image_url": "https://placekitten.com/603/345",
"created_at": "2025-03-12 14:51:12",
"updated_at": "2025-03-12 14:51:12",
"length": 6.57,
"width": 1.63,
"height": 2.04,
"weight": 26.9,
"record": 1
}
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
}
```
![alt text](image-6.png)

Loading…
Cancel
Save