| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>当前定位</title>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css"
- rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript">
- $(function() {
- $("#end_time").ligerDateEditor({labelAlign : 'left',width : 100,height : 21});
- $("#start_time").ligerDateEditor({labelAlign : 'left',width : 100,height : 21});
- });
-
- $(function() {
- loadNowLocationList();
- });
- var grid = null;
- function loadNowLocationList(params1,params2) {
- grid = $("#nowLocation")
- .ligerGrid({columns : [
- {display : '操作',isAllowHide : false,width : 100,
- render : function(row) {
- var html = '<a href=\"#\" style=\"color: blue;\" onclick=\"viewDriver('
- + row.universalid
- + ')\">单点登录到GPS</a> ';
- return html;
- }
- },
- {display : '车牌号',name : 'vehicleNO',width : 80},
- {display : '所属车队',name : 'nameCar',width : 90},
- {display : '车辆颜色',name : 'nameColor',width : 60},
- //{display : '状态',name : 'status',width :50},
- {display : '所在位置',
- name : 'latitude',
- width : 350,
- render : function(row){
- if(null !=row.latitude){
- var place = "";
- $.ajax({
- url:'carStateAction.do?task=toPlace',
- async: false,
- type: 'post',
- data: {"latitude":row.latitude,"longitude":row.longitude},
- cache: false,
- error: function(obj){
- },
- success: function(obj){
- if(obj!=""){
- place = obj;
- }
- }
- });
- return place;
- }
- }},
- {display : '纬度',name : 'latitude',width : 70},
- {display : '经度',name : 'longitude',width : 70},
- {display : '时速',name : 'speed',width : 60},
- {display : '方向',name : 'direction',width : 60,
- render :function(a,b){
- var s = parseInt(a["direction"]);
- if(s>=337.5 && s<=360){
- return '正北';
- }else if(s>=0 && s<=22.5){
- return '正北';
- }else if(s>22.5 && s<67.5){
- return '东北';
- }else if(s>=67.5 && s<=112.5){
- return '正东';
- }else if(s>112.5 && s<=157.55){
- return '东南';
- }else if(s>=157.55 && s<=202.5){
- return '正南';
- }else if(s>202.5 && s<247.5){
- return '西南';
- }else if(s>=247.5 && s<=292.5){
- return '正西';
- }else if(s>292.5 && s<337.5){
- return '西北';
- } }},
- {display : '海拔',name : 'elevation',width : 70},
- {display : '总里程',name : 'mileage',width : 70},
- {display : '卫星时间',name : 'GPSTime',width : 150},
- {display : '记录仪时速',name : 'recorderSpeed',width : 60},
- {display : '油耗',name : 'fuelAmount',width : 60}],
- pageSizeOptions: [5,10, 20, 30, 40, 50, 100],
- url : 'carStateAction.do?task=toNowLocationList&time='
- + new Date().getTime() + params1 +params2,
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.8%',
- height : '99%',
- rownumbers: true});
- $("#pageloading").hide();
- }
-
- function searchByKword() {
- grid.set("newPage","1");
- var plate_number= document.getElementById("plate_number");//驾驶员姓名
- var s1 = "";
- if (plate_number.value != "" && typeof (plate_number.value) != "undefined") {
- s1 += "&plate_number=" + encodeURI(encodeURI(plate_number.value));
- }
- var motorcade= document.getElementById("motorcade");//开始时间
- var s2 = "";
- if (motorcade.value != "" && typeof (motorcade.value) != "undefined") {
- s2 += "&motorcade=" + encodeURI(encodeURI(motorcade.value));
- }
- $(function() {
- loadNowLocationList(s1,s2);
- });
- }
-
- function viewDriver() {
- //window.parent.f_addTab('addDevice', '新增驾驶员',
- // 'carDriverAction.do?task=addDriver&tabid=' + getCurrentTabId());
- }
-
- $(document).ready(function() {
- $("[name='plate_number']").focus();
- });
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <form action="carDeclarationAction.do" method="post">
- <input type="hidden" id="tabid" name="tabid" value="getCurrentTabId()">
- <input type="hidden" id="user_id" name="user_id" value="">
- <input type="hidden" id="task" name="task" value="exportExcel">
- <div class="container">
- <!--
- <div id="title" class="form-button">
- <input type="button" class="l-button" value="新增驾驶员" onclick="addDriver()">
- <input type="button" value="关闭" class="l-button" onclick="closeWindow();" />
- </div>
- <div class="default_search" style="margin: 0; height:30px;">
- </div>
- -->
- <div class="default_search" style="margin: 0;">
- <ul class="list_search">
- <li class="title">车牌号:</li>
- <li class="text"><input type="text" name="plate_number" id="plate_number">
- </li>
- </ul>
- <ul class="list_search">
- <li class="title">车队:</li>
- <li class="text">
- <select name="motorcade" id="motorcade" style="width: 100px;">
- <option value="">-选择-</option>
- <c:forEach items="${motorcades}" var="inforpubdict">
- <option value="${inforpubdict.universalid}" >${inforpubdict.motorcade_name}</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul>
- <li class="search-button"><input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- </div>
- <div style="clear:both;"></div>
- <div style="overflow: hidden; clear: both;">
- <div id="nowLocation" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </form>
- </body>
- </html>
|