<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%
|
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;
|
}
|
|
.radioSpan {
|
position: relative;
|
border: 1px solid #95B8E7;
|
background-color: #fff;
|
vertical-align: middle;
|
display: inline-block;
|
overflow: hidden;
|
white-space: nowrap;
|
margin: 0;
|
padding: 0;
|
-moz-border-radius: 5px 5px 5px 5px;
|
-webkit-border-radius: 5px 5px 5px 5px;
|
border-radius: 5px 5px 5px 5px;
|
display: block;
|
}
|
|
.layout-split-west {
|
border-right: 5px solid #fff;
|
}
|
|
.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="margin-lr">
|
<div class="pt-main-top clear">
|
<div class="pt-nav pt-nav-xs">
|
<span class="pt-title-icon">
|
<i class="fa ${icon}"></i>
|
</span>
|
<div class="pt-title">
|
<div>
|
<h4>${title}</h4>
|
</div>
|
</div>
|
</div>
|
<c:if test="${type>-1}">
|
<div class="pt-search pt-search-xs">
|
<p class="pt-retrieval">
|
<input id="txtKeySearch" type="text" placeholder="请输入任务名称查询">
|
<button id="btnKeySearch">
|
<i class="fa fa-search"></i>
|
</button>
|
</p>
|
<button id="search" class="pt-btn pt-btn-info"><i class="fa fa-search"></i>高级查询</button>
|
<div class="pt-btnList">
|
</div>
|
</div>
|
</c:if>
|
</div>
|
<c:if test="${type==-1}">
|
<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 style="height: 200px" id="datalist">
|
<div class="pt-tablepanel">
|
<h3 style="cursor:hand" id="h_begin"><i class="fa fa-sort-desc"></i>已拟稿<span class="pt-color-warning"
|
id="lbl_begin">(0)</span>
|
</h3>
|
<div class="hide">
|
<table cellpadding="0" cellspacing="0" id="tb_begin">
|
</table>
|
</div>
|
</div>
|
<div class="pt-tablepanel">
|
<h3 style="cursor:hand" id="h_process"><i class="fa fa-sort-desc"></i>进行中<span class="pt-color-warning"
|
id="lbl_process">(0)</span>
|
</h3>
|
<div class="hide">
|
<table cellpadding="0" cellspacing="0" id="tb_process">
|
</table>
|
</div>
|
</div>
|
<div class="pt-tablepanel">
|
<h3 style="cursor:hand" id="h_end"><i class="fa fa-sort-desc"></i>已结束<span class="pt-color-warning"
|
id="lbl_end">(0)</span>
|
</h3>
|
<div class="hide">
|
<table cellpadding="0" cellspacing="0" id="tb_end">
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</c:if>
|
<c:if test="${type>-1}">
|
<div>
|
<div class="pt-form-inline" id="div_search" style="display:none;">
|
|
<div class="form-group">
|
<label class="control-label">流程类型:</label>
|
<div class="control-inline">
|
<select name="flowCategory" id="flowCategory" style="width: 200px" class="easyui-combobox"
|
data-options="panelHeight: 'auto'"></select>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="control-label">所属模块:</label>
|
<div class="control-inline">
|
<select name="flowModule" id="flowModule" style="width: 200px" class="easyui-combobox"
|
data-options="panelHeight: 'auto'"></select>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<button id="searchSelect" class="pt-btn pt-btn-info">查询</button>
|
<!-- <button id="btnReset" class="pt-btn pt-btn-default">重置</button> -->
|
</div>
|
|
</div>
|
<div>
|
|
<div id="div_table">
|
<table id="dg_viewData" style="width:100%;height:100%;">
|
</table>
|
</div>
|
|
</div>
|
</div>
|
</c:if>
|
</body>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
<script>
|
//定义页面全局变量
|
var t_viewData = null;
|
var columns = [];
|
var frozenColumns = [{field: 'ck', checkbox: true}];//固定列
|
var formParams = ""; //表单参数
|
var customFormParams = "";
|
var wh = $(window).height();
|
var height = wh - 90;
|
var openUrlType = '${openUrlType}';
|
var pageSize = parseInt('50');
|
var tb_begin = null;
|
var tb_process = null;
|
var tb_end = null;
|
//窗口参数,用于弹窗传递
|
var params = {
|
callBack: null
|
};
|
|
|
$(function () {
|
<c:if test="${type==-1}">
|
bindMyDraftData();
|
new ResizeScroll({
|
"id": "#datalist",
|
"fun": function () {
|
var wh = $(window).height();
|
return wh - 110;
|
}
|
});
|
</c:if>
|
|
<c:if test="${type>-1}">
|
getFlowDefinition();
|
getFlowModule()
|
bindMyDraftDataByType();
|
//删除按钮事件
|
$("#SysDelete").click(function () {
|
//获取dg选中的数据行
|
var checkRows = $("#dg_viewData").datagrid("getChecked");
|
if (checkRows.length == 0) {
|
wcp.message.error("请选择需要删除的数据!");
|
} else {
|
var ids = new Array();
|
|
$.each(checkRows, function (index, value) {
|
//ids.push(value.id);
|
|
ids.push(value.ID);
|
|
});
|
|
if (ids.length > 0) {
|
deleteBusinessDatas(ids);
|
} else {
|
wcp.message.error("获取数据异常,请检查主键字段!");
|
}
|
}
|
});
|
|
//绑定关键字检索输入框回车事件
|
$("#btnKeySearch").click(function () {
|
keywordSearch();
|
});
|
|
//高级查询按钮事件
|
$("#search").click(function () {
|
if ($("#div_search").is(':visible')) {
|
$("#div_search").hide();
|
computeHeight();
|
} else {
|
$("#div_search").show();
|
computeHeight();
|
}
|
|
});
|
//高级查询,查询按钮事件
|
$("#searchSelect").click(function () {
|
keywordSearch();
|
});
|
new CustomResize({
|
"id": "div_table",
|
"fun": computeHeight
|
});
|
</c:if>
|
});
|
|
<c:if test="${type==-1}">
|
var dealType = "";
|
var isFirstClick = true;
|
|
//绑定我的拟稿前十条
|
function bindMyDraftData() {
|
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
|
});
|
|
tb_begin = $('#tb_begin').datagrid({
|
url: 'flow/getMyDraftList?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 = "begin";
|
var openUrl = rowData.businessViewUrl;
|
if (openUrl.indexOf("?") > 0) {
|
openUrl += "&";
|
} else {
|
openUrl += "?";
|
}
|
openUrl += "processInstanceId=" + rowData.processInstanceId;
|
var title = rowData.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var openMoreUrl = "flow/myDraftIndex?type=0&openUrlType=2";
|
$("#lbl_begin").html("<a href='javascript:void(0)' class='moreData' onclick='wcp.openUrlByTab(\"" + openMoreUrl + "\",\"已拟稿\")'>(" + data.total + ")更多</a>");
|
if (data.total > 0 && isFirstClick) {
|
$("#h_begin").click();
|
}
|
}
|
});
|
|
tb_process = $('#tb_process').datagrid({
|
url: 'flow/getMyDraftList?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 = "process";
|
var openUrl = rowData.businessViewUrl + "&processInstanceId=" + rowData.processInstanceId;
|
var title = rowData.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var openMoreUrl = "flow/myDraftIndex?type=1&openUrlType=2";
|
$("#lbl_process").html("<a href='javascript:void(0)' class='moreData' onclick='wcp.openUrlByTab(\"" + openMoreUrl + "\",\"进行中\")'>(" + data.total + ")更多</a>");
|
if (data.total > 0 && isFirstClick) {
|
$("#h_process").click();
|
}
|
}
|
});
|
|
tb_end = $('#tb_end').datagrid({
|
url: 'flow/getMyDraftList?type=2',
|
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 = "end";
|
var openUrl = rowData.businessViewUrl + "&processInstanceId=" + rowData.processInstanceId;
|
var title = rowData.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var openMoreUrl = "flow/myDraftIndex?type=2&openUrlType=2";
|
$("#lbl_end").html("<a href='javascript:void(0)' class='moreData' onclick='wcp.openUrlByTab(\"" + openMoreUrl + "\",\"已结束\")'>(" + data.total + ")更多</a>");
|
if (data.total > 0 && isFirstClick) {
|
$("#h_end").click();
|
}
|
}
|
});
|
}
|
|
$(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_begin').datagrid('resize');
|
$('#tb_process').datagrid('resize');
|
$('#tb_end').datagrid('resize');
|
} else {
|
$(this).children("i").removeClass("fa-sort-up")
|
$(this).children("i").addClass("fa-sort-desc")
|
$(this).parent().children("div").hide();
|
}
|
//$(this).parent().childrisFirstClick en("div").toggle();
|
});
|
});
|
|
</c:if>
|
|
<c:if test="${type>-1}">
|
//关键字搜索方法
|
function keywordSearch() {
|
var keyValue = $("#txtKeySearch").val();
|
var flowDefinitionId = $("#flowCategory").combobox("getValue");
|
var moduleId = $("#flowModule").combobox("getValue");
|
$('#dg_viewData').datagrid('load', {
|
searchKey: keyValue,
|
flowDefinitionId: flowDefinitionId,
|
moduleId: moduleId
|
});
|
}
|
|
//根据类型绑定列表数据
|
function bindMyDraftDataByType() {
|
var isFirstRow = false;
|
columns.push({
|
field: 'moduleName1',
|
title: '状态',
|
width: 50,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'executionName',
|
title: '主题',
|
width: 200,
|
halign: 'center',
|
align: 'left',
|
sortable: false
|
});
|
columns.push({
|
field: 'flowDefinitionName',
|
title: '流程类型',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'startUserName',
|
title: '来自',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'moduleName1',
|
title: '最后更新时间',
|
width: 80,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'taskName',
|
title: '任务',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'createUnit',
|
title: '编制单位',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'fileCode',
|
title: '文件代码',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'startUserName',
|
title: '发起人',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'startUserName1',
|
title: '批分意见',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
columns.push({
|
field: 'startUserName1',
|
title: '批准意见',
|
width: 100,
|
halign: 'center',
|
align: 'center',
|
sortable: false
|
});
|
t_viewData = $('#dg_viewData').datagrid({
|
url: 'flow/getMyDraftList?type=${type}',
|
fitColumns: true,
|
striped: true,
|
idField: "ID",
|
rownumbers: true,
|
pagination: true,
|
pageSize: pageSize,
|
pagePosition: 'bottom',
|
checkOnSelect: false,
|
selectOnCheck: false,
|
singleSelect: true,
|
emptyMsg: '无数据',
|
frozenColumns: [frozenColumns],
|
columns: [columns],
|
onClickRow: function (rowIndex, rowData) {
|
var row = rowData;
|
var openUrl = row.businessViewUrl + "&keyId=" + row.keyId + "&processInstanceId=" + row.processInstanceId;
|
var title = row.executionName;
|
openPage(openUrl, title, refreshData);
|
},
|
onLoadSuccess: function (data) {
|
var row = $('#dg_viewData').datagrid('getRows');//grid加载完成后自动选中第一行
|
isFirstRow = true;
|
}
|
});
|
}
|
|
//首次加载下拉框数据
|
function getFlowDefinition() {
|
var data = [];
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/flowDefinition/getFlowDefinition",
|
}).done(function (result) {
|
for (var i = 0; i < result.length; i++) {
|
var flowId = result[i].flowId;
|
var flowName = result[i].flowName;
|
data.push({
|
"id": flowId,
|
"text": flowName
|
});
|
|
|
}
|
//下拉框设置点击事件
|
$("#flowCategory").combobox({
|
data: data,
|
valueField: 'id',
|
textField: 'text'
|
});
|
|
}));
|
}
|
|
//首次加载下拉框数据
|
function getFlowModule() {
|
var data = [];
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "config/module/getFlowModule",
|
}).done(function (result) {
|
for (var i = 0; i < result.length; i++) {
|
var moduleId = result[i].moduleId;
|
var moduleName = result[i].moduleName;
|
|
data.push({
|
"id": moduleId,
|
"text": moduleName
|
});
|
|
|
}
|
//下拉框设置点击事件
|
$("#flowModule").combobox({
|
data: data,
|
valueField: 'id',
|
textField: 'text'
|
});
|
|
}));
|
}
|
|
function computeHeight() {
|
var wh = $(window).height();
|
var dsh = 0;
|
if ($("#div_search").is(':visible')) {
|
dsh = $("#div_search").height() + 6;
|
}
|
|
$("#div_table").height(wh - 70 - dsh);
|
$("#dg_viewData").datagrid("resize");
|
}
|
|
</c:if>
|
//刷新表格数据
|
function refreshData() {
|
<c:if test="type==-1">
|
switch (dealType) {
|
case "begin":
|
tb_begin.datagrid("reload");
|
break;
|
case "process":
|
tb_process.datagrid("reload");
|
break;
|
case "end":
|
tb_end.datagrid("reload");
|
break;
|
}
|
</c:if>
|
<c:if test="type>-1">
|
t_viewData.datagrid('reload');
|
</c:if>
|
}
|
|
//打开页面
|
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;
|
}
|
}
|
</script>
|
</html>
|