排产看板提交

dev-scheduling
zhangdi 3 days ago
parent fd65912891
commit 7fd6ff31a7
  1. 41
      src/views/productionSchedulingPlan/schedulingDashboard/index.vue

@ -297,11 +297,11 @@
:key="taskIndex"
class="task-bar"
:class="{
'task-bar-narrow': getWidthPercent(task.startTime, task.endTime) < 6,
'task-bar-narrow': getWidthPercent(task.planStartTime, task.planEndTime) < 6,
}"
:style="{
left: `${getPositionPercent(task.startTime)}%`,
width: `${getWidthPercent(task.startTime, task.endTime)}%`,
left: `${getPositionPercent(task.planStartTime)}%`,
width: `${getWidthPercent(task.planStartTime, task.planEndTime)}%`,
backgroundColor: getStatusColor(task),
top: `${getLayerOffset(
layerIndex,
@ -318,7 +318,7 @@
>
<div class="task-label">
<span
v-if="getWidthPercent(task.startTime, task.endTime) >= 6"
v-if="getWidthPercent(task.planStartTime, task.planStartTime) >= 6"
class="task-label-txt task-label-txt-inside"
:style="{
top: '50%',
@ -328,7 +328,7 @@
>
</div>
<div
v-if="getWidthPercent(task.startTime, task.endTime) < 6"
v-if="getWidthPercent(task.planStartTime, task.planStartTime) < 6"
class="task-overlay-text"
>
{{ task.processName }}
@ -466,7 +466,7 @@ export default {
//
currentPage: 1,
pageSize: 6,
pageSize: 10,
//
tooltipVisible: false,
@ -698,12 +698,12 @@ export default {
this.$nextTick(() => {
this.calcCurrentTimePosition();
//
// if (this.$refs.timelineContainerTest) {
// this.$refs.timelineContainerTest.addEventListener('scroll', this.handleRightScrollBound);
// }
// if (this.$refs.leftScrollContainer) {
// this.$refs.leftScrollContainer.addEventListener('scroll', this.handleLeftScrollBound);
// }
if (this.$refs.timelineContainerTest) {
this.$refs.timelineContainerTest.addEventListener('scroll', this.handleRightScrollBound);
}
if (this.$refs.leftScrollContainer) {
this.$refs.leftScrollContainer.addEventListener('scroll', this.handleLeftScrollBound);
}
});
// 线
@ -713,17 +713,17 @@ export default {
},
created() {
// this
// this.handleRightScrollBound = this.handleRightScroll.bind(this);
// this.handleLeftScrollBound = this.handleLeftScroll.bind(this);
this.handleRightScrollBound = this.handleRightScroll.bind(this);
this.handleLeftScrollBound = this.handleLeftScroll.bind(this);
},
beforeDestroy() {
//
// if (this.$refs.timelineContainerTest) {
// this.$refs.timelineContainerTest.removeEventListener('scroll', this.handleRightScrollBound);
// }
// if (this.$refs.leftScrollContainer) {
// this.$refs.leftScrollContainer.removeEventListener('scroll', this.handleLeftScrollBound);
// }
if (this.$refs.timelineContainerTest) {
this.$refs.timelineContainerTest.removeEventListener('scroll', this.handleRightScrollBound);
}
if (this.$refs.leftScrollContainer) {
this.$refs.leftScrollContainer.removeEventListener('scroll', this.handleLeftScrollBound);
}
},
methods: {
//
@ -1189,6 +1189,7 @@ export default {
}
// timeStr "YYYY-MM-DD HH:mm" "2025-12-25 18:35"
console.log('timeStr',timeStr)
const [datePart, timePart] = timeStr.split(' ');
const [year, month, day] = datePart.split('-').map(Number);
const [hours, minutes] = timePart.split(':').map(Number);

Loading…
Cancel
Save