15832144755
2021-07-23 741d66c00c593d4f14cd6731d3e4af6ee5c191ac
src/main/webapp/hxzk/GPS/historicalgpsLocation.jsp
@@ -124,21 +124,24 @@
                                       <button style="float:left;margin-left:10px;" type="button"
                                          class="btn btn-secondary deleteAll"
                                          id="deleteAllButton">全部删除</button>
                                       <div style="width:120px;float:left;margin-left:10px;">
                                       <div style="width:80px;float:left;margin-left:10px;">
                                          <input type="text" id="begin"
                                             class="form-control form-control-sm"
                                             style="font-size:12px;" placeholder="请输入开始时间"/>
                                             class="form-control form-control-sm" style="font-size:12px;"
                                             placeholder="开始时间" />
                                       </div>
                                       <div style="width:120px;float:left;margin-left:10px;">
                                       <div style="width:80px;float:left;margin-left:10px;">
                                          <input type="text" id="end" class="form-control form-control-sm"
                                             style="font-size:12px;" placeholder="请输入结束时间"/>
                                             style="font-size:12px;" placeholder="结束时间" />
                                       </div>
                                       <div style="width:100px;float:left;margin-left:10px;">
                                          <input type="text" id="tagida" class="form-control form-control-sm"
                                             style="font-size:12px;" placeholder="请输入标签id"/>
                                       <div style="width:60px;float:left;margin-left:10px;">
                                          <input type="text" id="tagida"
                                             class="form-control form-control-sm" style="font-size:12px;"
                                             placeholder="标签id" />
                                       </div>
                                       <button style="float:left;margin-left:10px;" type="button"
                                          class="btn btn-secondary toAllExcel">导出表格</button>
                                          class="btn btn-secondary toAllExcel">导出Excel</button>
                                       <button style="float:left;margin-left:10px;" type="button"
                                          class="btn btn-secondary toAlltxt">导出txt</button>
                                       <label for="perPage"
                                          class="col-sm-2 col-form-label col-form-label-sm"
@@ -230,7 +233,7 @@
                     }
                  }
               });
               //执行一个laydate实例
               laydate.render({
                  elem: '#end' //指定元素'
@@ -243,7 +246,7 @@
                           document.getElementById("begin").value = "";
                        }
                     }
                  }
               });
            </script>
@@ -397,13 +400,35 @@
                     }
                  })
               });
               $(".toAlltxt").click(function () {
                  var dateaa = $("#dateList").val();
                  window.location.href = "/hxzkoa/totxt.do?date=" + dateaa;
                  // swal({
                  //    title: "Exported!",
                  //    text: "导出成功!",
                  //    type: "success",
                  //    showCancelButton: false,
                  //    showConfirmButton: false,
                  //    buttons: false
                  // })
                  // setTimeout("window.location.reload()", 1000);
                  /* $.ajax({
                     async: false,
                     type: 'POST',
                     url: "/hxzkoa/totxt.do",
                     dataType: 'json',
                     success: function(data){
                        console.log(data)
                     }
                  }) */
               })
               // 导出表格
               $(".toAllExcel").click(function () {
                  var tag = document.getElementById("tagida").value;
                  var begin = document.getElementById("begin").value;
                  var end = document.getElementById("end").value;
                  var datea = $("#dateList").val();
                  window.location.href = "/hxzkoa/historicalgpsLocation_export.do?tagid="+tag+"&begintime="+begin+"&endtime="+end+"&date="+datea;
                  window.location.href = "/hxzkoa/historicalgpsLocation_export.do?tagid=" + tag + "&begintime=" + begin + "&endtime=" + end + "&date=" + datea;
                  // $.ajax({
                  //    async: false,
                  //    type: "POST",