排产看板调整

dev-scheduling
zhangdi 1 day ago
parent 466ecffde7
commit 6ffecd1b65
  1. 25
      src/views/productionSchedulingPlan/schedulingDashboard/container.vue

@ -331,13 +331,15 @@
> >
</div> </div>
<!-- 为窄任务添加带偏移的文本显示 --> <!-- 为窄任务添加带偏移的文本显示 task.processName-->
<div <div
v-else v-else
class="task-overlay-text" class="task-overlay-text"
:style="{ :style="{
width:`${getWidthPercent(task.planStartTime, task.planEndTime)}%`,
top: `${getNarrowTaskOffsetByLayer(layerIndex)}px`, top: `${getNarrowTaskOffsetByLayer(layerIndex)}px`,
left: `${getNarrowTaskOffsetByLayerLeft(task.processName)}px`, left: `${getNarrowTaskOffsetByLayerLeft(task.processName,getWidthPercent(task.planStartTime, task.planEndTime),layerIndex)}px`,
}" }"
> >
{{ task.processName }} {{ task.processName }}
@ -773,15 +775,12 @@ export default {
return offset; return offset;
}, },
// //
getNarrowTaskOffsetByLayerLeft(processName) { getNarrowTaskOffsetByLayerLeft(processName,width,layerIndex) {
// //
// const offset = processName.length >= 5 ? -30 : -15;
const offset = null; const offset = null;
if (processName.length >= 7) {
return -33;
}
if (processName.length >= 6) { if (processName.length >= 6) {
return -20; return -15;
} }
if (processName.length >= 5) { if (processName.length >= 5) {
return -17; return -17;
@ -1742,7 +1741,7 @@ export default {
padding: 2px 0px; padding: 2px 0px;
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
overflow: hidden; /* overflow: hidden; */
transition: all 0.2s; transition: all 0.2s;
white-space: nowrap; white-space: nowrap;
border: 1px solid rgba(255, 255, 255, 0.3); border: 1px solid rgba(255, 255, 255, 0.3);
@ -1770,9 +1769,9 @@ export default {
position: absolute; position: absolute;
font-size: 9px; font-size: 9px;
color: white; color: white;
white-space: nowrap; /* white-space: nowrap; */
overflow: hidden; /* overflow: hidden; */
text-overflow: ellipsis; /* text-overflow: ellipsis; */
max-width: 120%; max-width: 120%;
text-align: center; text-align: center;
/* 正确的居中方式 */ /* 正确的居中方式 */

Loading…
Cancel
Save