diff --git a/src/views/productionSchedulingPlan/schedulingDashboard/index.vue b/src/views/productionSchedulingPlan/schedulingDashboard/index.vue
index d7d7a1c..b0a5456 100644
--- a/src/views/productionSchedulingPlan/schedulingDashboard/index.vue
+++ b/src/views/productionSchedulingPlan/schedulingDashboard/index.vue
@@ -232,7 +232,6 @@
{{ tooltipData.woCode }}
{{ tooltipData.teamName }}
{{ tooltipData.equipName }}
-
-
@@ -247,6 +246,26 @@
车间订单号:
{{ tooltipData.woCode || '-' }}
+ -
+ 零件号:
+ {{ tooltipData.partCode || '-' }}
+
+ -
+ 流程卡号:
+ {{ tooltipData.cardNo || '-' }}
+
+ -
+ 批次号:
+ {{ tooltipData.batehNo || '-' }}
+
+ -
+ 当前工序:
+ {{ tooltipData.currenterecessName || '-' }}
+
+ -
+ 数量:
+ {{ tooltipData.makeoty || '-' }}
+
-
计划开始时间:
{{ tooltipData.planStartTime || '-' }}
@@ -266,14 +285,12 @@
-
状态:
-
-
未开始
进行中
已完成
-
+
未开始
进行中
已完成
@@ -317,7 +334,7 @@ export default {
tooltipData: {},
tooltipX: 0,
tooltipY: 0,
- baseRowHeight: 40, // 基础行高(单任务时的高度)
+ baseRowHeight: 36, // 基础行高(单任务时的高度)
rowHeights: {}, // 存储每个设备的动态行高
};
},
@@ -497,10 +514,40 @@ export default {
// 提示框控制
showTooltip(e, task, device) {
- this.tooltipData = { ...task, device };
- this.tooltipX = e.pageX + 10;
- this.tooltipY = e.pageY + 10;
- this.tooltipVisible = true;
+ this.tooltipData = { ...task, device };
+ this.tooltipVisible = true; // 先显示tooltip以便获取尺寸
+
+ this.$nextTick(() => {
+ const tooltipEl = document.querySelector('.tooltip');
+ if (!tooltipEl) return; // 容错处理
+
+ const tooltipWidth = tooltipEl.offsetWidth;
+ const tooltipHeight = tooltipEl.offsetHeight;
+ const padding = 5; // 缩小边距,让tooltip更靠近鼠标
+ const mouseOffsetX = 8; // 水平偏移量(原10px改为8px)
+ const mouseOffsetY = 8; // 垂直偏移量(原10px改为8px)
+
+ // 初始位置(更靠近鼠标)
+ let x = e.pageX + mouseOffsetX;
+ let y = e.pageY + mouseOffsetY;
+
+ // 右侧边界检测
+ if (x + tooltipWidth > document.documentElement.clientWidth) {
+ x = e.pageX - tooltipWidth - mouseOffsetX;
+ }
+
+ // 底部边界检测
+ if (y + tooltipHeight > document.documentElement.clientHeight) {
+ y = e.pageY - tooltipHeight - mouseOffsetY;
+ }
+
+ // 确保不超出顶部和左侧
+ x = Math.max(padding, x);
+ y = Math.max(padding, y);
+
+ this.tooltipX = x;
+ this.tooltipY = y;
+ });
},
hideTooltip() {
this.tooltipVisible = false;
@@ -866,7 +913,7 @@ export default {
}
.task-label {
- font-size: 12px;
+ font-size: 14px;
color: white;
white-space: nowrap;
overflow: hidden;
@@ -879,11 +926,12 @@ export default {
background-color: white;
border: 1px solid #ddd;
border-radius: 4px;
- padding: 10px;
+ padding: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
z-index: 1000;
font-size: 12px;
pointer-events: none;
+ /* z-index: 100; */
}
.tooltip-content div {
@@ -906,8 +954,8 @@ export default {
.detail-item {
display: flex;
align-items: center;
- margin-bottom: 12px;
- line-height: 24px;
+ margin-bottom: 5px;
+ line-height: 20px;
.label {
width: 100px;