From ba0cfccff96520fa464f352c2ccb8f0d5766ffdc Mon Sep 17 00:00:00 2001 From: zhongwenkai <3478244299@qq.com> Date: Thu, 9 Jul 2026 10:53:22 +0800 Subject: [PATCH] =?UTF-8?q?style:=E6=A8=A1=E5=85=B7=E7=BB=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=BB=B4=E6=8A=A4=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=85=A8=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=A8=A1=E5=85=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E4=BB=BB=E5=8A=A1=E8=AE=A1=E5=88=92-?= =?UTF-8?q?=E6=96=B0=E5=A2=9E/=E7=BC=96=E8=BE=91-=E6=A8=A1=E5=85=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8/=E9=A1=B9=E7=9B=AE=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=BC=B9=E6=A1=86=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/mold/components/MoldMaintainView.vue | 6 +- .../device/components/DeviceAttributeList.vue | 2 +- src/views/iot/deviceattributetype/index.vue | 2 +- src/views/iot/historyData/index.vue | 2 +- .../TaskConfigurationForm.vue | 511 ++++++++++++++++-- src/views/mold/taskConfiguration/index.vue | 29 +- 6 files changed, 508 insertions(+), 44 deletions(-) diff --git a/src/views/erp/mold/components/MoldMaintainView.vue b/src/views/erp/mold/components/MoldMaintainView.vue index f82b8a28..764bf7b6 100644 --- a/src/views/erp/mold/components/MoldMaintainView.vue +++ b/src/views/erp/mold/components/MoldMaintainView.vue @@ -129,7 +129,7 @@ - - + + + + + + + + + + + {{ t('common.query') }} + + + + {{ t('common.reset') }} + + + + + + + + + + + + + + + + + +
+
+ 已选择 {{ moldDialogSelectedIds.length }} 个模具 +
+ +
+ + +
+ + + + + + + + + + + + + + + + {{ t('common.query') }} + + + + {{ t('common.reset') }} + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + diff --git a/src/views/mold/taskConfiguration/index.vue b/src/views/mold/taskConfiguration/index.vue index cc5029d7..fbbb0779 100644 --- a/src/views/mold/taskConfiguration/index.vue +++ b/src/views/mold/taskConfiguration/index.vue @@ -107,7 +107,8 @@ {{ t('EquipmentManagement.TaskManagement.createWorkOrder') }} @@ -164,7 +165,7 @@ const planPaginationRef = ref() const updatePlanTableMaxHeight = async () => { await nextTick() const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0 - const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72 + const paginationHeight = planPaginationRef.value?.$el?.getBoundingClientRect().height ?? 72 const pageBottomGap = 56 const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight))) @@ -253,6 +254,8 @@ const openForm = (type: string, row?: TaskManagementVO) => { formRef.value.open(type, row) } +const isTaskEnabled = (row: TaskManagementVO) => row.enabled === true || (row.enabled as any) === 'true' + const handleDelete = async (id?: number) => { if (!id) return try { @@ -264,11 +267,25 @@ const handleDelete = async (id?: number) => { } const ticketLoadingId = ref(undefined) -const handleCreateTicket = async (id?: number) => { - if (!id) return - ticketLoadingId.value = id +const handleCreateTicket = async (row?: TaskManagementVO) => { + if (!row?.id) return + if (!isTaskEnabled(row)) { + message.warning(t('EquipmentManagement.TaskManagement.createTicketDisabledTip')) + return + } + + try { + await message.confirm( + t('EquipmentManagement.TaskManagement.createTicketConfirm'), + t('common.reminder') + ) + } catch { + return + } + + ticketLoadingId.value = row.id try { - await TaskManagementApi.createTaskManagementTicket(id) + await TaskManagementApi.createTaskManagementTicket(row.id) message.success(t('EquipmentManagement.TaskManagement.createTicketSuccess')) } catch { message.error(t('EquipmentManagement.TaskManagement.createTicketFail'))