fix: deep-flatten all style objects to options at any nesting level

- Flatten style in widget root, options, and nested structures (row_options.fields etc.)
This commit is contained in:
yumoqing 2026-05-05 19:48:03 +08:00
parent b673139d73
commit 617accf97a
2 changed files with 16 additions and 32 deletions

View File

@ -155,11 +155,9 @@
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"label": "提交", "label": "提交",
"style": { "onclick": "submitForm('newInstanceForm', '/main/workflow_approval/api/instance_create.dspy', 'newInstanceDialog', null)",
"backgroundColor": "#007bff", "backgroundColor": "#007bff",
"color": "#fff" "color": "#fff"
},
"onclick": "submitForm('newInstanceForm', '/main/workflow_approval/api/instance_create.dspy', 'newInstanceDialog', null)"
} }
} }
] ]

View File

@ -114,22 +114,18 @@
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"label": "拒绝", "label": "拒绝",
"style": { "onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_reject.dspy', 'approveDialog', null)",
"backgroundColor": "#dc3545", "backgroundColor": "#dc3545",
"color": "#fff" "color": "#fff"
},
"onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_reject.dspy', 'approveDialog', null)"
} }
}, },
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"label": "批准", "label": "批准",
"style": { "onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_approve.dspy', 'approveDialog', null)",
"backgroundColor": "#28a745", "backgroundColor": "#28a745",
"color": "#fff" "color": "#fff"
},
"onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_approve.dspy', 'approveDialog', null)"
} }
} }
] ]
@ -169,9 +165,7 @@
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
"text": "步骤: ", "text": "步骤: ",
"style": { "fontWeight": "bold"
"fontWeight": "bold"
}
} }
}, },
{ {
@ -193,9 +187,7 @@
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
"text": "审批类型: ", "text": "审批类型: ",
"style": { "fontWeight": "bold"
"fontWeight": "bold"
}
} }
}, },
{ {
@ -217,9 +209,7 @@
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
"text": "分配时间: ", "text": "分配时间: ",
"style": { "fontWeight": "bold"
"fontWeight": "bold"
}
} }
}, },
{ {
@ -241,9 +231,7 @@
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
"text": "截止时间: ", "text": "截止时间: ",
"style": { "fontWeight": "bold"
"fontWeight": "bold"
}
} }
}, },
{ {
@ -276,11 +264,9 @@
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"label": "去审批", "label": "去审批",
"style": { "onclick": "closeDialog('taskDetailDialog'); openDialog('approveDialog'); setDialogField('approveDialog', 'task_id', getDialogField('taskDetailDialog', 'task_id')); setDialogField('approveDialog', 'task_title', getDialogField('taskDetailDialog', 'task_title'))",
"backgroundColor": "#007bff", "backgroundColor": "#007bff",
"color": "#fff" "color": "#fff"
},
"onclick": "closeDialog('taskDetailDialog'); openDialog('approveDialog'); setDialogField('approveDialog', 'task_id', getDialogField('taskDetailDialog', 'task_id')); setDialogField('approveDialog', 'task_title', getDialogField('taskDetailDialog', 'task_title'))"
} }
} }
] ]