diff --git a/src/views/mes/tasksummary/components/ScheduleGanttPanelEditable.vue b/src/views/mes/tasksummary/components/ScheduleGanttPanelEditable.vue index 97ec7d04..a3545f33 100644 --- a/src/views/mes/tasksummary/components/ScheduleGanttPanelEditable.vue +++ b/src/views/mes/tasksummary/components/ScheduleGanttPanelEditable.vue @@ -7,6 +7,7 @@ {{ activePreviewDevice.deviceName }} {{ activePreviewDevice.deviceId }} + {{ getCapacityTypeLabel(activePreviewDevice.capacityType) }} {{ activePreviewDevice.ratedCapacity ?? '-' }} {{ activePreviewDevice.dailyAverageValue ?? '-' }} {{ activePreviewDevice.dataCollectionCapacity ?? '-' }} @@ -72,6 +73,7 @@ import dayjs from 'dayjs' import { gantt } from 'dhtmlx-gantt' import 'dhtmlx-gantt/codebase/dhtmlxgantt.css' +import { getDictOptions } from '@/utils/dict' defineOptions({ name: 'ScheduleGanttPanelEditable' }) @@ -89,6 +91,13 @@ const message = useMessage() const ganttContainerRef = ref() const activePreviewDevice = ref() const activePreviewTask = ref() + +const getCapacityTypeLabel = (value: any) => { + if (value === undefined || value === null) return '-' + const options = getDictOptions('capacity_sources') + const found = options.find((opt) => Number(opt.value) === Number(value)) + return found?.label ?? String(value) +} const tooltipCleanupFns = ref<(() => void)[]>([]) const ganttEventIds = ref([]) const ganttSyncing = ref(false) diff --git a/src/views/mes/tasksummary/components/TaskScheduleDialog.vue b/src/views/mes/tasksummary/components/TaskScheduleDialog.vue index 73eb984b..e06b122f 100644 --- a/src/views/mes/tasksummary/components/TaskScheduleDialog.vue +++ b/src/views/mes/tasksummary/components/TaskScheduleDialog.vue @@ -216,7 +216,8 @@