修复排序功能
This commit is contained in:
@@ -68,7 +68,16 @@
|
|||||||
<if test="dobeginDate!=null and dobeginDate!='' and doendDate!=null and doendDate!=''">
|
<if test="dobeginDate!=null and dobeginDate!='' and doendDate!=null and doendDate!=''">
|
||||||
AND r.edit_time between #{dobeginDate} and #{doendDate}
|
AND r.edit_time between #{dobeginDate} and #{doendDate}
|
||||||
</if>
|
</if>
|
||||||
order by r.create_time desc
|
|
||||||
|
<choose>
|
||||||
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
|
ORDER BY ${page.orderBy}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY r.create_time desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据来函号查询 -->
|
<!-- 根据来函号查询 -->
|
||||||
<select id="getRequestInfoByRequestNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
|
<select id="getRequestInfoByRequestNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
|||||||
@@ -10,10 +10,15 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var orderBy = $("#${id}").val().split(" ");
|
var orderBy = $("#${id}").val().split(" ");
|
||||||
$(".sort-column").each(function(){
|
$(".sort-column").each(function(){
|
||||||
|
|
||||||
if ($(this).hasClass(orderBy[0])){
|
if ($(this).hasClass(orderBy[0])){
|
||||||
orderBy[1] = orderBy[1]&&orderBy[1].toUpperCase()=="DESC"?"down":"up";
|
orderBy[1] = orderBy[1]&&orderBy[1].toUpperCase()=="DESC"?"down":"up";
|
||||||
$(this).html($(this).html()+" <i class=\"icon icon-arrow-"+orderBy[1]+"\"></i>");
|
$(this).html($(this).html()+" <i class=\"sort-icon-"+orderBy[1]+"\"></i>");
|
||||||
|
}else {
|
||||||
|
$(this).html($(this).html()+" <i class=\"sort-icon\"></i>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
$(".sort-column").click(function(){
|
$(".sort-column").click(function(){
|
||||||
var order = $(this).attr("class").split(" ");
|
var order = $(this).attr("class").split(" ");
|
||||||
@@ -23,10 +28,11 @@
|
|||||||
}
|
}
|
||||||
if (order == sort[0]){
|
if (order == sort[0]){
|
||||||
sort = (sort[1]&&sort[1].toUpperCase()=="DESC"?"ASC":"DESC");
|
sort = (sort[1]&&sort[1].toUpperCase()=="DESC"?"ASC":"DESC");
|
||||||
$("#${id}").val(order+" DESC"!=order+" "+sort?"":order+" "+sort);
|
$("#${id}").val(order+" "+sort);
|
||||||
}else{
|
}else{
|
||||||
$("#${id}").val(order+" ASC");
|
$("#${id}").val(order+" ASC");
|
||||||
}
|
}
|
||||||
|
|
||||||
${callback}
|
${callback}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
<!-- 筛选按钮展开状态-->
|
<!-- 筛选按钮展开状态-->
|
||||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${requestInfo.isFilterAction }"/>
|
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${requestInfo.isFilterAction }"/>
|
||||||
|
|
||||||
|
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
|
||||||
|
|
||||||
<!-- 搜索内容与操作按钮栏 -->
|
<!-- 搜索内容与操作按钮栏 -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@@ -180,11 +182,12 @@
|
|||||||
<th><spring:message code="content"></spring:message></th>
|
<th><spring:message code="content"></spring:message></th>
|
||||||
<th><spring:message code="special_task"></spring:message></th>
|
<th><spring:message code="special_task"></spring:message></th>
|
||||||
<th><spring:message code="creator"/></th>
|
<th><spring:message code="creator"/></th>
|
||||||
<th><spring:message code="create_time"/></th>
|
<th class="sort-column createTime"><spring:message code="create_time"/></th>
|
||||||
<th><spring:message code="editor"/></th>
|
<th><spring:message code="editor"/></th>
|
||||||
<th><spring:message code="edit_time"/></th>
|
<th class="sort-column editTime"><spring:message code="edit_time"/></th>
|
||||||
<th><spring:message code="auditor"></spring:message></th>
|
<th><spring:message code="auditor"></spring:message></th>
|
||||||
<th><spring:message code="audit_time"></spring:message></th>
|
<th class="sort-column auditTime"><spring:message code="audit_time"></spring:message></th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@@ -21575,4 +21575,38 @@ Color library demo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ*/
|
||||||
|
.sort-column {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.sort-column i {
|
||||||
|
top: 2px;
|
||||||
|
position: relative;
|
||||||
|
display: inline-table;
|
||||||
|
}
|
||||||
|
.sort-icon {
|
||||||
|
width: 9px;
|
||||||
|
height: 13px;
|
||||||
|
background-image: url('../img/bee.png');
|
||||||
|
background-position: -232px -59px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.sort-icon-down {
|
||||||
|
width: 9px;
|
||||||
|
height: 12px;
|
||||||
|
background-image: url('../img/bee.png');
|
||||||
|
background-position: -232px -73px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sort-icon-up {
|
||||||
|
width: 9px;
|
||||||
|
height: 13px;
|
||||||
|
background-image: url('../img/bee.png');
|
||||||
|
background-position: -232px -86px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
src/main/webapp/static/global/img/bee.png
Normal file
BIN
src/main/webapp/static/global/img/bee.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Reference in New Issue
Block a user