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 @@ + + + + + + + + + + + + 刷新数据 + + + 更新时间:{{ updateTime }} + + + + + + + + + + + + + 设备状态 + {{ safe(deviceStatus.runningDevices) }} / {{ safe(deviceStatus.totalDevices) }} + + 运行 {{ safe(deviceStatus.runningDevices) }} + 故障 {{ safe(deviceStatus.faultDevices) }} + 停机 {{ safe(deviceStatus.stoppedDevices) }} + + + + + + + + + + + 今日完成率 + {{ formatPercent(taskCompletion.todayCompletionRate) }}% + + 完成 {{ safe(taskCompletion.todayCompleteAmount) }} / 计划 {{ safe(taskCompletion.todayPlanAmount) }} + + + + + + + + + + + OEE + {{ formatPercent(oeeSummary.overallOee) }}% + + 可用率 {{ formatPercent(oeeSummary.availability) }}% | 性能 {{ formatPercent(oeeSummary.performance) }}% + + + + + + + + + + + 良品率 + {{ formatPercent(qualitySummary.todayYieldRate) }}% + + 良品 {{ safe(qualitySummary.todayGoodCount) }} | 不良 {{ safe(qualitySummary.todayDefectCount) }} + + + + + + + + + + + + 安灯事件统计 + + + + + 今日事件 + {{ andonEvents.todayTotal }} + + + + + 待处理 + {{ andonEvents.pendingCount }} + + + + + 处理中 + {{ andonEvents.processingCount }} + + + + + 已解决 + {{ andonEvents.resolvedCount }} + + + + + 平均响应 + {{ andonEvents.avgResponseMinutes }} 分钟 + + + + + 平均解决 + {{ andonEvents.avgResolveMinutes }} 分钟 + + + + + + + + + + + + + + 设备状态详情 + + + + + + + + + {{ scope.row.statusName }} + + + + + + + + + + + + 设备OEE详情 + + + + + + + {{ scope.row.oee }}% + + + + + + + + + + + + + + + + 产线任务完成情况 + + + + + + + + + + + + + + + + + + + 产线利用率 + 整体利用率:{{ utilizationSummary.overallUtilization }}% + + + + + + + + + + + + + + + + + + + + + 产线品质数据 + 本月良品率:{{ qualitySummary.monthYieldRate }}% + + + + + + + + + {{ scope.row.defectCount }} + + + + + + {{ scope.row.yieldRate }}% + + + + + + + + + + + 安灯事件类型统计 + + + + + + + + + {{ scope.row.pendingCount }} + + + + + + + + + + + + + + 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 = [];