subgrid.html
8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>指标任务查询</title>
<meta name="decorator" content="default"/>
<style type="text/css">
.searchDiv {background-image: url(${ctxStatic}/images/railline.png);height:28px;background-repeat:no-repeat;}
.searchText {color:white;font-size:14px;padding:3px 10px;}
.breadcrumb {padding:2px 15px;margin-bottom:3px;}
</style>
<link href="${ctxStatic}/jqGrid/4.6/css/ui.jqgrid.css" rel="stylesheet"/>
<script src="${ctxStatic}/jqGrid/4.6/js/jquery.jqGrid.js" type="text/javascript"></script>
<script src="${ctxStatic}/jqGrid/4.6/js/jquery.jqGrid.extend.js" type="text/javascript"></script>
<script type="text/javascript">
var dataGrid, dataGrids = {}; // 定义全局表格对象。
$(document).ready(function() {
// 初始化DataGrid对象
dataGrid = new DataGrid({
// 当前页签编号
tabPageId: '${param.tabPageId}',
// 设置数据表格列
columnModel: [
{header:'绩效内容', name:'jxnr', width:150},
{header:'一级指标', name:'yjzb', width:150},
{header:'二级指标', name:'ejzb', width:150},
{header:'三级指标', name:'sjzb', width:150},
{header:'分值', name:'fz', width:150},
{header:'操作', name:'actions', width:80, fixed:true, sortable:false, resizable:false, fixed:true, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="${ctx}?'+row.id+'" class="btnList" title="查看"><i class="fa fa-pencil"></i></a> ');
return actions.join('');
}}
],
showRownum: false,
sortable: false,
autoGridWidthFix: 2,
subGrid: true,
subGridRowExpanded: function(subgrid_id, row_id) {
var subgrid_table_id = subgrid_id+"_t", subgrid_pager_id = "p_"+subgrid_table_id;
$("#"+subgrid_id).html("<table id='"+subgrid_table_id+"'></table><div id='"+subgrid_pager_id+"' class='pagination'></div>");
$("#sjzbId").val(row_id);
// 初始化DataGrid对象
var dataGrid = new DataGrid({
dataGrid: $("#"+subgrid_table_id),
dataGridPage: $("#"+subgrid_pager_id),
searchForm: $("#"+"searchForm2"),
// 当前页签编号
tabPageId: '${param.tabPageId}',
// 设置数据表格列
columnModel: [
{header:'指标名称', name:'zbmc', width:150},
{header:'指标属性', name:'zbsx', width:150},
{header:'考评周期', name:'kpzq', width:150},
{header:'分值', name:'fz', width:150},
{header:'操作', name:'actions', width:80, fixed:true, sortable:false, resizable:false, fixed:true, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="${ctx}?'+row.id+'" class="btnList" title="查看"><i class="fa fa-pencil"></i></a> ');
return actions.join('');
}}
],
showRownum: false,
sortable: false,
height: "100%",
autoGridHeight: false,
autoGridWidthFix: 55,
subGrid: true,
subGridRowExpanded: function(subgrid_id, row_id) {
var subgrid_table_id = subgrid_id+"_t", subgrid_pager_id = "p_"+subgrid_table_id;
$("#"+subgrid_id).html("<table id='"+subgrid_table_id+"'></table><div id='"+subgrid_pager_id+"' class='pagination'></div>");
$("#sjzbId3").val(row_id);
// 初始化DataGrid对象
var dataGrid = new DataGrid({
dataGrid: $("#"+subgrid_table_id),
dataGridPage: $("#"+subgrid_pager_id),
searchForm: $("#"+"searchForm3"),
// 当前页签编号
tabPageId: '${param.tabPageId}',
// 设置数据表格列
columnModel: [
{header:'指标名称', name:'zbmc', width:150},
{header:'指标属性', name:'zbsx', width:150},
{header:'考评周期', name:'kpzq', width:150},
{header:'分值', name:'fz', width:150},
{header:'操作', name:'actions', width:80, fixed:true, sortable:false, resizable:false, fixed:true, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="${ctx}?'+row.id+'" class="btnList" title="查看"><i class="fa fa-pencil"></i></a> ');
return actions.join('');
}}
],
showRownum: false,
sortable: false,
height: "100%",
autoGridHeight: false,
autoGridWidthFix: 88,
subGrid: true,
subGridRowExpanded: function(subgrid_id, row_id) {
var subgrid_table_id = subgrid_id+"_t", subgrid_pager_id = "p_"+subgrid_table_id;
$("#"+subgrid_id).html("<table id='"+subgrid_table_id+"'></table><div id='"+subgrid_pager_id+"' class='pagination'></div>");
$("#sjzbId4").val(row_id);
// 初始化DataGrid对象
var dataGrid = new DataGrid({
dataGrid: $("#"+subgrid_table_id),
dataGridPage: $("#"+subgrid_pager_id),
searchForm: $("#"+"searchForm4"),
// 当前页签编号
tabPageId: '${param.tabPageId}',
// 设置数据表格列
columnModel: [
{header:'指标名称', name:'zbmc', width:150},
{header:'指标属性', name:'zbsx', width:150},
{header:'考评周期', name:'kpzq', width:150},
{header:'分值', name:'fz', width:150},
{header:'操作', name:'actions', width:80, fixed:true, sortable:false, resizable:false, fixed:true, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="${ctx}?'+row.id+'" class="btnList" title="查看"><i class="fa fa-pencil"></i></a> ');
return actions.join('');
}}
],
showRownum: false,
sortable: false,
height: "100%",
autoGridHeight: false,
autoGridWidthFix: 120,
ajaxSuccess: function(data){ // 加载成功后执行方法
}
});
dataGrids[row_id] = dataGrid;
},
subGridRowColapsed: function(subgrid_id, row_id) {
},
ajaxSuccess: function(data){ // 加载成功后执行方法
}
});
dataGrids[row_id] = dataGrid;
},
subGridRowColapsed: function(subgrid_id, row_id) {
},
ajaxSuccess: function(data){ // 加载成功后执行方法
$(window).resize();
}
});
dataGrids[row_id] = dataGrid;
},
subGridRowColapsed: function(subgrid_id, row_id) {
},
ajaxSuccess: function(data){ // 加载成功后执行方法
}
});
});
</script>
</head>
<body>
<div class="searchDiv"><div class="searchText">查询条件</div></div>
<form:form id="searchForm" modelAttribute="jxjhGcglTask" action="${ctx}/jxjh/zbfpSjzb/listData" method="post" class="breadcrumb form-search"
data-page-no="${page.pageNo}" data-page-size="${page.pageSize}" data-order-by="${page.orderBy}">
<ul class="ul-form">
<li><label>状态:</label>
<form:select id="status" path="status" class="input-medium">
<form:option value=" " label=""/>
<form:options items="${fns:getDictList('jxkh_task_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</li>
<li>
<label></label>
<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
</li>
<li>
<label></label>
<input id="btnSubmit" class="btn btn-primary" type="button" value="导出全部"/>
</li>
</ul>
</form:form>
<form:form id="searchForm2" modelAttribute="jxjhGcglTask" action="${ctx}/sjzbfj/jxJxjhQjzb/sjzbfj/listData" method="post"
class="breadcrumb form-search hide" data-page-no="${page.pageNo}" data-page-size="${page.pageSize}" data-order-by="${page.orderBy}">
<input type="hidden" id="sjzbId" name="sjzbId">
</form:form>
<form:form id="searchForm3" modelAttribute="jxjhGcglTask" action="${ctx}/sjzbfj/jxJxjhQjzb/sjzbfj/listData" method="post"
class="breadcrumb form-search hide" data-page-no="${page.pageNo}" data-page-size="${page.pageSize}" data-order-by="${page.orderBy}">
<input type="hidden" id="sjzbId3" name="sjzbId">
</form:form>
<form:form id="searchForm4" modelAttribute="jxjhGcglTask" action="${ctx}/sjzbfj/jxJxjhQjzb/sjzbfj/listData" method="post"
class="breadcrumb form-search hide" data-page-no="${page.pageNo}" data-page-size="${page.pageSize}" data-order-by="${page.orderBy}">
<input type="hidden" id="sjzbId4" name="sjzbId">
</form:form>
<sys:message content="${message}"/>
<div class="searchDiv"><div class="searchText">列表</div></div>
<table id="dataGrid"></table>
<div id="dataGridPage" class="pagination"></div>
</body>
</html>