fix: Text widgets use 'text' not 'label', Button widgets use 'label' not 'text'
Per bricks-framework spec: - Text/Title: use 'text' for non-i18n, 'otext'+'i18n:true' for i18n - Button: use 'label' for button text
This commit is contained in:
parent
a7d7b9da68
commit
9e3734525c
@ -19,7 +19,13 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"tblname": "approval_task",
|
"tblname": "approval_task",
|
||||||
"mode": "view",
|
"mode": "view",
|
||||||
"fields": ["title", "step_name", "description", "assigned_at", "due_at"],
|
"fields": [
|
||||||
|
"title",
|
||||||
|
"step_name",
|
||||||
|
"description",
|
||||||
|
"assigned_at",
|
||||||
|
"due_at"
|
||||||
|
],
|
||||||
"fieldLabels": {
|
"fieldLabels": {
|
||||||
"title": "审批事项",
|
"title": "审批事项",
|
||||||
"step_name": "审批步骤",
|
"step_name": "审批步骤",
|
||||||
@ -39,25 +45,25 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "Button",
|
"widgettype": "Button",
|
||||||
"options": {
|
"options": {
|
||||||
"text": "批准",
|
|
||||||
"onClick": "approve_task",
|
"onClick": "approve_task",
|
||||||
"style": {
|
"style": {
|
||||||
"backgroundColor": "#28a745",
|
"backgroundColor": "#28a745",
|
||||||
"color": "white",
|
"color": "white",
|
||||||
"flex": "1"
|
"flex": "1"
|
||||||
}
|
},
|
||||||
|
"label": "批准"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widgettype": "Button",
|
"widgettype": "Button",
|
||||||
"options": {
|
"options": {
|
||||||
"text": "拒绝",
|
|
||||||
"onClick": "reject_task",
|
"onClick": "reject_task",
|
||||||
"style": {
|
"style": {
|
||||||
"backgroundColor": "#dc3545",
|
"backgroundColor": "#dc3545",
|
||||||
"color": "white",
|
"color": "white",
|
||||||
"flex": "1"
|
"flex": "1"
|
||||||
}
|
},
|
||||||
|
"label": "拒绝"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
136
wwwroot/base.ui
136
wwwroot/base.ui
@ -1,14 +1,37 @@
|
|||||||
{
|
{
|
||||||
"id": "workflow_approval",
|
"id": "workflow_approval",
|
||||||
"widgettype": "VBox",
|
"widgettype": "VBox",
|
||||||
"options": {"width": "100%", "height": "100%", "style": {"padding": "16px"}},
|
"options": {
|
||||||
|
"width": "100%",
|
||||||
|
"height": "100%",
|
||||||
|
"style": {
|
||||||
|
"padding": "16px"
|
||||||
|
}
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "HBox",
|
"widgettype": "HBox",
|
||||||
"options": {"style": {"marginBottom": "16px", "gap": "8px"}},
|
"options": {
|
||||||
|
"style": {
|
||||||
|
"marginBottom": "16px",
|
||||||
|
"gap": "8px"
|
||||||
|
}
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{"widgettype": "Text", "options": {"label": "审批管理", "style": {"fontSize": "20px", "fontWeight": "bold"}}},
|
{
|
||||||
{"widgettype": "Filler", "options": {}}
|
"widgettype": "Text",
|
||||||
|
"options": {
|
||||||
|
"style": {
|
||||||
|
"fontSize": "20px",
|
||||||
|
"fontWeight": "bold"
|
||||||
|
},
|
||||||
|
"text": "审批管理"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widgettype": "Filler",
|
||||||
|
"options": {}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -28,11 +51,36 @@
|
|||||||
"data_method": "GET",
|
"data_method": "GET",
|
||||||
"row_options": {
|
"row_options": {
|
||||||
"fields": [
|
"fields": [
|
||||||
{"name": "approval_code", "title": "审批编号", "uitype": "str", "cwidth": 12},
|
{
|
||||||
{"name": "title", "title": "标题", "uitype": "str", "cwidth": 20},
|
"name": "approval_code",
|
||||||
{"name": "applicant", "title": "申请人", "uitype": "str", "cwidth": 10},
|
"title": "审批编号",
|
||||||
{"name": "apply_date", "title": "申请日期", "uitype": "str", "cwidth": 12},
|
"uitype": "str",
|
||||||
{"name": "status", "title": "状态", "uitype": "str", "cwidth": 8}
|
"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
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,11 +97,36 @@
|
|||||||
"data_method": "GET",
|
"data_method": "GET",
|
||||||
"row_options": {
|
"row_options": {
|
||||||
"fields": [
|
"fields": [
|
||||||
{"name": "approval_code", "title": "审批编号", "uitype": "str", "cwidth": 12},
|
{
|
||||||
{"name": "title", "title": "标题", "uitype": "str", "cwidth": 20},
|
"name": "approval_code",
|
||||||
{"name": "applicant", "title": "申请人", "uitype": "str", "cwidth": 10},
|
"title": "审批编号",
|
||||||
{"name": "apply_date", "title": "申请日期", "uitype": "str", "cwidth": 12},
|
"uitype": "str",
|
||||||
{"name": "status", "title": "状态", "uitype": "str", "cwidth": 8}
|
"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
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -70,11 +143,36 @@
|
|||||||
"data_method": "GET",
|
"data_method": "GET",
|
||||||
"row_options": {
|
"row_options": {
|
||||||
"fields": [
|
"fields": [
|
||||||
{"name": "approval_code", "title": "审批编号", "uitype": "str", "cwidth": 12},
|
{
|
||||||
{"name": "title", "title": "标题", "uitype": "str", "cwidth": 20},
|
"name": "approval_code",
|
||||||
{"name": "applicant", "title": "申请人", "uitype": "str", "cwidth": 10},
|
"title": "审批编号",
|
||||||
{"name": "apply_date", "title": "申请日期", "uitype": "str", "cwidth": 12},
|
"uitype": "str",
|
||||||
{"name": "status", "title": "状态", "uitype": "str", "cwidth": 8}
|
"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
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,11 +10,11 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "审批管理",
|
|
||||||
"fontSize": "24px",
|
"fontSize": "24px",
|
||||||
"fontWeight": "bold",
|
"fontWeight": "bold",
|
||||||
"color": "#1E40AF",
|
"color": "#1E40AF",
|
||||||
"marginBottom": "20px"
|
"marginBottom": "20px",
|
||||||
|
"text": "审批管理"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -49,19 +49,19 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "审批实例",
|
|
||||||
"fontSize": "18px",
|
"fontSize": "18px",
|
||||||
"fontWeight": "bold",
|
"fontWeight": "bold",
|
||||||
"color": "#1E40AF"
|
"color": "#1E40AF",
|
||||||
|
"text": "审批实例"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "查看所有审批流程实例",
|
|
||||||
"fontSize": "14px",
|
"fontSize": "14px",
|
||||||
"color": "#6B7280",
|
"color": "#6B7280",
|
||||||
"marginTop": "8px"
|
"marginTop": "8px",
|
||||||
|
"text": "查看所有审批流程实例"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -91,19 +91,19 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "待办任务",
|
|
||||||
"fontSize": "18px",
|
"fontSize": "18px",
|
||||||
"fontWeight": "bold",
|
"fontWeight": "bold",
|
||||||
"color": "#D97706"
|
"color": "#D97706",
|
||||||
|
"text": "待办任务"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "处理待审批任务",
|
|
||||||
"fontSize": "14px",
|
"fontSize": "14px",
|
||||||
"color": "#6B7280",
|
"color": "#6B7280",
|
||||||
"marginTop": "8px"
|
"marginTop": "8px",
|
||||||
|
"text": "处理待审批任务"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -133,19 +133,19 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "工作流配置",
|
|
||||||
"fontSize": "18px",
|
"fontSize": "18px",
|
||||||
"fontWeight": "bold",
|
"fontWeight": "bold",
|
||||||
"color": "#7C3AED"
|
"color": "#7C3AED",
|
||||||
|
"text": "工作流配置"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "配置审批工作流模板",
|
|
||||||
"fontSize": "14px",
|
"fontSize": "14px",
|
||||||
"color": "#6B7280",
|
"color": "#6B7280",
|
||||||
"marginTop": "8px"
|
"marginTop": "8px",
|
||||||
|
"text": "配置审批工作流模板"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -24,7 +24,6 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "Button",
|
"widgettype": "Button",
|
||||||
"options": {
|
"options": {
|
||||||
"text": "发起审批",
|
|
||||||
"onClick": "goto('workflow_approval/approval_instance/create.ui')",
|
"onClick": "goto('workflow_approval/approval_instance/create.ui')",
|
||||||
"style": {
|
"style": {
|
||||||
"backgroundColor": "#007bff",
|
"backgroundColor": "#007bff",
|
||||||
@ -32,7 +31,8 @@
|
|||||||
"border": "none",
|
"border": "none",
|
||||||
"padding": "8px 16px",
|
"padding": "8px 16px",
|
||||||
"borderRadius": "4px"
|
"borderRadius": "4px"
|
||||||
}
|
},
|
||||||
|
"label": "发起审批"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -51,7 +51,12 @@
|
|||||||
"approver_id": "${logined_userid}",
|
"approver_id": "${logined_userid}",
|
||||||
"status": "pending"
|
"status": "pending"
|
||||||
},
|
},
|
||||||
"fields": ["title", "step_name", "assigned_at", "due_at"],
|
"fields": [
|
||||||
|
"title",
|
||||||
|
"step_name",
|
||||||
|
"assigned_at",
|
||||||
|
"due_at"
|
||||||
|
],
|
||||||
"fieldLabels": {
|
"fieldLabels": {
|
||||||
"title": "审批事项",
|
"title": "审批事项",
|
||||||
"step_name": "步骤",
|
"step_name": "步骤",
|
||||||
@ -71,7 +76,12 @@
|
|||||||
"where": {
|
"where": {
|
||||||
"initiator_id": "${logined_userid}"
|
"initiator_id": "${logined_userid}"
|
||||||
},
|
},
|
||||||
"fields": ["title", "status", "created_at", "completed_at"],
|
"fields": [
|
||||||
|
"title",
|
||||||
|
"status",
|
||||||
|
"created_at",
|
||||||
|
"completed_at"
|
||||||
|
],
|
||||||
"fieldLabels": {
|
"fieldLabels": {
|
||||||
"title": "审批事项",
|
"title": "审批事项",
|
||||||
"status": "状态",
|
"status": "状态",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user