|
@@ -43,6 +43,9 @@
|
|
|
<gantt-filter-bar
|
|
<gantt-filter-bar
|
|
|
v-show="!isFullscreen"
|
|
v-show="!isFullscreen"
|
|
|
:query="ganttQuery"
|
|
:query="ganttQuery"
|
|
|
|
|
+ :plan-code-label="
|
|
|
|
|
+ resourceLabelMode === 'order' ? '生产订单号' : '计划编号'
|
|
|
|
|
+ "
|
|
|
@update:query="ganttQuery = $event"
|
|
@update:query="ganttQuery = $event"
|
|
|
@apply="applyGanttFilters"
|
|
@apply="applyGanttFilters"
|
|
|
@reset="resetGanttFilters"
|
|
@reset="resetGanttFilters"
|
|
@@ -55,6 +58,9 @@
|
|
|
<gantt-filter-bar
|
|
<gantt-filter-bar
|
|
|
v-show="!isFullscreen"
|
|
v-show="!isFullscreen"
|
|
|
:query="calendarQuery"
|
|
:query="calendarQuery"
|
|
|
|
|
+ :plan-code-label="
|
|
|
|
|
+ resourceLabelMode === 'order' ? '生产订单号' : '计划编号'
|
|
|
|
|
+ "
|
|
|
@update:query="calendarQuery = $event"
|
|
@update:query="calendarQuery = $event"
|
|
|
@apply="applyCalendarFilters"
|
|
@apply="applyCalendarFilters"
|
|
|
@reset="resetCalendarFilters"
|
|
@reset="resetCalendarFilters"
|
|
@@ -233,10 +239,7 @@
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
filteredGanttTasks() {
|
|
filteredGanttTasks() {
|
|
|
- return this.ganttTasks.filter(
|
|
|
|
|
- (item) =>
|
|
|
|
|
- this.matchesResourceFilter(item) && this.matchesGanttFilters(item)
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ return this.buildFilteredGanttTasks();
|
|
|
},
|
|
},
|
|
|
planMetaByCode() {
|
|
planMetaByCode() {
|
|
|
return this.planList.reduce((result, item) => {
|
|
return this.planList.reduce((result, item) => {
|
|
@@ -905,25 +908,54 @@
|
|
|
this.calendarFilters = createSearchQuery();
|
|
this.calendarFilters = createSearchQuery();
|
|
|
this.calendarExpand = true;
|
|
this.calendarExpand = true;
|
|
|
},
|
|
},
|
|
|
|
|
+ joinSearchValues(values = []) {
|
|
|
|
|
+ return values
|
|
|
|
|
+ .filter((item) => item !== '' && item !== null && item !== undefined)
|
|
|
|
|
+ .map((item) => String(item))
|
|
|
|
|
+ .join(' ');
|
|
|
|
|
+ },
|
|
|
normalizePlanSearchEntry(entry) {
|
|
normalizePlanSearchEntry(entry) {
|
|
|
const planKey = entry.planCode || entry.code || entry.id;
|
|
const planKey = entry.planCode || entry.code || entry.id;
|
|
|
const planMeta = this.planMetaByCode[planKey] || {};
|
|
const planMeta = this.planMetaByCode[planKey] || {};
|
|
|
|
|
+ const isOrderScheduling = this.resourceLabelMode === 'order';
|
|
|
|
|
+ const visibleTaskText = [
|
|
|
|
|
+ entry.taskName,
|
|
|
|
|
+ entry.title,
|
|
|
|
|
+ entry.name,
|
|
|
|
|
+ entry.text,
|
|
|
|
|
+ entry.executor
|
|
|
|
|
+ ];
|
|
|
return {
|
|
return {
|
|
|
- routingName:
|
|
|
|
|
|
|
+ routingName: this.joinSearchValues([
|
|
|
entry.routingName ||
|
|
entry.routingName ||
|
|
|
- entry.produceRoutingName ||
|
|
|
|
|
- planMeta.routingName ||
|
|
|
|
|
- planMeta.produceRoutingName ||
|
|
|
|
|
- planMeta.routeName ||
|
|
|
|
|
- '',
|
|
|
|
|
- productName: entry.productName || planMeta.productName || '',
|
|
|
|
|
- planCode:
|
|
|
|
|
|
|
+ entry.produceRoutingName ||
|
|
|
|
|
+ planMeta.routingName ||
|
|
|
|
|
+ planMeta.produceRoutingName ||
|
|
|
|
|
+ planMeta.routeName,
|
|
|
|
|
+ ...visibleTaskText
|
|
|
|
|
+ ]),
|
|
|
|
|
+ productName: this.joinSearchValues([
|
|
|
|
|
+ entry.productName,
|
|
|
|
|
+ planMeta.productName,
|
|
|
|
|
+ isOrderScheduling ? entry.name : '',
|
|
|
|
|
+ isOrderScheduling ? entry.text : ''
|
|
|
|
|
+ ]),
|
|
|
|
|
+ planCode: this.joinSearchValues([
|
|
|
entry.productionOrderNumber ||
|
|
entry.productionOrderNumber ||
|
|
|
- entry.planCode ||
|
|
|
|
|
- entry.code ||
|
|
|
|
|
- planMeta.code ||
|
|
|
|
|
- planMeta.planCode ||
|
|
|
|
|
- ''
|
|
|
|
|
|
|
+ entry.apsWorkOrderCode ||
|
|
|
|
|
+ entry.workOrderCode ||
|
|
|
|
|
+ entry.productionOrderCode,
|
|
|
|
|
+ entry.displayCode,
|
|
|
|
|
+ entry.planCode,
|
|
|
|
|
+ entry.orderCode,
|
|
|
|
|
+ entry.code,
|
|
|
|
|
+ planMeta.productionOrderNumber,
|
|
|
|
|
+ planMeta.apsWorkOrderCode,
|
|
|
|
|
+ planMeta.workOrderCode,
|
|
|
|
|
+ planMeta.code,
|
|
|
|
|
+ planMeta.planCode,
|
|
|
|
|
+ ...visibleTaskText
|
|
|
|
|
+ ])
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
matchesPlanSearchFilters(entry, filters) {
|
|
matchesPlanSearchFilters(entry, filters) {
|
|
@@ -960,6 +992,40 @@
|
|
|
matchesCalendarFilters(entry) {
|
|
matchesCalendarFilters(entry) {
|
|
|
return this.matchesPlanSearchFilters(entry, this.calendarFilters);
|
|
return this.matchesPlanSearchFilters(entry, this.calendarFilters);
|
|
|
},
|
|
},
|
|
|
|
|
+ buildFilteredGanttTasks() {
|
|
|
|
|
+ const resourceMatchedTasks = this.ganttTasks.filter((item) =>
|
|
|
|
|
+ this.matchesResourceFilter(item)
|
|
|
|
|
+ );
|
|
|
|
|
+ const directMatchedTasks = resourceMatchedTasks.filter((item) =>
|
|
|
|
|
+ this.matchesGanttFilters(item)
|
|
|
|
|
+ );
|
|
|
|
|
+ const matchedIds = new Set(directMatchedTasks.map((item) => item.id));
|
|
|
|
|
+ const shouldExpandMatchedParent =
|
|
|
|
|
+ (!this.ganttFilters.planCode &&
|
|
|
|
|
+ (this.ganttFilters.routingName || this.ganttFilters.productName)) ||
|
|
|
|
|
+ (this.resourceLabelMode !== 'order' && this.ganttFilters.planCode);
|
|
|
|
|
+ const matchedSplitParentIds = shouldExpandMatchedParent
|
|
|
|
|
+ ? new Set(
|
|
|
|
|
+ directMatchedTasks
|
|
|
|
|
+ .filter((item) => item.render === 'split' && !item.parent)
|
|
|
|
|
+ .map((item) => item.id)
|
|
|
|
|
+ )
|
|
|
|
|
+ : new Set();
|
|
|
|
|
+
|
|
|
|
|
+ directMatchedTasks.forEach((item) => {
|
|
|
|
|
+ if (item.parent) {
|
|
|
|
|
+ matchedIds.add(item.parent);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ resourceMatchedTasks.forEach((item) => {
|
|
|
|
|
+ if (matchedSplitParentIds.has(item.parent)) {
|
|
|
|
|
+ matchedIds.add(item.id);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return resourceMatchedTasks.filter((item) => matchedIds.has(item.id));
|
|
|
|
|
+ },
|
|
|
showCalendarTooltip(event, entries) {
|
|
showCalendarTooltip(event, entries) {
|
|
|
this.hoverTooltip = {
|
|
this.hoverTooltip = {
|
|
|
visible: true,
|
|
visible: true,
|
|
@@ -1418,7 +1484,47 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 今日高亮 */
|
|
/* 今日高亮 */
|
|
|
|
|
+ :deep(.gantt_layout_cell),
|
|
|
|
|
+ :deep(.gantt_task),
|
|
|
|
|
+ :deep(.gantt_data_area),
|
|
|
|
|
+ :deep(.gantt_task_bg),
|
|
|
|
|
+ :deep(.gantt_task_scale) {
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.gantt_task) {
|
|
|
|
|
+ border-left: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.gantt_ver_scroll),
|
|
|
|
|
+ :deep(.gantt_hor_scroll) {
|
|
|
|
|
+ background: #f8fafc;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.gantt_ver_scroll::-webkit-scrollbar),
|
|
|
|
|
+ :deep(.gantt_hor_scroll::-webkit-scrollbar),
|
|
|
|
|
+ :deep(.gantt_data_area::-webkit-scrollbar) {
|
|
|
|
|
+ width: 10px;
|
|
|
|
|
+ height: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.gantt_ver_scroll::-webkit-scrollbar-thumb),
|
|
|
|
|
+ :deep(.gantt_hor_scroll::-webkit-scrollbar-thumb),
|
|
|
|
|
+ :deep(.gantt_data_area::-webkit-scrollbar-thumb) {
|
|
|
|
|
+ border: 2px solid #f8fafc;
|
|
|
|
|
+ border-radius: 999px;
|
|
|
|
|
+ background: #c9d1dc;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.gantt_ver_scroll::-webkit-scrollbar-thumb:hover),
|
|
|
|
|
+ :deep(.gantt_hor_scroll::-webkit-scrollbar-thumb:hover),
|
|
|
|
|
+ :deep(.gantt_data_area::-webkit-scrollbar-thumb:hover) {
|
|
|
|
|
+ background: #aeb7c4;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
:deep(.gantt_task_scale) {
|
|
:deep(.gantt_task_scale) {
|
|
|
|
|
+ border-bottom: 1px solid #dcdfe6;
|
|
|
|
|
+
|
|
|
.gantt_scale_line > .gantt_scale_cell {
|
|
.gantt_scale_line > .gantt_scale_cell {
|
|
|
color: #333333;
|
|
color: #333333;
|
|
|
font-size: 11px;
|
|
font-size: 11px;
|
|
@@ -1427,7 +1533,7 @@
|
|
|
|
|
|
|
|
&.today {
|
|
&.today {
|
|
|
background: #dbeeff;
|
|
background: #dbeeff;
|
|
|
- color: #ffffff;
|
|
|
|
|
|
|
+ color: #1677c8 !important;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1517,15 +1623,23 @@
|
|
|
:deep(.gantt_task_bg) {
|
|
:deep(.gantt_task_bg) {
|
|
|
border-right: 1px solid #ebebeb;
|
|
border-right: 1px solid #ebebeb;
|
|
|
}
|
|
}
|
|
|
|
|
+ :deep(.gantt_task_bg .gantt_task_row),
|
|
|
|
|
+ :deep(.gantt_task_row) {
|
|
|
|
|
+ border-bottom: 1px solid #f3f5f7;
|
|
|
|
|
+ }
|
|
|
:deep(.task-222) {
|
|
:deep(.task-222) {
|
|
|
height: 26px !important;
|
|
height: 26px !important;
|
|
|
line-height: 26px !important;
|
|
line-height: 26px !important;
|
|
|
border: none !important;
|
|
border: none !important;
|
|
|
- border-radius: 2px !important;
|
|
|
|
|
|
|
+ border-radius: 3px !important;
|
|
|
box-shadow: none !important;
|
|
box-shadow: none !important;
|
|
|
|
|
+ filter: saturate(0.88) brightness(0.99);
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ transition: box-shadow 0.18s ease, filter 0.18s ease;
|
|
|
}
|
|
}
|
|
|
:deep(.task-222:hover) {
|
|
:deep(.task-222:hover) {
|
|
|
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16) !important;
|
|
|
|
|
|
|
+ filter: saturate(0.94) brightness(1);
|
|
|
|
|
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14) !important;
|
|
|
}
|
|
}
|
|
|
:deep(.gantt_task_line.task-parent-red),
|
|
:deep(.gantt_task_line.task-parent-red),
|
|
|
:deep(.gantt_task_line.task-parent-red .gantt_task_progress) {
|
|
:deep(.gantt_task_line.task-parent-red .gantt_task_progress) {
|
|
@@ -1553,9 +1667,6 @@
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
}
|
|
}
|
|
|
- :deep(.gantt_task_row) {
|
|
|
|
|
- border-bottom: none;
|
|
|
|
|
- }
|
|
|
|
|
:deep(.gantt-task-text) {
|
|
:deep(.gantt-task-text) {
|
|
|
display: block;
|
|
display: block;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -1564,11 +1675,12 @@
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
line-height: 26px;
|
|
line-height: 26px;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
|
|
|
|
|
|
|
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
|
|
|
}
|
|
}
|
|
|
:deep(.month) {
|
|
:deep(.month) {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
@@ -1584,17 +1696,20 @@
|
|
|
.gantt-tooltip-card {
|
|
.gantt-tooltip-card {
|
|
|
min-width: 320px;
|
|
min-width: 320px;
|
|
|
max-width: 420px;
|
|
max-width: 420px;
|
|
|
- padding: 10px 12px;
|
|
|
|
|
- border-radius: 4px;
|
|
|
|
|
- background: rgba(70, 70, 70, 0.9);
|
|
|
|
|
- color: #ffffff;
|
|
|
|
|
- box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
|
|
|
|
|
|
|
+ padding: 12px 14px;
|
|
|
|
|
+ border: 1px solid rgba(226, 232, 240, 0.9);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.96);
|
|
|
|
|
+ color: #1f2937;
|
|
|
|
|
+ box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
|
|
|
|
|
+ backdrop-filter: blur(8px);
|
|
|
}
|
|
}
|
|
|
.gantt-tooltip-card__title {
|
|
.gantt-tooltip-card__title {
|
|
|
margin-bottom: 8px;
|
|
margin-bottom: 8px;
|
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
line-height: 20px;
|
|
line-height: 20px;
|
|
|
|
|
+ color: #0f172a;
|
|
|
word-break: break-all;
|
|
word-break: break-all;
|
|
|
}
|
|
}
|
|
|
.gantt-tooltip-card__row {
|
|
.gantt-tooltip-card__row {
|
|
@@ -1606,25 +1721,26 @@
|
|
|
.gantt-tooltip-card__section + .gantt-tooltip-card__section {
|
|
.gantt-tooltip-card__section + .gantt-tooltip-card__section {
|
|
|
margin-top: 8px;
|
|
margin-top: 8px;
|
|
|
padding-top: 8px;
|
|
padding-top: 8px;
|
|
|
- border-top: 1px solid rgba(255, 255, 255, 0.12);
|
|
|
|
|
|
|
+ border-top: 1px solid #edf2f7;
|
|
|
}
|
|
}
|
|
|
.gantt-tooltip-card__section-title {
|
|
.gantt-tooltip-card__section-title {
|
|
|
margin-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
- color: rgba(255, 255, 255, 0.86);
|
|
|
|
|
|
|
+ color: #475569;
|
|
|
}
|
|
}
|
|
|
.gantt-tooltip-card__row + .gantt-tooltip-card__row {
|
|
.gantt-tooltip-card__row + .gantt-tooltip-card__row {
|
|
|
margin-top: 2px;
|
|
margin-top: 2px;
|
|
|
}
|
|
}
|
|
|
.gantt-tooltip-card__label {
|
|
.gantt-tooltip-card__label {
|
|
|
flex: 0 0 72px;
|
|
flex: 0 0 72px;
|
|
|
- color: rgba(255, 255, 255, 0.78);
|
|
|
|
|
|
|
+ color: #64748b;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
.gantt-tooltip-card__value {
|
|
.gantt-tooltip-card__value {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
min-width: 0;
|
|
min-width: 0;
|
|
|
|
|
+ color: #111827;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|