From f86eb11ff3b724a32453e677065ae3bcff7db673 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Sat, 27 Dec 2025 13:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E4=BA=A7=E7=9C=8B=E6=9D=BF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96=E5=92=8C=E6=8E=92=E4=BA=A7=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=AD=97=E6=AE=B5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../schedulingDashboard/index.vue | 114 ++++++++++++------ .../schedulingException/index.vue | 2 +- 2 files changed, 76 insertions(+), 40 deletions(-) diff --git a/src/views/productionSchedulingPlan/schedulingDashboard/index.vue b/src/views/productionSchedulingPlan/schedulingDashboard/index.vue index 63d4505..68fafe9 100644 --- a/src/views/productionSchedulingPlan/schedulingDashboard/index.vue +++ b/src/views/productionSchedulingPlan/schedulingDashboard/index.vue @@ -174,16 +174,20 @@
- {{ order.woCode }}/ - {{ order.partCode }} + {{ order.woCode }} + {{ order.partCode }}
-
- {{ order.batchNo }} / {{ order.makeQty }} / {{ order.productIdent }} / {{ order.priorityAps }} +
+
+ {{ order.batchNo }} + {{ order.makeQty }} + {{ order.productIdent }} + {{ + order.priorityAps + }} +
@@ -333,14 +337,7 @@ v-if="getWidthPercent(task.planStartTime, task.planEndTime) < 1" class="task-overlay-text" :style="{ - top: `${ - -20 - - getNarrowTaskOffset( - order.woCode, - layer.findIndex(t => t === task), - layerIndex - ) - }px`, + top: `${getNarrowTaskOffsetByLayer(layerIndex)}px`, }" > {{ task.processName }} @@ -511,6 +508,16 @@ export default { handleLeftScrollBound: null, }; }, + watch: { + // 监听参数变化 + '$route.query': { + handler(newQuery) { + console.log('参数变化:', newQuery); + this.handleParamsChange(); + }, + immediate: true, + }, + }, computed: { // 通过 Vue Router 获取查询参数 tsId() { @@ -708,21 +715,12 @@ export default { } }, }, - watch: { - // 监听参数变化 - '$route.query': { - handler(newQuery) { - console.log('参数变化:', newQuery); - this.handleParamsChange(); - }, - immediate: true - } - }, + mounted() { this.getSelectTeam(); this.getSelectEquip(); this.getProcessSet(); - this.updateTime(); + // this.updateTime(); this.updateTimeAxis(); this.$nextTick(() => { this.calcCurrentTimePosition(); @@ -734,7 +732,6 @@ export default { this.$refs.leftScrollContainer.addEventListener('scroll', this.handleLeftScrollBound); } }); - // 定时更新当前时间线位置 // setInterval(() => { @@ -756,18 +753,17 @@ export default { } }, methods: { + // 根据层索引确定窄任务文本的垂直偏移 + getNarrowTaskOffsetByLayer(layerIndex) { + // 偶数层在上方显示(负值),奇数层在下方显示(正值) + const offset = layerIndex % 2 === 0 ? -20 : 15; // -20px 在上方,5px 在下方 + return offset; + }, handleParamsChange() { // 参数变化时的处理逻辑 - console.log('接收到的参数:', { - tsId: this.tsId, - tsName: this.tsName, - userId: this.userId, - userName: this.userName, - timestamp: this.timestamp - }); - - this.formLabelAlign.teamId = this.tsId - this.formLabelAlign.teamName = this.tsName + this.formLabelAlign.teamId = this.tsId; + this.formLabelAlign.teamName = this.tsName; + this.updateTime(); // 根据参数加载数据 this.getData(); }, @@ -886,7 +882,6 @@ export default { if (this.legendStatus.pending) { this.formLabelAlign.planStatusList.push('1'); } - this.handleParamsChange() this.getData(); }, @@ -1755,7 +1750,7 @@ export default { z-index: 10; transform: none; min-width: max-content; - pointer-events: none; + pointer-events: none; display: inline-block; transform: scale(0.7); } @@ -1896,4 +1891,45 @@ export default { font-size: 10px; white-space: nowrap; } +.info-item-content { + display: flex; + width: 100%; +} +/* 左侧信息颜色区分 */ +.order-code { + color: #1a73e8; /* 谷歌蓝 - 专业稳重 */ + font-weight: bold; + +} + +.part-code { + color: #34a853; /* 谷歌绿 - 清新自然 */ + font-weight: bold; +} + +.batch-no { + color: #fbbc05; /* 谷歌黄 - 温暖明亮 */ + font-weight: bold; + flex: 0 0 100px; /* 固定宽度80px,不伸缩 */ +} + +.make-qty { + color: #ea4335; /* 谷歌红 - 醒目突出 */ + font-weight: bold; + flex: 1; /* 均匀分配剩余空间 */ +} + +.product-ident { + color: #9c27b0; /* 紫色 - 优雅独特 */ + font-weight: bold; + flex: 1; /* 均匀分配剩余空间 */ +} + +.priority-aps { + color: #ff6d01; /* 橙色 - 温暖活力 */ + font-weight: bold; + flex: 0 0 90px; /* 固定宽度80px,不伸缩 */ + text-align:right; + padding-right:15px +} diff --git a/src/views/productionSchedulingPlan/schedulingException/index.vue b/src/views/productionSchedulingPlan/schedulingException/index.vue index 2b1e66d..a3b2b9a 100644 --- a/src/views/productionSchedulingPlan/schedulingException/index.vue +++ b/src/views/productionSchedulingPlan/schedulingException/index.vue @@ -114,7 +114,7 @@ export default { // span: 12, // }, { - label: '调度员', + label: '计划员', prop: 'planUser', search: false, sortable: true,