排产看板页面优化

dev-scheduling
zhangdi 3 months ago
parent 04feaa3620
commit b5a02ddaee
  1. 36
      src/views/productionSchedulingPlan/schedulingDashboard/container.vue

@ -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();
}, },
// //

Loading…
Cancel
Save