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

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

上级 b9f2d0e7
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 '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ 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: 'name', title: '当前节点', width: 130, templet: function (d) {
return '[' + d.name + ']';
{ 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: '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) {
if(d.suspended){
if (d.suspended) {
return "<span class='state-down'>挂起</span>";
} else {
return "<span class='state-up'>正常</span>";
}
}},
{ field: 'weatherEnd', title: '审批进度', align: 'left', width: 80, templet: function (d) {
if (d.weatherEnd == 1) {
return "<span class='state-up'>已完成</span>";
} else {
if (d.weatherEnd == 0) {
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'}
]],
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);
......@@ -93,44 +86,18 @@ layui.config({
});
}
//刷新我启用的流程
form.render();
$("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 loadTable() {
table.reloadData("messageMyStartTable", {where: getTableParams()});
}
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()}});
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageMyStartTable"));
}
$("body").on("click", "#stateDesc", function() {
layer.tips('该状态分为挂机和正常,被挂机待办无法进行审批操作', $("#stateDesc"), {
tips: [1, '#3595CC'],
time: 4000
});
});
exports('initiatedProcess', {});
});
......@@ -5,8 +5,6 @@ var taskType = "";//流程类型
var processInstanceId = "";//流程id
var sequenceId = "";//动态表单类型的流程
// 待我审批
layui.config({
base: basePath,
......@@ -36,22 +34,19 @@ layui.config({
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ 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: '状态<i id="stateDesc" class="fa fa-question-circle" style="margin-left: 5px"></i>', align: 'center', width: 130, templet: function (d) {
if(d.suspended){
{ 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) {
return "<span class='state-down'>挂起</span>";
} else {
return "<span class='state-up'>正常</span>";
......@@ -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()
};
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageMyNeedDealtTable"));
}
exports('pendingProcess', {});
......
......@@ -7,33 +7,14 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<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-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 style="margin:auto 10px;">
<table id="messageMyStartTable" lay-filter="messageMyStartTable"></table>
<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>
</script>
</div>
......
......@@ -5,35 +5,26 @@
<title></title>
<link href="../../assets/lib/layui/css/layui.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>
<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-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 style="margin:auto 10px;">
<table id="messageMyNeedDealtTable" lay-filter="messageMyNeedDealtTable"></table>
<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>
{{# } }}
</script>
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册