Browse Source

执法分析分页修复

v4
zouyx 2 years ago
parent
commit
512606c688
  1. 74
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html
  2. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

74
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html

@ -138,18 +138,13 @@
$("#select-time").hide(); $("#select-time").hide();
$("#showDetail").hide(); $("#showDetail").hide();
$("#jd").hide(); $("#jd").hide();
rTable();
}; };
$(function() { $(function() {
var options = { var options = {
url: prefix + "/staticEnforcementRegistration",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
detailUrl: prefix + "/detail/{id}",
exportUrl: prefix + "/export",
//height: $(window).height()-$(".search-collapse").height()-$("#toolbar").height()-50, //height: $(window).height()-$(".search-collapse").height()-$("#toolbar").height()-50,
modalName: "执法分析", modalName: "执法分析",
showHeader: false, showHeader: true,
showFooter: false, showFooter: false,
showColumns: false, showColumns: false,
showRefresh: false, showRefresh: false,
@ -267,48 +262,8 @@
}, },
] ]
}; };
$.table.init(options); $("#bootstrap-table").bootstrapTable(options);
}); });
/*function timeType() {
var dateSearch = document.getElementById("dateSearch");
if(dateSearch.value =="quarter"){
$("#quarter").show();
$("#month").hide();
$("#custom").hide();
$("#month").val("");
$("#startTime").val("");
$("#endTime").val("");
}else if(dateSearch.value=="month"){
$("#quarter").hide();
$("#month").show();
$("#custom").hide();
$("#quarter").val("");
$("#startTime").val("");
$("#endTime").val("");
}else if(dateSearch.value == 'year'){
$("#quarter").hide();
$("#month").hide();
$("#custom").hide();
$("#quarter").val("");
$("#month").val("");
$("#startTime").val("");
$("#endTime").val("");
}else if(dateSearch.value == 'custom'){
$("#custom").show();
$("#quarter").hide();
$("#month").hide();
$("#year").val("");
$("#quarter").val("");
$("#month").val("");
}
}*/
function timeType() { function timeType() {
var dateSearch = document.getElementById("dateSearch"); var dateSearch = document.getElementById("dateSearch");
@ -358,14 +313,25 @@
} }
} }
function search1 (formId) { function search1 (formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; rTable();
console.log(currentId);
var params = $.common.formToJSON(currentId);
searchType=params;
console.log(params);
$("#bootstrap-table").bootstrapTable('refresh', params);
/*zhanbi();*/ /*zhanbi();*/
} }
function rTable(){
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
$.ajax({
url: prefix + "/staticEnforcementRegistration",
method: 'post',
data:params,
success:function (response){
$('#bootstrap-table').bootstrapTable('load', response);
data1=response;
console.log(data1);
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
/*function zhanbi (){ /*function zhanbi (){
enforcementRegistration={ enforcementRegistration={
"lawEnforcement":searchType.lawEnforcement, "lawEnforcement":searchType.lawEnforcement,

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

@ -268,7 +268,7 @@ public class EnforcementRegistrationController extends BaseController
/*startPage(); /*startPage();
List<EnforcementRegistrationDto> enforcementRegistrationDtos = enforcementRegistrationService. List<EnforcementRegistrationDto> enforcementRegistrationDtos = enforcementRegistrationService.
staticEnforcementRegistration(enforcementRegistrationDto);*/ staticEnforcementRegistration(enforcementRegistrationDto);*/
startPage(); //startPage();
List<EnforcementRegistrationDto> enforcementRegistrationDtos = enforcementRegistrationService. List<EnforcementRegistrationDto> enforcementRegistrationDtos = enforcementRegistrationService.
staticEnforcementRegistrationLI(enforcementRegistrationDto); staticEnforcementRegistrationLI(enforcementRegistrationDto);
return getDataTable(enforcementRegistrationDtos); return getDataTable(enforcementRegistrationDtos);

Loading…
Cancel
Save