From 85b759406d30e65ff8f55605f4fdd358987bc036 Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 6 May 2026 14:26:02 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E4=BB=BB=E5=8A=A1=E5=8D=95?= =?UTF-8?q?=E6=8E=92=E4=BA=A7-=E6=8E=92=E4=BA=A7-=E4=BA=A7=E8=83=BD?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=94=B9=E6=88=90=E4=BB=8E=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ScheduleGanttPanelEditable.vue | 9 +++++++++ .../components/TaskScheduleDialog.vue | 18 +++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) 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 @@