Commit 1e768a44164ff15045cb46a62b67325bdf15bf3a
1 parent
160a14d6
移动端线调适配
Showing
14 changed files
with
1209 additions
and
8 deletions
Too many changes to show.
To preserve performance only 14 of 336 files are displayed.
src/main/java/com/bsth/common/Constants.java
| @@ -20,6 +20,8 @@ public class Constants { | @@ -20,6 +20,8 @@ public class Constants { | ||
| 20 | public static final String METRONIC_URL = "/metronic_v4.5.4/**"; | 20 | public static final String METRONIC_URL = "/metronic_v4.5.4/**"; |
| 21 | public static final String LOGIN_FAILURE = "/user/loginFailure"; | 21 | public static final String LOGIN_FAILURE = "/user/loginFailure"; |
| 22 | public static final String CAPTCHA = "/captcha.jpg"; | 22 | public static final String CAPTCHA = "/captcha.jpg"; |
| 23 | + public static final String XIANDIAO_LOGIN = "/xdlogin.html"; | ||
| 24 | + public static final String IPAD_IMG_URL = "/apple-touch-icon-72x72.png"; | ||
| 23 | 25 | ||
| 24 | //对外的营运数据接口 | 26 | //对外的营运数据接口 |
| 25 | public static final String SERVICE_INTERFACE = "/companyService/**"; | 27 | public static final String SERVICE_INTERFACE = "/companyService/**"; |
src/main/java/com/bsth/controller/realcontrol/PageForwardingController.java
| @@ -6,10 +6,12 @@ import com.bsth.security.util.SecurityUtils; | @@ -6,10 +6,12 @@ import com.bsth.security.util.SecurityUtils; | ||
| 6 | import org.slf4j.Logger; | 6 | import org.slf4j.Logger; |
| 7 | import org.slf4j.LoggerFactory; | 7 | import org.slf4j.LoggerFactory; |
| 8 | import org.springframework.stereotype.Controller; | 8 | import org.springframework.stereotype.Controller; |
| 9 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 10 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | import org.springframework.web.servlet.ModelAndView; | 11 | import org.springframework.web.servlet.ModelAndView; |
| 11 | 12 | ||
| 12 | import javax.servlet.http.HttpServletResponse; | 13 | import javax.servlet.http.HttpServletResponse; |
| 14 | +import javax.ws.rs.Path; | ||
| 13 | 15 | ||
| 14 | /** | 16 | /** |
| 15 | * 线调登入页面转发 | 17 | * 线调登入页面转发 |
| @@ -21,7 +23,7 @@ public class PageForwardingController { | @@ -21,7 +23,7 @@ public class PageForwardingController { | ||
| 21 | 23 | ||
| 22 | Logger logger = LoggerFactory.getLogger(this.getClass()); | 24 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 23 | 25 | ||
| 24 | - @RequestMapping("/v2") | 26 | + /*@RequestMapping("/v2") |
| 25 | public ModelAndView v2(HttpServletResponse response){ | 27 | public ModelAndView v2(HttpServletResponse response){ |
| 26 | ModelAndView mv = new ModelAndView(); | 28 | ModelAndView mv = new ModelAndView(); |
| 27 | SysUser user = SecurityUtils.getCurrentUser(); | 29 | SysUser user = SecurityUtils.getCurrentUser(); |
| @@ -50,5 +52,42 @@ public class PageForwardingController { | @@ -50,5 +52,42 @@ public class PageForwardingController { | ||
| 50 | //正常线调主页 | 52 | //正常线调主页 |
| 51 | mv.setViewName("/real_control_v2/main.html"); | 53 | mv.setViewName("/real_control_v2/main.html"); |
| 52 | return mv; | 54 | return mv; |
| 55 | + }*/ | ||
| 56 | + | ||
| 57 | + @RequestMapping("/{type}") | ||
| 58 | + public ModelAndView v2(@PathVariable("type") String type, HttpServletResponse response){ | ||
| 59 | + ModelAndView mv = new ModelAndView(); | ||
| 60 | + SysUser user = SecurityUtils.getCurrentUser(); | ||
| 61 | + | ||
| 62 | + //班次管理员 | ||
| 63 | + if(user.getUserName().equals("bcgly")){ | ||
| 64 | + mv.setViewName("/real_control_v2/sch_manage/sch_imitate.html"); | ||
| 65 | + return mv; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + try{ | ||
| 69 | + //闵行运管所,直接打开地图页面 | ||
| 70 | + if(user.getRoles().size() == 1){ | ||
| 71 | + for(Role role : user.getRoles()){ | ||
| 72 | + if(role.getCodeName().equals("MH_YGS")){ | ||
| 73 | + // 直接重定向 | ||
| 74 | + response.sendRedirect("/pages/mapmonitor/alone/wrap.html"); | ||
| 75 | + return null; | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | + }catch (Exception e){ | ||
| 80 | + logger.error("", e); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + | ||
| 84 | + if(type.equals("v2_mobile")){ | ||
| 85 | + mv.setViewName("/real_control_v2_mobile/main.html"); | ||
| 86 | + }else{ | ||
| 87 | + //正常线调主页 | ||
| 88 | + mv.setViewName("/real_control_v2/main.html"); | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + return mv; | ||
| 53 | } | 92 | } |
| 54 | } | 93 | } |
src/main/java/com/bsth/filter/BaseFilter.java
| @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter { | @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter { | ||
| 17 | * 白名单 | 17 | * 白名单 |
| 18 | */ | 18 | */ |
| 19 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, | 19 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, |
| 20 | - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT }; | 20 | + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT,Constants.XIANDIAO_LOGIN ,Constants.IPAD_IMG_URL}; |
| 21 | 21 | ||
| 22 | @Override | 22 | @Override |
| 23 | public void destroy() { | 23 | public void destroy() { |
src/main/java/com/bsth/security/filter/LoginInterceptor.java
| @@ -33,7 +33,7 @@ public class LoginInterceptor implements Filter { | @@ -33,7 +33,7 @@ public class LoginInterceptor implements Filter { | ||
| 33 | * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证 | 33 | * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证 |
| 34 | */ | 34 | */ |
| 35 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, | 35 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, |
| 36 | - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT }; | 36 | + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT,Constants.XIANDIAO_LOGIN,Constants.IPAD_IMG_URL }; |
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | @Override | 39 | @Override |
src/main/resources/static/apple-touch-icon-72x72.png
0 → 100644
17 KB
src/main/resources/static/pages/control/lineallot_v2/main.html
| @@ -299,11 +299,11 @@ | @@ -299,11 +299,11 @@ | ||
| 299 | } | 299 | } |
| 300 | }); | 300 | }); |
| 301 | 301 | ||
| 302 | - $('.checked_list').on('click', '.item', function () { | 302 | + /*$('.checked_list').on('click', '.item', function () { |
| 303 | var lineCode = $(this).data('id'); | 303 | var lineCode = $(this).data('id'); |
| 304 | $('.item[data-id='+lineCode+']','.line_list_all_wrap').removeClass('active'); | 304 | $('.item[data-id='+lineCode+']','.line_list_all_wrap').removeClass('active'); |
| 305 | $(this).remove(); | 305 | $(this).remove(); |
| 306 | - }); | 306 | + });*/ |
| 307 | 307 | ||
| 308 | /** | 308 | /** |
| 309 | * 搜索线路 | 309 | * 搜索线路 |
| @@ -492,9 +492,15 @@ | @@ -492,9 +492,15 @@ | ||
| 492 | //进入线调 | 492 | //进入线调 |
| 493 | var eq = EventProxy.create('cache_route', 'check_line_config', function () { | 493 | var eq = EventProxy.create('cache_route', 'check_line_config', function () { |
| 494 | var newWinOpen = $('input','.new_window_open_label')[0].checked; | 494 | var newWinOpen = $('input','.new_window_open_label')[0].checked; |
| 495 | - if(!newWinOpen) | 495 | + if(!newWinOpen){ |
| 496 | top.window.location.href = "/real_control/v2"; | 496 | top.window.location.href = "/real_control/v2"; |
| 497 | - else{ | 497 | + /*if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { |
| 498 | + //移动端 | ||
| 499 | + top.window.location.href = "/real_control/mobile_v2"; | ||
| 500 | + }else{ | ||
| 501 | + top.window.location.href = "/real_control/v2"; | ||
| 502 | + }*/ | ||
| 503 | + }else{ | ||
| 498 | window.open("/real_control/v2"); | 504 | window.open("/real_control/v2"); |
| 499 | $('#go_to_real_system_btn').html('已经尝试打开新窗口,如看不到,可能被浏览器阻止了'); | 505 | $('#go_to_real_system_btn').html('已经尝试打开新窗口,如看不到,可能被浏览器阻止了'); |
| 500 | } | 506 | } |
| @@ -570,6 +576,39 @@ | @@ -570,6 +576,39 @@ | ||
| 570 | function show_btn_load(btn, msg) { | 576 | function show_btn_load(btn, msg) { |
| 571 | $(btn).html('<div uk-spinner></div> ' + msg); | 577 | $(btn).html('<div uk-spinner></div> ' + msg); |
| 572 | } | 578 | } |
| 579 | + | ||
| 580 | + window.onload = function () { | ||
| 581 | + if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { | ||
| 582 | + goPAGE(); | ||
| 583 | + $('.checked_list').on('touchstart', '.item', function () { | ||
| 584 | + itemDataIdRemoveClass($(this)); | ||
| 585 | + }); | ||
| 586 | + }else{ | ||
| 587 | + $('.checked_list').on('click', '.item', function () { | ||
| 588 | + itemDataIdRemoveClass($(this)); | ||
| 589 | + }); | ||
| 590 | + } | ||
| 591 | + | ||
| 592 | + } | ||
| 593 | + | ||
| 594 | + /** | ||
| 595 | + * 如何使移动端修改按钮文字 | ||
| 596 | + */ | ||
| 597 | + function goPAGE() { | ||
| 598 | + $("#go_to_real_system_btn")[0].innerText = "进入移动端线调系统"; | ||
| 599 | + $.each($("#go_to_real_system_btn").siblings(),function(i,el){ | ||
| 600 | + if(i === 1) $(el).css({'display':'none'}); | ||
| 601 | + }); | ||
| 602 | + } | ||
| 603 | + | ||
| 604 | + /** | ||
| 605 | + * 移除選中的車 | ||
| 606 | + */ | ||
| 607 | + function itemDataIdRemoveClass(e) { | ||
| 608 | + var lineCode = $(e).data('id'); | ||
| 609 | + $('.item[data-id='+lineCode+']','.line_list_all_wrap').removeClass('active'); | ||
| 610 | + $(e).remove(); | ||
| 611 | + } | ||
| 573 | </script> | 612 | </script> |
| 574 | </body> | 613 | </body> |
| 575 | </html> | 614 | </html> |
| 576 | \ No newline at end of file | 615 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/waybillQp.html
| @@ -14,6 +14,9 @@ | @@ -14,6 +14,9 @@ | ||
| 14 | 14 | ||
| 15 | .table > tbody + tbody { | 15 | .table > tbody + tbody { |
| 16 | border-top: 1px solid; } | 16 | border-top: 1px solid; } |
| 17 | + .table { | ||
| 18 | + width: 90%; | ||
| 19 | + } | ||
| 17 | </style> | 20 | </style> |
| 18 | 21 | ||
| 19 | <div class="page-head"> | 22 | <div class="page-head"> |
| @@ -47,7 +50,7 @@ | @@ -47,7 +50,7 @@ | ||
| 47 | <div class="portlet-body"> | 50 | <div class="portlet-body"> |
| 48 | <div class="row"> | 51 | <div class="row"> |
| 49 | <div class="col-md-2"> | 52 | <div class="col-md-2"> |
| 50 | - <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> | 53 | + <div class="" style="margin-top: 10px;overflow:auto;/*height: 860px*/"> |
| 51 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | 54 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> |
| 52 | <thead> | 55 | <thead> |
| 53 | <tr class="hidden"> | 56 | <tr class="hidden"> |
src/main/resources/static/real_control_v2_mobile/alone_page/home/alone_data_basic.js
0 → 100644
| 1 | +/* 基础数据管理模块 */ | ||
| 2 | + | ||
| 3 | +var gb_data_basic = (function () { | ||
| 4 | + | ||
| 5 | + var stationRoutes, lineCode2NameAll, lineInformations, nbbm2deviceMap, device2nbbmMap, allPersonnel, svgAttrs; | ||
| 6 | + var ep = EventProxy.create("stationRoutes", "lineCode2Name", "lineInformations", "nbbm2deviceId", "all_personnel", "svg_attrs" | ||
| 7 | + , function (routes, code2Name, informations, nbbm2device, all_personnel, svgAttrMap) { | ||
| 8 | + stationRoutes = routes; | ||
| 9 | + lineCode2NameAll = code2Name; | ||
| 10 | + lineInformations = informations; | ||
| 11 | + nbbm2deviceMap = nbbm2device; | ||
| 12 | + device2nbbmMap = gb_common.inverse(nbbm2deviceMap); | ||
| 13 | + allPersonnel = all_personnel; | ||
| 14 | + svgAttrs = svgAttrMap; | ||
| 15 | + | ||
| 16 | + res_load_ep.emitLater('data-basic'); | ||
| 17 | + }); | ||
| 18 | + | ||
| 19 | + var storage = window.localStorage; | ||
| 20 | + //激活的线路 | ||
| 21 | + var activeLines = JSON.parse(storage.getItem('lineControlItems')); | ||
| 22 | + //lineCode to line object | ||
| 23 | + var codeToLine = {}; | ||
| 24 | + //lineCode idx string | ||
| 25 | + var line_idx = (function () { | ||
| 26 | + var str = ''; | ||
| 27 | + for (var i = 0, item; item = activeLines[i++];) { | ||
| 28 | + str += (',' + item.lineCode); | ||
| 29 | + codeToLine[item.lineCode] = item; | ||
| 30 | + } | ||
| 31 | + return str.substr(1); | ||
| 32 | + })(); | ||
| 33 | + | ||
| 34 | + //站点路由 | ||
| 35 | + gb_common.$get('/stationroute/multiLine', {lineIds: line_idx}, function (rs) { | ||
| 36 | + var list = rs.list;//JSON.parse(rs.list); | ||
| 37 | + var routeData = gb_common.groupBy(list, 'lineCode'); | ||
| 38 | + //排序 | ||
| 39 | + for (var lineCode in routeData) { | ||
| 40 | + routeData[lineCode].sort(stationRouteSort); | ||
| 41 | + } | ||
| 42 | + ep.emit('stationRoutes', routeData); | ||
| 43 | + }); | ||
| 44 | + | ||
| 45 | + //线路标准信息 | ||
| 46 | + /*gb_common.$get('/lineInformation/line/multi', {lineCodes: line_idx}, function (rs) { | ||
| 47 | + var informations = {}; | ||
| 48 | + $.each(rs, function () { | ||
| 49 | + informations[this.line.lineCode] = this; | ||
| 50 | + delete this['line']; | ||
| 51 | + }); | ||
| 52 | + ep.emit('lineInformations', informations); | ||
| 53 | + });*/ | ||
| 54 | + ep.emit('lineInformations', {}); | ||
| 55 | + | ||
| 56 | + //人员信息 | ||
| 57 | + ep.emit('all_personnel', {}); | ||
| 58 | + /*loadAllPersonnel(function (data) { | ||
| 59 | + ep.emit('all_personnel', data); | ||
| 60 | + }); | ||
| 61 | + function loadAllPersonnel(cb) { | ||
| 62 | + $.get('/personnel/all_py', function (rs) { | ||
| 63 | + //转换成自动补全组件需要的数据 | ||
| 64 | + var data = [], code; | ||
| 65 | + for(var i =0, p; p = rs[i++];){ | ||
| 66 | + code = p['workId'].indexOf('-')!=-1?p['workId'].split('-')[1]:p['workId']; | ||
| 67 | + data.push({ | ||
| 68 | + value: code + '/' + p.name, | ||
| 69 | + fullChars: p.fullChars.toUpperCase(), | ||
| 70 | + camelChars: p.camelChars.toUpperCase() | ||
| 71 | + }); | ||
| 72 | + } | ||
| 73 | + cb && cb(data); | ||
| 74 | + }); | ||
| 75 | + }*/ | ||
| 76 | + | ||
| 77 | + var carparks = {}; | ||
| 78 | + //停车场数据 | ||
| 79 | +/* gb_common.$get('/realMap/carParkSpatialData', {}, function (rs) { | ||
| 80 | + rs.list.sort(function (a, b) { | ||
| 81 | + return a.parkName.localeCompare(b.parkName); | ||
| 82 | + }); | ||
| 83 | + $.each(rs.list, function () { | ||
| 84 | + carparks[this.parkCode] = this; | ||
| 85 | + }); | ||
| 86 | + });*/ | ||
| 87 | + | ||
| 88 | + //车辆数据 | ||
| 89 | + var carsArray; | ||
| 90 | + /*$.get('/basic/cars?t=' + Math.random(), function (rs) { | ||
| 91 | + carsArray = rs; | ||
| 92 | + });*/ | ||
| 93 | + | ||
| 94 | + var getCarparkByCode = function (code) { | ||
| 95 | + return carparks[code]; | ||
| 96 | + }; | ||
| 97 | + | ||
| 98 | + //line code to name | ||
| 99 | + $.get('/basic/lineCode2Name', function (rs) { | ||
| 100 | + ep.emit('lineCode2Name', rs); | ||
| 101 | + }); | ||
| 102 | + | ||
| 103 | + //nbbm to device id | ||
| 104 | + $.get('/basic/nbbm2deviceId', function (rs) { | ||
| 105 | + ep.emit('nbbm2deviceId', rs); | ||
| 106 | + }); | ||
| 107 | + //nbbm to 车牌号 | ||
| 108 | + var nbbm2PlateMap; | ||
| 109 | + $.get('/basic/nbbm2PlateNo', function (rs) { | ||
| 110 | + nbbm2PlateMap = rs; | ||
| 111 | + }); | ||
| 112 | + | ||
| 113 | + //模拟图属性数据 | ||
| 114 | + gb_common.$get('/realSchedule/svgAttr', {idx: line_idx}, function (rs) { | ||
| 115 | + var data = {}; | ||
| 116 | + $.each(rs.list, function () { | ||
| 117 | + this.hideStations = JSON.parse(this.hideStations); | ||
| 118 | + this.nicknames = JSON.parse(this.nicknames); | ||
| 119 | + data[this.lineCode] = this; | ||
| 120 | + }); | ||
| 121 | + ep.emit('svg_attrs', data); | ||
| 122 | + }); | ||
| 123 | + | ||
| 124 | + //站点和停车场历时、公里对照数据 | ||
| 125 | + var stat_park_data; | ||
| 126 | + /*var load_stat_park_data = function () { | ||
| 127 | + $.get('/basic/station2ParkData?t='+Math.random(), {idx: line_idx}, function (rs) { | ||
| 128 | + stat_park_data = rs; | ||
| 129 | + }); | ||
| 130 | + } | ||
| 131 | + load_stat_park_data();*/ | ||
| 132 | + | ||
| 133 | + function findLineByCodes(codeArr) { | ||
| 134 | + var rs = []; | ||
| 135 | + $.each(codeArr, function () { | ||
| 136 | + rs.push(codeToLine[this]); | ||
| 137 | + }); | ||
| 138 | + return rs; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + var findCodeByLinename = function (name) { | ||
| 142 | + for (var code in lineCode2NameAll) { | ||
| 143 | + if (name == lineCode2NameAll[code]) | ||
| 144 | + return code; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + return null; | ||
| 148 | + }; | ||
| 149 | + | ||
| 150 | + var getLineInformation = function (lineCode) { | ||
| 151 | + return lineInformations[lineCode]; | ||
| 152 | + }; | ||
| 153 | + | ||
| 154 | + var stationRouteSort = function (a, b) { | ||
| 155 | + return a.stationRouteCode - b.stationRouteCode; | ||
| 156 | + }; | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 常用的备注补全列表 | ||
| 160 | + */ | ||
| 161 | + var remarksArray = ['保养', '故障', '肇事', '加油', '维修', '援外', '路阻' | ||
| 162 | + , '故障(离合器坏)', '故障,(方向盘坏)', '故障(排挡坏)', '故障(门坏)', '故障(雨刮器坏)','故障(刹车坏)', '故障(气打不上)' | ||
| 163 | + ,'故障(整车无电)', '故障(故障灯常亮)', '故障(警报灯亮)', '故障(玻璃坏)', '故障(反光镜坏)', '故障(发电机坏)', '故障(漏防冻液)' | ||
| 164 | + , '故障(漏水)','故障(轮胎坏)', '故障(无动力)', '故障(喷机油)', '故障(水温高)', '保养(一级保养)' | ||
| 165 | + , '保养(二级保养)', '保养(三级保养)', '换车出场', '临加进场', '临加出场']; | ||
| 166 | + var remarksMapps = []; | ||
| 167 | + $.each(remarksArray, function (i, t) { | ||
| 168 | + remarksMapps.push({ | ||
| 169 | + value: t, | ||
| 170 | + fullChars: pinyin.getFullChars(t).toUpperCase(), | ||
| 171 | + camelChars: pinyin.getCamelChars(t) | ||
| 172 | + }); | ||
| 173 | + }); | ||
| 174 | + | ||
| 175 | + //文件载入完毕 | ||
| 176 | + res_load_ep.emitLater('load_data_basic'); | ||
| 177 | + | ||
| 178 | + return { | ||
| 179 | + activeLines: activeLines, | ||
| 180 | + line_idx: line_idx, | ||
| 181 | + codeToLine: codeToLine, | ||
| 182 | + nbbm2deviceMap: function () { | ||
| 183 | + return nbbm2deviceMap; | ||
| 184 | + }, | ||
| 185 | + device2nbbmMap: function () { | ||
| 186 | + return device2nbbmMap; | ||
| 187 | + }, | ||
| 188 | + getLineInformation: getLineInformation, | ||
| 189 | + allInformations: function () { | ||
| 190 | + return lineInformations; | ||
| 191 | + }, | ||
| 192 | + stationRoutes: function (lineCode) { | ||
| 193 | + return stationRoutes[lineCode] | ||
| 194 | + }, | ||
| 195 | + findLineByCodes: findLineByCodes, | ||
| 196 | + lineCode2NameAll: function () { | ||
| 197 | + return lineCode2NameAll | ||
| 198 | + }, | ||
| 199 | + allPersonnel: function () { | ||
| 200 | + return allPersonnel; | ||
| 201 | + }, | ||
| 202 | + findCodeByLinename: findCodeByLinename, | ||
| 203 | + getCarparkByCode: getCarparkByCode, | ||
| 204 | + getSvgAttr: function (lineCode) { | ||
| 205 | + return svgAttrs[lineCode]; | ||
| 206 | + }, | ||
| 207 | + setSvgAttr: function (attr) { | ||
| 208 | + attr.hideStations = JSON.parse(attr.hideStations); | ||
| 209 | + attr.nicknames = JSON.parse(attr.nicknames); | ||
| 210 | + svgAttrs[attr.lineCode] = attr; | ||
| 211 | + }, | ||
| 212 | + //是否是环线 | ||
| 213 | + isLoopLine: function (lineCode) { | ||
| 214 | + var data = gb_common.groupBy(stationRoutes[lineCode], 'directions'); | ||
| 215 | + //下行只有2个站点 | ||
| 216 | + var len = data[0].length; | ||
| 217 | + if (len > 0 && data[1].length == 2) { | ||
| 218 | + var first = data[0][0], | ||
| 219 | + end = data[0][len - 1]; | ||
| 220 | + | ||
| 221 | + /*if(first.stationName != end.stationName) | ||
| 222 | + return false;*/ | ||
| 223 | + | ||
| 224 | + var fPoint = {latitude: first.station.gLaty, longitude: first.station.gLonx} | ||
| 225 | + , ePoint = {latitude: end.station.gLaty, longitude: end.station.gLonx}; | ||
| 226 | + | ||
| 227 | + //并且上行起终点距离200米内 | ||
| 228 | + if (geolib.getDistance(fPoint, ePoint) < 200) { | ||
| 229 | + return true; | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + return false; | ||
| 234 | + }, | ||
| 235 | + //刷新员工信息 | ||
| 236 | + refreshAllPersonnel: function (cb) { | ||
| 237 | + loadAllPersonnel(function (data) { | ||
| 238 | + allPersonnel = data; | ||
| 239 | + cb && cb(); | ||
| 240 | + }); | ||
| 241 | + }, | ||
| 242 | + nbbm2PlateMap: function () { | ||
| 243 | + return nbbm2PlateMap; | ||
| 244 | + }, | ||
| 245 | + carsArray: function () { | ||
| 246 | + return carsArray; | ||
| 247 | + }, | ||
| 248 | + simpleParksArray: function () { | ||
| 249 | + var map = {}; | ||
| 250 | + for(var code in carparks) | ||
| 251 | + map[code] = carparks[code].parkName; | ||
| 252 | + return map; | ||
| 253 | + }, | ||
| 254 | + remarksMapps: function () { | ||
| 255 | + return remarksMapps; | ||
| 256 | + }, | ||
| 257 | + get_stat_park_data: function () { | ||
| 258 | + return stat_park_data; | ||
| 259 | + }, | ||
| 260 | + reload_stat_park_data: function () { | ||
| 261 | + load_stat_park_data(); | ||
| 262 | + } | ||
| 263 | + }; | ||
| 264 | +})(); |
src/main/resources/static/real_control_v2_mobile/alone_page/home/alone_data_gps.js
0 → 100644
| 1 | +/* gps 数据管理模块 */ | ||
| 2 | + | ||
| 3 | +var gb_data_gps = (function () { | ||
| 4 | + | ||
| 5 | + //fixed time refresh delay | ||
| 6 | + var delay = 1000 * 7; | ||
| 7 | + //deviceId ——> gps | ||
| 8 | + var realData = {}; | ||
| 9 | + //refresh after callback | ||
| 10 | + var refreshEventCallbacks = []; | ||
| 11 | + //register callback function | ||
| 12 | + var registerCallback = function (cb) { | ||
| 13 | + if (cb) | ||
| 14 | + refreshEventCallbacks.push(cb); | ||
| 15 | + }; | ||
| 16 | + | ||
| 17 | + var refresh = function (cb) { | ||
| 18 | + $.ajax({ | ||
| 19 | + url: '/gps/real/line', | ||
| 20 | + data: {lineCodes: gb_data_basic.line_idx}, | ||
| 21 | + dataType: 'json', | ||
| 22 | + success: function (rs) { | ||
| 23 | + //用定时的gps来检测session断开 | ||
| 24 | + if(rs.status && rs.status==407){ | ||
| 25 | + location.href = '/login.html'; | ||
| 26 | + return; | ||
| 27 | + } | ||
| 28 | + refreshData(rs); | ||
| 29 | + cb(); | ||
| 30 | + }, | ||
| 31 | + error: function (xr, t) { | ||
| 32 | + notify_err('刷新GPS失败,稍后重试' + t); | ||
| 33 | + cb(); | ||
| 34 | + } | ||
| 35 | + }); | ||
| 36 | + }; | ||
| 37 | + | ||
| 38 | + var refreshData = function (rs) { | ||
| 39 | + var old, addArr = [], | ||
| 40 | + upArr = [], | ||
| 41 | + upDownChange = []; | ||
| 42 | + | ||
| 43 | + var schArray; | ||
| 44 | + $.each(rs.gpsList, function () { | ||
| 45 | + old = realData[this.deviceId]; | ||
| 46 | + if (old) { | ||
| 47 | + if (this.timestamp > old.timestamp) { | ||
| 48 | + if (old.upDown != this.upDown) | ||
| 49 | + upDownChange.push(this); | ||
| 50 | + else | ||
| 51 | + upArr.push(this); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + } else | ||
| 55 | + addArr.push(this); | ||
| 56 | + | ||
| 57 | + //班次信息 | ||
| 58 | + /*if (this.schId) { | ||
| 59 | + schArray = gb_schedule_table.findScheduleByLine(this.lineId); | ||
| 60 | + if (schArray) | ||
| 61 | + this.sch = schArray[this.schId]; | ||
| 62 | + }*/ | ||
| 63 | + | ||
| 64 | + //时间格式化 | ||
| 65 | + this.dateStr = moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss'); | ||
| 66 | + realData[this.deviceId] = this; | ||
| 67 | + }); | ||
| 68 | + | ||
| 69 | + //console.log('add array size: ' + addArr.length, 'up array size: ' + upArr.length); | ||
| 70 | + //CCCallFuncN | ||
| 71 | + $.each(refreshEventCallbacks, function (i, cb) { | ||
| 72 | + cb(addArr, upArr, upDownChange); | ||
| 73 | + }); | ||
| 74 | + | ||
| 75 | + }; | ||
| 76 | + | ||
| 77 | + var startFixedTime; | ||
| 78 | + var fixedTimeRefresh = function () { | ||
| 79 | + if (startFixedTime) | ||
| 80 | + return; | ||
| 81 | + startFixedTime = true; | ||
| 82 | + | ||
| 83 | + (function () { | ||
| 84 | + var f = arguments.callee; | ||
| 85 | + refresh(function () { | ||
| 86 | + setTimeout(f, delay); | ||
| 87 | + }); | ||
| 88 | + })(); | ||
| 89 | + }; | ||
| 90 | + | ||
| 91 | + var gpsByLineCode = function (lineCode) { | ||
| 92 | + var rs = []; | ||
| 93 | + for (var device in realData) { | ||
| 94 | + if (realData[device].lineId == lineCode) | ||
| 95 | + rs.push(realData[device]); | ||
| 96 | + } | ||
| 97 | + return rs; | ||
| 98 | + }; | ||
| 99 | + | ||
| 100 | + var findOne = function (deviceId) { | ||
| 101 | + return realData[deviceId]; | ||
| 102 | + }; | ||
| 103 | + | ||
| 104 | + var findGpsByNbbm = function (nbbm) { | ||
| 105 | + return realData[gb_data_basic.nbbm2deviceMap()[nbbm]]; | ||
| 106 | + }; | ||
| 107 | + | ||
| 108 | + /** | ||
| 109 | + * 设备掉线事件 | ||
| 110 | + */ | ||
| 111 | + var deviceOffline = function (gps) { | ||
| 112 | + $.each(offlineCallbacks, function (i, cb) { | ||
| 113 | + cb(gps); | ||
| 114 | + }); | ||
| 115 | + }; | ||
| 116 | + | ||
| 117 | + //注册掉线事件回调函数 | ||
| 118 | + var offlineCallbacks = []; | ||
| 119 | + var registerOfflineCb = function (cb) { | ||
| 120 | + if (cb) | ||
| 121 | + offlineCallbacks.push(cb); | ||
| 122 | + }; | ||
| 123 | + | ||
| 124 | + return { | ||
| 125 | + fixedTimeRefresh: fixedTimeRefresh, | ||
| 126 | + registerCallback: registerCallback, | ||
| 127 | + allGps: realData, | ||
| 128 | + gpsByLineCode: gpsByLineCode, | ||
| 129 | + findOne: findOne, | ||
| 130 | + findGpsByNbbm: findGpsByNbbm, | ||
| 131 | + deviceOffline: deviceOffline, | ||
| 132 | + registerOfflineCb: registerOfflineCb | ||
| 133 | + }; | ||
| 134 | +})(); |
src/main/resources/static/real_control_v2_mobile/alone_page/home/home_wrap.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html lang="zh-cn"> | ||
| 3 | + | ||
| 4 | +<head> | ||
| 5 | + <meta charset="UTF-8"> | ||
| 6 | + <title>主页模拟图</title> | ||
| 7 | + <!-- uikit core style--> | ||
| 8 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" /> | ||
| 9 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" merge="plugins"/> | ||
| 10 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" merge="plugins"/> | ||
| 11 | + <link rel="stylesheet" | ||
| 12 | + href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="plugins"/> | ||
| 13 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/sticky.gradient.min.css" merge="plugins"/> | ||
| 14 | + | ||
| 15 | + <!-- main style --> | ||
| 16 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/main.css" /> | ||
| 17 | + <!-- home style --> | ||
| 18 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/home.css" merge="custom_style"/> | ||
| 19 | + | ||
| 20 | + <!-- custom table --> | ||
| 21 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/ct_table.css" merge="custom_style"/> | ||
| 22 | + <!-- jquery contextMenu style --> | ||
| 23 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/css/jquery.contextMenu.min.css" merge="plugins"/> | ||
| 24 | + <!-- formvalidation style --> | ||
| 25 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/formvalidation/formValidation.min.css" merge="plugins"/> | ||
| 26 | + <!-- js tree --> | ||
| 27 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/jstree/default/style.css" merge="plugins"/> | ||
| 28 | + <!-- tooltip css--> | ||
| 29 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/qtip/jquery.qtip.min.css" merge="plugins"/> | ||
| 30 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/pace.css" merge="plugins"/> | ||
| 31 | + | ||
| 32 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/modal_extend.css" merge="custom_style"/> | ||
| 33 | + <!-- perfect-scrollbar style --> | ||
| 34 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" merge="plugins"/> | ||
| 35 | + <!-- layer 3.0.3 --> | ||
| 36 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/layer3.0.3/skin/default/layer.css" merge="plugins"/> | ||
| 37 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/layer3.0.3/skin/moon/style.css" merge="plugins"/> | ||
| 38 | + | ||
| 39 | + | ||
| 40 | + <style> | ||
| 41 | + .main-container{ | ||
| 42 | + height: 100% !important; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + #main-tab-content{ | ||
| 46 | + padding: 0 !important; | ||
| 47 | + list-style: none; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + .home-panel{ | ||
| 51 | + | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + #home-main-content{ | ||
| 55 | + padding: 0 !important; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + #main-tab-content>.home-panel>#home-main-content{ | ||
| 59 | + overflow: inherit !important; | ||
| 60 | + } | ||
| 61 | + </style> | ||
| 62 | +</head> | ||
| 63 | + | ||
| 64 | +<body> | ||
| 65 | +<!--<div class="main-container" style="height: 100%;"> | ||
| 66 | +</div>--> | ||
| 67 | +<div class="main-container"> | ||
| 68 | + <ul id="main-tab-content"> | ||
| 69 | + <li class="home-panel"></li> | ||
| 70 | + </ul> | ||
| 71 | +</div> | ||
| 72 | + | ||
| 73 | + | ||
| 74 | +<!-- 地图相关 --> | ||
| 75 | +<script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script> | ||
| 76 | +<script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script> | ||
| 77 | +<script src="/assets/js/baidu//MarkerClusterer.js" merge="plugins"></script> | ||
| 78 | +<script src="/assets/js/TransGPS.js" merge="plugins"></script> | ||
| 79 | +<!-- jquery --> | ||
| 80 | +<script src="/real_control_v2_mobile/assets/js/jquery.min.js"></script> | ||
| 81 | +<!-- jquery actual --> | ||
| 82 | +<script src="/real_control_v2_mobile/assets/js/jquery.actual.min.js" merge="plugins"></script> | ||
| 83 | +<!-- jquery.serializejson JSON序列化插件 --> | ||
| 84 | +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script> | ||
| 85 | +<!-- moment.js 日期处理类库 --> | ||
| 86 | +<script src="/real_control_v2_mobile/assets/plugins/moment/moment.min.js"></script> | ||
| 87 | +<script src="/real_control_v2_mobile/assets/plugins/moment/zh-cn.js"></script> | ||
| 88 | + | ||
| 89 | +<!-- flatpickr --> | ||
| 90 | +<script src="/real_control_v2_mobile/assets/plugins/flatpickr/flatpickr.min.js" merge="plugins"></script> | ||
| 91 | +<script src="/real_control_v2_mobile/assets/plugins/flatpickr/l10n/zh.js" merge="plugins"></script> | ||
| 92 | + | ||
| 93 | +<!-- perfect-scrollbar --> | ||
| 94 | +<script src="/real_control_v2_mobile/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> | ||
| 95 | +<!-- common js --> | ||
| 96 | +<script src="/real_control_v2_mobile/js/common.js"></script> | ||
| 97 | +<!-- art-template 模版引擎 --> | ||
| 98 | +<script src="/assets/plugins/template.js" merge="plugins"></script> | ||
| 99 | +<!-- d3 --> | ||
| 100 | +<script src="/assets/js/d3.min.js"></script> | ||
| 101 | +<!-- EventProxy --> | ||
| 102 | +<script src="/assets/js/eventproxy.js"></script> | ||
| 103 | +<!-- Geolib --> | ||
| 104 | +<script src="/real_control_v2_mobile/geolib/geolib.js" merge="plugins"></script> | ||
| 105 | + | ||
| 106 | +<script> | ||
| 107 | + | ||
| 108 | + | ||
| 109 | + var res_load_ep = EventProxy.create('load_home_layout', 'load_home_line_panel', 'load_data_basic', 'data-basic', function () { | ||
| 110 | + //加载主页 | ||
| 111 | + gb_home_layout.layout(function () { | ||
| 112 | + gb_home_line_panel.init(function () { | ||
| 113 | + //gps自刷新 | ||
| 114 | + gb_data_gps.fixedTimeRefresh(); | ||
| 115 | + | ||
| 116 | + $('.uk-icon-send-o.home_alone_page').remove(); | ||
| 117 | + }); | ||
| 118 | + }); | ||
| 119 | + }); | ||
| 120 | + | ||
| 121 | + function connectArr(arr, separator, transFun) { | ||
| 122 | + var rs = ''; | ||
| 123 | + $.each(arr, function (i, item) { | ||
| 124 | + if (transFun) | ||
| 125 | + item = transFun(item); | ||
| 126 | + rs += (separator + item); | ||
| 127 | + }); | ||
| 128 | + return rs.substr(separator.length); | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + var isArray = function (obj) { | ||
| 132 | + return Object.prototype.toString.call(obj) === '[object Array]'; | ||
| 133 | + }; | ||
| 134 | + | ||
| 135 | + var gb_form_validation_opts = { | ||
| 136 | + framework: 'uikit', | ||
| 137 | + locale: 'zh_CN', | ||
| 138 | + icon: { | ||
| 139 | + valid: 'uk-icon-check', | ||
| 140 | + invalid: 'uk-icon-times', | ||
| 141 | + validating: 'uk-icon-refresh' | ||
| 142 | + } | ||
| 143 | + }; | ||
| 144 | + | ||
| 145 | +</script> | ||
| 146 | + | ||
| 147 | +<!-- uikit core --> | ||
| 148 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/uikit.min.js" merge="uikit_js"></script> | ||
| 149 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/notify.min.js" merge="uikit_js"></script> | ||
| 150 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/pagination.min.js" merge="uikit_js"></script> | ||
| 151 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/tooltip.min.js" merge="uikit_js"></script> | ||
| 152 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/sticky.min.js" merge="uikit_js"></script> | ||
| 153 | + | ||
| 154 | + | ||
| 155 | +<!-- jquery contextMenu --> | ||
| 156 | +<script src="/real_control_v2_mobile/assets/js/jquery.contextMenu.min.js" merge="plugins"></script> | ||
| 157 | +<script src="/real_control_v2_mobile/assets/js/jquery.ui.position.min.js" merge="plugins"></script> | ||
| 158 | +<!-- formvalidation- --> | ||
| 159 | +<script src="/real_control_v2_mobile/assets/plugins/formvalidation/formValidation.min.js" merge="plugins"></script> | ||
| 160 | +<script src="/real_control_v2_mobile/assets/plugins/formvalidation/zh_CN.js" merge="plugins"></script> | ||
| 161 | +<script src="/real_control_v2_mobile/assets/plugins/formvalidation/uikit.min.js" merge="plugins"></script> | ||
| 162 | +<!-- js tree --> | ||
| 163 | +<script src="/real_control_v2_mobile/assets/plugins/jstree/jstree.min.js" merge="plugins"></script> | ||
| 164 | +<!-- simple pinyin --> | ||
| 165 | +<script src="/assets/plugins/pinyin.js" merge="plugins"></script> | ||
| 166 | +<!-- qtip --> | ||
| 167 | +<script src="/real_control_v2_mobile/assets/plugins/qtip/jquery.qtip.min.js" merge="plugins"></script> | ||
| 168 | +<!-- layer 3.0.3 --> | ||
| 169 | +<script src="/real_control_v2_mobile/assets/plugins/layer3.0.3/layer.js" merge="plugins"></script> | ||
| 170 | + | ||
| 171 | +<!-- 数据 --> | ||
| 172 | +<script src="/real_control_v2_mobile/alone_page/home/alone_data_basic.js" merge="custom_js"></script> | ||
| 173 | +<script src="/real_control_v2_mobile/alone_page/home/alone_data_gps.js" merge="custom_js"></script> | ||
| 174 | +<script src="/real_control_v2_mobile/js/data/gps_abnormal.js" merge="custom_js"></script> | ||
| 175 | +<!-- 线路模拟图 --> | ||
| 176 | +<script src="/real_control_v2_mobile/js/utils/svg_chart.js" merge="custom_js"></script> | ||
| 177 | +<script src="/real_control_v2_mobile/js/utils/svg_data_convert.js" merge="custom_js"></script> | ||
| 178 | +<script src="/real_control_v2_mobile/js/utils/svg_chart_tooltip.js" merge="custom_js"></script> | ||
| 179 | +<script src="/real_control_v2_mobile/js/utils/svg_chart_map.js" merge="custom_js"></script> | ||
| 180 | + | ||
| 181 | +<!-- custom table js --> | ||
| 182 | +<script src="/real_control_v2_mobile/js/utils/ct_table.js" merge="custom_js"></script> | ||
| 183 | +<!-- home js --> | ||
| 184 | +<script src="/real_control_v2_mobile/js/home/layout.js" merge="custom_js"></script> | ||
| 185 | +<script src="/real_control_v2_mobile/js/home/line_panel.js" merge="custom_js"></script> | ||
| 186 | +<script src="/real_control_v2_mobile/js/home/context_menu.js" merge="custom_js"></script> | ||
| 187 | + | ||
| 188 | + | ||
| 189 | +<!-- 模态框扩展 --> | ||
| 190 | +<script src="/real_control_v2_mobile/js/modal_extend.js" merge="custom_js"></script> | ||
| 191 | + | ||
| 192 | +</body> | ||
| 193 | + | ||
| 194 | +</html> |
src/main/resources/static/real_control_v2_mobile/alone_page/map/alone_data_basic.js
0 → 100644
| 1 | +/* 基础数据管理模块 */ | ||
| 2 | + | ||
| 3 | +var gb_data_basic = (function () { | ||
| 4 | + | ||
| 5 | + var stationRoutes, lineCode2NameAll, lineInformations, nbbm2deviceMap, device2nbbmMap, allPersonnel, svgAttrs; | ||
| 6 | + var ep = EventProxy.create("stationRoutes", "lineCode2Name", "lineInformations", "nbbm2deviceId", "all_personnel", "svg_attrs" | ||
| 7 | + , function (routes, code2Name, informations, nbbm2device, all_personnel, svgAttrMap) { | ||
| 8 | + stationRoutes = routes; | ||
| 9 | + lineCode2NameAll = code2Name; | ||
| 10 | + lineInformations = informations; | ||
| 11 | + nbbm2deviceMap = nbbm2device; | ||
| 12 | + device2nbbmMap = gb_common.inverse(nbbm2deviceMap); | ||
| 13 | + allPersonnel = all_personnel; | ||
| 14 | + svgAttrs = svgAttrMap; | ||
| 15 | + | ||
| 16 | + res_load_ep.emitLater('data-basic'); | ||
| 17 | + }); | ||
| 18 | + | ||
| 19 | + var storage = window.localStorage; | ||
| 20 | + //激活的线路 | ||
| 21 | + var activeLines = JSON.parse(storage.getItem('lineControlItems')); | ||
| 22 | + //lineCode to line object | ||
| 23 | + var codeToLine = {}; | ||
| 24 | + //lineCode idx string | ||
| 25 | + var line_idx = (function () { | ||
| 26 | + var str = ''; | ||
| 27 | + for (var i = 0, item; item = activeLines[i++];) { | ||
| 28 | + str += (',' + item.lineCode); | ||
| 29 | + codeToLine[item.lineCode] = item; | ||
| 30 | + } | ||
| 31 | + return str.substr(1); | ||
| 32 | + })(); | ||
| 33 | + | ||
| 34 | + //站点路由 | ||
| 35 | + gb_common.$get('/stationroute/multiLine', {lineIds: line_idx}, function (rs) { | ||
| 36 | + var list = rs.list;//JSON.parse(rs.list); | ||
| 37 | + var routeData = gb_common.groupBy(list, 'lineCode'); | ||
| 38 | + //排序 | ||
| 39 | + for (var lineCode in routeData) { | ||
| 40 | + routeData[lineCode].sort(stationRouteSort); | ||
| 41 | + } | ||
| 42 | + ep.emit('stationRoutes', routeData); | ||
| 43 | + }); | ||
| 44 | + | ||
| 45 | + //线路标准信息 | ||
| 46 | + gb_common.$get('/lineInformation/line/multi', {lineCodes: line_idx}, function (rs) { | ||
| 47 | + var informations = {}; | ||
| 48 | + $.each(rs, function () { | ||
| 49 | + informations[this.line.lineCode] = this; | ||
| 50 | + delete this['line']; | ||
| 51 | + }); | ||
| 52 | + ep.emit('lineInformations', informations); | ||
| 53 | + }); | ||
| 54 | + | ||
| 55 | + //人员信息 | ||
| 56 | + loadAllPersonnel(function (data) { | ||
| 57 | + ep.emit('all_personnel', data); | ||
| 58 | + }); | ||
| 59 | + function loadAllPersonnel(cb) { | ||
| 60 | + $.get('/basic/all_personnel_py', function (rs) { | ||
| 61 | + //转换成自动补全组件需要的数据 | ||
| 62 | + var data = [], code; | ||
| 63 | + for(var i =0, p; p = rs[i++];){ | ||
| 64 | + code = p['workId'].indexOf('-')!=-1?p['workId'].split('-')[1]:p['workId']; | ||
| 65 | + data.push({ | ||
| 66 | + value: code + '/' + p.name, | ||
| 67 | + fullChars: p.fullChars.toUpperCase(), | ||
| 68 | + camelChars: p.camelChars.toUpperCase() | ||
| 69 | + }); | ||
| 70 | + } | ||
| 71 | + cb && cb(data); | ||
| 72 | + }); | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + var carparks = {}; | ||
| 76 | + //停车场数据 | ||
| 77 | + gb_common.$get('/realMap/carParkSpatialData', {}, function (rs) { | ||
| 78 | + rs.list.sort(function (a, b) { | ||
| 79 | + return a.parkName.localeCompare(b.parkName); | ||
| 80 | + }); | ||
| 81 | + $.each(rs.list, function () { | ||
| 82 | + carparks[this.parkCode] = this; | ||
| 83 | + }); | ||
| 84 | + }); | ||
| 85 | + | ||
| 86 | + //车辆数据 | ||
| 87 | + var carsArray; | ||
| 88 | + $.get('/basic/cars?t=' + Math.random(), function (rs) { | ||
| 89 | + carsArray = rs; | ||
| 90 | + }); | ||
| 91 | + | ||
| 92 | + var getCarparkByCode = function (code) { | ||
| 93 | + return carparks[code]; | ||
| 94 | + }; | ||
| 95 | + | ||
| 96 | + //line code to name | ||
| 97 | + $.get('/basic/lineCode2Name', function (rs) { | ||
| 98 | + ep.emit('lineCode2Name', rs); | ||
| 99 | + }); | ||
| 100 | + | ||
| 101 | + //nbbm to device id | ||
| 102 | + $.get('/basic/nbbm2deviceId', function (rs) { | ||
| 103 | + ep.emit('nbbm2deviceId', rs); | ||
| 104 | + }); | ||
| 105 | + //nbbm to 车牌号 | ||
| 106 | + var nbbm2PlateMap; | ||
| 107 | + $.get('/basic/nbbm2PlateNo', function (rs) { | ||
| 108 | + nbbm2PlateMap = rs; | ||
| 109 | + }); | ||
| 110 | + | ||
| 111 | + //模拟图属性数据 | ||
| 112 | + gb_common.$get('/realSchedule/svgAttr', {idx: line_idx}, function (rs) { | ||
| 113 | + var data = {}; | ||
| 114 | + $.each(rs.list, function () { | ||
| 115 | + this.hideStations = JSON.parse(this.hideStations); | ||
| 116 | + this.nicknames = JSON.parse(this.nicknames); | ||
| 117 | + data[this.lineCode] = this; | ||
| 118 | + }); | ||
| 119 | + ep.emit('svg_attrs', data); | ||
| 120 | + }); | ||
| 121 | + | ||
| 122 | + //站点和停车场历时、公里对照数据 | ||
| 123 | + var stat_park_data; | ||
| 124 | + var load_stat_park_data = function () { | ||
| 125 | + $.get('/basic/station2ParkData?t='+Math.random(), {idx: line_idx}, function (rs) { | ||
| 126 | + stat_park_data = rs; | ||
| 127 | + }); | ||
| 128 | + } | ||
| 129 | + load_stat_park_data(); | ||
| 130 | + | ||
| 131 | + function findLineByCodes(codeArr) { | ||
| 132 | + var rs = []; | ||
| 133 | + $.each(codeArr, function () { | ||
| 134 | + rs.push(codeToLine[this]); | ||
| 135 | + }); | ||
| 136 | + return rs; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + var findCodeByLinename = function (name) { | ||
| 140 | + for (var code in lineCode2NameAll) { | ||
| 141 | + if (name == lineCode2NameAll[code]) | ||
| 142 | + return code; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + return null; | ||
| 146 | + }; | ||
| 147 | + | ||
| 148 | + var getLineInformation = function (lineCode) { | ||
| 149 | + return lineInformations[lineCode]; | ||
| 150 | + }; | ||
| 151 | + | ||
| 152 | + var stationRouteSort = function (a, b) { | ||
| 153 | + return a.stationRouteCode - b.stationRouteCode; | ||
| 154 | + }; | ||
| 155 | + | ||
| 156 | + return { | ||
| 157 | + activeLines: activeLines, | ||
| 158 | + line_idx: line_idx, | ||
| 159 | + codeToLine: codeToLine, | ||
| 160 | + nbbm2deviceMap: function () { | ||
| 161 | + return nbbm2deviceMap; | ||
| 162 | + }, | ||
| 163 | + device2nbbmMap: function () { | ||
| 164 | + return device2nbbmMap; | ||
| 165 | + }, | ||
| 166 | + getLineInformation: getLineInformation, | ||
| 167 | + allInformations: function () { | ||
| 168 | + return lineInformations; | ||
| 169 | + }, | ||
| 170 | + stationRoutes: function (lineCode) { | ||
| 171 | + return stationRoutes[lineCode] | ||
| 172 | + }, | ||
| 173 | + findLineByCodes: findLineByCodes, | ||
| 174 | + lineCode2NameAll: function () { | ||
| 175 | + return lineCode2NameAll | ||
| 176 | + }, | ||
| 177 | + allPersonnel: function () { | ||
| 178 | + return allPersonnel; | ||
| 179 | + }, | ||
| 180 | + findCodeByLinename: findCodeByLinename, | ||
| 181 | + getCarparkByCode: getCarparkByCode, | ||
| 182 | + getSvgAttr: function (lineCode) { | ||
| 183 | + return svgAttrs[lineCode]; | ||
| 184 | + }, | ||
| 185 | + setSvgAttr: function (attr) { | ||
| 186 | + attr.hideStations = JSON.parse(attr.hideStations); | ||
| 187 | + attr.nicknames = JSON.parse(attr.nicknames); | ||
| 188 | + svgAttrs[attr.lineCode] = attr; | ||
| 189 | + }, | ||
| 190 | + //是否是环线 | ||
| 191 | + isLoopLine: function (lineCode) { | ||
| 192 | + var data = gb_common.groupBy(stationRoutes[lineCode], 'directions'); | ||
| 193 | + //下行只有2个站点 | ||
| 194 | + var len = data[0].length; | ||
| 195 | + if (len > 0 && data[1].length == 2) { | ||
| 196 | + var first = data[0][0], | ||
| 197 | + end = data[0][len - 1]; | ||
| 198 | + | ||
| 199 | + /*if(first.stationName != end.stationName) | ||
| 200 | + return false;*/ | ||
| 201 | + | ||
| 202 | + var fPoint = {latitude: first.station.gLaty, longitude: first.station.gLonx} | ||
| 203 | + , ePoint = {latitude: end.station.gLaty, longitude: end.station.gLonx}; | ||
| 204 | + | ||
| 205 | + //并且上行起终点距离200米内 | ||
| 206 | + if (geolib.getDistance(fPoint, ePoint) < 200) { | ||
| 207 | + return true; | ||
| 208 | + } | ||
| 209 | + } | ||
| 210 | + | ||
| 211 | + return false; | ||
| 212 | + }, | ||
| 213 | + //刷新员工信息 | ||
| 214 | + refreshAllPersonnel: function (cb) { | ||
| 215 | + loadAllPersonnel(function (data) { | ||
| 216 | + allPersonnel = data; | ||
| 217 | + cb && cb(); | ||
| 218 | + }); | ||
| 219 | + }, | ||
| 220 | + nbbm2PlateMap: function () { | ||
| 221 | + return nbbm2PlateMap; | ||
| 222 | + }, | ||
| 223 | + carsArray: function () { | ||
| 224 | + return carsArray; | ||
| 225 | + }, | ||
| 226 | + simpleParksArray: function () { | ||
| 227 | + var map = {}; | ||
| 228 | + for(var code in carparks) | ||
| 229 | + map[code] = carparks[code].parkName; | ||
| 230 | + return map; | ||
| 231 | + }, | ||
| 232 | + remarksMapps: function () { | ||
| 233 | + return remarksMapps; | ||
| 234 | + }, | ||
| 235 | + get_stat_park_data: function () { | ||
| 236 | + return stat_park_data; | ||
| 237 | + }, | ||
| 238 | + reload_stat_park_data: function () { | ||
| 239 | + load_stat_park_data(); | ||
| 240 | + } | ||
| 241 | + }; | ||
| 242 | +})(); |
src/main/resources/static/real_control_v2_mobile/alone_page/map/alone_data_gps.js
0 → 100644
| 1 | +/* gps 数据管理模块 */ | ||
| 2 | + | ||
| 3 | +var gb_data_gps = (function () { | ||
| 4 | + | ||
| 5 | + //fixed time refresh delay | ||
| 6 | + var delay = 1000 * 7; | ||
| 7 | + //deviceId ——> gps | ||
| 8 | + var realData = {}; | ||
| 9 | + //refresh after callback | ||
| 10 | + var refreshEventCallbacks = []; | ||
| 11 | + //register callback function | ||
| 12 | + var registerCallback = function (cb) { | ||
| 13 | + if (cb) | ||
| 14 | + refreshEventCallbacks.push(cb); | ||
| 15 | + }; | ||
| 16 | + | ||
| 17 | + var refresh = function (cb) { | ||
| 18 | + $.ajax({ | ||
| 19 | + url: '/gps/real/line', | ||
| 20 | + data: {lineCodes: gb_data_basic.line_idx}, | ||
| 21 | + dataType: 'json', | ||
| 22 | + success: function (rs) { | ||
| 23 | + //用定时的gps来检测session断开 | ||
| 24 | + if(rs.status && rs.status==407){ | ||
| 25 | + location.href = '/login.html'; | ||
| 26 | + return; | ||
| 27 | + } | ||
| 28 | + refreshData(rs); | ||
| 29 | + cb(); | ||
| 30 | + }, | ||
| 31 | + error: function (xr, t) { | ||
| 32 | + notify_err('刷新GPS失败,稍后重试' + t); | ||
| 33 | + cb(); | ||
| 34 | + } | ||
| 35 | + }); | ||
| 36 | + }; | ||
| 37 | + | ||
| 38 | + var refreshData = function (rs) { | ||
| 39 | + var old, addArr = [], | ||
| 40 | + upArr = [], | ||
| 41 | + upDownChange = []; | ||
| 42 | + | ||
| 43 | + var schArray; | ||
| 44 | + $.each(rs.gpsList, function () { | ||
| 45 | + old = realData[this.deviceId]; | ||
| 46 | + if (old) { | ||
| 47 | + if (this.timestamp > old.timestamp) { | ||
| 48 | + if (old.upDown != this.upDown) | ||
| 49 | + upDownChange.push(this); | ||
| 50 | + else | ||
| 51 | + upArr.push(this); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + } else | ||
| 55 | + addArr.push(this); | ||
| 56 | + | ||
| 57 | + //班次信息 | ||
| 58 | + /*if (this.schId) { | ||
| 59 | + //schArray = gb_schedule_table.findScheduleByLine(this.lineId); | ||
| 60 | + ///if (schArray) | ||
| 61 | + // this.sch = schArray[this.schId]; | ||
| 62 | + }*/ | ||
| 63 | + | ||
| 64 | + //时间格式化 | ||
| 65 | + this.dateStr = moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss'); | ||
| 66 | + realData[this.deviceId] = this; | ||
| 67 | + }); | ||
| 68 | + | ||
| 69 | + //console.log('add array size: ' + addArr.length, 'up array size: ' + upArr.length); | ||
| 70 | + //CCCallFuncN | ||
| 71 | + $.each(refreshEventCallbacks, function (i, cb) { | ||
| 72 | + cb(addArr, upArr, upDownChange, rs.overspeedList); | ||
| 73 | + }); | ||
| 74 | + | ||
| 75 | + //超速数据回调 | ||
| 76 | + //console.log('超速,,,', rs.overspeedList); | ||
| 77 | + | ||
| 78 | + }; | ||
| 79 | + | ||
| 80 | + var startFixedTime; | ||
| 81 | + var fixedTimeRefresh = function () { | ||
| 82 | + if (startFixedTime) | ||
| 83 | + return; | ||
| 84 | + startFixedTime = true; | ||
| 85 | + | ||
| 86 | + (function () { | ||
| 87 | + var f = arguments.callee; | ||
| 88 | + refresh(function () { | ||
| 89 | + setTimeout(f, delay); | ||
| 90 | + }); | ||
| 91 | + })(); | ||
| 92 | + }; | ||
| 93 | + | ||
| 94 | + var gpsByLineCode = function (lineCode) { | ||
| 95 | + var rs = []; | ||
| 96 | + for (var device in realData) { | ||
| 97 | + if (realData[device].lineId == lineCode) | ||
| 98 | + rs.push(realData[device]); | ||
| 99 | + } | ||
| 100 | + return rs; | ||
| 101 | + }; | ||
| 102 | + | ||
| 103 | + var findOne = function (deviceId) { | ||
| 104 | + return realData[deviceId]; | ||
| 105 | + }; | ||
| 106 | + | ||
| 107 | + var findGpsByNbbm = function (nbbm) { | ||
| 108 | + return realData[gb_data_basic.nbbm2deviceMap()[nbbm]]; | ||
| 109 | + }; | ||
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * 设备掉线事件 | ||
| 113 | + */ | ||
| 114 | + var deviceOffline = function (gps) { | ||
| 115 | + $.each(offlineCallbacks, function (i, cb) { | ||
| 116 | + cb(gps); | ||
| 117 | + }); | ||
| 118 | + }; | ||
| 119 | + | ||
| 120 | + //注册掉线事件回调函数 | ||
| 121 | + var offlineCallbacks = []; | ||
| 122 | + var registerOfflineCb = function (cb) { | ||
| 123 | + if (cb) | ||
| 124 | + offlineCallbacks.push(cb); | ||
| 125 | + }; | ||
| 126 | + | ||
| 127 | + return { | ||
| 128 | + fixedTimeRefresh: fixedTimeRefresh, | ||
| 129 | + registerCallback: registerCallback, | ||
| 130 | + allGps: realData, | ||
| 131 | + gpsByLineCode: gpsByLineCode, | ||
| 132 | + findOne: findOne, | ||
| 133 | + findGpsByNbbm: findGpsByNbbm, | ||
| 134 | + deviceOffline: deviceOffline, | ||
| 135 | + registerOfflineCb: registerOfflineCb | ||
| 136 | + }; | ||
| 137 | +})(); |
src/main/resources/static/real_control_v2_mobile/alone_page/map/alone_wrap.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html lang="zh-cn"> | ||
| 3 | + | ||
| 4 | +<head> | ||
| 5 | + <meta charset="UTF-8"> | ||
| 6 | + <title>地图监控 v2.0</title> | ||
| 7 | + <!-- uikit core style--> | ||
| 8 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css"/> | ||
| 9 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" | ||
| 10 | + merge="plugins"/> | ||
| 11 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" | ||
| 12 | + merge="plugins"/> | ||
| 13 | + <link rel="stylesheet" | ||
| 14 | + href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="plugins"/> | ||
| 15 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css" | ||
| 16 | + merge="plugins"/> | ||
| 17 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css" | ||
| 18 | + merge="plugins"/> | ||
| 19 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/sticky.gradient.min.css" | ||
| 20 | + merge="plugins"/> | ||
| 21 | + | ||
| 22 | + <!-- main style --> | ||
| 23 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/main.css"/> | ||
| 24 | + <!-- north style --> | ||
| 25 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/north.css" merge="custom_style"/> | ||
| 26 | + <!-- home style --> | ||
| 27 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/home.css" merge="custom_style"/> | ||
| 28 | + | ||
| 29 | + <!-- js tree --> | ||
| 30 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/jstree/default/style.css" merge="plugins"/> | ||
| 31 | + | ||
| 32 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/modal_extend.css" merge="custom_style"/> | ||
| 33 | + <!-- perfect-scrollbar style --> | ||
| 34 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" | ||
| 35 | + merge="plugins"/> | ||
| 36 | + <!-- layer 3.0.3 --> | ||
| 37 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/layer3.0.3/skin/default/layer.css" merge="plugins"/> | ||
| 38 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/layer3.0.3/skin/moon/style.css" merge="plugins"/> | ||
| 39 | + | ||
| 40 | + <!-- flatpickr --> | ||
| 41 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/flatpickr/flatpickr.min.css" merge="plugins"/> | ||
| 42 | + <link rel="stylesheet" href="/real_control_v2_mobile/assets/plugins/flatpickr/themes/airbnb.css" merge="plugins"/> | ||
| 43 | + | ||
| 44 | + <link rel="stylesheet" href="/real_control_v2_mobile/css/ct_table.css" merge="custom_style"/> | ||
| 45 | + | ||
| 46 | + <style> | ||
| 47 | + .main-container .map-panel{ | ||
| 48 | + position: absolute; | ||
| 49 | + top:0; | ||
| 50 | + left: 0; | ||
| 51 | + width: 20px; | ||
| 52 | + z-index: 999; | ||
| 53 | + height: 20px; | ||
| 54 | + } | ||
| 55 | + </style> | ||
| 56 | +</head> | ||
| 57 | + | ||
| 58 | +<body> | ||
| 59 | +<div class="main-container" style="height: 100%;"> | ||
| 60 | + <span style="position: absolute;left: calc(50% - 35px);top: calc(45% - 35px);">加载中...</span> | ||
| 61 | +</div> | ||
| 62 | +<!-- 地图相关 --> | ||
| 63 | +<script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script> | ||
| 64 | +<script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script> | ||
| 65 | +<script src="/assets/js/baidu//MarkerClusterer.js" merge="plugins"></script> | ||
| 66 | +<script src="/assets/js/TransGPS.js" merge="plugins"></script> | ||
| 67 | +<!-- 高德 --> | ||
| 68 | +<script src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"></script> | ||
| 69 | +<!-- jquery --> | ||
| 70 | +<script src="/real_control_v2_mobile/assets/js/jquery.min.js"></script> | ||
| 71 | +<!-- jquery actual --> | ||
| 72 | +<script src="/real_control_v2_mobile/assets/js/jquery.actual.min.js" merge="plugins"></script> | ||
| 73 | +<!-- moment.js 日期处理类库 --> | ||
| 74 | +<script src="/real_control_v2_mobile/assets/plugins/moment/moment.min.js"></script> | ||
| 75 | +<script src="/real_control_v2_mobile/assets/plugins/moment/zh-cn.js"></script> | ||
| 76 | + | ||
| 77 | +<!-- flatpickr --> | ||
| 78 | +<script src="/real_control_v2_mobile/assets/plugins/flatpickr/flatpickr.min.js" merge="plugins"></script> | ||
| 79 | +<script src="/real_control_v2_mobile/assets/plugins/flatpickr/l10n/zh.js" merge="plugins"></script> | ||
| 80 | + | ||
| 81 | +<!-- perfect-scrollbar --> | ||
| 82 | +<script src="/real_control_v2_mobile/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> | ||
| 83 | +<!-- common js --> | ||
| 84 | +<script src="/real_control_v2_mobile/js/common.js"></script> | ||
| 85 | +<!-- art-template 模版引擎 --> | ||
| 86 | +<script src="/assets/plugins/template.js" merge="plugins"></script> | ||
| 87 | +<!-- d3 --> | ||
| 88 | +<script src="/assets/js/d3.min.js"></script> | ||
| 89 | +<!-- EventProxy --> | ||
| 90 | +<script src="/assets/js/eventproxy.js"></script> | ||
| 91 | +<!-- uikit core --> | ||
| 92 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/uikit.min.js" merge="uikit_js"></script> | ||
| 93 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/notify.min.js" merge="uikit_js"></script> | ||
| 94 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/tooltip.min.js" merge="uikit_js"></script> | ||
| 95 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/autocomplete.min.js" merge="uikit_js"></script> | ||
| 96 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/accordion.min.js" merge="uikit_js"></script> | ||
| 97 | +<script src="/real_control_v2_mobile/assets/plugins/uikit-2.27.1/components/sticky.min.js" merge="uikit_js"></script> | ||
| 98 | + | ||
| 99 | +<!-- js tree --> | ||
| 100 | +<script src="/real_control_v2_mobile/assets/plugins/jstree/jstree.min.js" merge="plugins"></script> | ||
| 101 | +<!-- layer 3.0.3 --> | ||
| 102 | +<script src="/real_control_v2_mobile/assets/plugins/layer3.0.3/layer.js" merge="plugins"></script> | ||
| 103 | + | ||
| 104 | +<!-- 模态框扩展 --> | ||
| 105 | +<script src="/real_control_v2_mobile/js/modal_extend.js" merge="custom_js"></script> | ||
| 106 | + | ||
| 107 | +<script src="/real_control_v2_mobile/alone_page/map/alone_data_basic.js" merge="custom_js"></script> | ||
| 108 | +<script src="/real_control_v2_mobile/alone_page/map/alone_data_gps.js" merge="custom_js"></script> | ||
| 109 | +<script src="/real_control_v2_mobile/js/utils/ct_table.js" merge="custom_js"></script> | ||
| 110 | +<!-- jquery.serializejson JSON序列化插件 --> | ||
| 111 | +<script src="/assets/plugins/jquery.serializejson.js" merge="uikit_js"></script> | ||
| 112 | + | ||
| 113 | +<script src="/assets/plugins/pinyin.js" merge="plugins"></script> | ||
| 114 | +</body> | ||
| 115 | +<script> | ||
| 116 | + gb_data_gps.fixedTimeRefresh(); | ||
| 117 | + var res_load_ep = EventProxy.create('data-basic', function () { | ||
| 118 | + | ||
| 119 | + //嵌入地图页面 | ||
| 120 | + $('.main-container').load('/real_control_v2_mobile/mapmonitor/real.html', function () { | ||
| 121 | + $('.map-system-msg.flex-left').remove(); | ||
| 122 | + | ||
| 123 | + $(this).append('<span class="map-panel"></span>');//判断里有JS判定这个容器是否显示 | ||
| 124 | + }); | ||
| 125 | + }); | ||
| 126 | + | ||
| 127 | + var isArray = function (obj) { | ||
| 128 | + return Object.prototype.toString.call(obj) === '[object Array]'; | ||
| 129 | + }; | ||
| 130 | +</script> | ||
| 131 | +</html> |
src/main/resources/static/real_control_v2_mobile/assets/css/jquery.contextMenu.min.css
0 → 100644
| 1 | +@charset "UTF-8";/*! | ||
| 2 | + * jQuery contextMenu - Plugin for simple contextMenu handling | ||
| 3 | + * | ||
| 4 | + * Version: v2.2.5-dev | ||
| 5 | + * | ||
| 6 | + * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) | ||
| 7 | + * Web: http://swisnl.github.io/jQuery-contextMenu/ | ||
| 8 | + * | ||
| 9 | + * Copyright (c) 2011-2016 SWIS BV and contributors | ||
| 10 | + * | ||
| 11 | + * Licensed under | ||
| 12 | + * MIT License http://www.opensource.org/licenses/mit-license | ||
| 13 | + * | ||
| 14 | + * Date: 2016-08-27T11:09:08.919Z | ||
| 15 | + */.context-menu-icon.context-menu-icon--fa::before,.context-menu-icon::before{left:0;width:2em;font-size:1em;font-style:normal;font-weight:400;line-height:1;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:50%}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(../fonts/context-menu-icons.eot?4pl8q);src:url(../fonts/context-menu-icons.eot?4pl8q#iefix) format("embedded-opentype"),url(../fonts/context-menu-icons.woff2?4pl8q) format("woff2"),url(../fonts/context-menu-icons.woff?4pl8q) format("woff"),url(../fonts/context-menu-icons.ttf?4pl8q) format("truetype")}.context-menu-icon-add:before{content:"\EA01"}.context-menu-icon-copy:before{content:"\EA02"}.context-menu-icon-cut:before{content:"\EA03"}.context-menu-icon-delete:before{content:"\EA04"}.context-menu-icon-edit:before{content:"\EA05"}.context-menu-icon-paste:before{content:"\EA06"}.context-menu-icon-quit:before{content:"\EA07"}.context-menu-icon::before{font-family:context-menu-icons;color:#2980b9;transform:translateY(-50%)}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon--fa{display:list-item;font-family:inherit}.context-menu-icon.context-menu-icon--fa::before{font-family:FontAwesome;color:#2980b9;transform:translateY(-50%)}.context-menu-icon.context-menu-icon--fa.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-icon--fa.context-menu-disabled::before{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5)}.context-menu-item{position:relative;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline} | ||
| 16 | +/*# sourceMappingURL=jquery.contextMenu.min.css.map */ |