You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

476 lines
21 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-11 14:38:18
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-11 15:21:43
* @FilePath: \5G-Loading-Bay-Web\dashboard.md
* @Description: dashboard接口文档
-->
# 仪表盘模块Dashboard接口文档
## 一、设备状态分页列表接口
### 1.1 接口基本信息
- **接口地址**/api/v1/device/device/
- **请求方式**GET
- **功能描述**:获取设备状态分页列表,支持条件查询
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|---------------|--------|----------|--------------------------|----------------|
| device_name | string | 否 | 设备名称(模糊查询) | "设备A" |
| device_number | string | 否 | 设备ID精确查询 | "DEV-001" |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 1.3 响应参数
| 参数名 | 类型 | 说明 |
|---------------------------|----------|----------------------|
| 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,
"success": true,
"data": {
"total": 21,
"data": [
{
"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](localFiles/image-1.png)
## 二、设备历史视频列表接口
### 2.1 接口基本信息
- **接口地址**/api/v1/device/device_history/
- **请求方式**GET
- **功能描述**:根据设备 ID 查询历史视频列表,支持日期时间过滤
### 2.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|------------|--------|----------|-----------------------------|--------------|
| 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 响应参数
| 参数名 | 类型 | 说明 |
|--------------|----------|-----------------------------------|
| code | int | 响应码200 为成功) |
| message | string | 响应信息 |
| data | object | 数据体 |
| ├─ total | int | 总记录数 |
| ├─ list | array | 历史视频列表 |
| └─ ├─ video_url | string | 历史视频路径 |
| └─ └─ record_time | string | 视频记录时间格式YYYvY-MM-DD HH:MM:SS |
### 2.4 响应示例
```json
{
"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](localFiles/image-2.png)
# 撑杆监测模块Pole Monitor接口文档
## 一、撑杆监测分页列表接口
### 1.1 接口基本信息
- **接口地址**/api/v1/record/record/
- **请求方式**GET
- **功能描述**:获取撑杆监测分页列表,支持多条件筛选
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|-----------------------|---------|----------|--------------------------|--------------|
| 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 响应参数
| 参数名 | 类型 | 说明 |
|------------------|----------|--------------------------|
| code | int | 响应码200为成功 |
| message | string | 响应信息 |
| data | object | 数据体 |
| ├─ total | int | 总记录数 |
| ├─ list | array | 撑杆监测列表 |
| └─ ├─ id | string | 唯一标识 |
| └─ ├─ carNo | string | 车号 |
| └─ ├─ carType | string | 车型 |
| └─ ├─ carriageNo | string | 车厢号 |
| └─ ├─ warnType | string | 告警类型 |
| └─ ├─ faultType | string | 故障类型 |
| └─ ├─ level | int | 等级1-3 |
| └─ ├─ review | boolean | 复核状态 |
| └─ └─ date | string | 监测时间格式YYYY-MM-DD HH:MM:SS |
### 1.4 响应示例
```json
{
"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](localFiles/image-3.png)
## 二、撑杆监测详情接口
### 2.1 接口基本信息
- **接口地址**/api/v1/record/record_detail_list/
- **请求方式**GET
- **功能描述**:根据监测数据 ID 获取详细信息,包含图文列表及监测数据
### 2.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|-----|----------|--------------------------|-----|
| id | int | 是 | 监测数据唯一标识(关联分页列表 ID | 1 |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 2.3 响应参数
| 参数名 | 类型 | 说明 |
|----------------------|----------|--------------------------|
| code | int | 响应码200为成功 |
| message | string | 响应信息 |
| data | object | 数据体 |
| ├─ id | string | 监测数据 ID |
| ├─ carNo | string | 车号 |
| ├─ carType | string | 车型 |
| ├─ carriageNo | string | 车厢号 |
| ├─ warnType | string | 告警类型 |
| ├─ faultType | string | 故障类型 |
| ├─ level | int | 等级1-3 |
| ├─ review | boolean | 复核状态 |
| ├─ date | string | 监测时间格式YYYY-MM-DD HH:MM:SS |
| ├─ image_list | array | 监测图文列表 |
| └─ ├─ image_name | string | 图片名称 |
| └─ ├─ image_url | string | 图片路径 |
| └─ ├─ capture_time | string | 图片拍摄时间格式YYYY-MM-DD HH:MM:SS |
| └─ ├─ length | float | 撑杆长度(单位:米) |
| └─ ├─ width | float | 撑杆宽度(单位:米) |
| └─ ├─ height | float | 撑杆高度(单位:米) |
| └─ └─ weight | float | 撑杆重量(单位:千克) |
### 2.4 响应示例
```json
{
"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](localFiles/image-4.png)
# 外观监测模块Appearance Monitor接口文档
## 一、外观监测分页列表接口
### 1.1 接口基本信息
- **接口地址**/api/v1/record/record/
- **请求方式**GET
- **功能描述**:获取外观监测分页列表,支持多条件筛选
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|-----------------------|---------|----------|--------------------------|--------------|
| 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 响应参数
| 参数名 | 类型 | 说明 |
|------------------|----------|--------------------------|
| code | int | 响应码200为成功 |
| message | string | 响应信息 |
| data | object | 数据体 |
| ├─ total | int | 总记录数 |
| ├─ list | array | 外观监测列表 |
| └─ ├─ id | string | 唯一标识 |
| └─ ├─ carNo | string | 车号 |
| └─ ├─ carType | string | 车型 |
| └─ ├─ carriageNo | string | 车厢号 |
| └─ ├─ warnType | string | 告警类型 |
| └─ ├─ faultType | string | 故障类型 |
| └─ ├─ level | int | 等级1-3 |
| └─ ├─ review | boolean | 复核状态 |
| └─ └─ date | string | 监测时间格式YYYY-MM-DD HH:MM:SS |
### 1.4 响应示例
```json
{
"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](localFiles/image-5.png)
# 外观监测模块Appearance Monitor接口文档
## 一、外观监测详情接口
### 1.1 接口基本信息
- **接口地址**/api/v1/record/record_detail_list/
- **请求方式**GET
- **功能描述**:根据监测数据 ID 获取详细信息,包含视频列表及监测数据
### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|-----|----------|--------------------------|-----|
| id | int | 是 | 监测数据唯一标识(关联列表 ID | 1 |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 1.3 响应参数
| 参数名 | 类型 | 说明 |
|----------------------|----------|--------------------------|
| code | int | 响应码200为成功 |
| message | string | 响应信息 |
| data | object | 数据体 |
| ├─ id | string | 监测数据 ID |
| ├─ carNo | string | 车号 |
| ├─ carType | string | 车型 |
| ├─ carriageNo | string | 车厢号 |
| ├─ warnType | string | 告警类型 |
| ├─ faultType | string | 故障类型 |
| ├─ level | int | 等级1-3 |
| ├─ review | boolean | 复核状态 |
| ├─ date | string | 监测时间格式YYYY-MM-DD HH:MM:SS |
| ├─ video_list | array | 监测视频列表 |
| └─ ├─ video_name | string | 视频名称 |
| └─ ├─ video_url | string | 视频路径 |
| └─ ├─ capture_time | string | 视频拍摄时间格式YYYY-MM-DD HH:MM:SS |
| └─ ├─ length | float | 外观尺寸长度(单位:米) |
| └─ ├─ width | float | 外观尺寸宽度(单位:米) |
| └─ ├─ height | float | 外观尺寸高度(单位:米) |
| └─ ├─ volume | float | 体积(单位:立方米) |
| └─ └─ weight | float | 重量(单位:千克) |
### 1.4 响应示例
```json
{
"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](localFiles/image-6.png)