排产看板调整

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

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

Loading…
Cancel
Save