@@ -765,20 +765,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
if button.has_icon:
|
||||
btn_exec_action_el.set("icon", button.icon)
|
||||
# 接下来是隐藏的配置
|
||||
if button.name == "收回":
|
||||
next_node_names = []
|
||||
if node.out_link_ids:
|
||||
next_node_names = [link.node_to.node_name for link in node.out_link_ids if link.node_to]
|
||||
|
||||
if next_node_names:
|
||||
state_conditions = " and ".join([f"state != '{name}'" for name in next_node_names])
|
||||
invisible = f"not id or ({state_conditions}) "
|
||||
else:
|
||||
# 无出链时,收回按钮永久隐藏
|
||||
invisible = "1 "
|
||||
else:
|
||||
invisible = f"not id or state != '{node.node_name}' "
|
||||
|
||||
invisible = "not id or state != '{0}' ".format(str(node.node_name))
|
||||
if button.review_type == 'user_role':
|
||||
# 构建角色条件
|
||||
role_domain = []
|
||||
|
||||
Reference in New Issue
Block a user