From 36063089a765a134139ab6702f825fc688502e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Tue, 10 Jun 2025 15:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E9=81=93=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionBoard/index.vue | 42 ++++++-- .../components/SpecialPrintDialog.vue | 96 ++++++++++++++----- .../workorder/components/WorkOrderCard.vue | 5 +- 3 files changed, 111 insertions(+), 32 deletions(-) diff --git a/src/views/kanbanManagement/productionBoard/index.vue b/src/views/kanbanManagement/productionBoard/index.vue index 730ecb4..f7bce7b 100644 --- a/src/views/kanbanManagement/productionBoard/index.vue +++ b/src/views/kanbanManagement/productionBoard/index.vue @@ -14,8 +14,8 @@

{{ module.title }}

-
-
    +
    +
    • @@ -43,11 +43,11 @@ export default { currentTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), orderModules: [ { - title: '未完成工单', + title: '未上线工单', orders: [], }, { - title: '进行中工单', + title: '已上线工单', orders: [], }, { @@ -64,11 +64,22 @@ export default { this.refreshInterval = setInterval(() => { this.fetchOrders() }, 5 * 60 * 1000) + // 初始检查 + this.$nextTick(() => { + this.checkScroll() + }) }, beforeUnmount() { // 使用更现代的生命周期钩子 clearInterval(this.refreshInterval) }, + watch: { + // 监听工单数据变化,重新检查滚动条件 + 'orderModules.orders': { + handler: 'checkScroll', + deep: true, + }, + }, methods: { /** * 更新当前时间 @@ -92,6 +103,9 @@ export default { this.orderModules[0].orders = noStartOrders.data this.orderModules[1].orders = inProgressOrders.data this.orderModules[2].orders = finishedOrders.data + this.$nextTick(() => { + this.checkScroll() + }) } catch (error) { console.error('获取工单数据失败:', error) } @@ -137,10 +151,10 @@ export default { * @returns {string} 对应的类名 */ getOrderClass(title) { - if (title === '未完成工单') { + if (title === '未上线工单') { return 'unfinished-order' } - if (title === '进行中工单') { + if (title === '已上线工单') { return 'in-progress-order' } if (title === '已完成工单') { @@ -148,6 +162,19 @@ export default { } return '' }, + checkScroll() { + this.$nextTick(() => { + this.$refs.scrollLists.forEach((list, index) => { + const ul = list.querySelector('ul') + const containerHeight = list.offsetHeight + const listHeight = ul.offsetHeight + this.orderModules[index].shouldAnimate = listHeight > containerHeight + }) + }) + }, + shouldAnimate(index) { + return this.orderModules[index].shouldAnimate + }, }, } @@ -251,6 +278,9 @@ export default { position: absolute; top: 0; width: 100%; /* 让 ul 宽度撑满容器 */ +} + +.scroll-list ul.animate-scroll { animation: scroll 30s linear infinite; } diff --git a/src/views/qualityManagement/backend/touchScreen/workorder/components/SpecialPrintDialog.vue b/src/views/qualityManagement/backend/touchScreen/workorder/components/SpecialPrintDialog.vue index 2808f05..a2b874e 100644 --- a/src/views/qualityManagement/backend/touchScreen/workorder/components/SpecialPrintDialog.vue +++ b/src/views/qualityManagement/backend/touchScreen/workorder/components/SpecialPrintDialog.vue @@ -1,8 +1,9 @@