From 883900528a8efc9bf779af037f6f115c3f5ccc0d Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Tue, 30 Dec 2025 17:33:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(production):=20=E6=B7=BB=E5=8A=A0=E5=AE=89?= =?UTF-8?q?=E7=81=AF=E7=9C=8B=E6=9D=BF=E5=8A=9F=E8=83=BD=E5=B9=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加新的安灯看板页面,包含设备状态、任务完成率、OEE、品质数据等统计 - 集成看板API接口,实现数据自动刷新和多维度统计展示 - 隐藏安灯事件列表中触发源类型、班组编码、工单号、物料编码等字段 - 隐藏安灯事件分配列表中被分配用户姓名、角色编码、班组编码等字段 - 修正安灯规则配置中工位选择逻辑,改为按产线筛选 - 调整工位下拉选项数据源,优化选择体验 - 修复删除按钮操作中的语法错误 --- src/api/production/andonDashboard.js | 64 ++ src/views/production/andonDashboard/index.vue | 612 ++++++++++++++++++ src/views/production/andonEvent/index.vue | 12 +- .../production/andonEventAssignment/index.vue | 6 +- src/views/production/andonRule/index.vue | 10 +- 5 files changed, 690 insertions(+), 14 deletions(-) create mode 100644 src/api/production/andonDashboard.js create mode 100644 src/views/production/andonDashboard/index.vue diff --git a/src/api/production/andonDashboard.js b/src/api/production/andonDashboard.js new file mode 100644 index 0000000..2ee613a --- /dev/null +++ b/src/api/production/andonDashboard.js @@ -0,0 +1,64 @@ +import request from '@/utils/request' + +// 获取完整的看板数据 +export function getDashboardData(productLineCode) { + return request({ + url: '/production/andon/dashboard/all', + method: 'get', + params: { productLineCode } + }) +} + +// 获取设备状态统计 +export function getDeviceStatusSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/device-status', + method: 'get', + params: { productLineCode } + }) +} + +// 获取任务完成情况 +export function getTaskCompletionSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/task-completion', + method: 'get', + params: { productLineCode } + }) +} + +// 获取OEE数据 +export function getOeeSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/oee', + method: 'get', + params: { productLineCode } + }) +} + +// 获取利用率统计 +export function getUtilizationSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/utilization', + method: 'get', + params: { productLineCode } + }) +} + +// 获取品质数据 +export function getQualitySummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/quality', + method: 'get', + params: { productLineCode } + }) +} + +// 获取安灯事件统计 +export function getAndonEventSummary(productLineCode) { + return request({ + url: '/production/andon/dashboard/andon-events', + method: 'get', + params: { productLineCode } + }) +} diff --git a/src/views/production/andonDashboard/index.vue b/src/views/production/andonDashboard/index.vue new file mode 100644 index 0000000..5d5ab4d --- /dev/null +++ b/src/views/production/andonDashboard/index.vue @@ -0,0 +1,612 @@ + + + + + diff --git a/src/views/production/andonEvent/index.vue b/src/views/production/andonEvent/index.vue index 4b483bd..1289027 100644 --- a/src/views/production/andonEvent/index.vue +++ b/src/views/production/andonEvent/index.vue @@ -642,18 +642,18 @@ export default { { key: 0, label: `主键ID`, visible: false }, { key: 1, label: `安灯呼叫单号`, visible: true }, { key: 2, label: `呼叫类型编码`, visible: true }, - { key: 3, label: `触发源类型`, visible: true }, + { key: 3, label: `触发源类型`, visible: false }, { key: 4, label: `触发源引用ID`, visible: false }, { key: 5, label: `产品线编码`, visible: true }, { key: 6, label: `工位/工序编码`, visible: true }, - { key: 7, label: `班组编码`, visible: true }, - { key: 8, label: `工单号`, visible: true }, - { key: 9, label: `物料编码`, visible: true }, + { key: 7, label: `班组编码`, visible: false }, + { key: 8, label: `工单号`, visible: false }, + { key: 9, label: `物料编码`, visible: false }, { key: 10, label: `设备ID`, visible: false }, - { key: 11, label: `设备编码`, visible: true }, + { key: 11, label: `设备编码`, visible: false }, { key: 12, label: `优先级`, visible: true }, { key: 13, label: `事件状态`, visible: true }, - { key: 14, label: `呼叫描述`, visible: true }, + { key: 14, label: `呼叫描述`, visible: false }, { key: 15, label: `确认人`, visible: true }, { key: 16, label: `确认时间`, visible: true }, { key: 17, label: `开始处理时间`, visible: true }, diff --git a/src/views/production/andonEventAssignment/index.vue b/src/views/production/andonEventAssignment/index.vue index 8837e72..300c5b6 100644 --- a/src/views/production/andonEventAssignment/index.vue +++ b/src/views/production/andonEventAssignment/index.vue @@ -357,9 +357,9 @@ export default { { key: 0, label: `主键ID`, visible: false }, { key: 1, label: `事件ID`, visible: false }, { key: 2, label: `被分配用户ID`, visible: false }, - { key: 3, label: `被分配用户姓名`, visible: true }, - { key: 4, label: `被分配角色编码`, visible: true }, - { key: 5, label: `被分配班组编码`, visible: true }, + { key: 3, label: `被分配用户姓名`, visible: false }, + { key: 4, label: `被分配角色编码`, visible: false }, + { key: 5, label: `被分配班组编码`, visible: false }, { key: 6, label: `分配时间`, visible: true }, { key: 7, label: `接单时间`, visible: true }, { key: 8, label: `完成时间`, visible: true }, diff --git a/src/views/production/andonRule/index.vue b/src/views/production/andonRule/index.vue index a3f8368..6442826 100644 --- a/src/views/production/andonRule/index.vue +++ b/src/views/production/andonRule/index.vue @@ -155,9 +155,9 @@ @@ -444,7 +444,7 @@ export default { return ids.map(id => nameMap.get(String(id)) || id).join(', '); }, /** 删除按钮操作 */ - handleDelete(row) { + handleDelete(row) {listProcessStation const ruleIds = row.ruleId || this.ids; this.$modal.confirm('是否确认删除安灯规则配置编号为"' + ruleIds + '"的数据项?').then(function() { return delAndonRule(ruleIds); @@ -469,7 +469,7 @@ export default { }, /** 加载工位/工序下拉选项 */ loadProcessStations() { - listProcessStation({}).then(res => { + findProductLineList({ productLineType: 2 }).then(res => { this.processStationList = res.data || res.rows || []; }).catch(() => { this.processStationList = [];