diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html
index 07f9eba2..6c531d05 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html
@@ -23,27 +23,28 @@
-
×
@@ -60,19 +61,29 @@
var prefix2 = ctx + "code/registration";
var warnLevel = [[${@dict.getType('warnLevel')}]];
window.onload = function () {
+ $("#tip").hide();
if(window.sessionStorage.getItem('registrationDetailVueGo')){
document.getElementById("enterpriseName").value=window.sessionStorage.getItem('lawEnforcementWarningList-enterpriseName');
document.getElementById("warningLevel").value=window.sessionStorage.getItem('lawEnforcementWarningList-warningLevel');
document.getElementById("startTime").value=window.sessionStorage.getItem('lawEnforcementWarningList-startTime');
document.getElementById("endTime").value=window.sessionStorage.getItem('lawEnforcementWarningList-endTime');
- $.table.search();
+ // $.table.search();
+ searchW();
sessionStorage.clear();
console.log(window.sessionStorage.getItem('lawEnforcementWarningList-enterpriseName'));
console.log(window.sessionStorage.getItem('lawEnforcementWarningList-warningLevel'));
console.log(window.sessionStorage.getItem('lawEnforcementWarningList-startTime'));
console.log(window.sessionStorage.getItem('lawEnforcementWarningList-endTime'));
+ }else{
+ searchW();
}
}
+ function tipShow(){
+ $("#tip").show();
+ }
+ function tipHide(){
+ $("#tip").hide();
+ }
$(function() {
$('#detail2').hide();
var date = new Date();
@@ -80,11 +91,6 @@
var month = date.getMonth() + 1;
$("input[name='currentMonth']").val(year + "-" + month);
var options = {
- url: prefix + "/list",
- createUrl: prefix + "/add",
- updateUrl: prefix + "/edit/{id}",
- removeUrl: prefix + "/remove",
- exportUrl: prefix + "/export",
modalName: "执法预警列表",
showHeader: true,
showFooter: false,
@@ -146,7 +152,8 @@
}
]
};
- $.table.init(options);
+ // $.table.init(options);
+ $("#bootstrap-table").bootstrapTable(options);
});
function getColor(){
var map=new Map([
@@ -217,10 +224,62 @@
};
$("#bootstrap-table3").bootstrapTable(options);
});
- function downloadRW(){
+ function searchW(){
+ $("#tips").hide()
+ rTable()
+ tipsChange()
+ }
+ function rTable(){
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
$.ajax({
+ url: prefix + "/list",
+ 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 resetW(){
+ $('form').eq(0).trigger("reset");
+ console.log($.common.formToJSON($('form').eq(0).attr('id')));
+ searchW();
+ }
+
+ function tipsChange(){
+ var beginTime=document.getElementById('startTime').value;
+ var endTime=document.getElementById('endTime').value;
+ if(beginTime!=null&&beginTime!=""&&endTime!=null&&endTime!=""){
+ var beginDate=new Date(beginTime);
+ var endDate=new Date(endTime);
+ if(beginDate.getFullYear()==endDate.getFullYear()&&beginDate.getMonth()==endDate.getMonth()){
+ var currentId=$('form').eq(0).attr('id');
+ var params = $.common.formToJSON(currentId);
+ $.ajax({
+ url: prefix + "/tips",
+ method: 'GET',
+ data:params,
+ success:function (response){
+ console.log(response)
+ document.getElementById("tips").textContent = "被预警企业数"+response[0]+"家 被检査次数:3~4次"+response[1]+"家、5~6次"+response[2]+"家、7次以上"+response[3]+"家";
+ $("#tips").show()
+ },error:function (xhr,status,error){
+ console.error("请求失败:",status,error);
+ }
+ })
+ }
+ }
+ }
+
+ function downloadRW(){
+ var currentId=$('form').eq(0).attr('id');
+ var params = $.common.formToJSON(currentId);
+/* $.ajax({
type: "POST",
data: JSON.stringify(params),
contentType: 'application/json',
@@ -237,7 +296,21 @@
link.click();
document.body.removeChild(link)
}
- })
+ })*/
+ console.log(params)
+ let paramsList=[]
+ for(var key in params){
+ if (params.hasOwnProperty(key)) {
+ var value = params[key];
+ // 检查值是否为空
+ if (value!== null && value!== undefined && value!== '') {
+ paramsList.push(key + '=' + value);
+ }
+ }
+ }
+ console.log(paramsList)
+ console.log(paramsList.join("&"))
+ window.location.href = prefix +"/exportWarnList?"+paramsList.join("&")
}