From a699a2557c37d2304600030aa7cdd8e0a767ae19 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Thu, 16 May 2024 19:00:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=B2=E5=8A=9E=E4=BA=8B=E5=AE=9C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activitiCommon/processInstanceDetails.js | 2 + .../approvalActiviti/approvalProcessTask.js | 2 + .../template/js/myActiviti/pendingProcess.js | 3 + .../js/myActiviti/processedProcess.js | 101 +++++++++++------- .../processInstanceDetails.html | 9 ++ .../approvalActiviti/approvalProcessTask.html | 6 ++ .../tpl/myActiviti/processedProcess.html | 25 ++--- web/src/main/resources/bootstrap.yml | 4 +- 8 files changed, 95 insertions(+), 57 deletions(-) diff --git a/activiti/src/main/resources/template/js/activitiCommon/processInstanceDetails.js b/activiti/src/main/resources/template/js/activitiCommon/processInstanceDetails.js index 847acd559..2ceaebc59 100644 --- a/activiti/src/main/resources/template/js/activitiCommon/processInstanceDetails.js +++ b/activiti/src/main/resources/template/js/activitiCommon/processInstanceDetails.js @@ -21,6 +21,8 @@ layui.config({ AjaxPostUtil.request({url: flowableBasePath + "queryProcessInstance", params: {processInstanceId: processInstanceId}, type: 'json', method: 'POST', callback: function(data) { // 加载业务数据 activitiUtil.loadBusiness(data.bean.objectId, data.bean.objectKey, data.bean.actFlowId, 'details'); + // 当前审批人 + $("#taskCurrentAssignee").html(getNotUndefinedVal(data.bean.task?.taskCurrentAssigneeMation?.name)); // 加载流程图片 $("#processInstanceIdImg").attr("src", fileBasePath + 'images/upload/activiti/' + processInstanceId + ".png?cdnversion=" + Math.ceil(new Date()/3600000)); matchingLanguage(); diff --git a/activiti/src/main/resources/template/js/approvalActiviti/approvalProcessTask.js b/activiti/src/main/resources/template/js/approvalActiviti/approvalProcessTask.js index 8dcceed23..5d3e6e47c 100644 --- a/activiti/src/main/resources/template/js/approvalActiviti/approvalProcessTask.js +++ b/activiti/src/main/resources/template/js/approvalActiviti/approvalProcessTask.js @@ -25,6 +25,8 @@ layui.config({ // 加载业务数据 activitiUtil.loadBusiness(data.bean.objectId, data.bean.objectKey, data.bean.actFlowId, 'edit'); + // 当前审批人 + $("#taskCurrentAssignee").html(getNotUndefinedVal(data.bean.task?.taskCurrentAssigneeMation?.name)); }, async: false}); AjaxPostUtil.request({url: flowableBasePath + "activitimode016", params: {taskId: taskId, processInstanceId: processInstanceId}, type: 'json', method: 'GET', callback: function(j){ diff --git a/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js b/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js index ff1e8d4c8..30d8b0a1a 100644 --- a/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js +++ b/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js @@ -44,6 +44,9 @@ layui.config({ { field: 'createTime', title: '申请时间', align: 'center', width: 150, templet: function (d) { return d.processMation.createTime; }}, + { field: 'assignee', title: '当前审批人', width: 120, templet: function (d) { + return d.processMation.createName; + }}, { field: 'name', title: '当前节点', width: 130, templet: function (d) { return '[' + d.name + ']'; }}, diff --git a/activiti/src/main/resources/template/js/myActiviti/processedProcess.js b/activiti/src/main/resources/template/js/myActiviti/processedProcess.js index 1faedb606..d94453ab2 100644 --- a/activiti/src/main/resources/template/js/myActiviti/processedProcess.js +++ b/activiti/src/main/resources/template/js/myActiviti/processedProcess.js @@ -1,7 +1,8 @@ -var processInstanceId = "";//流程id - -var hisTaskId = "";//历史审批任务id +// 流程id +var processInstanceId = ""; +// 历史审批任务id +var hisTaskId = ""; layui.config({ base: basePath, @@ -14,53 +15,69 @@ layui.config({ table = layui.table, form = layui.form; - // 我的历史任务 + // 我的历史审批任务 table.render({ id: 'messageMyHistoryTaskTable', elem: '#messageMyHistoryTaskTable', method: 'post', url: flowableBasePath + 'activitimode014', - where:{}, + where: getTableParams(), even: true, page: true, limits: getLimits(), limit: getLimit(), cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'processInstanceId', title: '流程ID', width: 100 }, - { field: 'taskType', title: '类型', width: 150, templet: function (d) { - return d.processMation.title; + { title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' }, + { field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 280, templet: function (d) { + return '' + getNotUndefinedVal(d.hisTask?.processInstanceId) + ''; }}, - { field: 'createName', title: '申请人', width: 120, templet: function (d) { - return d.processMation.createName; + { field: 'taskType', title: '类型', rowspan: '2', width: 150, templet: function (d) { + return getNotUndefinedVal(d.processMation.title); }}, - { field: 'createTime', title: '申请时间', align: 'center', width: 150, templet: function (d) { - return d.processMation.createTime; + { field: 'createName', title: '申请人', rowspan: '2', width: 120, templet: function (d) { + return getNotUndefinedVal(d.processMation?.createName); }}, - { field: 'name', title: '我处理的节点', width: 130, templet: function (d) { - return '[' + d.name + ']'; - }}, - { field: 'agencyName', title: '受理人', width: 80}, - { field: 'endTime', title: '受理时间', align: 'center', width: 140, templet: function (d) { - if (!isNull(d.endTime)){ - var str = d.endTime.toString(); - str = str.substring(0, str.length - 3); - return date('Y-m-d H:i', str); - } else { - return ""; - } - }}, - { field: 'weatherEnd', title: '审批进度', align: 'left', width: 80, templet: function (d) { - if(d.weatherEnd == 0){ + { field: 'createTime', title: '申请时间', rowspan: '2', align: 'center', width: 150, templet: function (d) { + return getNotUndefinedVal(d.processMation?.createTime); + }}, + { field: 'assigneeList', title: '当前审批人', align: 'left', rowspan: '2', width: 150, templet: function (d) { + if (!isNull(d.assigneeList)) { + var str = ""; + $.each(d.assigneeList, function(i, item) { + str += '' + item.name + '
'; + }); + return str; + } + return ''; + }}, + { title: '我处理的', colspan: '2', align: 'center' }, + { field: 'weatherEnd', title: '审批进度', align: 'left', rowspan: '2', width: 80, templet: function (d) { + if (d.weatherEnd == 0) { return "进行中"; } else { return "已完成"; } }}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#myHistoryTaskTableBar'} - ]], + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', rowspan: '2', align: 'center', width: 150, toolbar: '#myHistoryTaskTableBar'} + ], [ + { field: 'hisTaskName', title: '节点', width: 130, templet: function (d) { + return '[' + getNotUndefinedVal(d.hisTask?.name) + ']'; + }}, + { field: 'lastUpdateTime', title: '处理时间', width: 130, templet: function (d) { + if (!isNull(d.hisTask.endTime)) { + var str = d.hisTask.endTime.toString(); + str = str.substring(0, str.length - 3); + return date('Y-m-d H:i', str); + } else { + return ""; + } + }} + ]], done: function(json) { matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入流程ID", function () { + table.reloadData("messageMyHistoryTaskTable", {page: {curr: 1}, where: getTableParams()}); + }); } }); @@ -76,11 +93,9 @@ layui.config({ } }); - //撤回 + // 撤回 function withdraw(data) { - //流程id processInstanceId = data.processInstanceId; - //历史审批任务id hisTaskId = data.hisTaskId; _openNewWindows({ url: "../../tpl/activitiCommon/revokeActiviti.html", @@ -89,12 +104,12 @@ layui.config({ area: ['70vw', '40vh'], callBack: function (refreshCode) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - reloadMyHistoryTaskTable(); + loadTable(); } }); } - //刷新流程图 + // 刷新流程图 function refreshPic(data) { layer.confirm('确认重新生成流程图吗?', { icon: 3, title: '刷新流程图操作' }, function (i) { layer.close(i); @@ -104,14 +119,18 @@ layui.config({ }); } - //刷新我的历史任务 + form.render(); $("body").on("click", "#reloadMyHistoryTaskTable", function() { - reloadMyHistoryTaskTable(); + loadTable(); }); - - function reloadMyHistoryTaskTable(){ - table.reloadData("messageMyHistoryTaskTable", {where:{}}); - } + + function loadTable() { + table.reloadData("messageMyHistoryTaskTable", {where: getTableParams()}); + } + + function getTableParams() { + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageMyHistoryTaskTable")); + } exports('processedProcess', {}); }); diff --git a/activiti/src/main/resources/template/tpl/activitiCommon/processInstanceDetails.html b/activiti/src/main/resources/template/tpl/activitiCommon/processInstanceDetails.html index 7d0737588..c5dea93a3 100644 --- a/activiti/src/main/resources/template/tpl/activitiCommon/processInstanceDetails.html +++ b/activiti/src/main/resources/template/tpl/activitiCommon/processInstanceDetails.html @@ -32,6 +32,15 @@
+
+ 审批信息
+
+
+ +
+ +
+
diff --git a/activiti/src/main/resources/template/tpl/approvalActiviti/approvalProcessTask.html b/activiti/src/main/resources/template/tpl/approvalActiviti/approvalProcessTask.html index 50bc17431..91fd2ecc8 100644 --- a/activiti/src/main/resources/template/tpl/approvalActiviti/approvalProcessTask.html +++ b/activiti/src/main/resources/template/tpl/approvalActiviti/approvalProcessTask.html @@ -42,6 +42,12 @@
+
+ +
+ +
+
diff --git a/activiti/src/main/resources/template/tpl/myActiviti/processedProcess.html b/activiti/src/main/resources/template/tpl/myActiviti/processedProcess.html index 9833bc1b3..3fec968f4 100644 --- a/activiti/src/main/resources/template/tpl/myActiviti/processedProcess.html +++ b/activiti/src/main/resources/template/tpl/myActiviti/processedProcess.html @@ -5,28 +5,25 @@ + -
-
-
-
- - -
-
-
-
- +
-
+