@@ -17,20 +17,20 @@ | |||||
} | } | ||||
</style> | </style> | ||||
@Html.AppendCssFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.css") | @Html.AppendCssFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.css") | ||||
<div class="lr-layout-panel-btn"> | |||||
<a id="print" class="btn btn-primary">打印表单</a> | |||||
</div> | |||||
<div class="lr-layout-panel"> | <div class="lr-layout-panel"> | ||||
<div class="lr-layout-panel-btn"> | |||||
<a id="print" class="btn btn-primary">打印表单</a> | |||||
</div> | |||||
<div class="tab-pane" id="forminfo" style="padding-bottom:40px;"> | |||||
<div class="tab-pane" id="forminfo"> | |||||
<div class="form-list" id="form_list_iframes"> | <div class="form-list" id="form_list_iframes"> | ||||
<div id="wf_timeline"> | |||||
</div> | |||||
</div> | </div> | ||||
<div class="form-list-tabs" id="form_list_tabs_warp"> | <div class="form-list-tabs" id="form_list_tabs_warp"> | ||||
<ul class="nav nav-tabs" id="form_list_tabs"></ul> | <ul class="nav nav-tabs" id="form_list_tabs"></ul> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div id="wf_timeline"> | |||||
</div> | |||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js") | @Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js") | ||||
@@ -4,13 +4,14 @@ | |||||
width: 100%; | width: 100%; | ||||
padding: 5px; | padding: 5px; | ||||
} | } | ||||
.lr-layout-panel { | .lr-layout-panel { | ||||
position: relative; | position: relative; | ||||
height: 100%; | height: 100%; | ||||
width: 100%; | width: 100%; | ||||
border: 1px solid #ccc; | border: 1px solid #ccc; | ||||
background: #fff; | background: #fff; | ||||
padding-top: 41px; | |||||
margin-top: 40px; | |||||
} | } | ||||
.lr-layout-panel-btn { | .lr-layout-panel-btn { | ||||
@@ -103,7 +104,10 @@ | |||||
} | } | ||||
.tab-pane { | .tab-pane { | ||||
position:relative; | |||||
height:100%; | |||||
width:100%; | |||||
} | |||||
position: relative; | |||||
/* height: auto; | |||||
width: auto; | |||||
*/} | |||||
#wf_timeline { | |||||
margin-top: 41px | |||||
} |
@@ -182,9 +182,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
custmerForm.loadForm(nodeInfo.wfForms, true, true); | |||||
console.log(nodeInfo); | |||||
if (!processId && nodeId) { | if (!processId && nodeId) { | ||||
learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetChildProcessDetails', { processId: processId, nodeId: nodeId }, function (data) { | learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetChildProcessDetails', { processId: processId, nodeId: nodeId }, function (data) { | ||||
@@ -212,12 +210,13 @@ var bootstrap = function ($, learun) { | |||||
history = info.TaskLogList; | history = info.TaskLogList; | ||||
currentIds = info.CurrentNodeIds; | currentIds = info.CurrentNodeIds; | ||||
// page.loadFlowInfo(); | |||||
// page.loadFlowInfo(); | |||||
page.loadTimeLine(); | page.loadTimeLine(); | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
custmerForm.loadForm(nodeInfo.wfForms, true, true); | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
@@ -238,17 +237,7 @@ var bootstrap = function ($, learun) { | |||||
$('#print').on('click', function () { | $('#print').on('click', function () { | ||||
//打印checkbox 选中效果打印不出来 | //打印checkbox 选中效果打印不出来 | ||||
$("input[type='checkbox']:checked").attr('checked', 'checked'); | $("input[type='checkbox']:checked").attr('checked', 'checked'); | ||||
var $iframes = $('#form_list_iframes'); | |||||
var iframeId = $iframes.find('.form-list-iframe.active').attr('id'); | |||||
if (iframeId) { | |||||
var $iframe = learun.iframe(iframeId, frames); | |||||
$iframe.$('.lr-form-wrap:visible').jqprint(); | |||||
} | |||||
else { | |||||
//$iframes.find('.form-list-container.active').find('.lr-form-wrap:visible').jqprint(); | |||||
//$('#form_list_iframes').jqprint(); | |||||
$.print('#form_list_iframes'); | |||||
} | |||||
$.print('.lr-layout-panel'); | |||||
}); | }); | ||||
$('#print').show(); | $('#print').show(); | ||||
}, | }, | ||||
@@ -345,6 +334,7 @@ var bootstrap = function ($, learun) { | |||||
callback: function (departmentMap) { | callback: function (departmentMap) { | ||||
learun.clientdata.getAllAsync('user', { | learun.clientdata.getAllAsync('user', { | ||||
callback: function (userMap) { | callback: function (userMap) { | ||||
history.sort(compareFunction("F_CreateDate")); | |||||
for (var i = 0, l = history.length; i < l; i++) { | for (var i = 0, l = history.length; i < l; i++) { | ||||
var item = history[i]; | var item = history[i]; | ||||
@@ -415,7 +405,7 @@ var bootstrap = function ($, learun) { | |||||
nodelist.push(point); | nodelist.push(point); | ||||
} | } | ||||
$('#wf_timeline').lrtimeline(nodelist); | |||||
$('#wf_timeline').lrtimelineEsc(nodelist); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -428,4 +418,22 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | |||||
function compareFunction(propertyName) { | |||||
return function (src, tar) { | |||||
//获取比较的值 | |||||
var v1 = src[propertyName]; | |||||
var v2 = tar[propertyName]; | |||||
if (v1 > v2) { | |||||
return 1; | |||||
} | |||||
if (v1 < v2) { | |||||
return -1; | |||||
} | |||||
return 0; | |||||
}; | |||||
} | } |
@@ -3784,6 +3784,7 @@ | |||||
<Content Include="Views\LR_Content\plugin\scroll\scroll.js" /> | <Content Include="Views\LR_Content\plugin\scroll\scroll.js" /> | ||||
<Content Include="Views\LR_Content\plugin\select\lr-select.css" /> | <Content Include="Views\LR_Content\plugin\select\lr-select.css" /> | ||||
<Content Include="Views\LR_Content\plugin\select\lr-select.js" /> | <Content Include="Views\LR_Content\plugin\select\lr-select.js" /> | ||||
<Content Include="Views\LR_Content\plugin\timeline\lr-timelineEsc.js" /> | |||||
<Content Include="Views\LR_Content\plugin\timeline\lr-timeline.css" /> | <Content Include="Views\LR_Content\plugin\timeline\lr-timeline.css" /> | ||||
<Content Include="Views\LR_Content\plugin\timeline\lr-timeline.js" /> | <Content Include="Views\LR_Content\plugin\timeline\lr-timeline.js" /> | ||||
<Content Include="Views\LR_Content\plugin\tree\lr-tree.css" /> | <Content Include="Views\LR_Content\plugin\tree\lr-tree.css" /> | ||||
@@ -0,0 +1,64 @@ | |||||
/* | |||||
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:Learun智慧校园-前端开发组 | |||||
* 日 期:2017.03.22 | |||||
* 描 述:时间轴方法(升序) | |||||
*/ | |||||
$.fn.lrtimelineEsc = function (nodelist) { | |||||
// title 标题 | |||||
// people 审核人 | |||||
// content 内容 | |||||
// time 时间 | |||||
var $self = $(this); | |||||
if ($self.length == 0) { | |||||
return $self; | |||||
} | |||||
$self.addClass('lr-timeline'); | |||||
var $wrap = $('<div class="lr-timeline-allwrap"></div>'); | |||||
var $ul = $('<ul></ul>'); | |||||
if (nodelist.length > 0) { | |||||
// 开始节点 | |||||
var $begin = $('<li class="lr-timeline-header"><div>开始</div></li>') | |||||
$ul.append($begin); | |||||
$.each(nodelist, function (_index, _item) { | |||||
// 中间节点 | |||||
var $li = $('<li class="lr-timeline-item" ><div class="lr-timeline-wrap" ></div></li>'); | |||||
if (_index == 0) { | |||||
$li.find('div').addClass('lr-timeline-current'); | |||||
} | |||||
var $itemwrap = $li.find('.lr-timeline-wrap'); | |||||
var $itemcontent = $('<div class="lr-timeline-content"><span class="arrow"></span></div>'); | |||||
$itemcontent.append('<div class="lr-timeline-title">' + _item.title + '</div>'); | |||||
$itemcontent.append('<div class="lr-timeline-body"><span>' + _item.people + '</span>' + _item.content + '</div>') | |||||
$itemwrap.append('<span class="lr-timeline-date">' + _item.time + '</span>'); | |||||
$itemwrap.append($itemcontent); | |||||
var $event = $itemcontent.find('.lr-event'); | |||||
if ($event.length > 0) { | |||||
$event[0].lrdata = _item; | |||||
$itemcontent.find('.lr-event').on('click', function () { | |||||
var data = $(this)[0].lrdata; | |||||
data.callback && data.callback(data); | |||||
}); | |||||
} | |||||
$ul.append($li); | |||||
}); | |||||
// 结束节点 | |||||
$ul.append('<li class="lr-timeline-ender"><div>当前</div></li>'); | |||||
} | |||||
$wrap.html($ul); | |||||
$self.html($wrap); | |||||
}; |
@@ -90,6 +90,7 @@ | |||||
"/Views/LR_Content/plugin/wizard/wizard.js", | "/Views/LR_Content/plugin/wizard/wizard.js", | ||||
"/Views/LR_Content/plugin/layerselect/lr-layerselect.js", | "/Views/LR_Content/plugin/layerselect/lr-layerselect.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timeline.js", | "/Views/LR_Content/plugin/timeline/lr-timeline.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timelineEsc.js", | |||||
"/Views/LR_Content/plugin/formselect/lr-formselect.js", | "/Views/LR_Content/plugin/formselect/lr-formselect.js", | ||||
"/Views/LR_Content/plugin/uploader/lr-uploader.js", | "/Views/LR_Content/plugin/uploader/lr-uploader.js", | ||||
"/Views/LR_Content/plugin/date/lr-datepicker.js", | "/Views/LR_Content/plugin/date/lr-datepicker.js", | ||||
@@ -63,6 +63,7 @@ | |||||
"/Views/LR_Content/plugin/select/lr-select.js", | "/Views/LR_Content/plugin/select/lr-select.js", | ||||
"/Views/LR_Content/plugin/layerselect/lr-layerselect.js", | "/Views/LR_Content/plugin/layerselect/lr-layerselect.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timeline.js", | "/Views/LR_Content/plugin/timeline/lr-timeline.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timelineEsc.js", | |||||
"/Views/LR_Content/plugin/formselect/lr-formselect.js", | "/Views/LR_Content/plugin/formselect/lr-formselect.js", | ||||
"/Views/LR_Content/plugin/inputsearch/lr-isearch.js", | "/Views/LR_Content/plugin/inputsearch/lr-isearch.js", | ||||
"/Views/LR_Content/plugin/uploader/lr-uploader.js", | "/Views/LR_Content/plugin/uploader/lr-uploader.js", | ||||
@@ -62,6 +62,7 @@ | |||||
"/Views/LR_Content/plugin/tree/lr-tree.js", | "/Views/LR_Content/plugin/tree/lr-tree.js", | ||||
"/Views/LR_Content/plugin/select/lr-select.js", | "/Views/LR_Content/plugin/select/lr-select.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timeline.js", | "/Views/LR_Content/plugin/timeline/lr-timeline.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timelineEsc.js", | |||||
"/Views/LR_Content/plugin/formselect/lr-formselect.js", | "/Views/LR_Content/plugin/formselect/lr-formselect.js", | ||||
"/Views/LR_Content/plugin/custmerquery/lr-custmerquery.js", | "/Views/LR_Content/plugin/custmerquery/lr-custmerquery.js", | ||||
"/Views/LR_Content/plugin/date/lr-datepicker.js", | "/Views/LR_Content/plugin/date/lr-datepicker.js", | ||||
@@ -56,6 +56,7 @@ | |||||
"/Views/LR_Content/plugin/tree/lr-tree.js", | "/Views/LR_Content/plugin/tree/lr-tree.js", | ||||
"/Views/LR_Content/plugin/select/lr-select.js", | "/Views/LR_Content/plugin/select/lr-select.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timeline.js", | "/Views/LR_Content/plugin/timeline/lr-timeline.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timelineEsc.js", | |||||
"/Views/LR_Content/plugin/formselect/lr-formselect.js", | "/Views/LR_Content/plugin/formselect/lr-formselect.js", | ||||
"/Views/LR_Content/plugin/inputsearch/lr-isearch.js", | "/Views/LR_Content/plugin/inputsearch/lr-isearch.js", | ||||
"/Views/LR_Content/plugin/workflow/lr-workflow-ui.js", | "/Views/LR_Content/plugin/workflow/lr-workflow-ui.js", | ||||
@@ -60,6 +60,7 @@ | |||||
"/Views/LR_Content/plugin/tree/lr-tree.js", | "/Views/LR_Content/plugin/tree/lr-tree.js", | ||||
"/Views/LR_Content/plugin/select/lr-select.js", | "/Views/LR_Content/plugin/select/lr-select.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timeline.js", | "/Views/LR_Content/plugin/timeline/lr-timeline.js", | ||||
"/Views/LR_Content/plugin/timeline/lr-timelineEsc.js", | |||||
"/Views/LR_Content/plugin/formselect/lr-formselect.js", | "/Views/LR_Content/plugin/formselect/lr-formselect.js", | ||||
"/Views/LR_Content/plugin/inputsearch/lr-isearch.js", | "/Views/LR_Content/plugin/inputsearch/lr-isearch.js", | ||||
"/Views/LR_Content/plugin/custmerform/lr-formcomponts.js", | "/Views/LR_Content/plugin/custmerform/lr-formcomponts.js", | ||||