修改前端布局
This commit is contained in:
parent
034054d6f9
commit
a34f686180
|
@ -7,242 +7,240 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>请假流程示例</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/lenos/main.css"/>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js" charset="utf-8"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>请假流程示例</title>
|
||||
<#include "/system/base/header.ftl">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="lenos-search">
|
||||
<div class="select">
|
||||
开始时间:
|
||||
<div class="layui-inline">
|
||||
<input class="layui-input" placeholder="yyyy-MM-dd" height="20px" id="beginTime" autocomplete="off">
|
||||
<div class="select">
|
||||
开始时间:
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" placeholder="yyyy-MM-dd" height="20px" id="beginTime" autocomplete="off">
|
||||
</span>
|
||||
结束时间:
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" placeholder="yyyy-MM-dd" height="20px" id="endTime" autocomplete="off">
|
||||
</span>
|
||||
</div>
|
||||
结束时间:
|
||||
<div class="layui-inline">
|
||||
<input class="layui-input" placeholder="yyyy-MM-dd" height="20px" id="endTime" autocomplete="off">
|
||||
<div class="len-form-item">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="select">查询</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="reload">重置</button>
|
||||
</div>
|
||||
<button class="select-on layui-btn layui-btn-sm" data-type="select"><i class="layui-icon"></i>
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm icon-position-button" id="refresh" style="float: right;"
|
||||
data-type="reload">
|
||||
<i class="layui-icon">ဂ</i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-btn-group">
|
||||
<button class="layui-btn layui-btn-normal" data-type="createLeave">
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm" data-type="createLeave">
|
||||
<i class="layui-icon"></i>新建请假
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="leaveList" width="100%" lay-filter="leave"></table>
|
||||
<table id="leaveList" width="100%" lay-filter="leave"></table>
|
||||
<script type="text/html" id="toolBar">
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="getProcImage"><i class="layui-icon"></i>查看流程图</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="leaveDetail"><i class="layui-icon"></i>查看详情</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="getProcImage"><i class="layui-icon"></i>查看流程图</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="leaveDetail"><i
|
||||
class="layui-icon"></i>查看详情</a>
|
||||
</script>
|
||||
<script type="text/html" id="status">
|
||||
{{#if(typeof(d.taskName)!='undefined'){}}
|
||||
{{#if(typeof(d.taskName)!='undefined'){}}
|
||||
<div>${d.taskName}</div>
|
||||
{{# }else{}}
|
||||
结束
|
||||
{{# }}}
|
||||
{{# }else{}}
|
||||
结束
|
||||
{{# }}}
|
||||
</script>
|
||||
<script>
|
||||
layui.laytpl.toDateString = function(d, format){
|
||||
var date = new Date(d || new Date())
|
||||
,ymd = [
|
||||
this.digit(date.getFullYear(), 4)
|
||||
,this.digit(date.getMonth() + 1)
|
||||
,this.digit(date.getDate())
|
||||
]
|
||||
,hms = [
|
||||
this.digit(date.getHours())
|
||||
,this.digit(date.getMinutes())
|
||||
,this.digit(date.getSeconds())
|
||||
];
|
||||
layui.laytpl.toDateString = function (d, format) {
|
||||
var date = new Date(d || new Date())
|
||||
, ymd = [
|
||||
this.digit(date.getFullYear(), 4)
|
||||
, this.digit(date.getMonth() + 1)
|
||||
, this.digit(date.getDate())
|
||||
]
|
||||
, hms = [
|
||||
this.digit(date.getHours())
|
||||
, this.digit(date.getMinutes())
|
||||
, this.digit(date.getSeconds())
|
||||
];
|
||||
|
||||
format = format || 'yyyy-MM-dd HH:mm:ss';
|
||||
format = format || 'yyyy-MM-dd HH:mm:ss';
|
||||
|
||||
return format.replace(/yyyy/g, ymd[0])
|
||||
.replace(/MM/g, ymd[1])
|
||||
.replace(/dd/g, ymd[2])
|
||||
.replace(/HH/g, hms[0])
|
||||
.replace(/mm/g, hms[1])
|
||||
.replace(/ss/g, hms[2]);
|
||||
};
|
||||
|
||||
//数字前置补零
|
||||
layui.laytpl.digit = function(num, length, end){
|
||||
var str = '';
|
||||
num = String(num);
|
||||
length = length || 2;
|
||||
for(var i = num.length; i < length; i++){
|
||||
str += '0';
|
||||
}
|
||||
return num < Math.pow(10, length) ? str + (num|0) : num;
|
||||
};
|
||||
|
||||
document.onkeydown = function (e) { // 回车提交表单
|
||||
var theEvent = window.event || e;
|
||||
var code = theEvent.keyCode || theEvent.which;
|
||||
if (code == 13) {
|
||||
$(".select .select-on").click();
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('table', function () {
|
||||
var table = layui.table,laydate = layui.laydate;
|
||||
var a = laydate.render({
|
||||
elem: '#beginTime',
|
||||
done: function(value, date, endDate) {
|
||||
b.config.min = {
|
||||
year: date.year,
|
||||
month: date.month - 1,
|
||||
date: date.date,
|
||||
hours: date.hours,
|
||||
minutes: date.minutes,
|
||||
seconds: date.seconds
|
||||
}
|
||||
}
|
||||
});
|
||||
var b = laydate.render({
|
||||
elem: '#endTime'
|
||||
});
|
||||
//方法级渲染
|
||||
table.render({
|
||||
id: 'leaveList',
|
||||
elem: '#leaveList'
|
||||
, url: 'showLeaveList'
|
||||
,parseData: function(res){
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.count,
|
||||
"data": res.data
|
||||
};
|
||||
}
|
||||
, cols: [[
|
||||
{checkbox: true, fixed: true, width: '5%'}
|
||||
, {field: 'userName', title: '申请人', width: '10%', sort: true}
|
||||
, {field: 'beginTime', title: '开始时间', width: '10%', sort: true,templet: '<div>{{ layui.laytpl.toDateString(d.beginTime,"yyyy-MM-dd") }}</div>'}
|
||||
, {field: 'endTime', title: '结束时间', width: '10%', sort: true,templet: '<div>{{ layui.laytpl.toDateString(d.endTime,"yyyy-MM-dd") }}</div>'}
|
||||
/* , {field: 'text', title: '审批', width: '10%', sort: true,templet: '#titleTpl'}*/
|
||||
, {field: 'taskName', title: '状态', width: '10%',templet:'#status'}
|
||||
, {field: 'reason', title: '原因', width: '10%', sort: true}
|
||||
, {field: 'days', title: '天数', width: '10%', sort: true}
|
||||
, {field: 'processInstanceId', title: '流程定义id', width: '10%', sort: true}
|
||||
, {field: 'text', title: '操作', width: '20%', toolbar:'#toolBar'}
|
||||
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-84'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
select: function () {
|
||||
var beginTime = $('#beginTime').val();
|
||||
var endTime = $('#endTime').val();
|
||||
table.reload('leaveList', {
|
||||
where: {
|
||||
beginTime: beginTime,
|
||||
endTime:endTime
|
||||
}
|
||||
});
|
||||
}
|
||||
,createLeave:function(){
|
||||
add("申请请假",'addLeave',700,450);
|
||||
}
|
||||
,reload:function(){
|
||||
$('#beginTime').val('');
|
||||
$('#endTime').val('');
|
||||
table.reload('leaveList', {
|
||||
where: {
|
||||
beginTime: null,
|
||||
endTime: null
|
||||
}
|
||||
});
|
||||
}
|
||||
return format.replace(/yyyy/g, ymd[0])
|
||||
.replace(/MM/g, ymd[1])
|
||||
.replace(/dd/g, ymd[2])
|
||||
.replace(/HH/g, hms[0])
|
||||
.replace(/mm/g, hms[1])
|
||||
.replace(/ss/g, hms[2]);
|
||||
};
|
||||
//监听工具条
|
||||
table.on('tool(leave)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'start') {
|
||||
start(data.key);
|
||||
}else if(obj.event === 'getProcImage'){
|
||||
// var url='getProcImage?processInstanceId='+data.processInstanceId+'';
|
||||
layer.open({
|
||||
id: 'leave-image',
|
||||
type: 2,
|
||||
area: [ '880px', '400px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '流程图',
|
||||
content: '/leave/shinePics/' + data.processInstanceId
|
||||
|
||||
//数字前置补零
|
||||
layui.laytpl.digit = function (num, length, end) {
|
||||
var str = '';
|
||||
num = String(num);
|
||||
length = length || 2;
|
||||
for (var i = num.length; i < length; i++) {
|
||||
str += '0';
|
||||
}
|
||||
return num < Math.pow(10, length) ? str + (num | 0) : num;
|
||||
};
|
||||
|
||||
document.onkeydown = function (e) { // 回车提交表单
|
||||
var theEvent = window.event || e;
|
||||
var code = theEvent.keyCode || theEvent.which;
|
||||
if (code == 13) {
|
||||
$(".select .select-on").click();
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('table', function () {
|
||||
var table = layui.table, laydate = layui.laydate;
|
||||
var a = laydate.render({
|
||||
elem: '#beginTime',
|
||||
done: function (value, date, endDate) {
|
||||
b.config.min = {
|
||||
year: date.year,
|
||||
month: date.month - 1,
|
||||
date: date.date,
|
||||
hours: date.hours,
|
||||
minutes: date.minutes,
|
||||
seconds: date.seconds
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if(obj.event==='leaveDetail'){
|
||||
layer.open({
|
||||
id: 'leave-detail',
|
||||
type: 2,
|
||||
area: [ '880px', '400px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '审核详情',
|
||||
content: "leaveDetail?processId="+data.processInstanceId
|
||||
var b = laydate.render({
|
||||
elem: '#endTime'
|
||||
});
|
||||
}
|
||||
//方法级渲染
|
||||
table.render({
|
||||
id: 'leaveList',
|
||||
elem: '#leaveList'
|
||||
, url: 'showLeaveList'
|
||||
, parseData: function (res) {
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.count,
|
||||
"data": res.data
|
||||
};
|
||||
}
|
||||
, cols: [[
|
||||
{checkbox: true, fixed: true, width: '5%'}
|
||||
, {field: 'userName', title: '申请人', width: '10%', sort: true}
|
||||
, {
|
||||
field: 'beginTime',
|
||||
title: '开始时间',
|
||||
width: '10%',
|
||||
sort: true,
|
||||
templet: '<div>{{ layui.laytpl.toDateString(d.beginTime,"yyyy-MM-dd") }}</div>'
|
||||
}
|
||||
, {
|
||||
field: 'endTime',
|
||||
title: '结束时间',
|
||||
width: '10%',
|
||||
sort: true,
|
||||
templet: '<div>{{ layui.laytpl.toDateString(d.endTime,"yyyy-MM-dd") }}</div>'
|
||||
}
|
||||
, {field: 'taskName', title: '状态', width: '10%', templet: '#status'}
|
||||
, {field: 'reason', title: '原因', width: '10%', sort: true}
|
||||
, {field: 'days', title: '天数', width: '10%', sort: true}
|
||||
, {field: 'processInstanceId', title: '流程定义id', width: '10%', sort: true}
|
||||
, {field: 'text', title: '操作', width: '20%', toolbar: '#toolBar'}
|
||||
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-100'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
select: function () {
|
||||
var beginTime = $('#beginTime').val();
|
||||
var endTime = $('#endTime').val();
|
||||
table.reload('leaveList', {
|
||||
where: {
|
||||
beginTime: beginTime,
|
||||
endTime: endTime
|
||||
}
|
||||
});
|
||||
}
|
||||
, createLeave: function () {
|
||||
add("申请请假", 'addLeave', 700, 450);
|
||||
}
|
||||
, reload: function () {
|
||||
$('#beginTime').val('');
|
||||
$('#endTime').val('');
|
||||
table.reload('leaveList', {
|
||||
where: {
|
||||
beginTime: null,
|
||||
endTime: null
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
//监听工具条
|
||||
table.on('tool(leave)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'start') {
|
||||
start(data.key);
|
||||
} else if (obj.event === 'getProcImage') {
|
||||
layer.open({
|
||||
id: 'leave-image',
|
||||
type: 2,
|
||||
area: ['880px', '400px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '流程图',
|
||||
content: '/leave/shinePics/' + data.processInstanceId
|
||||
});
|
||||
} else if (obj.event === 'leaveDetail') {
|
||||
layer.open({
|
||||
id: 'leave-detail',
|
||||
type: 2,
|
||||
area: ['880px', '400px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '审核详情',
|
||||
content: "leaveDetail?processId=" + data.processInstanceId
|
||||
});
|
||||
}
|
||||
});
|
||||
eleClick(active, '.len-form-item .layui-btn,.layui-col-md12 .layui-btn');
|
||||
|
||||
});
|
||||
|
||||
eleClick(active,'.layui-col-md12 .layui-btn');
|
||||
eleClick(active,'.select .layui-btn');
|
||||
|
||||
});
|
||||
|
||||
function add(title, url, w, h) {
|
||||
if (title == null || title == '') {
|
||||
title = false;
|
||||
function add(title, url, w, h) {
|
||||
if (title == null || title == '') {
|
||||
title = false;
|
||||
}
|
||||
;
|
||||
if (url == null || url == '') {
|
||||
url = "404.html";
|
||||
}
|
||||
;
|
||||
if (w == null || w == '') {
|
||||
w = ($(window).width() * 0.9);
|
||||
}
|
||||
;
|
||||
if (h == null || h == '') {
|
||||
h = ($(window).height() - 50);
|
||||
}
|
||||
;
|
||||
layer.open({
|
||||
id: 'leave-add',
|
||||
type: 2,
|
||||
area: [w + 'px', h + 'px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: title,
|
||||
content: url
|
||||
});
|
||||
}
|
||||
;
|
||||
if (url == null || url == '') {
|
||||
url = "404.html";
|
||||
}
|
||||
;
|
||||
if (w == null || w == '') {
|
||||
w = ($(window).width() * 0.9);
|
||||
}
|
||||
;
|
||||
if (h == null || h == '') {
|
||||
h = ($(window).height() - 50);
|
||||
}
|
||||
;
|
||||
layer.open({
|
||||
id: 'leave-add',
|
||||
type: 2,
|
||||
area: [w + 'px', h + 'px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: title,
|
||||
content: url
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -8,64 +8,54 @@ To change this template use File | Settings | File Templates.-->
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>流程图</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/ztree/css/metroStyle/metroStyle.css">
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js" charset="utf-8"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>流程图</title>
|
||||
<#include "/system/base/header.ftl">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<form class="layui-form layui-form-pane" style="margin-left: 20px;">
|
||||
<div id="image" style="width:100%;height:100%;overflow: auto;">
|
||||
<div class="layui-form-item">
|
||||
<image id="showImages1" style="display: none;"></image>
|
||||
<image id="showImages2"></image>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<form class="layui-form layui-form-pane" style="margin-left: 20px;">
|
||||
<div id="image" style="width:100%;height:100%;overflow: auto;">
|
||||
<div class="layui-form-item">
|
||||
<image id="showImages1" style="display: none;"></image>
|
||||
<image id="showImages2"></image>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
var countNum = 0;
|
||||
// $('#image').css('height',document.body.offsetHeight);
|
||||
layui.use(['form','layer'], function(){
|
||||
$ = layui.jquery;
|
||||
//执行AJAX 获取数据
|
||||
$.getJSON('${re.contextPath}/leave/getShineProcImage?processInstanceId=${processInstanceId}', function(json){
|
||||
var result = json.images;
|
||||
var imgObj1 = document.getElementById("showImages1")
|
||||
imgObj1.src = "data:image/png;base64,"+result[0] ;
|
||||
var imgObj2 = document.getElementById("showImages2")
|
||||
imgObj2.src = "data:image/png;base64,"+result[1] ;
|
||||
layui.use(['form', 'layer'], function () {
|
||||
$ = layui.jquery;
|
||||
//执行AJAX 获取数据
|
||||
$.getJSON('${re.contextPath}/leave/getShineProcImage?processInstanceId=${processInstanceId}', function (json) {
|
||||
var result = json.images;
|
||||
var imgObj1 = document.getElementById("showImages1")
|
||||
imgObj1.src = "data:image/png;base64," + result[0];
|
||||
var imgObj2 = document.getElementById("showImages2")
|
||||
imgObj2.src = "data:image/png;base64," + result[1];
|
||||
// $("#showImages1").show();
|
||||
window.setInterval(function () {
|
||||
//获取网页中id=myImg的图片对象元素
|
||||
window.setInterval(function () {
|
||||
//获取网页中id=myImg的图片对象元素
|
||||
// var imgObj = document.getElementById("showImages")
|
||||
// imgObj.src = "data:image/png;base64,"+result[countNum] ;
|
||||
if(countNum==0)
|
||||
{
|
||||
$("#showImages1").show();
|
||||
$("#showImages2").hide();
|
||||
}else
|
||||
{
|
||||
$("#showImages1").hide();
|
||||
$("#showImages2").show();
|
||||
}
|
||||
countNum++;
|
||||
if (countNum==2)
|
||||
{
|
||||
countNum = 0;//回到了原点
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
if (countNum == 0) {
|
||||
$("#showImages1").show();
|
||||
$("#showImages2").hide();
|
||||
} else {
|
||||
$("#showImages1").hide();
|
||||
$("#showImages2").show();
|
||||
}
|
||||
countNum++;
|
||||
if (countNum == 2) {
|
||||
countNum = 0;//回到了原点
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -9,36 +9,25 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>我的任务</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/lenos/main.css">
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"
|
||||
charset="utf-8"></script>
|
||||
<#include "/system/base/header.ftl">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="lenos-search">
|
||||
<div class="select">
|
||||
操作用户:
|
||||
<div class="layui-inline">
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" height="20px" id="userName" autocomplete="off">
|
||||
</div>
|
||||
</span>
|
||||
操作类型:
|
||||
<div class="layui-inline">
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" height="20px" id="type" autocomplete="off">
|
||||
</div>
|
||||
<button class="select-on layui-btn layui-btn-sm" data-type="select"><i class="layui-icon"></i>
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm icon-position-button" id="refresh" style="float: right;"
|
||||
data-type="reload">
|
||||
<i class="layui-icon">ဂ</i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="len-form-item">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="select">查询</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="reload">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="taskList" width="100%" lay-filter="task"></table>
|
||||
|
@ -180,38 +169,12 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('.select .layui-btn').on('click', function () {
|
||||
$('.len-form-item .layui-btn,.select .layui-btn').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
|
||||
});
|
||||
/**批量删除id*/
|
||||
/*function del(ids) {
|
||||
$.ajax({
|
||||
url: "del",
|
||||
type: "post",
|
||||
data: {ids: ids},
|
||||
dataType: "json", traditional: true,
|
||||
success: function (data) {
|
||||
layer.msg(data.msg, {icon: 6});
|
||||
layui.table.reload('actList');
|
||||
}
|
||||
});
|
||||
}*/
|
||||
/*function start(id) {
|
||||
$.ajax({
|
||||
url: "start",
|
||||
type: "post",
|
||||
data: {key: id},
|
||||
dataType: "json", traditional: true,
|
||||
success: function (data) {
|
||||
layer.msg(data.msg, {icon: 6});
|
||||
layui.table.reload('actList');
|
||||
}
|
||||
});
|
||||
}*/
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -7,208 +7,186 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>流程部署</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/lenos/main.css">
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js" charset="utf-8"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>流程部署</title>
|
||||
<#include "/system/base/header.ftl">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="lenos-search">
|
||||
<div class="select">
|
||||
部署id:
|
||||
<div class="layui-inline">
|
||||
<div class="select">
|
||||
部署id:
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" height="20px" id="deploymentId" autocomplete="off">
|
||||
</div>
|
||||
流程名称:
|
||||
<div class="layui-inline">
|
||||
</span>
|
||||
流程名称:
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" height="20px" id="name" autocomplete="off">
|
||||
</span>
|
||||
</div>
|
||||
<div class="len-form-item">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="select">查询</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="reload">重置</button>
|
||||
</div>
|
||||
<button class="select-on layui-btn layui-btn-sm" data-type="select"><i class="layui-icon"></i>
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm icon-position-button" id="refresh" style="float: right;"
|
||||
data-type="reload">
|
||||
<i class="layui-icon">ဂ</i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-btn-group">
|
||||
<@shiro.hasPermission name="control:del">
|
||||
<#-- <button class="layui-btn layui-btn-normal" id="processGroup" data-type="assignee">
|
||||
<@shiro.hasPermission name="control:del">
|
||||
<#-- <button class="layui-btn layui-btn-normal" id="processGroup" data-type="assignee">
|
||||
<i class="layui-icon"></i>节点处理人设置
|
||||
</button>-->
|
||||
</@shiro.hasPermission>
|
||||
</@shiro.hasPermission>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="actList" width="100%" lay-filter="act"></table>
|
||||
<table id="actList" width="100%" lay-filter="act"></table>
|
||||
<script type="text/html" id="toolBar">
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon"></i>删除</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon"></i>删除</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.laytpl.toDateString = function(d, format){
|
||||
var date = new Date(d || new Date())
|
||||
,ymd = [
|
||||
this.digit(date.getFullYear(), 4)
|
||||
,this.digit(date.getMonth() + 1)
|
||||
,this.digit(date.getDate())
|
||||
]
|
||||
,hms = [
|
||||
this.digit(date.getHours())
|
||||
,this.digit(date.getMinutes())
|
||||
,this.digit(date.getSeconds())
|
||||
];
|
||||
layui.laytpl.toDateString = function (d, format) {
|
||||
var date = new Date(d || new Date())
|
||||
, ymd = [
|
||||
this.digit(date.getFullYear(), 4)
|
||||
, this.digit(date.getMonth() + 1)
|
||||
, this.digit(date.getDate())
|
||||
]
|
||||
, hms = [
|
||||
this.digit(date.getHours())
|
||||
, this.digit(date.getMinutes())
|
||||
, this.digit(date.getSeconds())
|
||||
];
|
||||
|
||||
format = format || 'yyyy-MM-dd HH:mm:ss';
|
||||
format = format || 'yyyy-MM-dd HH:mm:ss';
|
||||
|
||||
return format.replace(/yyyy/g, ymd[0])
|
||||
.replace(/MM/g, ymd[1])
|
||||
.replace(/dd/g, ymd[2])
|
||||
.replace(/HH/g, hms[0])
|
||||
.replace(/mm/g, hms[1])
|
||||
.replace(/ss/g, hms[2]);
|
||||
};
|
||||
|
||||
//数字前置补零
|
||||
layui.laytpl.digit = function(num, length, end){
|
||||
var str = '';
|
||||
num = String(num);
|
||||
length = length || 2;
|
||||
for(var i = num.length; i < length; i++){
|
||||
str += '0';
|
||||
}
|
||||
return num < Math.pow(10, length) ? str + (num|0) : num;
|
||||
};
|
||||
|
||||
document.onkeydown = function (e) { // 回车提交表单
|
||||
var theEvent = window.event || e;
|
||||
var code = theEvent.keyCode || theEvent.which;
|
||||
if (code == 13) {
|
||||
$(".select .select-on").click();
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
//方法级渲染
|
||||
table.render({
|
||||
id: 'actList',
|
||||
elem: '#actList'
|
||||
, url: 'showAct'
|
||||
, cols: [[
|
||||
{checkbox: true, fixed: true, width: '5%'}
|
||||
, {field: 'id', title: '编号', width: '15%', sort: true}
|
||||
, {field: 'name', title: '流程名称', width: '10%', sort: true}
|
||||
, {field: 'key', title: 'key', width: '12%', sort: true}
|
||||
, {field: 'deploymentId', title: '部署id', width: '5%', sort: true}
|
||||
, {field: 'diagramResourceName', title: '流程图资源', width: '15%', sort: true}
|
||||
, {field: 'category', title: '版本', width: '15%', sort: true}
|
||||
, {field: 'resourceName', title: '资源名称', width: '10%', sort: true}
|
||||
, {field: 'text', title: '操作', width: '10%', toolbar:'#toolBar'}
|
||||
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-85'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
select: function () {
|
||||
var deploymentId = $('#deploymentId').val();
|
||||
var name = $('#name').val();
|
||||
table.reload('actList', {
|
||||
where: {
|
||||
deploymentId: deploymentId,
|
||||
name: name
|
||||
}
|
||||
});
|
||||
}
|
||||
/*,assignee:function(){
|
||||
var checkStatus = table.checkStatus('actList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length !=1) {
|
||||
layer.msg('请选择一个流程', {icon: 5});
|
||||
return false;
|
||||
}
|
||||
assignee(data[0].id,data[0].deploymentId);
|
||||
}*/
|
||||
,reload:function(){
|
||||
$('#deploymentId').val('');
|
||||
$('#name').val('');
|
||||
table.reload('actList', {
|
||||
where: {
|
||||
deploymentId: null,
|
||||
name: null
|
||||
}
|
||||
});
|
||||
}
|
||||
return format.replace(/yyyy/g, ymd[0])
|
||||
.replace(/MM/g, ymd[1])
|
||||
.replace(/dd/g, ymd[2])
|
||||
.replace(/HH/g, hms[0])
|
||||
.replace(/mm/g, hms[1])
|
||||
.replace(/ss/g, hms[2]);
|
||||
};
|
||||
//监听工具条
|
||||
table.on('tool(act)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'del') {
|
||||
layer.confirm('将会删除正在执行的流程,确定删除?', {
|
||||
btn: ['确定','取消'] //按钮
|
||||
}, function(){
|
||||
del(data.deploymentId);
|
||||
}, function(){
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('.layui-col-md12 .layui-btn').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
$('.select .layui-btn').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
|
||||
});
|
||||
function del(id) {
|
||||
$.ajax({
|
||||
url: "delDeploy",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
dataType: "json", traditional: true,
|
||||
success: function (d) {
|
||||
if(d.flag){
|
||||
layer.msg(d.msg, {icon: 6});
|
||||
layui.table.reload('actList');
|
||||
}else{
|
||||
layer.msg(d.msg, {icon: 5});
|
||||
//数字前置补零
|
||||
layui.laytpl.digit = function (num, length, end) {
|
||||
var str = '';
|
||||
num = String(num);
|
||||
length = length || 2;
|
||||
for (var i = num.length; i < length; i++) {
|
||||
str += '0';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 流程绑定节点
|
||||
* @param id
|
||||
*/
|
||||
/* function assignee(id,deploymentId){
|
||||
var index =
|
||||
layer.open({
|
||||
id: 'assignee',
|
||||
type: 2,
|
||||
area: ['600px', '350px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '设置流程节点',
|
||||
content: 'goAssignee/'+deploymentId
|
||||
return num < Math.pow(10, length) ? str + (num | 0) : num;
|
||||
};
|
||||
|
||||
document.onkeydown = function (e) { // 回车提交表单
|
||||
var theEvent = window.event || e;
|
||||
var code = theEvent.keyCode || theEvent.which;
|
||||
if (code == 13) {
|
||||
$(".select .select-on").click();
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
//方法级渲染
|
||||
table.render({
|
||||
id: 'actList',
|
||||
elem: '#actList'
|
||||
, url: 'showAct'
|
||||
, cols: [[
|
||||
{checkbox: true, fixed: true, width: '5%'}
|
||||
, {field: 'id', title: '编号', width: '15%', sort: true}
|
||||
, {field: 'name', title: '流程名称', width: '10%', sort: true}
|
||||
, {field: 'key', title: 'key', width: '12%', sort: true}
|
||||
, {field: 'deploymentId', title: '部署id', width: '5%', sort: true}
|
||||
, {field: 'diagramResourceName', title: '流程图资源', width: '15%', sort: true}
|
||||
, {field: 'category', title: '版本', width: '15%', sort: true}
|
||||
, {field: 'resourceName', title: '资源名称', width: '10%', sort: true}
|
||||
, {field: 'text', title: '操作', width: '10%', toolbar: '#toolBar'}
|
||||
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-100'
|
||||
});
|
||||
layer.full(index);
|
||||
}*/
|
||||
|
||||
var $ = layui.$, active = {
|
||||
select: function () {
|
||||
var deploymentId = $('#deploymentId').val();
|
||||
var name = $('#name').val();
|
||||
table.reload('actList', {
|
||||
where: {
|
||||
deploymentId: deploymentId,
|
||||
name: name
|
||||
}
|
||||
});
|
||||
}
|
||||
, reload: function () {
|
||||
$('#deploymentId').val('');
|
||||
$('#name').val('');
|
||||
table.reload('actList', {
|
||||
where: {
|
||||
deploymentId: null,
|
||||
name: null
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
//监听工具条
|
||||
table.on('tool(act)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'del') {
|
||||
layer.confirm('将会删除正在执行的流程,确定删除?', {
|
||||
btn: ['确定', '取消'] //按钮
|
||||
}, function () {
|
||||
del(data.deploymentId);
|
||||
}, function () {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('.len-form-item .layui-btn,.layui-col-md12 .layui-btn').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function del(id) {
|
||||
$.ajax({
|
||||
url: "delDeploy",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
dataType: "json", traditional: true,
|
||||
success: function (d) {
|
||||
if (d.flag) {
|
||||
layer.msg(d.msg, {icon: 6});
|
||||
layui.table.reload('actList');
|
||||
} else {
|
||||
layer.msg(d.msg, {icon: 5});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程绑定节点
|
||||
* @param id
|
||||
*/
|
||||
/* function assignee(id,deploymentId){
|
||||
var index =
|
||||
layer.open({
|
||||
id: 'assignee',
|
||||
type: 2,
|
||||
area: ['600px', '350px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '设置流程节点',
|
||||
content: 'goAssignee/'+deploymentId
|
||||
});
|
||||
layer.full(index);
|
||||
}*/
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
@ -7,242 +7,234 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>模型列表</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/lenos/main.css"/>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js" charset="utf-8"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>模型列表</title>
|
||||
<#include "/system/base/header.ftl">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="lenos-search">
|
||||
<div class="select">
|
||||
模型名称:
|
||||
<div class="layui-inline">
|
||||
<div class="select">
|
||||
模型名称:
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" height="20px" id="name" autocomplete="off">
|
||||
</div>
|
||||
key:
|
||||
<div class="layui-inline">
|
||||
</span>
|
||||
key:
|
||||
<span class="layui-inline">
|
||||
<input class="layui-input" height="20px" id="key" autocomplete="off">
|
||||
</span>
|
||||
</div>
|
||||
<div class="len-form-item">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="select">查询</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" data-type="reload">重置</button>
|
||||
</div>
|
||||
<button class="select-on layui-btn layui-btn-sm" data-type="select"><i class="layui-icon"></i>
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm icon-position-button" id="refresh" style="float: right;"
|
||||
data-type="reload">
|
||||
<i class="layui-icon">ဂ</i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-btn-group">
|
||||
<@shiro.hasPermission name="control:del">
|
||||
<button class="layui-btn layui-btn-normal" data-type="syncdata">
|
||||
<i class="layui-icon"></i>同步数据
|
||||
<@shiro.hasPermission name="control:del">
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm" data-type="syncdata">
|
||||
<i class="layui-icon"></i>同步数据
|
||||
</button>
|
||||
</@shiro.hasPermission>
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm" id="processGroup" data-type="add">
|
||||
<i class="layui-icon"></i>新建流程
|
||||
</button>
|
||||
</@shiro.hasPermission>
|
||||
<button class="layui-btn layui-btn-normal" id="processGroup" data-type="add">
|
||||
<i class="layui-icon"></i>新建流程
|
||||
</button>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table id="actModelList" width="100%" lay-filter="act"></table>
|
||||
<script type="text/html" id="toolBar">
|
||||
<shiro.hasPermission name="control:del">
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="update"><i class="layui-icon"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="open"><i class="layui-icon"></i>发布</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon"></i>删除</a>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="control:del">
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="update"><i class="layui-icon"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="open"><i class="layui-icon"></i>发布</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon"></i>删除</a>
|
||||
</shiro.hasPermission>
|
||||
</script>
|
||||
<script>
|
||||
layui.laytpl.toDateString = function(d, format){
|
||||
var date = new Date(d || new Date())
|
||||
,ymd = [
|
||||
this.digit(date.getFullYear(), 4)
|
||||
,this.digit(date.getMonth() + 1)
|
||||
,this.digit(date.getDate())
|
||||
]
|
||||
,hms = [
|
||||
this.digit(date.getHours())
|
||||
,this.digit(date.getMinutes())
|
||||
,this.digit(date.getSeconds())
|
||||
];
|
||||
layui.laytpl.toDateString = function (d, format) {
|
||||
var date = new Date(d || new Date())
|
||||
, ymd = [
|
||||
this.digit(date.getFullYear(), 4)
|
||||
, this.digit(date.getMonth() + 1)
|
||||
, this.digit(date.getDate())
|
||||
]
|
||||
, hms = [
|
||||
this.digit(date.getHours())
|
||||
, this.digit(date.getMinutes())
|
||||
, this.digit(date.getSeconds())
|
||||
];
|
||||
|
||||
format = format || 'yyyy-MM-dd HH:mm:ss';
|
||||
format = format || 'yyyy-MM-dd HH:mm:ss';
|
||||
|
||||
return format.replace(/yyyy/g, ymd[0])
|
||||
.replace(/MM/g, ymd[1])
|
||||
.replace(/dd/g, ymd[2])
|
||||
.replace(/HH/g, hms[0])
|
||||
.replace(/mm/g, hms[1])
|
||||
.replace(/ss/g, hms[2]);
|
||||
};
|
||||
$('#processGroup').on('mouseover',function(){
|
||||
layer.tips('设置流程节点的代办人/候选人/候选组,目前只开发到组', this,{time:2000});
|
||||
});
|
||||
//数字前置补零
|
||||
layui.laytpl.digit = function(num, length, end){
|
||||
var str = '';
|
||||
num = String(num);
|
||||
length = length || 2;
|
||||
for(var i = num.length; i < length; i++){
|
||||
str += '0';
|
||||
}
|
||||
return num < Math.pow(10, length) ? str + (num|0) : num;
|
||||
};
|
||||
|
||||
document.onkeydown = function (e) { // 回车提交表单
|
||||
var theEvent = window.event || e;
|
||||
var code = theEvent.keyCode || theEvent.which;
|
||||
if (code == 13) {
|
||||
$(".select .select-on").click();
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
//方法级渲染
|
||||
table.render({
|
||||
id: 'actModelList',
|
||||
elem: '#actModelList'
|
||||
, url: 'showAm'
|
||||
, cols: [[
|
||||
{checkbox: true, fixed: true, width: '5%'}
|
||||
, {field: 'id', title: '编号', width: '10%', sort: true}
|
||||
, {field: 'name', title: '流程名称', width: '10%', sort: true}
|
||||
, {field: 'key', title: 'key', width: '10%', sort: true}
|
||||
, {field: 'version', title: '版本', width: '10%', sort: true}
|
||||
, {field: 'createTime', title: '创建时间', width: '20%',templet: '<div>{{ layui.laytpl.toDateString(d.createTime,"yyyy-MM-dd HH:mm:ss") }}</div>'}
|
||||
, {field: 'text', title: '操作', width: '20%', toolbar:'#toolBar'}
|
||||
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-85'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
select: function () {
|
||||
var name = $('#name').val();
|
||||
var key = $('#key').val();
|
||||
table.reload('actModelList', {
|
||||
where: {
|
||||
name: name,
|
||||
key: key
|
||||
}
|
||||
});
|
||||
},
|
||||
syncdata:function () {
|
||||
syncdata();
|
||||
}
|
||||
,reload:function(){
|
||||
$('#name').val('');
|
||||
$('#key').val('');
|
||||
table.reload('actModelList', {
|
||||
where: {
|
||||
name: null,
|
||||
key: null
|
||||
}
|
||||
});
|
||||
},add:function(){
|
||||
var index =layer.open({
|
||||
id: 'act-add',
|
||||
type: 2,
|
||||
area: ['600px','350px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '添加流程',
|
||||
content: 'goActiviti'
|
||||
});
|
||||
layer.full(index);
|
||||
}
|
||||
return format.replace(/yyyy/g, ymd[0])
|
||||
.replace(/MM/g, ymd[1])
|
||||
.replace(/dd/g, ymd[2])
|
||||
.replace(/HH/g, hms[0])
|
||||
.replace(/mm/g, hms[1])
|
||||
.replace(/ss/g, hms[2]);
|
||||
};
|
||||
//监听工具条
|
||||
table.on('tool(act)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'open') {
|
||||
open(data.id);
|
||||
}else if(obj.event === 'update'){
|
||||
var index =layer.open({
|
||||
id: 'act-update',
|
||||
type: 2,
|
||||
area: ['600px','350px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '编辑流程',
|
||||
content: 'actUpdate/'+data.id
|
||||
});
|
||||
layer.full(index);
|
||||
}else if(obj.event === 'del') {
|
||||
layer.confirm('确定删除[' + data.name + ']?', {
|
||||
btn: ['确定', '取消'] //按钮
|
||||
}, function () {
|
||||
del(data.id);
|
||||
}, function () {
|
||||
});
|
||||
}
|
||||
$('#processGroup').on('mouseover', function () {
|
||||
layer.tips('设置流程节点的代办人/候选人/候选组,目前只开发到组', this, {time: 2000});
|
||||
});
|
||||
|
||||
$('.layui-col-md12 .layui-btn').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
$('.select .layui-btn').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
|
||||
});
|
||||
function del(id) {
|
||||
$.ajax({
|
||||
url: "delModel",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
dataType: "json", traditional: true,
|
||||
success: function (d) {
|
||||
if(d.flag){
|
||||
layer.msg(d.msg, {icon: 6});
|
||||
layui.table.reload('actModelList');
|
||||
}else{
|
||||
layer.msg(d.msg, {icon: 5});
|
||||
//数字前置补零
|
||||
layui.laytpl.digit = function (num, length, end) {
|
||||
var str = '';
|
||||
num = String(num);
|
||||
length = length || 2;
|
||||
for (var i = num.length; i < length; i++) {
|
||||
str += '0';
|
||||
}
|
||||
}
|
||||
return num < Math.pow(10, length) ? str + (num | 0) : num;
|
||||
};
|
||||
|
||||
document.onkeydown = function (e) { // 回车提交表单
|
||||
var theEvent = window.event || e;
|
||||
var code = theEvent.keyCode || theEvent.which;
|
||||
if (code == 13) {
|
||||
$(".select .select-on").click();
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('table', function () {
|
||||
var table = layui.table;
|
||||
//方法级渲染
|
||||
table.render({
|
||||
id: 'actModelList',
|
||||
elem: '#actModelList'
|
||||
, url: 'showAm'
|
||||
, cols: [[
|
||||
{checkbox: true, fixed: true, width: '5%'}
|
||||
, {field: 'id', title: '编号', width: '10%', sort: true}
|
||||
, {field: 'name', title: '流程名称', width: '10%', sort: true}
|
||||
, {field: 'key', title: 'key', width: '10%', sort: true}
|
||||
, {field: 'version', title: '版本', width: '10%', sort: true}
|
||||
, {
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
width: '20%',
|
||||
templet: '<div>{{ layui.laytpl.toDateString(d.createTime,"yyyy-MM-dd HH:mm:ss") }}</div>'
|
||||
}
|
||||
, {field: 'text', title: '操作', width: '20%', toolbar: '#toolBar'}
|
||||
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-100'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
select: function () {
|
||||
var name = $('#name').val();
|
||||
var key = $('#key').val();
|
||||
table.reload('actModelList', {
|
||||
where: {
|
||||
name: name,
|
||||
key: key
|
||||
}
|
||||
});
|
||||
},
|
||||
syncdata: function () {
|
||||
syncdata();
|
||||
}
|
||||
, reload: function () {
|
||||
$('#name').val('');
|
||||
$('#key').val('');
|
||||
table.reload('actModelList', {
|
||||
where: {
|
||||
name: null,
|
||||
key: null
|
||||
}
|
||||
});
|
||||
}, add: function () {
|
||||
var index = layer.open({
|
||||
id: 'act-add',
|
||||
type: 2,
|
||||
area: ['600px', '350px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '添加流程',
|
||||
content: 'goActiviti'
|
||||
});
|
||||
layer.full(index);
|
||||
}
|
||||
};
|
||||
//监听工具条
|
||||
table.on('tool(act)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'open') {
|
||||
open(data.id);
|
||||
} else if (obj.event === 'update') {
|
||||
var index = layer.open({
|
||||
id: 'act-update',
|
||||
type: 2,
|
||||
area: ['600px', '350px'],
|
||||
fix: false,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
shade: 0.4,
|
||||
title: '编辑流程',
|
||||
content: 'actUpdate/' + data.id
|
||||
});
|
||||
layer.full(index);
|
||||
} else if (obj.event === 'del') {
|
||||
layer.confirm('确定删除[' + data.name + ']?', {
|
||||
btn: ['确定', '取消'] //按钮
|
||||
}, function () {
|
||||
del(data.id);
|
||||
}, function () {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('.len-form-item .layui-btn,.layui-col-md12 .layui-btn').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
function syncdata() {
|
||||
$.ajax({
|
||||
url: "syncdata",
|
||||
type: "post",
|
||||
dataType: "json", traditional: true,
|
||||
success: function (data) {
|
||||
layer.msg(data.msg, {icon: 6});
|
||||
//layui.table.reload('actModeltList');
|
||||
}
|
||||
});
|
||||
}
|
||||
function open(id) {
|
||||
$.ajax({
|
||||
url: "open",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
dataType: "json", traditional: true,
|
||||
success: function d(data) {
|
||||
layer.msg(data.msg, {icon: 6});
|
||||
layui.table.reload('actModelList');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
$.ajax({
|
||||
url: "delModel",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
dataType: "json", traditional: true,
|
||||
success: function (d) {
|
||||
if (d.flag) {
|
||||
layer.msg(d.msg, {icon: 6});
|
||||
layui.table.reload('actModelList');
|
||||
} else {
|
||||
layer.msg(d.msg, {icon: 5});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function syncdata() {
|
||||
$.ajax({
|
||||
url: "syncdata",
|
||||
type: "post",
|
||||
dataType: "json", traditional: true,
|
||||
success: function (data) {
|
||||
layer.msg(data.msg, {icon: 6});
|
||||
//layui.table.reload('actModeltList');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function open(id) {
|
||||
$.ajax({
|
||||
url: "open",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
dataType: "json", traditional: true,
|
||||
success: function d(data) {
|
||||
layer.msg(data.msg, {icon: 6});
|
||||
layui.table.reload('actModelList');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
, {field: 'remark', title: '操作', width: '20%', toolbar: "#toolBar"}
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-83'
|
||||
,height: 'full-100'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-83'
|
||||
,height: 'full-100'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
|
|
|
@ -10,14 +10,15 @@
|
|||
<div class="layui-col-md12">
|
||||
<div class="layui-btn-group">
|
||||
<@shiro.hasPermission name="nemu:add">
|
||||
<button class="layui-btn layui-btn-sm" data-type="add">
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm" data-type="add">
|
||||
<i class="layui-icon"></i>新增
|
||||
</button>
|
||||
</@shiro.hasPermission>
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-sm icon-position-no-button" id="refresh" style="float: right;" onclick="javascript:location.replace(location.href);">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" style="float: right;margin-right:30px" onclick="javascript:location.replace(location.href);">刷新</button>
|
||||
<#-- <button class="layui-btn layui-btn-sm icon-position-no-button" id="refresh" style="float: right;" onclick="javascript:location.replace(location.href);">
|
||||
<i class="layui-icon i-icon" style="font-size: 21px">ဂ</i>
|
||||
</button>
|
||||
</button>-->
|
||||
</div>
|
||||
<div id="menuTree"></div>
|
||||
</body>
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
, {field: 'remark', title: '操作', width: '20%', toolbar: "#toolBar"}
|
||||
]]
|
||||
, page: true
|
||||
, height: 'full-83'
|
||||
,height: 'full-100'
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
shadeClose: true,
|
||||
shade: 0.4,
|
||||
title: title,
|
||||
content: url,
|
||||
content: url
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -310,5 +310,4 @@
|
|||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -5,3 +5,5 @@
|
|||
.kit-theme .layui-tab-card>.layui-tab-title{
|
||||
background-color: #fbfbfb;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
.layui-input {
|
||||
min-width: 120px;
|
||||
}
|
||||
.lenos-search .select span .layui-input{
|
||||
height: 30px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,3 +63,7 @@
|
|||
.len-button button{
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
body .layui-laypage .layui-laypage-curr .layui-laypage-em{
|
||||
background-color: #1E9FFF;
|
||||
}
|
Loading…
Reference in New Issue