From 9c090666aa3db1c295c4d18bc89fda647bc9be54 Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 3 Mar 2022 15:44:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=BB=BB=E5=8A=A1=E5=92=8C?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=9B=91=E6=8E=A7=E6=A8=A1=E5=9D=97=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=BD=93=E5=89=8D=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=8A=9E=E7=90=86=E4=BA=BA=E5=88=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NWFProcessController.cs | 36 +++++++++++++++++-- .../LR_NewWorkFlow/Views/NWFProcess/Index.js | 14 +++++++- .../Views/NWFProcess/MonitorIndex.js | 14 +++++++- 3 files changed, 60 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs index 49960a48f..d3df61f1a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs @@ -294,8 +294,8 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers public ActionResult GetFirstTaskByProcessId(string processId) { - var taskId= nWFProcessIBLL.GetFirstTaskByProcessId(processId); - return Success(new {taskId}); + var taskId = nWFProcessIBLL.GetFirstTaskByProcessId(processId); + return Success(new { taskId }); } /// /// 获取我的流程信息列表 @@ -860,5 +860,37 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers return Success("添加成功"); } #endregion + + [HttpGet] + public ActionResult GetNextUser(string F_TaskId) + { + List usernamelist = new List(); + List nextlist = nWFTaskIBLL.GetTaskUserList(F_TaskId).Select(m => m.F_UserId).ToList(); + foreach (var uid in nextlist) + { + usernamelist.Add(userIbll.GetEntityByUserId(uid)?.F_RealName); + } + return SuccessString(string.Join(",", usernamelist)); + } + + [HttpGet] + public ActionResult GetNextUserMonitor(string F_ProcessId) + { + var tasklist=nWFTaskIBLL.GetUnFinishTaskList(F_ProcessId).FirstOrDefault(); + if (tasklist!=null&&!string.IsNullOrEmpty(tasklist.F_Id)) + { + List usernamelist = new List(); + List nextlist = nWFTaskIBLL.GetTaskUserList(tasklist.F_Id).Select(m => m.F_UserId).ToList(); + foreach (var uid in nextlist) + { + usernamelist.Add(userIbll.GetEntityByUserId(uid)?.F_RealName); + } + return SuccessString(string.Join(",", usernamelist)); + } + else + { + return SuccessString(""); + } + } } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js index 188fdb0e1..97b6419e6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js @@ -116,7 +116,7 @@ var bootstrap = function ($, learun) { }); }, initGrid: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetTaskPageList', headData: [ { @@ -290,6 +290,18 @@ var bootstrap = function ($, learun) { } } }, + { + label: "当前节点办理人", name: "F_Id", width: 300, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + if (row.F_TaskId) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetNextUser?F_TaskId=' + row.F_TaskId, function (res) { + if (res.code == learun.httpCode.success) { + callback(res.data); + } + }); + } else + callback(""); + } + }, //{ // label: "等级", name: "F_Level", width: 60, align: "center", // formatter: function (cellvalue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndex.js index c811244ff..61a0cda94 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndex.js @@ -121,7 +121,7 @@ var bootstrap = function ($, learun) { }); }, initGrid: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetPorcessList', headData: [ { @@ -174,6 +174,18 @@ var bootstrap = function ($, learun) { } }, + { + label: "当前节点办理人", name: "F_Id", width: 300, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + if (row.F_Id) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetNextUserMonitor?F_ProcessId=' + row.F_Id, function (res) { + if (res.code == learun.httpCode.success) { + callback(res.data); + } + }); + } else + callback(""); + } + }, { label: "发起者", name: "F_CreateUserName", width: 80, align: "center" }, { label: "时间", name: "F_CreateDate", width: 150, align: "left",