diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml index 65d50ce89..f1c537fcd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml @@ -18,7 +18,9 @@ @Html.AppendCssFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.css")
- 打印表单 + @*打印表单*@ + @*流程任务-打印表单*@ + 打印表单
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js index 3181196a6..82eeb68ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js @@ -8,6 +8,7 @@ var processId = request('processId'); // 流程实例主键 var nodeId = request('nodeId'); // 流程节点 var schemeObj2; +var nodeInfoList = []; //审核节点部分,流程任务-打印表单需要使用 var bootstrap = function ($, learun) { "use strict"; @@ -240,6 +241,36 @@ var bootstrap = function ($, learun) { $.print('.lr-layout-panel'); }); $('#print').show(); + // 流程任务-打印表单 + $('#print2').on('click', function () { + var $iframes = $('#form_list_iframes'); + var iframeId = $iframes.find('.form-list-iframe.active').attr('id'); + //表单部分 + let res = []; + if (iframeId) { + var $iframe = learun.iframe(iframeId, frames); + res = $iframe.$('body').lrGetFormShow(); + } else { + res = $iframes.lrGetFormShow(); + } + //审核部分 + let anodeinfoList = []; + for (var i = 0; i < nodeInfoList.length; i++) { + var nodeItem = nodeInfoList[i]; + if (nodeItem.title != "开始") { + var anodeinfo = { + type: 'anodeinfo', + title: nodeItem.title, + content: nodeItem.content, + date: nodeItem.time, + user: nodeItem.people, + }; + anodeinfoList.push(anodeinfo); + } + } + $.jqprintForm(res.concat(anodeinfoList)); + }); + $('#print2').show(); }, // iframe 加载 iframeLoad: function (iframeId, url, callback, formData) { @@ -256,7 +287,11 @@ var bootstrap = function ($, learun) { } if (!!iframeObj.$) { - callback(iframeObj, formData); + //callback(iframeObj, formData); + //优化系统表单中的数据无法回显问题; + setTimeout(function () { + callback(iframeObj, formData); + }, 10); } }; @@ -405,6 +440,7 @@ var bootstrap = function ($, learun) { nodelist.push(point); } + nodeInfoList = nodelist; $('#wf_timeline').lrtimelineEsc(nodelist); } });