fix: flatten style to options, fix Button/Text widget properties

- Flatten nested style objects directly into options
- Text/Title use 'text', Button uses 'label'
- All paths use {{entire_url()}}
This commit is contained in:
yumoqing 2026-05-05 19:36:13 +08:00
parent 9e3734525c
commit b673139d73
6 changed files with 757 additions and 320 deletions

View File

@ -1,79 +1,172 @@
{
"widgettype": "Page",
"options": {
"title": "审批实例管理",
"style": {"height": "100vh", "padding": "0"}
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {"style": {"padding": "16px", "height": "100%"}},
"subwidgets": [
"widgettype": "Page",
"options": {
"title": "审批实例管理",
"height": "100vh",
"padding": "0"
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {"style": {"marginBottom": "16px"}},
"subwidgets": [
{
"widgettype": "Text",
"options": {"text": "审批实例管理", "style": {"fontSize": "20px", "fontWeight": "bold"}}
"widgettype": "VBox",
"options": {
"padding": "16px",
"height": "100%"
},
{
"widgettype": "Button",
"options": {
"label": "发起审批",
"style": {"backgroundColor": "#007bff", "color": "#fff", "border": "none", "padding": "8px 16px", "borderRadius": "4px", "marginLeft": "auto"},
"onclick": "openDialog('newInstanceDialog')"
}
}
]
},
{
"widgettype": "DataViewer",
"options": {
"title": "审批实例",
"data_url": "/main/workflow_approval/api/instance_list.dspy",
"page_rows": 20,
"row_options": {
"fields": [
{"name": "title", "label": "审批标题", "uitype": "text"},
{"name": "workflow_name", "label": "工作流", "uitype": "text"},
{"name": "module_type", "label": "模块类型", "uitype": "text"},
{"name": "status", "label": "状态", "uitype": "text"},
{"name": "created_at", "label": "发起时间", "uitype": "text"},
{"name": "completed_at", "label": "完成时间", "uitype": "text"}
]
}
}
},
{
"widgettype": "Dialog",
"id": "newInstanceDialog",
"options": {
"title": "发起审批",
"width": 500,
"content": {
"widgettype": "Form",
"id": "newInstanceForm",
"fields": [
{"name": "workflow_id", "label": "选择工作流", "uitype": "code", "data_url": "/main/workflow_approval/api/workflow_list.dspy", "required": true},
{"name": "module_type", "label": "模块类型", "uitype": "code", "data": [
{"value": "customer", "text": "客户管理"},
{"value": "opportunity", "text": "商机管理"},
{"value": "contract", "text": "合同管理"},
{"value": "financial", "text": "财务管理"}
], "required": true},
{"name": "module_record_id", "label": "业务记录ID", "uitype": "text", "required": true},
{"name": "title", "label": "审批标题", "uitype": "text", "required": true},
{"name": "description", "label": "审批描述", "uitype": "textarea"}
],
"actions": [
{"widgettype": "Button", "options": {"label": "取消", "onclick": "closeDialog('newInstanceDialog')"}},
{"widgettype": "Button", "options": {"label": "提交", "style": {"backgroundColor": "#007bff", "color": "#fff"}, "onclick": "submitForm('newInstanceForm', '/main/workflow_approval/api/instance_create.dspy', 'newInstanceDialog', null)"}}
]
}
}
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"marginBottom": "16px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "审批实例管理",
"fontSize": "20px",
"fontWeight": "bold"
}
},
{
"widgettype": "Button",
"options": {
"label": "发起审批",
"onclick": "openDialog('newInstanceDialog')",
"backgroundColor": "#007bff",
"color": "#fff",
"border": "none",
"padding": "8px 16px",
"borderRadius": "4px",
"marginLeft": "auto"
}
}
]
},
{
"widgettype": "DataViewer",
"options": {
"title": "审批实例",
"data_url": "/main/workflow_approval/api/instance_list.dspy",
"page_rows": 20,
"row_options": {
"fields": [
{
"name": "title",
"label": "审批标题",
"uitype": "text"
},
{
"name": "workflow_name",
"label": "工作流",
"uitype": "text"
},
{
"name": "module_type",
"label": "模块类型",
"uitype": "text"
},
{
"name": "status",
"label": "状态",
"uitype": "text"
},
{
"name": "created_at",
"label": "发起时间",
"uitype": "text"
},
{
"name": "completed_at",
"label": "完成时间",
"uitype": "text"
}
]
}
}
},
{
"widgettype": "Dialog",
"id": "newInstanceDialog",
"options": {
"title": "发起审批",
"width": 500,
"content": {
"widgettype": "Form",
"id": "newInstanceForm",
"fields": [
{
"name": "workflow_id",
"label": "选择工作流",
"uitype": "code",
"data_url": "/main/workflow_approval/api/workflow_list.dspy",
"required": true
},
{
"name": "module_type",
"label": "模块类型",
"uitype": "code",
"data": [
{
"value": "customer",
"text": "客户管理"
},
{
"value": "opportunity",
"text": "商机管理"
},
{
"value": "contract",
"text": "合同管理"
},
{
"value": "financial",
"text": "财务管理"
}
],
"required": true
},
{
"name": "module_record_id",
"label": "业务记录ID",
"uitype": "text",
"required": true
},
{
"name": "title",
"label": "审批标题",
"uitype": "text",
"required": true
},
{
"name": "description",
"label": "审批描述",
"uitype": "textarea"
}
],
"actions": [
{
"widgettype": "Button",
"options": {
"label": "取消",
"onclick": "closeDialog('newInstanceDialog')"
}
},
{
"widgettype": "Button",
"options": {
"label": "提交",
"style": {
"backgroundColor": "#007bff",
"color": "#fff"
},
"onclick": "submitForm('newInstanceForm', '/main/workflow_approval/api/instance_create.dspy', 'newInstanceDialog', null)"
}
}
]
}
}
}
]
}
]
}
]
]
}

View File

@ -1,107 +1,295 @@
{
"widgettype": "Page",
"options": {
"title": "待办任务",
"style": {"height": "100vh", "padding": "0"}
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {"style": {"padding": "16px", "height": "100%"}},
"subwidgets": [
"widgettype": "Page",
"options": {
"title": "待办任务",
"height": "100vh",
"padding": "0"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {"text": "待办审批任务", "style": {"fontSize": "20px", "fontWeight": "bold", "marginBottom": "16px"}}
},
{
"widgettype": "DataViewer",
"options": {
"title": "任务列表",
"data_url": "/main/workflow_approval/api/task_list.dspy",
"page_rows": 20,
"row_options": {
"fields": [
{"name": "instance_title", "label": "审批事项", "uitype": "text"},
{"name": "step_name", "label": "审批步骤", "uitype": "text"},
{"name": "module_type", "label": "模块", "uitype": "text"},
{"name": "status", "label": "状态", "uitype": "text"},
{"name": "assigned_at", "label": "分配时间", "uitype": "text"},
{"name": "due_at", "label": "截止时间", "uitype": "text"}
]
"widgettype": "VBox",
"options": {
"padding": "16px",
"height": "100%"
},
"row_actions": [
{
"label": "审批",
"onclick": "openDialog('approveDialog'); setDialogField('approveDialog', 'task_id', '${id}'); setDialogField('approveDialog', 'task_title', '${instance_title}')",
"condition": "status == 'pending'"
},
{
"label": "查看详情",
"onclick": "openDialog('taskDetailDialog'); setDialogField('taskDetailDialog', 'task_id', '${id}'); setDialogField('taskDetailDialog', 'task_title', '${instance_title}'); setDialogField('taskDetailDialog', 'step_name', '${step_name}'); setDialogField('taskDetailDialog', 'assigned_at', '${assigned_at}'); setDialogField('taskDetailDialog', 'due_at', '${due_at}'); setDialogField('taskDetailDialog', 'approval_type', '${approval_type}')"
}
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "待办审批任务",
"fontSize": "20px",
"fontWeight": "bold",
"marginBottom": "16px"
}
},
{
"widgettype": "DataViewer",
"options": {
"title": "任务列表",
"data_url": "/main/workflow_approval/api/task_list.dspy",
"page_rows": 20,
"row_options": {
"fields": [
{
"name": "instance_title",
"label": "审批事项",
"uitype": "text"
},
{
"name": "step_name",
"label": "审批步骤",
"uitype": "text"
},
{
"name": "module_type",
"label": "模块",
"uitype": "text"
},
{
"name": "status",
"label": "状态",
"uitype": "text"
},
{
"name": "assigned_at",
"label": "分配时间",
"uitype": "text"
},
{
"name": "due_at",
"label": "截止时间",
"uitype": "text"
}
]
},
"row_actions": [
{
"label": "审批",
"onclick": "openDialog('approveDialog'); setDialogField('approveDialog', 'task_id', '${id}'); setDialogField('approveDialog', 'task_title', '${instance_title}')",
"condition": "status == 'pending'"
},
{
"label": "查看详情",
"onclick": "openDialog('taskDetailDialog'); setDialogField('taskDetailDialog', 'task_id', '${id}'); setDialogField('taskDetailDialog', 'task_title', '${instance_title}'); setDialogField('taskDetailDialog', 'step_name', '${step_name}'); setDialogField('taskDetailDialog', 'assigned_at', '${assigned_at}'); setDialogField('taskDetailDialog', 'due_at', '${due_at}'); setDialogField('taskDetailDialog', 'approval_type', '${approval_type}')"
}
]
}
},
{
"widgettype": "Dialog",
"id": "approveDialog",
"options": {
"title": "审批处理",
"width": 500,
"content": {
"widgettype": "Form",
"id": "approveForm",
"fields": [
{
"name": "task_id",
"label": "任务ID",
"uitype": "hidden"
},
{
"name": "task_title",
"label": "审批事项",
"uitype": "text",
"readonly": true
},
{
"name": "decision",
"label": "审批意见",
"uitype": "textarea"
}
],
"actions": [
{
"widgettype": "Button",
"options": {
"label": "取消",
"onclick": "closeDialog('approveDialog')"
}
},
{
"widgettype": "Button",
"options": {
"label": "拒绝",
"style": {
"backgroundColor": "#dc3545",
"color": "#fff"
},
"onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_reject.dspy', 'approveDialog', null)"
}
},
{
"widgettype": "Button",
"options": {
"label": "批准",
"style": {
"backgroundColor": "#28a745",
"color": "#fff"
},
"onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_approve.dspy', 'approveDialog', null)"
}
}
]
}
}
},
{
"widgettype": "Dialog",
"id": "taskDetailDialog",
"options": {
"title": "任务详情",
"width": 500,
"content": {
"widgettype": "VBox",
"options": {
"gap": 8
},
"subwidgets": [
{
"widgettype": "Text",
"id": "detail_title",
"options": {
"text": ""
}
},
{
"widgettype": "Divider",
"options": {}
},
{
"widgettype": "HBox",
"options": {
"gap": 8
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "步骤: ",
"style": {
"fontWeight": "bold"
}
}
},
{
"widgettype": "Text",
"id": "detail_step",
"options": {
"text": ""
}
}
]
},
{
"widgettype": "HBox",
"options": {
"gap": 8
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "审批类型: ",
"style": {
"fontWeight": "bold"
}
}
},
{
"widgettype": "Text",
"id": "detail_type",
"options": {
"text": ""
}
}
]
},
{
"widgettype": "HBox",
"options": {
"gap": 8
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "分配时间: ",
"style": {
"fontWeight": "bold"
}
}
},
{
"widgettype": "Text",
"id": "detail_assigned",
"options": {
"text": ""
}
}
]
},
{
"widgettype": "HBox",
"options": {
"gap": 8
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "截止时间: ",
"style": {
"fontWeight": "bold"
}
}
},
{
"widgettype": "Text",
"id": "detail_due",
"options": {
"text": ""
}
}
]
},
{
"widgettype": "Divider",
"options": {}
},
{
"widgettype": "HBox",
"options": {
"gap": 8
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"label": "关闭",
"onclick": "closeDialog('taskDetailDialog')"
}
},
{
"widgettype": "Button",
"options": {
"label": "去审批",
"style": {
"backgroundColor": "#007bff",
"color": "#fff"
},
"onclick": "closeDialog('taskDetailDialog'); openDialog('approveDialog'); setDialogField('approveDialog', 'task_id', getDialogField('taskDetailDialog', 'task_id')); setDialogField('approveDialog', 'task_title', getDialogField('taskDetailDialog', 'task_title'))"
}
}
]
}
]
}
}
}
]
}
},
{
"widgettype": "Dialog",
"id": "approveDialog",
"options": {
"title": "审批处理",
"width": 500,
"content": {
"widgettype": "Form",
"id": "approveForm",
"fields": [
{"name": "task_id", "label": "任务ID", "uitype": "hidden"},
{"name": "task_title", "label": "审批事项", "uitype": "text", "readonly": true},
{"name": "decision", "label": "审批意见", "uitype": "textarea"}
],
"actions": [
{"widgettype": "Button", "options": {"label": "取消", "onclick": "closeDialog('approveDialog')"}},
{"widgettype": "Button", "options": {"label": "拒绝", "style": {"backgroundColor": "#dc3545", "color": "#fff"}, "onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_reject.dspy', 'approveDialog', null)"}},
{"widgettype": "Button", "options": {"label": "批准", "style": {"backgroundColor": "#28a745", "color": "#fff"}, "onclick": "submitForm('approveForm', '/main/workflow_approval/api/task_approve.dspy', 'approveDialog', null)"}}
]
}
}
},
{
"widgettype": "Dialog",
"id": "taskDetailDialog",
"options": {
"title": "任务详情",
"width": 500,
"content": {
"widgettype": "VBox",
"options": {"gap": 8},
"subwidgets": [
{"widgettype": "Text", "id": "detail_title", "options": {"text": ""}},
{"widgettype": "Divider", "options": {}},
{"widgettype": "HBox", "options": {"gap": 8}, "subwidgets": [
{"widgettype": "Text", "options": {"text": "步骤: ", "style": {"fontWeight": "bold"}}},
{"widgettype": "Text", "id": "detail_step", "options": {"text": ""}}
]},
{"widgettype": "HBox", "options": {"gap": 8}, "subwidgets": [
{"widgettype": "Text", "options": {"text": "审批类型: ", "style": {"fontWeight": "bold"}}},
{"widgettype": "Text", "id": "detail_type", "options": {"text": ""}}
]},
{"widgettype": "HBox", "options": {"gap": 8}, "subwidgets": [
{"widgettype": "Text", "options": {"text": "分配时间: ", "style": {"fontWeight": "bold"}}},
{"widgettype": "Text", "id": "detail_assigned", "options": {"text": ""}}
]},
{"widgettype": "HBox", "options": {"gap": 8}, "subwidgets": [
{"widgettype": "Text", "options": {"text": "截止时间: ", "style": {"fontWeight": "bold"}}},
{"widgettype": "Text", "id": "detail_due", "options": {"text": ""}}
]},
{"widgettype": "Divider", "options": {}},
{"widgettype": "HBox", "options": {"gap": 8}, "subwidgets": [
{"widgettype": "Button", "options": {"label": "关闭", "onclick": "closeDialog('taskDetailDialog')"}},
{"widgettype": "Button", "options": {"label": "去审批", "style": {"backgroundColor": "#007bff", "color": "#fff"}, "onclick": "closeDialog('taskDetailDialog'); openDialog('approveDialog'); setDialogField('approveDialog', 'task_id', getDialogField('taskDetailDialog', 'task_id')); setDialogField('approveDialog', 'task_title', getDialogField('taskDetailDialog', 'task_title'))"}}
]}
]
}
}
}
]
}
]
]
}

