提交 1bd1dc99 编写于 作者: doc_wei's avatar doc_wei

feat:代办,已办,我的请求代码修改

上级 b9f2d0e7
var processInstanceId = "";//流程id
var sequenceId = "";//动态表单类型的流程
var rowId = "";//用户提交的表单数据的id
var taskId = "";//任务id
layui.config({ layui.config({
base: basePath, base: basePath,
version: skyeyeVersion version: skyeyeVersion
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
table = layui.table, table = layui.table,
laydate = layui.laydate,
form = layui.form; form = layui.form;
// '申请时间'页面的选取时间段表格
laydate.render({elem: '#createTime', range: '~'});
//申请时间
var startTime = "", endTime = "";
// 我启动的流程 // 我启动的流程
table.render({ table.render({
id: 'messageMyStartTable', id: 'messageMyStartTable',
elem: '#messageMyStartTable', elem: '#messageMyStartTable',
method: 'post', method: 'post',
url: flowableBasePath + 'activitimode013', url: flowableBasePath + 'activitimode013',
where:{startTime: startTime, endTime: endTime, processInstanceId: $("#processInstanceId").val()}, where: getTableParams(),
even: true, even: true,
page: true, page: true,
limits: getLimits(), limits: getLimits(),
limit: getLimit(), limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'processInstanceId', title: '流程ID', width: 100 }, { field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) {
{ field: 'taskType', title: '类型', width: 150, templet: function (d) { return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
return d.processMation.title;
}}, }},
{ field: 'createName', title: '申请人', width: 120, templet: function (d) { { field: 'taskType', title: '类型', width: 150, templet: function (d) {
return d.processMation.createName; return getNotUndefinedVal(d.processMation?.title);
}}, }},
{ field: 'createTime', title: '申请时间', align: 'center', width: 150, templet: function (d) { { 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 += '<span class="layui-badge layui-bg-blue">' + item.name + '</span><br>';
});
return str;
}
return '';
}}, }},
{ field: 'name', title: '当前节点', width: 130, templet: function (d) {
return '[' + d.name + ']';
}},
{ field: 'agencyName', title: '审批人', width: 120},
{ field: 'suspended', title: '状态<i id="stateDesc" class="fa fa-question-circle" style="margin-left: 5px"></i>', align: 'center', width: 130, templet: function (d) { { field: 'suspended', title: '状态<i id="stateDesc" class="fa fa-question-circle" style="margin-left: 5px"></i>', align: 'center', width: 130, templet: function (d) {
if(d.suspended){ if (d.suspended) {
return "<span class='state-down'>挂起</span>"; return "<span class='state-down'>挂起</span>";
} else { } else {
return "<span class='state-up'>正常</span>"; return "<span class='state-up'>正常</span>";
} }
}}, }},
{ field: 'weatherEnd', title: '审批进度', align: 'left', width: 80, templet: function (d) { { field: 'weatherEnd', title: '审批进度', align: 'left', width: 80, templet: function (d) {
if (d.weatherEnd == 1) { if (d.weatherEnd == 0) {
return "<span class='state-up'>已完成</span>";
} else {
return "<span class='state-down'>进行中</span>"; return "<span class='state-down'>进行中</span>";
} else {
return "<span class='state-up'>已完成</span>";
} }
}}, }},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#myStartTableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#myStartTableBar'}
]], ]],
done: function(json) { done: function(json) {
matchingLanguage(); matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入流程ID", function () {
table.reloadData("messageMyStartTable", {page: {curr: 1}, where: getTableParams()});
});
} }
}); });
...@@ -83,7 +76,7 @@ layui.config({ ...@@ -83,7 +76,7 @@ layui.config({
} }
}); });
//刷新流程图 // 刷新流程图
function refreshPic(data) { function refreshPic(data) {
layer.confirm('确认重新生成流程图吗?', { icon: 3, title: '刷新流程图操作' }, function (i) { layer.confirm('确认重新生成流程图吗?', { icon: 3, title: '刷新流程图操作' }, function (i) {
layer.close(i); layer.close(i);
...@@ -92,45 +85,19 @@ layui.config({ ...@@ -92,45 +85,19 @@ layui.config({
}}); }});
}); });
} }
//刷新我启用的流程 form.render();
$("body").on("click", "#reloadMyStartTable", function() { $("body").on("click", "#reloadMyStartTable", function() {
reloadMyStartTable(); loadTable();
});
//搜索
$("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
});
}); });
function loadTable() {
table.reloadData("messageMyStartTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageMyStartTable"));
}
exports('initiatedProcess', {}); exports('initiatedProcess', {});
}); });
...@@ -5,8 +5,6 @@ var taskType = "";//流程类型 ...@@ -5,8 +5,6 @@ var taskType = "";//流程类型
var processInstanceId = "";//流程id var processInstanceId = "";//流程id
var sequenceId = "";//动态表单类型的流程
// 待我审批 // 待我审批
layui.config({ layui.config({
base: basePath, base: basePath,
...@@ -36,22 +34,19 @@ layui.config({ ...@@ -36,22 +34,19 @@ layui.config({
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>'; return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}}, }},
{ field: 'taskType', title: '类型', width: 150, templet: function (d) { { 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) { { 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) { { field: 'createTime', title: '申请时间', align: 'center', width: 150, templet: function (d) {
return d.processMation.createTime; return getNotUndefinedVal(d.processMation?.createTime);
}},
{ field: 'assignee', title: '当前审批人', width: 120, templet: function (d) {
return d.processMation.createName;
}}, }},
{ field: 'name', title: '当前节点', width: 130, templet: function (d) { { field: 'taskName', title: '当前节点', width: 130, templet: function (d) {
return '[' + d.name + ']'; return '[' + d.taskName + ']';
}}, }},
{ field: 'suspended', title: '状态<i id="stateDesc" class="fa fa-question-circle" style="margin-left: 5px"></i>', align: 'center', width: 130, templet: function (d) { { field: 'suspended', title: '状态<i id="stateDesc" class="fa fa-question-circle" style="margin-left: 5px"></i>', align: 'center', width: 100, templet: function (d) {
if(d.suspended){ if (d.suspended) {
return "<span class='state-down'>挂起</span>"; return "<span class='state-down'>挂起</span>";
} else { } else {
return "<span class='state-up'>正常</span>"; return "<span class='state-up'>正常</span>";
...@@ -61,6 +56,9 @@ layui.config({ ...@@ -61,6 +56,9 @@ layui.config({
]], ]],
done: function(json) { done: function(json) {
matchingLanguage(); matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入流程ID", function () {
table.reloadData("messageMyNeedDealtTable", {page: {curr: 1}, where: getTableParams()});
});
} }
}); });
...@@ -76,7 +74,7 @@ layui.config({ ...@@ -76,7 +74,7 @@ layui.config({
// 提交任务 // 提交任务
function subTasks(data, obj){ function subTasks(data, obj){
taskId = data.id; taskId = data.taskId;
taskType = data.taskType; taskType = data.taskType;
processInstanceId = data.processInstanceId; processInstanceId = data.processInstanceId;
_openNewWindows({ _openNewWindows({
...@@ -86,39 +84,21 @@ layui.config({ ...@@ -86,39 +84,21 @@ layui.config({
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
winui.window.msg("提交成功", {icon: 1, time: 2000}); 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.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() { $("body").on("click", "#reloadMyNeedDealtTable", function() {
loadMyNeedDealtTable(); loadTable();
}); });
function loadMyNeedDealtTable(){ function loadTable() {
table.reloadData("messageMyNeedDealtTable", {where: getTableParams()}); table.reloadData("messageMyNeedDealtTable", {where: getTableParams()});
} }
function getTableParams() { function getTableParams() {
return { return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageMyNeedDealtTable"));
taskName: $("#taskName").val(),
processInstanceId: $("#processInstanceId").val()
};
} }
exports('pendingProcess', {}); exports('pendingProcess', {});
......
...@@ -7,33 +7,14 @@ ...@@ -7,33 +7,14 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" /> <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div class="txtcenter" style="margin:0 auto;padding:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">流程ID</label>
<div class="layui-input-inline">
<input type="text" id="processInstanceId" name="processInstanceId" placeholder="请输入流程ID" class="layui-input" />
</div>
<label class="layui-form-label">申请时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" placeholder="请选择申请时间" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar"> <div class="winui-toolbar">
<div class="winui-tool"> <div class="winui-tool">
<button id="reloadMyStartTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button> <button id="reloadMyStartTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div> </div>
</div> </div>
<div style="margin:auto 10px;"> <div style="margin:auto 10px;">
<table id="messageMyStartTable" lay-filter="messageMyStartTable"></table> <table id="messageMyStartTable" lay-filter="messageMyStartTable"></table>
<script type="text/html" id="myStartTableBar"> <script type="text/html" id="myStartTableBar">
<a class="layui-btn layui-btn-xs" lay-event="details">详情</a>
<a class="layui-btn layui-btn-xs" lay-event="refreshPic">刷新流程图</a> <a class="layui-btn layui-btn-xs" lay-event="refreshPic">刷新流程图</a>
</script> </script>
</div> </div>
......
...@@ -5,35 +5,26 @@ ...@@ -5,35 +5,26 @@
<title></title> <title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" /> <link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" /> <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<style>
.layui-table-cell {
height: auto;
text-overflow: inherit;
overflow: visible;
white-space: normal;
word-wrap: break-word;
}
</style>
</head> </head>
<body> <body>
<div class="txtcenter" style="margin:0 auto;padding:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">流程ID</label>
<div class="layui-input-inline">
<input type="text" id="processInstanceId" name="processInstanceId" placeholder="请输入流程ID" class="layui-input" />
</div>
<label class="layui-form-label">任务名称</label>
<div class="layui-input-inline">
<input type="text" id="taskName" name="taskName" placeholder="请输入任务名称" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar"> <div class="winui-toolbar">
<div class="winui-tool"> <div class="winui-tool">
<button id="reloadMyNeedDealtTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button> <button id="reloadMyNeedDealtTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div> </div>
</div> </div>
<div style="margin:auto 10px;"> <div style="margin:auto 10px;">
<table id="messageMyNeedDealtTable" lay-filter="messageMyNeedDealtTable"></table> <table id="messageMyNeedDealtTable" lay-filter="messageMyNeedDealtTable"></table>
<script type="text/html" id="myNeedDealtTableBar"> <script type="text/html" id="myNeedDealtTableBar">
{{# if(!d.suspended){ }} {{# if (!d.suspended) { }}
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="subTasks">审批</a> <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="subTasks">审批</a>
{{# } }} {{# } }}
</script> </script>
......
...@@ -10,9 +10,9 @@ spring: ...@@ -10,9 +10,9 @@ spring:
cloud: cloud:
nacos: nacos:
discovery: discovery:
server-addr: 172.18.92.40:9000 # 配置服务注册nacos地址 server-addr: localhost:9000 # 配置服务注册nacos地址
config: config:
# 指定nacos server的地址 # 指定nacos server的地址
server-addr: 172.18.92.40:9000 server-addr: localhost:9000
file-extension: yml file-extension: yml
namespace: dev namespace: dev
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册