diff --git a/activiti/src/main/resources/template/js/myActiviti/initiatedProcess.js b/activiti/src/main/resources/template/js/myActiviti/initiatedProcess.js index 41175424c94fb31c05d68ebddd68890adedde3ae..d894fe9501b2e8f1fb90958de23e37e9fda35ce5 100644 --- a/activiti/src/main/resources/template/js/myActiviti/initiatedProcess.js +++ b/activiti/src/main/resources/template/js/myActiviti/initiatedProcess.js @@ -1,75 +1,68 @@ -var processInstanceId = "";//流程id - -var sequenceId = "";//动态表单类型的流程 - -var rowId = "";//用户提交的表单数据的id - -var taskId = "";//任务id - layui.config({ base: basePath, version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { winui.renderColor(); var $ = layui.$, table = layui.table, - laydate = layui.laydate, form = layui.form; - // '申请时间'页面的选取时间段表格 - laydate.render({elem: '#createTime', range: '~'}); - - //申请时间 - var startTime = "", endTime = ""; - // 我启动的流程 table.render({ id: 'messageMyStartTable', elem: '#messageMyStartTable', method: 'post', url: flowableBasePath + 'activitimode013', - where:{startTime: startTime, endTime: endTime, processInstanceId: $("#processInstanceId").val()}, + 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; + { field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) { + return '' + getNotUndefinedVal(d.processInstanceId) + ''; }}, - { field: 'createName', title: '申请人', width: 120, templet: function (d) { - return d.processMation.createName; + { field: 'taskType', title: '类型', width: 150, templet: function (d) { + return getNotUndefinedVal(d.processMation?.title); }}, { field: 'createTime', title: '申请时间', align: 'center', width: 150, templet: function (d) { - return d.processMation.createTime; + return getNotUndefinedVal(d.processMation?.createTime); + }}, + { field: 'assigneeList', title: '当前审批人', align: 'left', width: 150, templet: function (d) { + if (!isNull(d.assigneeList)) { + var str = ""; + $.each(d.assigneeList, function(i, item) { + str += '' + item.name + '
'; + }); + return str; + } + return ''; }}, - { field: 'name', title: '当前节点', width: 130, templet: function (d) { - return '[' + d.name + ']'; - }}, - { field: 'agencyName', title: '审批人', width: 120}, { field: 'suspended', title: '状态', align: 'center', width: 130, templet: function (d) { - if(d.suspended){ + if (d.suspended) { return "挂起"; } else { return "正常"; } }}, { field: 'weatherEnd', title: '审批进度', align: 'left', width: 80, templet: function (d) { - if (d.weatherEnd == 1) { - return "已完成"; - } else { + if (d.weatherEnd == 0) { return "进行中"; + } else { + return "已完成"; } }}, { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#myStartTableBar'} ]], done: function(json) { matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入流程ID", function () { + table.reloadData("messageMyStartTable", {page: {curr: 1}, where: getTableParams()}); + }); } }); @@ -83,7 +76,7 @@ layui.config({ } }); - //刷新流程图 + // 刷新流程图 function refreshPic(data) { layer.confirm('确认重新生成流程图吗?', { icon: 3, title: '刷新流程图操作' }, function (i) { layer.close(i); @@ -92,45 +85,19 @@ layui.config({ }}); }); } - - //刷新我启用的流程 + + form.render(); $("body").on("click", "#reloadMyStartTable", function() { - reloadMyStartTable(); - }); - - //搜索 - $("body").on("click", "#formSearch", function() { - searchMyStartTable(); - }); - - function reloadMyStartTable(){ - if (!isNull($("#createTime").val())) {//一定要记得,当createTime为空时 - startTime = $("#createTime").val().split('~')[0].trim() + ' 00:00:00'; - endTime = $("#createTime").val().split('~')[1].trim() + ' 23:59:59'; - } else { - startTime = ""; - endTime = ""; - } - table.reloadData("messageMyStartTable", {where:{startTime: startTime, endTime: endTime, processInstanceId: $("#processInstanceId").val()}}); - } - - function searchMyStartTable(){ - if (!isNull($("#createTime").val())) {//一定要记得,当createTime为空时 - startTime = $("#createTime").val().split('~')[0].trim() + ' 00:00:00'; - endTime = $("#createTime").val().split('~')[1].trim() + ' 23:59:59'; - } else { - startTime = ""; - endTime = ""; - } - table.reloadData("messageMyStartTable", {page: {curr: 1}, where:{startTime: startTime, endTime: endTime, processInstanceId: $("#processInstanceId").val()}}); - } - - $("body").on("click", "#stateDesc", function() { - layer.tips('该状态分为挂机和正常,被挂机待办无法进行审批操作', $("#stateDesc"), { - tips: [1, '#3595CC'], - time: 4000 - }); + loadTable(); }); + + function loadTable() { + table.reloadData("messageMyStartTable", {where: getTableParams()}); + } + + function getTableParams() { + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageMyStartTable")); + } exports('initiatedProcess', {}); }); diff --git a/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js b/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js index 30d8b0a1aa316ddfeaacf309ceed41329ba91a7f..cee76a7331e6ca470606ee68d38b5e2ffc3f8c61 100644 --- a/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js +++ b/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js @@ -5,8 +5,6 @@ var taskType = "";//流程类型 var processInstanceId = "";//流程id -var sequenceId = "";//动态表单类型的流程 - // 待我审批 layui.config({ base: basePath, @@ -36,22 +34,19 @@ layui.config({ return '' + getNotUndefinedVal(d.processInstanceId) + ''; }}, { field: 'taskType', title: '类型', width: 150, templet: function (d) { - return d.processMation.title; + return getNotUndefinedVal(d.processMation?.title); }}, { field: 'createName', title: '申请人', width: 120, templet: function (d) { - return d.processMation.createName; + return getNotUndefinedVal(d.processMation?.createName); }}, { 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; + return getNotUndefinedVal(d.processMation?.createTime); }}, - { field: 'name', title: '当前节点', width: 130, templet: function (d) { - return '[' + d.name + ']'; + { field: 'taskName', title: '当前节点', width: 130, templet: function (d) { + return '[' + d.taskName + ']'; }}, - { field: 'suspended', title: '状态', align: 'center', width: 130, templet: function (d) { - if(d.suspended){ + { field: 'suspended', title: '状态', align: 'center', width: 100, templet: function (d) { + if (d.suspended) { return "挂起"; } else { return "正常"; @@ -61,6 +56,9 @@ layui.config({ ]], done: function(json) { matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入流程ID", function () { + table.reloadData("messageMyNeedDealtTable", {page: {curr: 1}, where: getTableParams()}); + }); } }); @@ -76,7 +74,7 @@ layui.config({ // 提交任务 function subTasks(data, obj){ - taskId = data.id; + taskId = data.taskId; taskType = data.taskType; processInstanceId = data.processInstanceId; _openNewWindows({ @@ -86,39 +84,21 @@ layui.config({ area: ['90vw', '90vh'], callBack: function (refreshCode) { winui.window.msg("提交成功", {icon: 1, time: 2000}); - loadMyNeedDealtTable(); + loadTable(); }}); } - - $("body").on("click", "#stateDesc", function() { - layer.tips('该状态分为挂机和正常,被挂机待办无法进行审批操作', $("#stateDesc"), { - tips: [1, '#3595CC'], - time: 4000 - }); - }); form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - table.reloadData("messageMyNeedDealtTable", {page: {curr: 1}, where: getTableParams()}); - } - return false; - }); - - // 刷新我的待办 $("body").on("click", "#reloadMyNeedDealtTable", function() { - loadMyNeedDealtTable(); + loadTable(); }); - function loadMyNeedDealtTable(){ + function loadTable() { table.reloadData("messageMyNeedDealtTable", {where: getTableParams()}); } - function getTableParams() { - return { - taskName: $("#taskName").val(), - processInstanceId: $("#processInstanceId").val() - }; + function getTableParams() { + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageMyNeedDealtTable")); } exports('pendingProcess', {}); diff --git a/activiti/src/main/resources/template/tpl/myActiviti/initiatedProcess.html b/activiti/src/main/resources/template/tpl/myActiviti/initiatedProcess.html index cdeeddf177d9eaab023c818275a3e60797949ec7..61e2f69abb954e03c63943db662be361abaa8f78 100644 --- a/activiti/src/main/resources/template/tpl/myActiviti/initiatedProcess.html +++ b/activiti/src/main/resources/template/tpl/myActiviti/initiatedProcess.html @@ -7,33 +7,14 @@ -
-
-
-
- -
- -
- -
- -
- - -
-
-
-
- +
diff --git a/activiti/src/main/resources/template/tpl/myActiviti/pendingProcess.html b/activiti/src/main/resources/template/tpl/myActiviti/pendingProcess.html index ac9b58096ba484ca75c50f5b1fb0a201b7e42fc2..403d31b3c11b21caa3bbbbbce655cfc0b4edebbd 100644 --- a/activiti/src/main/resources/template/tpl/myActiviti/pendingProcess.html +++ b/activiti/src/main/resources/template/tpl/myActiviti/pendingProcess.html @@ -5,35 +5,26 @@ + -
-
-
-
- -
- -
- -
- -
- - -
-
-
-
- +
diff --git a/web/src/main/resources/bootstrap.yml b/web/src/main/resources/bootstrap.yml index b5bd3942852949e2d5dc856463d7d6041a95deeb..71d0c0d53b73f9237104b99dd3d9db1b25cb2941 100644 --- a/web/src/main/resources/bootstrap.yml +++ b/web/src/main/resources/bootstrap.yml @@ -10,9 +10,9 @@ spring: cloud: nacos: discovery: - server-addr: 172.18.92.40:9000 # 配置服务注册nacos地址 + server-addr: localhost:9000 # 配置服务注册nacos地址 config: # 指定nacos server的地址 - server-addr: 172.18.92.40:9000 + server-addr: localhost:9000 file-extension: yml namespace: dev \ No newline at end of file