From 7c7c9da66c66c1f1b76ddb8bb2ba615f83dee798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Fri, 9 Oct 2026 22:04:42 +0800 Subject: [PATCH] =?UTF-8?q?vue=E7=95=8C=E9=9D=A2=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/sortingBoard54.vue | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/src/views/modules/haianWarehouse/dashboard/sortingBoard54.vue b/src/views/modules/haianWarehouse/dashboard/sortingBoard54.vue index 25eb389..1a01cec 100644 --- a/src/views/modules/haianWarehouse/dashboard/sortingBoard54.vue +++ b/src/views/modules/haianWarehouse/dashboard/sortingBoard54.vue @@ -17,6 +17,7 @@
标签 {{ visibleRows.length }} 未完成 {{ pendingCount }} + 数据异常 {{ abnormalCount }} 已完成 {{ completedCount }}
@@ -30,17 +31,17 @@
- - - - - - + + + + + - + + @@ -50,8 +51,7 @@ - - + @@ -108,6 +108,8 @@ export default { stale () { return this.lastReceivedAt > 0 && this.now - this.lastReceivedAt > 20000 }, visibleRows () { return this.available && !this.stale ? this.rows : [] }, pendingCount () { return this.visibleRows.filter(item => item.status === '未完成').length }, + // 数据异常独立计数,避免隐藏说明列后总数与未完成、已完成之和不一致却没有提示 - rqrq + abnormalCount () { return this.visibleRows.filter(item => item.status === '数据异常').length }, completedCount () { return this.visibleRows.filter(item => item.status === '已完成').length }, // 绿灯只代表STOMP连接正常,WCS/WMS查询异常通过旁边业务提示显示,不混淆连接与任务状态 - rqrq connectionText () { return { connected: '连接正常', disconnected: '连接断开,等待重连', connecting: '正在连接', disabled: '推送已停用' }[this.wsState] }, @@ -250,7 +252,28 @@ export default { const board = data.row this.lastReceivedAt = Date.now() this.available = board.available === true - this.rows = this.available && Array.isArray(board.rows) ? board.rows : [] + // 四个人工位置的HTTP与推送数据统一按未完成、数据异常、已完成稳定分组,组内保留原顺序 - rqrq + const sourceRows = this.available && Array.isArray(board.rows) ? board.rows : [] + const unfinishedRows = [] + const abnormalRows = [] + const completedRows = [] + sourceRows.forEach(item => { + if (item.status === '已完成') completedRows.push(item) + else if (item.status === '未完成') unfinishedRows.push(item) + else abnormalRows.push(item) + }) + const nextRows = unfinishedRows.concat(abnormalRows, completedRows) + const orderChanged = this.rows.length !== nextRows.length || this.rows.some((item, index) => { + const nextItem = nextRows[index] + return item.rfidBarcode !== nextItem.rfidBarcode || item.status !== nextItem.status + }) + this.rows = nextRows + // 列表顺序或状态变化且仍有待处理/异常项时回到顶部,避免旧滚动位置让已完成项遮住它们 - rqrq + if (orderChanged && (unfinishedRows.length > 0 || abnormalRows.length > 0)) { + this.$nextTick(() => { + if (this.$refs.tableViewport) this.$refs.tableViewport.scrollTop = 0 + }) + } this.updatedAt = Number(board.updatedAt) || 0 this.message = board.message || (this.rows.length ? '数据正常' : '当前分拣位暂无任务') }, @@ -314,6 +337,8 @@ export default { .summary-counts, .summary-refresh { display: flex; align-items: center; gap: 20px; } .summary-counts strong { font-size: 26px; margin-left: 8px; } .pending-text { color: #ffd17d; } +/* 人工分拣异常数量和状态使用醒目红色,提醒现场核对标签预留信息 - rqrq */ +.abnormal-text { color: #ffb3b3; } .completed-text { color: #80e5bc; } .ws-status-dot { display: inline-block; width: 12px; height: 12px; margin-left: 12px; border-radius: 50%; vertical-align: middle; background: #94a3b8; } .ws-status-dot.connected { background: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.8); } @@ -331,6 +356,7 @@ export default { .board-table .row-message { color: #ffd17d; font-size: 14px; } .status-badge { display: inline-block; padding: 5px 10px; border-radius: 4px; white-space: nowrap; font-size: 16px; } .status-badge.pending { background: #745827; color: #fff0cf; } +.status-badge.abnormal { background: #8b2d2d; color: #ffe2e2; } .status-badge.completed { background: #21684e; color: #d4ffeb; } .board-table .empty-message { height: 220px; font-size: 24px; color: #d2e1ee; } .board-table .empty-message.is-error { color: #ffd17d; }
序号工单号物料编码物料名称RFID / 标签号状态说明
序号工单号物料编码物料名称RFID / 标签号状态
{{ item.partNo || '-' }} {{ (item.partDesc || '').slice(0, 100) || '-' }} {{ item.rfidBarcode }}{{ item.status }}{{ item.message || '-' }}{{ item.status }}