排产看板提交

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

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

Loading…
Cancel
Save