Explorar el Código

流程时间轴增加升序

大厂分支
zhichao lei hace 4 años
padre
commit
77ec80e2b8
Se han modificado 10 ficheros con 109 adiciones y 27 borrados
  1. +7
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml
  2. +9
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.css
  3. +23
    -15
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +64
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/timeline/lr-timelineEsc.js
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_AllIndex.cshtml
  7. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_Form.cshtml
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_Index.cshtml
  9. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowForm.cshtml
  10. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowNewForm.cshtml

+ 7
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml Ver fichero

@@ -17,20 +17,20 @@
}
</style>
@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-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 id="wf_timeline">

</div>
</div>
<div class="form-list-tabs" id="form_list_tabs_warp">
<ul class="nav nav-tabs" id="form_list_tabs"></ul>
</div>
</div>
<div id="wf_timeline">

</div>
</div>
@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js")


+ 9
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.css Ver fichero

@@ -4,13 +4,14 @@
width: 100%;
padding: 5px;
}

.lr-layout-panel {
position: relative;
height: 100%;
width: 100%;
border: 1px solid #ccc;
background: #fff;
padding-top: 41px;
margin-top: 40px;
}

.lr-layout-panel-btn {
@@ -103,7 +104,10 @@
}

.tab-pane {
position:relative;
height:100%;
width:100%;
}
position: relative;
/* height: auto;
width: auto;
*/}
#wf_timeline {
margin-top: 41px
}

+ 23
- 15
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js Ver fichero

@@ -182,9 +182,7 @@ var bootstrap = function ($, learun) {
}
});

custmerForm.loadForm(nodeInfo.wfForms, true, true);

console.log(nodeInfo);

if (!processId && nodeId) {
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;
currentIds = info.CurrentNodeIds;

// page.loadFlowInfo();
// page.loadFlowInfo();
page.loadTimeLine();
}
});
}

custmerForm.loadForm(nodeInfo.wfForms, true, true);

},
bind: function () {
@@ -238,17 +237,7 @@ var bootstrap = function ($, learun) {
$('#print').on('click', function () {
//打印checkbox 选中效果打印不出来
$("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();
},
@@ -345,6 +334,7 @@ var bootstrap = function ($, learun) {
callback: function (departmentMap) {
learun.clientdata.getAllAsync('user', {
callback: function (userMap) {
history.sort(compareFunction("F_CreateDate"));
for (var i = 0, l = history.length; i < l; i++) {
var item = history[i];

@@ -415,7 +405,7 @@ var bootstrap = function ($, learun) {

nodelist.push(point);
}
$('#wf_timeline').lrtimeline(nodelist);
$('#wf_timeline').lrtimelineEsc(nodelist);
}
});
}
@@ -428,4 +418,22 @@ var bootstrap = function ($, learun) {
};

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;

};

}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver fichero

@@ -3784,6 +3784,7 @@
<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.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.js" />
<Content Include="Views\LR_Content\plugin\tree\lr-tree.css" />


+ 64
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/timeline/lr-timelineEsc.js Ver fichero

@@ -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);

};

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_AllIndex.cshtml Ver fichero

@@ -90,6 +90,7 @@
"/Views/LR_Content/plugin/wizard/wizard.js",
"/Views/LR_Content/plugin/layerselect/lr-layerselect.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/uploader/lr-uploader.js",
"/Views/LR_Content/plugin/date/lr-datepicker.js",


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_Form.cshtml Ver fichero

@@ -63,6 +63,7 @@
"/Views/LR_Content/plugin/select/lr-select.js",
"/Views/LR_Content/plugin/layerselect/lr-layerselect.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/inputsearch/lr-isearch.js",
"/Views/LR_Content/plugin/uploader/lr-uploader.js",


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_Index.cshtml Ver fichero

@@ -62,6 +62,7 @@
"/Views/LR_Content/plugin/tree/lr-tree.js",
"/Views/LR_Content/plugin/select/lr-select.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/custmerquery/lr-custmerquery.js",
"/Views/LR_Content/plugin/date/lr-datepicker.js",


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowForm.cshtml Ver fichero

@@ -56,6 +56,7 @@
"/Views/LR_Content/plugin/tree/lr-tree.js",
"/Views/LR_Content/plugin/select/lr-select.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/inputsearch/lr-isearch.js",
"/Views/LR_Content/plugin/workflow/lr-workflow-ui.js",


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowNewForm.cshtml Ver fichero

@@ -60,6 +60,7 @@
"/Views/LR_Content/plugin/tree/lr-tree.js",
"/Views/LR_Content/plugin/select/lr-select.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/inputsearch/lr-isearch.js",
"/Views/LR_Content/plugin/custmerform/lr-formcomponts.js",


Cargando…
Cancelar
Guardar