|
|
|
@ -104,22 +104,43 @@
|
|
|
|
- 排行榜无数据:灰色文字"暂无数据"
|
|
|
|
- 排行榜无数据:灰色文字"暂无数据"
|
|
|
|
- 状态网格无机床:灰色文字"暂无机床"
|
|
|
|
- 状态网格无机床:灰色文字"暂无机床"
|
|
|
|
|
|
|
|
|
|
|
|
### 8. Mock数据
|
|
|
|
### 8. 接口引用与数据结构
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/summary 统计摘要:**
|
|
|
|
> Mock/正式API的URL、HTTP方法均定义在 `03-API接口设计.md` §3.12 端点清单,本节仅引用编号并定义返回数据结构。大屏API(/api/screen/**)免认证,但仅限读取。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### 接口引用
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 接口名称 | 端点编号 | 界面用途 |
|
|
|
|
|
|
|
|
|---------|---------|---------|
|
|
|
|
|
|
|
|
| 大屏汇总统计 | §3.12 #1 | 顶部统计卡片 |
|
|
|
|
|
|
|
|
| 采集服务状态 | §3.12 #2 | 采集服务状态卡片 |
|
|
|
|
|
|
|
|
| 各车间产量 | §3.12 #3 | 车间产量柱状图 |
|
|
|
|
|
|
|
|
| 产量趋势 | §3.12 #4 | 7天产量趋势折线图 |
|
|
|
|
|
|
|
|
| 机床产量排行 | §3.12 #5 | 机床排行TOP5 |
|
|
|
|
|
|
|
|
| 工人产量排行 | §3.12 #6 | 工人排行TOP5 |
|
|
|
|
|
|
|
|
| 机床状态总览 | §3.12 #7 | 机床状态网格 |
|
|
|
|
|
|
|
|
| 大屏筛选条件 | §3.12 #8 | 筛选下拉选项 |
|
|
|
|
|
|
|
|
| 刷新间隔配置 | §3.12 #9 | 自动刷新间隔 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### 数据结构
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**大屏汇总统计(§3.12 #1):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "onlineCount": 142, "totalMachines": 160, "todayProduction": 8520, "activeAlerts": 3, "avgQuantityPerMachine": 60 }}
|
|
|
|
{ "code": 0, "data": { "onlineCount": 142, "totalMachines": 160, "todayProduction": 8520, "activeAlerts": 3, "avgQuantityPerMachine": 60 }}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/collector-status 采集服务状态:**
|
|
|
|
**采集服务状态(§3.12 #2):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "status": "running", "uptime": "3天16小时", "successCount": 12800, "failCount": 5, "lastCollectTime": "2026-04-25T17:36:38" }}
|
|
|
|
{ "code": 0, "data": { "status": "running", "uptime": "3天16小时", "successCount": 12800, "failCount": 5, "lastCollectTime": "2026-04-25T17:36:38" }}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/workshop-production 各车间产量:**
|
|
|
|
**各车间产量(§3.12 #3):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "name": "A栋", "quantity": 3200 },
|
|
|
|
{ "name": "A栋", "quantity": 3200 },
|
|
|
|
@ -128,8 +149,9 @@
|
|
|
|
]}}
|
|
|
|
]}}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/production-trend 7天产量趋势:**
|
|
|
|
**产量趋势(§3.12 #4):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "date": "04-19", "quantity": 8200 }, { "date": "04-20", "quantity": 7600 },
|
|
|
|
{ "date": "04-19", "quantity": 8200 }, { "date": "04-20", "quantity": 7600 },
|
|
|
|
@ -139,8 +161,9 @@
|
|
|
|
]}}
|
|
|
|
]}}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/machine-rank 机床产量排行:**
|
|
|
|
**机床产量排行(§3.12 #5):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "rank": 1, "machineName": "西-1.8", "quantity": 580 },
|
|
|
|
{ "rank": 1, "machineName": "西-1.8", "quantity": 580 },
|
|
|
|
@ -151,8 +174,9 @@
|
|
|
|
]}}
|
|
|
|
]}}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/worker-rank 工人产量排行:**
|
|
|
|
**工人产量排行(§3.12 #6):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "rank": 1, "workerName": "张三", "quantity": 1240 },
|
|
|
|
{ "rank": 1, "workerName": "张三", "quantity": 1240 },
|
|
|
|
@ -163,8 +187,9 @@
|
|
|
|
]}}
|
|
|
|
]}}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/machine-status 机床状态网格:**
|
|
|
|
**机床状态总览(§3.12 #7):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "machineId": 1, "machineName": "西-1.8", "isOnline": 1 },
|
|
|
|
{ "machineId": 1, "machineName": "西-1.8", "isOnline": 1 },
|
|
|
|
@ -175,8 +200,9 @@
|
|
|
|
]}}
|
|
|
|
]}}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**GET /api/screen/filters 筛选选项(从cnc_screen_filter读取):**
|
|
|
|
**大屏筛选条件(§3.12 #8):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
```json
|
|
|
|
```json
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "code": 0, "data": { "items": [
|
|
|
|
{ "filterType": "workshop", "filterValue": "A栋", "isDefault": 1 },
|
|
|
|
{ "filterType": "workshop", "filterValue": "A栋", "isDefault": 1 },
|
|
|
|
@ -185,6 +211,13 @@
|
|
|
|
]}}
|
|
|
|
]}}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**刷新间隔配置(§3.12 #9):**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
|
|
|
{ "code": 0, "data": { "interval": 10, "unit": "seconds" }}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### 9. 数据需求
|
|
|
|
### 9. 数据需求
|
|
|
|
|
|
|
|
|
|
|
|
> 以下为本页面需要的数据,数据库设计定稿时需覆盖。参考 `01-数据库设计.md` 草案。
|
|
|
|
> 以下为本页面需要的数据,数据库设计定稿时需覆盖。参考 `01-数据库设计.md` 草案。
|
|
|
|
|