From c9134152268a034f3b593af233ede380ced7ecbc Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Sun, 26 Oct 2025 20:22:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/dashboard/robot-picking-board.vue | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/views/modules/dashboard/robot-picking-board.vue b/src/views/modules/dashboard/robot-picking-board.vue index e7fe70d..647c3b7 100644 --- a/src/views/modules/dashboard/robot-picking-board.vue +++ b/src/views/modules/dashboard/robot-picking-board.vue @@ -283,9 +283,10 @@ export default { */ handleWebSocketMessage(message) { if (message && message.code === 0) { - this.containerPickingList = message.data.containerList - this.materialPickingList = message.data.materialList - // 如果storageBatchNo.length>10,则status改成分拣中 + this.containerPickingList = message.data.containerList || [] + this.materialPickingList = message.data.materialList || [] + + // 如果 storageBatchNo.length < 10,则 status 改成 分拣中 this.containerPickingList.forEach(item => { if (item.storageBatchNo && item.storageBatchNo.length < 10) { item.status = '分拣中' @@ -298,6 +299,20 @@ export default { } }) + // 排序:分拣中 在最上面 + this.containerPickingList.sort((a, b) => { + if (a.status === '分拣中' && b.status !== '分拣中') return -1 + if (a.status !== '分拣中' && b.status === '分拣中') return 1 + return 0 + }) + + this.materialPickingList.sort((a, b) => { + if (a.status === '分拣中' && b.status !== '分拣中') return -1 + if (a.status !== '分拣中' && b.status === '分拣中') return 1 + return 0 + }) + + } },