From 512606c688b23431d0dec9ef7524f6f3dd1a6e5a Mon Sep 17 00:00:00 2001 From: zouyx <1798599149@qq.com> Date: Fri, 15 Nov 2024 16:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A7=E6=B3=95=E5=88=86=E6=9E=90=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../code/registration/staticRegistration.html | 74 +++++-------------- .../EnforcementRegistrationController.java | 2 +- 2 files changed, 21 insertions(+), 55 deletions(-) diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html index b7bb2386..5a758391 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/staticRegistration.html @@ -138,18 +138,13 @@ $("#select-time").hide(); $("#showDetail").hide(); $("#jd").hide(); + rTable(); }; $(function() { 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, modalName: "执法分析", - showHeader: false, + showHeader: true, showFooter: false, showColumns: 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() { var dateSearch = document.getElementById("dateSearch"); @@ -358,14 +313,25 @@ } } function search1 (formId) { - var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; - console.log(currentId); - var params = $.common.formToJSON(currentId); - searchType=params; - console.log(params); - $("#bootstrap-table").bootstrapTable('refresh', params); + rTable(); /*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 (){ enforcementRegistration={ "lawEnforcement":searchType.lawEnforcement, diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java index 7a0c3fbd..4cae4e35 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java @@ -268,7 +268,7 @@ public class EnforcementRegistrationController extends BaseController /*startPage(); List enforcementRegistrationDtos = enforcementRegistrationService. staticEnforcementRegistration(enforcementRegistrationDto);*/ - startPage(); + //startPage(); List enforcementRegistrationDtos = enforcementRegistrationService. staticEnforcementRegistrationLI(enforcementRegistrationDto); return getDataTable(enforcementRegistrationDtos);