diff --git a/wwwroot/exists_flow_definition/brief_definition.ui b/wwwroot/exists_flow_definition/brief_definition.ui new file mode 100644 index 0000000..4a9a464 --- /dev/null +++ b/wwwroot/exists_flow_definition/brief_definition.ui @@ -0,0 +1,54 @@ +{ + "widgettype": "VBox", + "options": { + "css": "flowdefinition" + }, + "subwidgets": [ + { + "widgettype": "Title4", + "options": { + "otext": "{{params_kw.name}}", + "i18n": true, + "wrap": true, + "halign": "left" + } + }, { + "widgettype": "text", + "options": { + "otext": "{{params_kw.description}}", + "i18n": true, + "wrap": true, + "halign": "left" + } + }, { + "widgettype": "IconTextBar", + "options": { + "margin": "5px", + "rate": 1, + "tools":[ + { + "tip": "新建流程的一个实例", + "name": "new_instance", + "icon": "{{entire_url('/bricks/imgs/flow_instance.svg')}}", + "label": "创建实例" + } + ] + }, + "binds":[ + { + "wid": "self", + "event": "new_instance", + "actiontype": "urlwidget", + "target": "wish_panel", + "options": { + "url": "{{entire_url('instance_input.ui')}}", + "params": { + "id": "{{params_kw.id}}" + } + } + } + ] + } + ] +} + diff --git a/wwwroot/exists_flow_definition/index.ui b/wwwroot/exists_flow_definition/index.ui new file mode 100644 index 0000000..8366542 --- /dev/null +++ b/wwwroot/exists_flow_definition/index.ui @@ -0,0 +1,41 @@ +{% set definitions = get_org_flow_definition() %} +{% if definitions %} +{ + "widgettype": "DynamicColumn", + "options": { + "width": "100%", + "height": "100%", + }, + "subwidgets": [ +{% for d in definitions %} + { + "widgettype": "urlwidget", + "options": { + "url": "{{entire_url('brief_definition.ui')}}", + "params": {{json.dumps(d)}} + } + } +{% if not loop.last %},{% endif %} +{% endfor %} + ] +} +{% else %} +{ + "widgettype": "VBox", + "options": { + "css": "card", + "cwidth": 15, + "height": 10 + }, + "subwidgets": [ + { + "widget": "text", + "options": { + "i18n": true, + "otext": "没有流程" + } + } + ] +} +{% endif %} + "url": "{{entire_url('show_e diff --git a/wwwroot/menu.ui b/wwwroot/menu.ui new file mode 100644 index 0000000..e8d2cb5 --- /dev/null +++ b/wwwroot/menu.ui @@ -0,0 +1,26 @@ +{ + "widgettype": "menu", + "options": { + "cwidth": 10, + "target": "page-center", + "height": "100%", + "items": [ + { + "name": "definitions", + "icon": "{{entire_url('/bricks/imgs/workflow.svg')}}", + "label": "已有流程", + "url": "{{entire_url('exists_flow_definition')}}", + }, { + "name": "instances", + "icon": "{{entire_url('/bricks/imgs/flow_instance.svg')}}", + "label": "进行中流程", + "url": "{{entire_url('running_instances')}}" + }, { + "name": "mywork", + "icon": "{{entire_url('/bricks/imgs/mywork.svg')}}", + "label": "我的任务", + "url": "{{entire_url('mywork')}}" + } + ] + } +}