From eb885c69dcf890e0d9a55fa72a197ab2c314f86c Mon Sep 17 00:00:00 2001 From: zhang1106 <849185023@qq.com> Date: Mon, 29 Dec 2025 16:49:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=A8=A1=E5=9E=8B):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=85=B3=E8=81=94=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在ticketIndex.js中添加initAssociations函数并导出 在TicketManagement.jsx中添加操作列 --- backend/models/ticketIndex.js | 3 +++ frontend/src/pages/TicketManagement.jsx | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/backend/models/ticketIndex.js b/backend/models/ticketIndex.js index dca27e9..5dc7cf5 100644 --- a/backend/models/ticketIndex.js +++ b/backend/models/ticketIndex.js @@ -175,8 +175,11 @@ const initializeModels = async () => { } }; +initAssociations(); + module.exports = { initializeModels, + initAssociations, Ticket, TicketOperationRecord, FaultCategory diff --git a/frontend/src/pages/TicketManagement.jsx b/frontend/src/pages/TicketManagement.jsx index 05b8ae6..68e0815 100644 --- a/frontend/src/pages/TicketManagement.jsx +++ b/frontend/src/pages/TicketManagement.jsx @@ -302,7 +302,19 @@ function TicketManagement() { } })); - return [...baseColumns, ...customFieldColumns]; + const actionColumn = { + title: '操作', + key: 'action', + width: 100, + fixed: 'right', + render: (_, record) => ( + +