From db0a42979be36aff91bebbb4f71dfb043bcf879e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 3 May 2026 14:47:08 +0800 Subject: [PATCH] bugfix --- wwwroot/base.ui | 141 +++++++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 62 deletions(-) diff --git a/wwwroot/base.ui b/wwwroot/base.ui index 746cfe3..a83c5be 100644 --- a/wwwroot/base.ui +++ b/wwwroot/base.ui @@ -1,70 +1,87 @@ { - "widgettype": "Page", - "options": { - "title": "审批管理", - "style": {"height": "100vh", "overflow": "hidden"} - }, + "id": "workflow_approval", + "widgettype": "VBox", + "options": {"width": "100%", "height": "100%", "style": {"padding": "16px"}}, "subwidgets": [ { "widgettype": "HBox", - "options": {"style": {"height": "100vh"}}, + "options": {"style": {"marginBottom": "16px", "gap": "8px"}}, "subwidgets": [ - { - "widgettype": "Drawer", - "options": {"width": 220, "variant": "permanent", "style": {"backgroundColor": "#1a1a2e"}}, - "subwidgets": [ - { - "widgettype": "VBox", - "options": {"gap": 4, "style": {"padding": "8px"}}, - "subwidgets": [ - { - "widgettype": "Text", - "options": { - "text": "审批管理", - "style": {"color": "#fff", "fontSize": "18px", "fontWeight": "bold", "padding": "12px 8px"} - } - }, - { - "widgettype": "Divider", - "options": {"style": {"backgroundColor": "#333", "margin": "8px 0"}} - }, - { - "widgettype": "ListTile", - "options": { - "leading": "account_tree", - "title": "工作流配置", - "style": {"color": "#ccc"}, - "onclick": "navigate('main/workflow_approval/approval_workflow.ui')" - } - }, - { - "widgettype": "ListTile", - "options": { - "leading": "assignment", - "title": "审批实例", - "style": {"color": "#ccc"}, - "onclick": "navigate('main/workflow_approval/approval_instance.ui')" - } - }, - { - "widgettype": "ListTile", - "options": { - "leading": "assignment_turned_in", - "title": "待办任务", - "style": {"color": "#ccc"}, - "onclick": "navigate('main/workflow_approval/approval_task.ui')" - } - } - ] - } - ] - }, - { - "widgettype": "Frame", - "id": "workflow_frame", - "options": {"flex": 1, "src": "main/workflow_approval/approval_workflow.ui"} - } + {"widgettype": "Text", "options": {"label": "审批管理", "style": {"fontSize": "20px", "fontWeight": "bold"}}}, + {"widgettype": "Filler", "options": {}} ] + }, + { + "widgettype": "TabPanel", + "id": "approval_tabs", + "options": { + "tab_pos": "top", + "items": [ + { + "name": "pending", + "label": "待审批", + "content": { + "widgettype": "Tabular", + "id": "pending_grid", + "options": { + "data_url": "{{entire_url('api/approvals_list.dspy?status=pending')}}", + "data_method": "GET", + "row_options": { + "fields": [ + {"name": "approval_code", "title": "审批编号", "uitype": "str", "cwidth": 12}, + {"name": "title", "title": "标题", "uitype": "str", "cwidth": 20}, + {"name": "applicant", "title": "申请人", "uitype": "str", "cwidth": 10}, + {"name": "apply_date", "title": "申请日期", "uitype": "str", "cwidth": 12}, + {"name": "status", "title": "状态", "uitype": "str", "cwidth": 8} + ] + } + } + } + }, + { + "name": "approved", + "label": "已审批", + "content": { + "widgettype": "Tabular", + "id": "approved_grid", + "options": { + "data_url": "{{entire_url('api/approvals_list.dspy?status=approved')}}", + "data_method": "GET", + "row_options": { + "fields": [ + {"name": "approval_code", "title": "审批编号", "uitype": "str", "cwidth": 12}, + {"name": "title", "title": "标题", "uitype": "str", "cwidth": 20}, + {"name": "applicant", "title": "申请人", "uitype": "str", "cwidth": 10}, + {"name": "apply_date", "title": "申请日期", "uitype": "str", "cwidth": 12}, + {"name": "status", "title": "状态", "uitype": "str", "cwidth": 8} + ] + } + } + } + }, + { + "name": "rejected", + "label": "已拒绝", + "content": { + "widgettype": "Tabular", + "id": "rejected_grid", + "options": { + "data_url": "{{entire_url('api/approvals_list.dspy?status=rejected')}}", + "data_method": "GET", + "row_options": { + "fields": [ + {"name": "approval_code", "title": "审批编号", "uitype": "str", "cwidth": 12}, + {"name": "title", "title": "标题", "uitype": "str", "cwidth": 20}, + {"name": "applicant", "title": "申请人", "uitype": "str", "cwidth": 10}, + {"name": "apply_date", "title": "申请日期", "uitype": "str", "cwidth": 12}, + {"name": "status", "title": "状态", "uitype": "str", "cwidth": 8} + ] + } + } + } + } + ] + } } ] -} +} \ No newline at end of file