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,