View File

@ -46,24 +46,20 @@
"widgettype": "Button",
"options": {
"onClick": "approve_task",
"style": {
"backgroundColor": "#28a745",
"color": "white",
"flex": "1"
},
"label": "批准"
"label": "批准",
"backgroundColor": "#28a745",
"color": "white",
"flex": "1"
}
},
{
"widgettype": "Button",
"options": {
"onClick": "reject_task",
"style": {
"backgroundColor": "#dc3545",
"color": "white",
"flex": "1"
},
"label": "拒绝"
"label": "拒绝",
"backgroundColor": "#dc3545",
"color": "white",
"flex": "1"
}
}
]

View File

@ -1,115 +1,283 @@
{
"widgettype": "Page",
"options": {
"title": "审批工作流管理",
"style": {"height": "100vh", "padding": "0"}
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {"style": {"padding": "16px", "height": "100%"}},
"subwidgets": [
"widgettype": "Page",
"options": {
"title": "审批工作流管理",
"height": "100vh",
"padding": "0"
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {"style": {"marginBottom": "16px"}},
"subwidgets": [
{
"widgettype": "Text",
"options": {"text": "审批工作流管理", "style": {"fontSize": "20px", "fontWeight": "bold"}}
}
]
},
{
"widgettype": "DataViewer",
"options": {
"title": "工作流列表",
"data_url": "/main/workflow_approval/api/workflow_list.dspy",
"page_rows": 20,
"editable": {
"new_data_url": "/main/workflow_approval/api/workflow_create.dspy",
"update_data_url": "/main/workflow_approval/api/workflow_update.dspy",
"delete_data_url": "/main/workflow_approval/api/workflow_delete.dspy",
"form_cheight": 10,
"fields": [
{"name": "workflow_name", "label": "工作流名称", "uitype": "text", "required": true},
{"name": "module_type", "label": "模块类型", "uitype": "code", "data": [
{"value": "customer", "text": "客户管理"},
{"value": "opportunity", "text": "商机管理"},
{"value": "contract", "text": "合同管理"},
{"value": "financial", "text": "财务管理"}
], "required": true},
{"name": "trigger_condition", "label": "触发条件", "uitype": "textarea"},
{"name": "description", "label": "描述", "uitype": "textarea"},
{"name": "is_active", "label": "是否激活", "uitype": "code", "data": [
{"value": "Y", "text": "是"},
{"value": "N", "text": "否"}
], "value": "Y"}
]
"widgettype": "VBox",
"options": {
"padding": "16px",
"height": "100%"
},
"row_options": {
"fields": [
{"name": "workflow_name", "label": "工作流名称", "uitype": "text"},
{"name": "module_type", "label": "模块类型", "uitype": "text"},
{"name": "description", "label": "描述", "uitype": "text"},
{"name": "is_active", "label": "状态", "uitype": "text"},
{"name": "created_at", "label": "创建时间", "uitype": "text"}
]
}
}
},
{
"widgettype": "Divider",
"options": {"style": {"margin": "20px 0"}}
},
{
"widgettype": "Text",
"options": {"text": "审批步骤配置", "style": {"fontSize": "16px", "fontWeight": "bold", "marginBottom": "12px"}}
},
{
"widgettype": "DataViewer",
"options": {
"title": "审批步骤",
"data_url": "/main/workflow_approval/api/step_list.dspy",
"page_rows": 20,
"editable": {
"new_data_url": "/main/workflow_approval/api/step_create.dspy",
"update_data_url": "/main/workflow_approval/api/step_update.dspy",
"delete_data_url": "/main/workflow_approval/api/step_delete.dspy",
"form_cheight": 10,
"fields": [
{"name": "workflow_id", "label": "所属工作流", "uitype": "code", "data_url": "/main/workflow_approval/api/workflow_list.dspy", "required": true},
{"name": "step_name", "label": "步骤名称", "uitype": "text", "required": true},
{"name": "step_order", "label": "步骤顺序", "uitype": "number", "required": true},
{"name": "approver_type", "label": "审批人类型", "uitype": "code", "data": [
{"value": "role", "text": "角色"},
{"value": "user", "text": "用户"},
{"value": "department", "text": "部门"},
{"value": "dynamic", "text": "动态"}
], "required": true},
{"name": "approver_value", "label": "审批人值", "uitype": "text"},
{"name": "approval_type", "label": "审批类型", "uitype": "code", "data": [
{"value": "single", "text": "单人审批"},
{"value": "multiple", "text": "多人审批"},
{"value": "sequential", "text": "顺序审批"},
{"value": "parallel", "text": "并行审批"}
], "required": true},
{"name": "timeout_hours", "label": "超时时间(小时)", "uitype": "number"},
{"name": "description", "label": "描述", "uitype": "textarea"}
]
},
"row_options": {
"fields": [
{"name": "workflow_id", "label": "工作流ID", "uitype": "text"},
{"name": "step_name", "label": "步骤名称", "uitype": "text"},
{"name": "step_order", "label": "顺序", "uitype": "text"},
{"name": "approver_type", "label": "审批人类型", "uitype": "text"},
{"name": "approval_type", "label": "审批类型", "uitype": "text"},
{"name": "timeout_hours", "label": "超时(小时)", "uitype": "text"}
]
}
}
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"marginBottom": "16px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "审批工作流管理",
"fontSize": "20px",
"fontWeight": "bold"
}
}
]
},
{
"widgettype": "DataViewer",
"options": {
"title": "工作流列表",
"data_url": "/main/workflow_approval/api/workflow_list.dspy",
"page_rows": 20,
"editable": {
"new_data_url": "/main/workflow_approval/api/workflow_create.dspy",
"update_data_url": "/main/workflow_approval/api/workflow_update.dspy",
"delete_data_url": "/main/workflow_approval/api/workflow_delete.dspy",
"form_cheight": 10,
"fields": [
{
"name": "workflow_name",
"label": "工作流名称",
"uitype": "text",
"required": true
},
{
"name": "module_type",
"label": "模块类型",
"uitype": "code",
"data": [
{
"value": "customer",
"text": "客户管理"
},
{
"value": "opportunity",
"text": "商机管理"
},
{
"value": "contract",
"text": "合同管理"
},
{
"value": "financial",
"text": "财务管理"
}
],
"required": true
},
{
"name": "trigger_condition",
"label": "触发条件",
"uitype": "textarea"
},
{
"name": "description",
"label": "描述",
"uitype": "textarea"
},
{
"name": "is_active",
"label": "是否激活",
"uitype": "code",
"data": [
{
"value": "Y",
"text": "是"
},
{
"value": "N",
"text": "否"
}
],
"value": "Y"
}
]
},
"row_options": {
"fields": [
{
"name": "workflow_name",
"label": "工作流名称",
"uitype": "text"
},
{
"name": "module_type",
"label": "模块类型",
"uitype": "text"
},
{
"name": "description",
"label": "描述",
"uitype": "text"
},
{
"name": "is_active",
"label": "状态",
"uitype": "text"
},
{
"name": "created_at",
"label": "创建时间",
"uitype": "text"
}
]
}
}
},
{
"widgettype": "Divider",
"options": {
"margin": "20px 0"
}
},
{
"widgettype": "Text",
"options": {
"text": "审批步骤配置",
"fontSize": "16px",
"fontWeight": "bold",
"marginBottom": "12px"
}
},
{
"widgettype": "DataViewer",
"options": {
"title": "审批步骤",
"data_url": "/main/workflow_approval/api/step_list.dspy",
"page_rows": 20,
"editable": {
"new_data_url": "/main/workflow_approval/api/step_create.dspy",
"update_data_url": "/main/workflow_approval/api/step_update.dspy",
"delete_data_url": "/main/workflow_approval/api/step_delete.dspy",
"form_cheight": 10,
"fields": [
{
"name": "workflow_id",
"label": "所属工作流",
"uitype": "code",
"data_url": "/main/workflow_approval/api/workflow_list.dspy",
"required": true
},
{
"name": "step_name",
"label": "步骤名称",
"uitype": "text",
"required": true
},
{
"name": "step_order",
"label": "步骤顺序",
"uitype": "number",
"required": true
},
{
"name": "approver_type",
"label": "审批人类型",
"uitype": "code",
"data": [
{
"value": "role",
"text": "角色"
},
{
"value": "user",
"text": "用户"
},
{
"value": "department",
"text": "部门"
},
{
"value": "dynamic",
"text": "动态"
}
],
"required": true
},
{
"name": "approver_value",
"label": "审批人值",
"uitype": "text"
},
{
"name": "approval_type",
"label": "审批类型",
"uitype": "code",
"data": [
{
"value": "single",
"text": "单人审批"
},
{
"value": "multiple",
"text": "多人审批"
},
{
"value": "sequential",
"text": "顺序审批"
},
{
"value": "parallel",
"text": "并行审批"
}
],
"required": true
},
{
"name": "timeout_hours",
"label": "超时时间(小时)",
"uitype": "number"
},
{
"name": "description",
"label": "描述",
"uitype": "textarea"
}
]
},
"row_options": {
"fields": [
{
"name": "workflow_id",
"label": "工作流ID",
"uitype": "text"
},
{
"name": "step_name",
"label": "步骤名称",
"uitype": "text"
},
{
"name": "step_order",
"label": "顺序",
"uitype": "text"
},
{
"name": "approver_type",
"label": "审批人类型",
"uitype": "text"
},
{
"name": "approval_type",
"label": "审批类型",
"uitype": "text"
},
{
"name": "timeout_hours",
"label": "超时(小时)",
"uitype": "text"
}
]
}
}
}
]
}
]
}
]
]
}

View File

@ -4,28 +4,22 @@
"options": {
"width": "100%",
"height": "100%",
"style": {
"padding": "16px"
}
"padding": "16px"
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"style": {
"marginBottom": "16px",
"gap": "8px"
}
"marginBottom": "16px",
"gap": "8px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"style": {
"fontSize": "20px",
"fontWeight": "bold"
},
"text": "审批管理"
"text": "审批管理",
"fontSize": "20px",
"fontWeight": "bold"
}
},
{

View File

@ -25,14 +25,12 @@
"widgettype": "Button",
"options": {
"onClick": "goto('workflow_approval/approval_instance/create.ui')",
"style": {
"backgroundColor": "#007bff",
"color": "white",
"border": "none",
"padding": "8px 16px",
"borderRadius": "4px"
},
"label": "发起审批"
"label": "发起审批",
"backgroundColor": "#007bff",
"color": "white",
"border": "none",
"padding": "8px 16px",
"borderRadius": "4px"
}
}
]