|
|
|
@ -826,11 +826,12 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleParamsChange() { |
|
|
|
handleParamsChange() { |
|
|
|
// 参数变化时的处理逻辑 |
|
|
|
// 参数变化时的处理逻辑 |
|
|
|
this.formLabelAlign.teamId = this.tsId; |
|
|
|
// this.formLabelAlign.teamId = this.tsId; |
|
|
|
this.formLabelAlign.teamName = this.tsName; |
|
|
|
// this.formLabelAlign.teamName = this.tsName; |
|
|
|
|
|
|
|
|
|
|
|
this.updateTime(); |
|
|
|
this.updateTime(); |
|
|
|
// 根据参数加载数据 |
|
|
|
// 根据参数加载数据 |
|
|
|
this.getData(); |
|
|
|
// this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 计算重叠的窄任务的垂直偏移量 |
|
|
|
// 计算重叠的窄任务的垂直偏移量 |
|
|
|
getNarrowTaskOffset(orderWoCode, taskIndex, layerIndex) { |
|
|
|
getNarrowTaskOffset(orderWoCode, taskIndex, layerIndex) { |
|
|
|
@ -922,7 +923,7 @@ export default { |
|
|
|
this.$refs.timelineContainerTest.scrollTop = leftScrollTop; |
|
|
|
this.$refs.timelineContainerTest.scrollTop = leftScrollTop; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
updateTime() { |
|
|
|
updateTime(type) { |
|
|
|
// 设置默认时间范围为今天到后两天 |
|
|
|
// 设置默认时间范围为今天到后两天 |
|
|
|
const today = new Date(); |
|
|
|
const today = new Date(); |
|
|
|
const endDay = new Date(today); |
|
|
|
const endDay = new Date(today); |
|
|
|
@ -932,10 +933,11 @@ export default { |
|
|
|
const endDate = endDay.toISOString().split('T')[0]; |
|
|
|
const endDate = endDay.toISOString().split('T')[0]; |
|
|
|
|
|
|
|
|
|
|
|
this.formLabelAlign.timeRange = [startDate, endDate]; |
|
|
|
this.formLabelAlign.timeRange = [startDate, endDate]; |
|
|
|
this.handleLegendChange(); |
|
|
|
|
|
|
|
|
|
|
|
this.handleLegendChange(type); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 处理图例状态变化 |
|
|
|
// 处理图例状态变化 |
|
|
|
handleLegendChange() { |
|
|
|
handleLegendChange(type) { |
|
|
|
// 如果需要重新加载数据,可以调用 |
|
|
|
// 如果需要重新加载数据,可以调用 |
|
|
|
this.formLabelAlign.planStatusList = []; |
|
|
|
this.formLabelAlign.planStatusList = []; |
|
|
|
if (this.legendStatus.completed) { |
|
|
|
if (this.legendStatus.completed) { |
|
|
|
@ -947,6 +949,9 @@ export default { |
|
|
|
if (this.legendStatus.pending) { |
|
|
|
if (this.legendStatus.pending) { |
|
|
|
this.formLabelAlign.planStatusList.push('1'); |
|
|
|
this.formLabelAlign.planStatusList.push('1'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(type=='reset'){ |
|
|
|
|
|
|
|
sessionStorage.setItem('formLabelAlign',JSON.stringify(this.formLabelAlign)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -1050,8 +1055,12 @@ export default { |
|
|
|
this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0]; |
|
|
|
this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0]; |
|
|
|
this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1]; |
|
|
|
this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1]; |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.formLabelAlign.planStatusList.length <= 0) { |
|
|
|
// if (this.formLabelAlign.planStatusList.length <= 0) { |
|
|
|
this.formLabelAlign.planStatusList = null; |
|
|
|
// this.formLabelAlign.planStatusList = []; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
let seeData = sessionStorage.getItem('formLabelAlign'); |
|
|
|
|
|
|
|
if (seeData) { |
|
|
|
|
|
|
|
this.formLabelAlign = JSON.parse(seeData); |
|
|
|
} |
|
|
|
} |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
await getData(this.formLabelAlign).then(res => { |
|
|
|
await getData(this.formLabelAlign).then(res => { |
|
|
|
@ -1106,7 +1115,6 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
groupedTasks[task.processName].push(task); |
|
|
|
groupedTasks[task.processName].push(task); |
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(89898989, groupedTasks); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.values(groupedTasks).forEach(group => { |
|
|
|
Object.values(groupedTasks).forEach(group => { |
|
|
|
// 按计划开始时间升序排序 |
|
|
|
// 按计划开始时间升序排序 |
|
|
|
@ -1148,7 +1156,7 @@ export default { |
|
|
|
tasks.push(...mergedTasks); |
|
|
|
tasks.push(...mergedTasks); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(909090, tasks); |
|
|
|
// console.log(909090, tasks); |
|
|
|
// >>>>>>>>>> 新增排序逻辑 <<<<<<<<<< |
|
|
|
// >>>>>>>>>> 新增排序逻辑 <<<<<<<<<< |
|
|
|
// 1. 对 orders 按 receiveTime 升序 |
|
|
|
// 1. 对 orders 按 receiveTime 升序 |
|
|
|
orders.sort((a, b) => new Date(a.receiveTime) - new Date(b.receiveTime)); |
|
|
|
orders.sort((a, b) => new Date(a.receiveTime) - new Date(b.receiveTime)); |
|
|
|
@ -1230,6 +1238,8 @@ export default { |
|
|
|
// 将时间范围设置到请求参数中 |
|
|
|
// 将时间范围设置到请求参数中 |
|
|
|
this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0]; |
|
|
|
this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0]; |
|
|
|
this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1]; |
|
|
|
this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1]; |
|
|
|
|
|
|
|
console.log(this.formLabelAlign,'99999'); |
|
|
|
|
|
|
|
sessionStorage.setItem('formLabelAlign', JSON.stringify(this.formLabelAlign)); |
|
|
|
|
|
|
|
|
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -1248,12 +1258,16 @@ export default { |
|
|
|
receiveTime: '', //接收时间 |
|
|
|
receiveTime: '', //接收时间 |
|
|
|
partCode: '', //订单号 |
|
|
|
partCode: '', //订单号 |
|
|
|
batchNo: '', //批次号 |
|
|
|
batchNo: '', //批次号 |
|
|
|
|
|
|
|
planStatusList:[] |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.legendStatus.completed = false; |
|
|
|
this.legendStatus.completed = false; |
|
|
|
this.legendStatus.processing = true; |
|
|
|
this.legendStatus.processing = true; |
|
|
|
this.legendStatus.pending = true; |
|
|
|
this.legendStatus.pending = true; |
|
|
|
this.updateTime(); |
|
|
|
|
|
|
|
|
|
|
|
this.updateTime('reset'); |
|
|
|
|
|
|
|
|
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 任务数据过滤 |
|
|
|
// 任务数据过滤 |
|
|
|
|