<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
+ path + "/";
|
%>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<title>待办任务</title>
|
<!--[if !IE]><!-->
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<!--<![endif]-->
|
<!--[if gt IE 8]>
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<![endif]-->
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link href="static/styles/initialize.css" rel="stylesheet" type="text/css">
|
<link href="static/styles/common.css" rel="stylesheet" type="text/css">
|
<link href="static/styles/tree-style.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/styles/material-teal.css" type="text/css">
|
<link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
|
|
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
|
<script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
|
|
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
<script type="text/javascript" src="static/scripts/customResize.js"></script>
|
<!-- 弹窗加载组件 -->
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
|
<!-- wcp组件 -->
|
<script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
|
|
<!--[if lt IE 9]>
|
<script type="text/javascript" src="static/plugins/json2.js"></script>
|
<![endif]-->
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.infoPicker.js"></script>
|
<style>
|
html, body {
|
height: 100%;
|
width: 100%;
|
overflow: hidden;
|
}
|
|
.portal {
|
padding: 0;
|
margin: 0;
|
overflow: auto;
|
border: 1px solid #99bbe8;
|
}
|
|
.portal-noborder {
|
border: 0;
|
}
|
|
.portal .portal-panel {
|
}
|
|
.portal-column-td {
|
vertical-align: top;
|
}
|
|
.portal-column {
|
padding: 0px 0px 0px 10px;
|
overflow: hidden;
|
}
|
|
.portal-column-left {
|
padding-left: 10px;
|
}
|
|
.portal-column-right {
|
padding-right: 10px;
|
}
|
|
.portal-proxy {
|
opacity: 0.6;
|
filter: alpha(opacity=60);
|
}
|
|
.portal-spacer {
|
border: 3px dashed #eee;
|
margin-bottom: 10px;
|
}
|
|
.pt-tablepanelth td {
|
background: #3b689f;
|
padding: 4px 6px;
|
border: 1px solid #e4eaec;
|
color: #fff;
|
text-align: center;
|
font-weight: bold;
|
}
|
|
.moreData {
|
color: #f39c12;
|
text-decoration: none;
|
border-bottom: 1px dashed #f39c12
|
}
|
</style>
|
|
</head>
|
<body>
|
<div class="pt-wrap margin-lr" style="height:100%;">
|
<div class="pt-main-top clear">
|
<div class="pt-nav">
|
<span class="pt-title-icon"><i class="fa fa-gears"></i></span>
|
<div class="pt-title">
|
<div><h4>待办任务</h4></div>
|
</div>
|
</div>
|
</div>
|
<div>
|
<table cellpadding="0" cellspacing="0" style="width: 100%">
|
<tr class="pt-tablepanelth">
|
<td style="width:50px"> </td>
|
<td style="width:5%;">状态</td>
|
<td style="width:25%;">主题</td>
|
<td style="width:10%;">流程类型</td>
|
<td style="width:10%;">来自</td>
|
<td style="width:10%;">最后更新时间</td>
|
<td style="width:10%;">任务</td>
|
<td style="width:10%;">编制单位</td>
|
<td style="width:10%;">文件代码</td>
|
<td style="width:10%;">发起人</td>
|
</tr>
|
</table>
|
<div id="datalist">
|
<div class="pt-tablepanel">
|
<h3 style="cursor:hand" id="h_waitDeal0"><i class="fa fa-sort-desc"></i>个人待办<span
|
class="pt-color-warning"
|
id="lbl_waitDeal0">(0)</span>
|
</h3>
|
<div class="hide">
|
<table cellpadding="0" cellspacing="0" id="tb_waitDeal0">
|
</table>
|
</div>
|
</div>
|
<div class="pt-tablepanel">
|
<h3 style="cursor:hand" id="h_waitDeal1"><i class="fa fa-sort-desc"></i>公办待办<span
|
class="pt-color-warning"
|
id="lbl_waitDeal1">(0)</span>
|
</h3>
|
<div class="hide">
|
<table cellpadding="0" cellspacing="0" id="tb_waitDeal1">
|
</table>
|
</div>
|
</div>
|
<div class="pt-tablepanel">
|
<h3 style="cursor:hand" id="h_waitRead0"><i class="fa fa-sort-desc"></i>个人待阅<span
|
class="pt-color-warning"
|
id="lbl_waitRead0">(0)</span>
|
</h3>
|
<div class="hide">
|
<table cellpadding="0" cellspacing="0" id="tb_waitRead0">
|
</table>
|
</div>
|
</div>
|
<div class="pt-tablepanel">
|
<h3 style="cursor:hand" id="h_waitRead1"><i class="fa fa-sort-desc"></i>公办待阅<span
|
class="pt-color-warning"
|
id="lbl_waitRead1">(0)</span>
|
</h3>
|
<div class="hide">
|
<table cellpadding="0" cellspacing="0" id="tb_waitRead1">
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</body>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
<script>
|
//定义页面全局变量
|
var wh = $(window).height();
|
var height = wh - 90;
|
var pageSize = parseInt('50');
|
var openUrlType = '${openUrlType}';
|
var frozenColumns = [{field: 'ck', checkbox: true}];//固定列
|
var columns = [];
|
var isFirstClick = true;
|
var dealType = "";
|
var tb_waitDeal0 = null;
|
var tb_waitDeal1 = null;
|
var tb_waitRead0 = null;
|
var tb_waitRead1 = null;
|
//窗口参数,用于弹窗传递
|
var params = {
|
callBack: null
|
};
|
columns.push({
|
field: 'emergencyDegreeCode',
|
title: '状态',
|
width: '5%',
|
halign: 'center',
|
align: 'center',
|
formatter: function (value, row, index) {
|
if (value == null || value == 0) {
|
return ''
|
} else if (value == 1) {
|
return '<span style="color: red;font-weight:bolder">!</span>';
|
} else if (value == 2) {
|
return '<span style="color: red;font-weight:bolder">!!</span>';
|
//return '<i class="fa fa-lock pt-color-warning"></i>';
|
}
|
}
|
});
|
columns.push({
|
field: 'executionName',
|
title: '主题',
|
width: '25%',
|
halign: 'center',
|
align: 'left',
|
formatter: function (value, row, index) {
|
if (row.emergencyDegreeCode != null && row.emergencyDegreeCode > 0) {
|
return '<span style="color: red">' + value + '</span>';
|
} else {
|
return value;
|
}
|
}
|
});
|
columns.push({
|
field: 'flowDefinitionName',
|
title: '流程类型',
|
width: '10%',
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
|
columns.push({
|
field: 'startUserName',
|
title: '来自',
|
width: '10%',
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'lastUpdateTime',
|
title: '最后更新时间',
|
width: '10%',
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'taskName',
|
title: '任务',
|
width: '10%',
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'createUnit',
|
title: '编制单位',
|
width: '10%',
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'fileCode',
|
title: '文件代码',
|
width: '10%',
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'startUserName',
|
title: '发起人',
|
width: '10%',
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
|
$(function () {
|
bindWaitDeal();
|
bindWaitRead();
|
|
new ResizeScroll({
|
"id": "#datalist",
|
"fun": function () {
|
var wh = $(window).height();
|
return wh - 110;
|
}
|
});
|
});
|
|
//绑定待办数据
|
function bindWaitDeal() {
|
tb_waitDeal0 = $('#tb_waitDeal0').datagrid({
|
url: 'flow/getWaitDealList?type=0',
|
fitColumns: true,
|
striped: true,
|
rownumbers: true,
|
pagination: false,
|
pageSize: pageSize,
|
pagePosition: 'bottom',
|
checkOnSelect: false,
|
selectOnCheck: false,
|
singleSelect: true,
|
showHeader: false,
|
emptyMsg: '无数据',
|
columns: [columns],
|
onClickRow: function (rowIndex, rowData) {
|
dealType = "waitDeal0";
|
var openUrl = rowData.businessViewUrl;
|
if (openUrl.indexOf("?") > 0) {
|
openUrl += "&";
|
} else {
|
openUrl += "?";
|
}
|
openUrl += "processInstanceId=" + rowData.processInstanceId + "&taskId=" + rowData.taskId;
|
var title = rowData.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var openMoreUrl = "flow/waitDealIndex?type=0&openUrlType=2";
|
$("#lbl_waitDeal0").html("<a href='javascript:void(0)' class='moreData' onclick='wcp.openUrlByTab(\"" + openMoreUrl + "\",\"个人待办\")'>(" + data.total + ")更多</a>");
|
if (data.total > 0 && isFirstClick) {
|
$("#h_waitDeal0").click();
|
}
|
}
|
});
|
|
tb_waitDeal1 = $('#tb_waitDeal1').datagrid({
|
url: 'flow/getWaitDealList?type=1',
|
fitColumns: true,
|
striped: true,
|
rownumbers: true,
|
pagination: false,
|
pageSize: pageSize,
|
pagePosition: 'bottom',
|
checkOnSelect: false,
|
selectOnCheck: false,
|
singleSelect: true,
|
showHeader: false,
|
emptyMsg: '无数据',
|
columns: [columns],
|
onClickRow: function (rowIndex, rowData) {
|
dealType = "waitDeal1";
|
var openUrl = rowData.businessViewUrl + "&processInstanceId=" + rowData.processInstanceId + "&taskId=" + rowData.taskId;
|
var title = rowData.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var openMoreUrl = "flow/waitDealIndex?type=1&openUrlType=2";
|
$("#lbl_waitDeal1").html("<a href='javascript:void(0)' class='moreData' onclick='wcp.openUrlByTab(\"" + openMoreUrl + "\",\"公办待办\")'>(" + data.total + ")更多</a>");
|
if (data.total > 0 && isFirstClick) {
|
$("#h_waitDeal1").click();
|
}
|
}
|
});
|
}
|
|
//绑定待阅数据
|
function bindWaitRead() {
|
tb_waitRead0 = $('#tb_waitRead0').datagrid({
|
url: 'flow/getWaitReadList?type=0',
|
fitColumns: true,
|
striped: true,
|
rownumbers: true,
|
pagination: false,
|
pageSize: pageSize,
|
pagePosition: 'bottom',
|
checkOnSelect: false,
|
selectOnCheck: false,
|
singleSelect: true,
|
showHeader: false,
|
emptyMsg: '无数据',
|
columns: [columns],
|
onClickRow: function (rowIndex, rowData) {
|
dealType = "waitRead0";
|
var openUrl = rowData.businessViewUrl + "&processInstanceId=" + rowData.processInstanceId;
|
var title = rowData.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var openMoreUrl = "flow/waitReadIndex?type=0&openUrlType=2";
|
$("#lbl_waitRead0").html("<a href='javascript:void(0)' class='moreData' onclick='wcp.openUrlByTab(\"" + openMoreUrl + "\",\"个人待阅\")'>(" + data.total + ")更多</a>");
|
if (data.total > 0 && isFirstClick) {
|
$("#h_waitRead0").click();
|
}
|
}
|
});
|
|
tb_waitRead1 = $('#tb_waitRead1').datagrid({
|
url: 'flow/getWaitReadList?type=1',
|
fitColumns: true,
|
striped: true,
|
rownumbers: true,
|
pagination: false,
|
pageSize: pageSize,
|
pagePosition: 'bottom',
|
checkOnSelect: false,
|
selectOnCheck: false,
|
singleSelect: true,
|
showHeader: false,
|
emptyMsg: '无数据',
|
columns: [columns],
|
onClickRow: function (rowIndex, rowData) {
|
dealType = "waitRead1";
|
var openUrl = rowData.businessViewUrl + "&processInstanceId=" + rowData.processInstanceId;
|
var title = rowData.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var openMoreUrl = "flow/waitReadIndex?type=1&openUrlType=2";
|
$("#lbl_waitRead1").html("<a href='javascript:void(0)' class='moreData' onclick='wcp.openUrlByTab(\"" + openMoreUrl + "\",\"公办待阅\")'>(" + data.total + ")更多</a>");
|
if (data.total > 0 && isFirstClick) {
|
$("#h_waitRead1").click();
|
}
|
}
|
});
|
}
|
|
//打开页面
|
function openPage(openUrl, title, refreshData) {
|
isFirstClick = false;
|
switch (openUrlType) {
|
case '0': //tab选项卡
|
wcp.openUrlByTab(openUrl, title, null, refreshData);
|
break;
|
case '1'://弹出层
|
wcp.openUrlByLayer(900, 600, openUrl, title, null, refreshData);
|
break;
|
case '2'://新窗口
|
var pageWidth = 0;
|
var pageHeight = 0;
|
wcp.openUrlByWindow(openUrl, null, title, pageWidth, pageHeight, refreshData);
|
break;
|
}
|
}
|
|
//刷新各种列表
|
function refreshData() {
|
switch (dealType) {
|
case "waitDeal0":
|
tb_waitDeal0.datagrid("reload");
|
break;
|
case "waitDeal1":
|
tb_waitDeal1.datagrid("reload");
|
break;
|
case "waitRead0":
|
tb_waitRead0.datagrid("reload");
|
break;
|
case "waitRead1":
|
tb_waitRead1.datagrid("reload");
|
break;
|
}
|
}
|
|
$(document).ready(function () {
|
$(".pt-tablepanel h3").click(function () {
|
if ($(this).children("i").hasClass("fa-sort-desc")) {
|
$(this).children("i").removeClass("fa-sort-desc")
|
$(this).children("i").addClass("fa-sort-up")
|
$(this).parent().children("div").show();
|
$('#tb_waitDeal0').datagrid('resize');
|
$('#tb_waitDeal1').datagrid('resize');
|
$('#tb_waitRead0').datagrid('resize');
|
$('#tb_waitRead1').datagrid('resize');
|
} else {
|
$(this).children("i").removeClass("fa-sort-up")
|
$(this).children("i").addClass("fa-sort-desc")
|
$(this).parent().children("div").hide();
|
}
|
;
|
//$(this).parent().children("div").toggle();
|
});
|
});
|
</script>
|
</html>
|