|
@@ -21,7 +21,7 @@
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="dateRange"
|
|
v-model="dateRange"
|
|
|
type="daterange"
|
|
type="daterange"
|
|
|
- size="mini"
|
|
|
|
|
|
|
+ size="small"
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
|
range-separator="至"
|
|
range-separator="至"
|
|
|
start-placeholder="计划开始时间"
|
|
start-placeholder="计划开始时间"
|
|
@@ -884,9 +884,7 @@
|
|
|
|
|
|
|
|
async handleDateChange(val) {
|
|
async handleDateChange(val) {
|
|
|
this.dateRange = val;
|
|
this.dateRange = val;
|
|
|
- if (this.activeTab === 'factory') {
|
|
|
|
|
- await this.refreshSchedulingView();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ await this.refreshSchedulingView();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async refreshSchedulingView() {
|
|
async refreshSchedulingView() {
|
|
@@ -917,6 +915,23 @@
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
data = await teamSchedulingGanttChart(params);
|
|
data = await teamSchedulingGanttChart(params);
|
|
|
|
|
+
|
|
|
|
|
+ const extractedPlanIds = new Set();
|
|
|
|
|
+ (data || []).forEach((item) => {
|
|
|
|
|
+ (item.resourcePeriods || []).forEach((period) => {
|
|
|
|
|
+ if (period.planId) extractedPlanIds.add(period.planId);
|
|
|
|
|
+ });
|
|
|
|
|
+ (item.resourceList || []).forEach((resource) => {
|
|
|
|
|
+ if (resource.planId) extractedPlanIds.add(resource.planId);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (extractedPlanIds.size > 0) {
|
|
|
|
|
+ const plans = await this.loadPlansByIds(
|
|
|
|
|
+ Array.from(extractedPlanIds)
|
|
|
|
|
+ );
|
|
|
|
|
+ this.planDataList = this.buildPlanTableRows(plans);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
this.calendarSourceData = data || [];
|
|
this.calendarSourceData = data || [];
|
|
|
this.tableData = this.initGanttFlatRows(data || []);
|
|
this.tableData = this.initGanttFlatRows(data || []);
|