From 96ba1291191ff916b7ba3497d071f4726b5a2a25 Mon Sep 17 00:00:00 2001 From: hanshuaikang <1758504262@qq.com> Date: Wed, 1 Nov 2023 20:23:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E7=BA=BF?= =?UTF-8?q?=E6=9D=A1=E8=A7=A6=E5=8F=91=E5=99=A8=E4=B8=8D=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/pc/src/i18n/lang/en.js | 1 + frontend/pc/src/i18n/lang/zh.js | 1 + .../ticket/details/taskInfo/taskHistory.vue | 52 +++++++++++++++++++ itsm/ticket/views/ticket.py | 4 ++ 4 files changed, 58 insertions(+) diff --git a/frontend/pc/src/i18n/lang/en.js b/frontend/pc/src/i18n/lang/en.js index c333ec275..2546df1c2 100644 --- a/frontend/pc/src/i18n/lang/en.js +++ b/frontend/pc/src/i18n/lang/en.js @@ -2644,6 +2644,7 @@ export const m = { '人都会收到单据代办通知,是否继续?如有疑问请咨询ITSM系统管理员。': 'Everyone will receive a notice of document agency. Do you want to continue? If in doubt, consult your ITSM system administrator.', 当前节点未设置节点描述: 'The node description is not set for the current node', 单据触发器: 'Ticket Trigger', + 线条触发器: 'Transition Trigger', 节点: 'Node', 名称: 'Name', 设置为全局变量: 'Set as a global variable', diff --git a/frontend/pc/src/i18n/lang/zh.js b/frontend/pc/src/i18n/lang/zh.js index aa4fc093e..3dcd44e06 100644 --- a/frontend/pc/src/i18n/lang/zh.js +++ b/frontend/pc/src/i18n/lang/zh.js @@ -2713,6 +2713,7 @@ export const m = { '人都会收到单据代办通知,是否继续?如有疑问请咨询ITSM系统管理员。': '人都会收到单据代办通知,是否继续?如有疑问请咨询ITSM系统管理员。', 当前节点未设置节点描述: '当前节点未设置节点描述', 单据触发器: '单据触发器', + 线条触发器: '线条触发器', 节点: '节点', 名称: '名称', 设置为全局变量: '设置为全局变量', diff --git a/frontend/pc/src/views/ticket/details/taskInfo/taskHistory.vue b/frontend/pc/src/views/ticket/details/taskInfo/taskHistory.vue index 93bee9f80..1bf1b8586 100644 --- a/frontend/pc/src/views/ticket/details/taskInfo/taskHistory.vue +++ b/frontend/pc/src/views/ticket/details/taskInfo/taskHistory.vue @@ -123,6 +123,56 @@ + + {{$t(`m['线条触发器']`)}} +
+ + + + + + + + + + + + + +
+ + +
+
+
+
@@ -182,6 +232,7 @@ id: '', }, ticketAction: [], + transitionAction: [], nodeActions: [], nodeIdMap: {}, listError: false, @@ -216,6 +267,7 @@ // this.historyList = res.data.filter(item => item.status === 'FAILED' || item.status === 'SUCCEED'); // 单据触发器 this.ticketAction = res.data.ticket_actions.filter(item => item.status === 'FAILED' || item.status === 'SUCCEED'); + this.transitionAction = res.data.transition.filter(item => item.status === 'FAILED' || item.status === 'SUCCEED'); // 节点触发器 this.nodeIdMap = res.data.state_map; this.nodeActions = Object.keys(res.data.state).map(state => { diff --git a/itsm/ticket/views/ticket.py b/itsm/ticket/views/ticket.py index f8370c486..c00130b42 100644 --- a/itsm/ticket/views/ticket.py +++ b/itsm/ticket/views/ticket.py @@ -1080,12 +1080,15 @@ def trigger_actions_group(self, request, *args, **kwargs): # 分组 ticket_actions = [] state_actions = {} + transition_actions = [] state_map = {} for item in actions: if item["signal_type"] == "STATE": state_actions.setdefault(item["sender"], []).append(item) if item["signal_type"] == "FLOW": ticket_actions.append(item) + if item["signal_type"] == "TRANSITION": + transition_actions.append(item) for state_id in state_actions.keys(): state_map[state_id] = instance.state(state_id)["name"] @@ -1094,6 +1097,7 @@ def trigger_actions_group(self, request, *args, **kwargs): { "state": state_actions, "ticket_actions": ticket_actions, + "transition": transition_actions, "state_map": state_map, } ) From 012bd09520ba1719aa1559fd099698ff8556d866 Mon Sep 17 00:00:00 2001 From: hanshuaikang <1758504262@qq.com> Date: Tue, 7 Nov 2023 16:46:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bugfix:=20=E5=8D=87=E7=BA=A7django=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=A7=A3=E5=86=B3migrate=E4=B8=8D=E5=85=BC=E5=AE=B9my?= =?UTF-8?q?sql8.0=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1670fe432..c16f53889 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ # 请确保指定的包和版本号,可通过pip安装 # blueapps requirement -Django==3.2.4 +Django==3.2.13 PyMySQL==0.6.7 mysqlclient==2.0.3 MarkupSafe==1.1.1