diff --git a/docs/功能测试-设备履历报表.md b/docs/功能测试-设备履历报表.md new file mode 100644 index 00000000..923ba142 --- /dev/null +++ b/docs/功能测试-设备履历报表.md @@ -0,0 +1,22 @@ +# 功能测试 - 设备履历报表 + +> 模块:数据中台 / 生产报表 / 设备履历报表 (Equipment History Report) +> 路由:`/data_middleground/produce/report/equipment-history` + +## 测试任务列表 + +| 序号 | 测试项 | 操作步骤 | 预期结果 | +|---:|---|---|---| +| 1 | 页面入口 | 进入设备履历报表页面 | 页面显示设备编码、状态、时间范围筛选项和列表 | +| 2 | 设备编码查询 | 输入有效设备编码并查询 | 表格展示设备履历记录 | +| 3 | 状态筛选 | 选择运行/空闲/异常状态查询 | 表格仅展示匹配状态数据 | +| 4 | 时间范围筛选 | 选择开始结束时间后查询 | 表格展示时间范围内履历 | +| 5 | 分页切换 | 查询出多页数据后切换分页 | 当前页数据刷新,总数正确 | +| 6 | 重置功能 | 点击重置 | 筛选项、表格和分页状态清空 | +| 7 | 空数据 | 输入无匹配条件查询 | 显示空态,不出现脚本错误 | +| 8 | 国际化检查 | 切换中英文语言 | 页面文案随语言切换 | + +## 回归关注点 + +- 接口必须调用 `report/device/log`,method 为 `get.device.status.log`。 +- 时间范围需要拆分为 `start_time` 和 `end_time`。 diff --git a/docs/迁移任务列表.md b/docs/迁移任务列表.md index 1ecffeb2..83d5e197 100644 --- a/docs/迁移任务列表.md +++ b/docs/迁移任务列表.md @@ -3,8 +3,8 @@ > 根据 `后台Webman界面截图对照表.md` 生成。状态以当前 V2 项目中已落地的页面目录为准。 - 总功能数:79 -- 已迁移:32 -- 未迁移:47 +- 已迁移:33 +- 未迁移:46 | 状态 | 一级模块 | 二级模块 | 三级模块 | 功能说明 | V2 目标路径 | |:---:|---|---|---|---|---| @@ -84,7 +84,7 @@ | ✅ | 数据中台 (Data Platform) | 基础追溯 (Traceability) | 电池曲线 (Battery Curve) | 电池曲线 | `src/views/data-platform/traceability/battery-curve/` | | ✅ | 数据中台 (Data Platform) | 基础追溯 (Traceability) | 托盘追溯 (Tray Traceability) | 托盘追溯 | `src/views/data-platform/traceability/tray/` | | ✅ | 数据中台 (Data Platform) | 基础追溯 (Traceability) | 电池追溯 (Battery Traceability) | 电池追溯 | `src/views/data-platform/traceability/battery/` | -| ⬜ | 数据中台 (Data Platform) | 生产报表 (Production Reports) | 设备履历报表 (Equipment History Report) | | 待确认 | +| ✅ | 数据中台 (Data Platform) | 生产报表 (Production Reports) | 设备履历报表 (Equipment History Report) | 设备履历报表 | `src/views/data-platform/production-reports/equipment-history/` | | ⬜ | 数据中台 (Data Platform) | 生产报表 (Production Reports) | 电池详情报表 (Battery Detail Report) | | 待确认 | | ⬜ | 数据中台 (Data Platform) | 相关性分析 (Correlation Analysis) | 鹰眼 (Hawkeye) | | 待确认 | diff --git a/src/api/data-platform/production-reports/equipment-history.js b/src/api/data-platform/production-reports/equipment-history.js new file mode 100644 index 00000000..7d200f12 --- /dev/null +++ b/src/api/data-platform/production-reports/equipment-history.js @@ -0,0 +1,15 @@ +import { request } from '@/api/_service' + +const BASE = 'report/' + +function apiParams (method, data = {}) { + return { method, platform: 'api', ...data } +} + +export function getEquipmentHistoryList (data) { + return request({ + url: BASE + 'device/log', + method: 'post', + data: apiParams('get.device.status.log', data) + }) +} diff --git a/src/locales/en.json b/src/locales/en.json index afc04140..a209c10d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1336,6 +1336,27 @@ "cancel_success": "Cancel active successfully", "activation_success": "Rework activation successfully" } + }, + "production_reports": { + "equipment_history": { + "query": "Search", + "reset": "Reset", + "device_code": "Device Code", + "enter_device_code": "Enter device code", + "device_name": "Device Name", + "status": "Status", + "select_status": "Select status", + "running": "Running", + "idle": "Idle", + "error": "Error", + "status_name": "Status Name", + "time_range": "Time Range", + "start_time": "Start Time", + "end_time": "End Time", + "duration": "Duration", + "remark": "Remark", + "no_data": "No data" + } } } }, diff --git a/src/locales/zh-chs.json b/src/locales/zh-chs.json index 8e2ac626..0b482d4b 100644 --- a/src/locales/zh-chs.json +++ b/src/locales/zh-chs.json @@ -1336,6 +1336,27 @@ "cancel_success": "取消激活成功", "activation_success": "复投激活成功" } + }, + "production_reports": { + "equipment_history": { + "query": "查询", + "reset": "重置", + "device_code": "设备编码", + "enter_device_code": "请输入设备编码", + "device_name": "设备名称", + "status": "状态", + "select_status": "请选择状态", + "running": "运行", + "idle": "空闲", + "error": "异常", + "status_name": "状态名称", + "time_range": "时间范围", + "start_time": "开始时间", + "end_time": "结束时间", + "duration": "持续时长", + "remark": "备注", + "no_data": "暂无数据" + } } } }, diff --git a/src/router/modules/data-platform.js b/src/router/modules/data-platform.js index cf02cfff..be6784ca 100644 --- a/src/router/modules/data-platform.js +++ b/src/router/modules/data-platform.js @@ -43,6 +43,12 @@ export default { name: `${pre}traceability-battery`, meta: { ...meta, cache: true, title: '电池追溯' }, component: _import('data-platform/traceability/battery') + }, + { + path: 'produce/report/equipment-history', + name: `${pre}report-equipment-history`, + meta: { ...meta, cache: true, title: '设备履历报表' }, + component: _import('data-platform/production-reports/equipment-history') } ])('data_middleground-') } diff --git a/src/views/data-platform/production-reports/equipment-history/index.vue b/src/views/data-platform/production-reports/equipment-history/index.vue new file mode 100644 index 00000000..be7737d3 --- /dev/null +++ b/src/views/data-platform/production-reports/equipment-history/index.vue @@ -0,0 +1,108 @@ + + + + +