{ "type" : "page", "title" : "流程监控", "body" : { "type" : "crud", "api" : "/api/flow/VIEW_ACT_PROCESS_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "TITLE", "label" : "主题", "type" : "input-text" }, { "name" : "PROCESSNAME", "label" : "流程名称", "type" : "input-text" }, { "name" : "INITUSERID", "label" : "发起者", "type" : "picker", "clearable" : true, "source" : "/api/picker/090981ba-0c10-4d84-92dc-80e226594480/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] }, "placeholder" : "请点击右侧的图标" }, { "name" : "INITUSERORGID", "label" : "发起者所属分公司", "type" : "picker", "clearable" : true, "source" : "/api/picker/1a998b23-371d-4ebb-911f-6465a56a6809/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] } }, { "name" : "WFSTATUS", "label" : "审批状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/WFSTATUS" }, { "name" : "STARTTIME", "label" : "发起时间", "type" : "input-datetime-range" }, { "name" : "ENDTIME", "label" : "结束时间", "type" : "input-datetime-range" }, { "name" : "ASSIGNEENAME", "label" : "当前审批人", "type" : "input-text" } ] }, "columns" : [ { "name" : "VIEW_ACT_PROCESS_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "TITLE", "label" : "主题", "width" : 300 }, { "name" : "PROCESSNAME", "label" : "流程名称", "width" : 150 }, { "name" : "INITUSERORGID_DISPLAY__", "label" : "发起者所属分公司", "width" : 100 }, { "name" : "INITUSERID_DISPLAY__", "label" : "发起者", "width" : 80 }, { "name" : "WFSTATUS", "label" : "审批状态", "width" : 80, "type" : "mapping", "map" : { "1" : "未提交", "2" : "处理中", "3" : "通过", "4" : "未通过", "5" : "重新提交", "6" : "作废" } }, { "name" : "STARTTIME", "label" : "发起时间", "width" : 150, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ENDTIME", "label" : "结束时间", "width" : 150, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ASSIGNEENAME", "label" : "当前审批人", "width" : 100 } ], "headerToolbar" : [ { "type" : "button", "id" : "处理", "label" : "处理", "icon" : "fa fa-edit", "disabledOn" : "${!selectedItems || selectedItems.length !== 1}", "onEvent" : { "click" : { "actions" : [ { "actionType" : "openApprovalDrawer", "args" : { "taskName" : "${selectedItems[0].TITLE || '流程监控明细'}", "processInstanceId" : "${selectedItems[0].VIEW_ACT_PROCESS_ID}", "businessKey" : "${selectedItems[0].businessKey || selectedItems[0].BUSINESSKEY || ''}", "businessTable" : "${selectedItems[0].businessTable || selectedItems[0].BUSINESSTABLE || ''}", "businessSummary" : "${selectedItems[0].businessSummary || {}}", "readOnly" : true, "mode" : "read" } } ] } } }, { "type" : "button", "id" : "高级处理", "label" : "高级处理", "icon" : "fa fa-code", "disabledOn" : "${!selectedItems || selectedItems.length !== 1}", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "高级处理", "size" : "xl", "body" : { "type" : "form", "id" : "process-monitor-advanced-script-form", "wrapWithPanel" : false, "api" : { "method" : "post", "url" : "/api/workflow/process/${selectedItems[0].VIEW_ACT_PROCESS_ID}/advanced-script", "data" : { "script" : "${script}", "businessKey" : "${selectedItems[0].businessKey || selectedItems[0].BUSINESSKEY || ''}", "tableName" : "${selectedItems[0].businessTable || selectedItems[0].BUSINESSTABLE || ''}" } }, "body" : [ { "type" : "editor", "name" : "script", "label" : "高级处理脚本", "language" : "java", "value" : "", "size" : "lg", "options" : { "minimap" : { "enabled" : false }, "wordWrap" : "on", "fontSize" : 14 } } ] }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "结束流程", "label" : "结束流程", "icon" : "fa fa-ban", "level" : "danger", "actionType" : "ajax", "disabledOn" : "${!selectedItems || selectedItems.length !== 1}", "confirmText" : "确认结束选中的流程?", "api" : { "method" : "post", "url" : "/api/workflow/process/${selectedItems[0].VIEW_ACT_PROCESS_ID}/terminate", "data" : { "comment" : "流程有误作废处理", "businessKey" : "${selectedItems[0].businessKey || selectedItems[0].BUSINESSKEY || ''}", "tableName" : "${selectedItems[0].businessTable || selectedItems[0].BUSINESSTABLE || ''}" } }, "reload" : "process-monitor-crud" }, "pagination" ], "primaryField" : "VIEW_ACT_PROCESS_ID", "id" : "process-monitor-crud", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${event.data.selectedItems[0]}", "templateId" : "9f3b5a8b-0d34-4a34-b493-76a9676c1ed2" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }