Commit 5b38853699d65a0fc38813dad6f5596073cec6e7

Authored by 王通
2 parents 1d9535b1 ea6adf21

Merge branch 'minhang' of http://192.168.168.201:8888/panzhaov5/bsth_control into minhang

Too many changes to show.

To preserve performance only 17 of 339 files are displayed.

src/main/java/com/bsth/common/Constants.java
... ... @@ -20,6 +20,8 @@ public class Constants {
20 20 public static final String METRONIC_URL = "/metronic_v4.5.4/**";
21 21 public static final String LOGIN_FAILURE = "/user/loginFailure";
22 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 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 6 import org.slf4j.Logger;
7 7 import org.slf4j.LoggerFactory;
8 8 import org.springframework.stereotype.Controller;
  9 +import org.springframework.web.bind.annotation.PathVariable;
9 10 import org.springframework.web.bind.annotation.RequestMapping;
10 11 import org.springframework.web.servlet.ModelAndView;
11 12  
12 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 23  
22 24 Logger logger = LoggerFactory.getLogger(this.getClass());
23 25  
24   - @RequestMapping("/v2")
  26 + /*@RequestMapping("/v2")
25 27 public ModelAndView v2(HttpServletResponse response){
26 28 ModelAndView mv = new ModelAndView();
27 29 SysUser user = SecurityUtils.getCurrentUser();
... ... @@ -50,5 +52,42 @@ public class PageForwardingController {
50 52 //正常线调主页
51 53 mv.setViewName("/real_control_v2/main.html");
52 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 17 * 白名单
18 18 */
19 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 22 @Override
23 23 public void destroy() {
... ...
src/main/java/com/bsth/security/filter/LoginInterceptor.java
... ... @@ -33,7 +33,7 @@ public class LoginInterceptor implements Filter {
33 33 * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证
34 34 */
35 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 39 @Override
... ...
src/main/java/com/bsth/service/sys/RoleService.java
... ... @@ -11,5 +11,11 @@ public interface RoleService extends BaseService<Role, Integer>{
11 11  
12 12 Map<String, Object> roleInfo(Integer id);
13 13  
14   - Map<String, Object> settRoleResources(Integer roleId, String mIds);
  14 + /***
  15 + * 根据角色id设置该角色拥有的资源权限
  16 + * @param roleId 角色id
  17 + * @param rIds 资源id字符串
  18 + * @return
  19 + */
  20 + Map<String, Object> settRoleResources(Integer roleId, String rIds);
15 21 }
... ...
src/main/resources/static/apple-touch-icon-72x72.png 0 → 100644

17 KB

src/main/resources/static/assets/js/common.js
... ... @@ -57,6 +57,7 @@ function ajaxComplete(xhr, ts, succ){
57 57 successHandle(JSON.parse(xhr.responseText), succ);
58 58 }
59 59 else if(ts == 'error'){
  60 + //添加自动跳转首页
60 61 layer.alert(xhr.responseText + '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="goIndex" style="color: #ff1f08;font-weight: bold;font-size: large;">1</span> 秒后回到首页', {icon: 2, title: '操作失败'});
61 62 setTimeout(function(){
62 63 window.location.href = '/';
... ...
src/main/resources/static/pages/control/lineallot/allot_mobile.html 0 → 100644
  1 +<style>
  2 + .line-select {
  3 + border: 1px solid #ddd;
  4 + height: 310px;
  5 + margin-top: 15px;
  6 + box-shadow: 0 2px 5px 0 rgba(221, 221, 221, 0.24), 0 2px 10px 0 rgba(221, 221, 221, 0.24);
  7 + }
  8 +
  9 + .line-select.selected {
  10 + height: 210px;
  11 + }
  12 +
  13 + .line-select .company {
  14 + font-family: 仿宋;
  15 + font-weight: 600;
  16 + }
  17 +
  18 + .line-select .line {
  19 + display: inline-block;
  20 + padding: 8px;
  21 + min-width: 85px;
  22 + text-align: center;
  23 + border: 1px solid #C1C1C1;
  24 + color: #666;
  25 + border-radius: 5px !important;
  26 + margin: 5px;
  27 + }
  28 +
  29 + .line-select .line.active {
  30 + color: white;
  31 + background: #32C5D2;
  32 + border: 1px solid #32C5D2;
  33 + }
  34 +
  35 + .line-select-cont {
  36 + text-align: left;
  37 + overflow: auto;
  38 + height: 230px;
  39 + padding-right: 0px;
  40 + }
  41 +
  42 + .line-select-cont .slimScrollBar {
  43 + background: rgb(50, 197, 210) !important;
  44 + border-radius: 5px !important;
  45 + }
  46 +
  47 + .line-select .search-input {
  48 + margin: 25px 0 5px 0;
  49 + padding-left: 0;
  50 + }
  51 +
  52 + .line-select .search-input .input-icon-lg {
  53 + box-shadow: 0 2px 5px 0 rgba(194, 202, 216, 0.49), 0 2px 10px 0 rgba(194, 202, 216, 0.49) !important;
  54 + }
  55 +
  56 + .line-select .fa-search {
  57 + color: #32c5d2 !important;
  58 + }
  59 +
  60 + .line-select .fa-plus-circle {
  61 + cursor: pointer;
  62 + transform: rotate(43deg);
  63 + }
  64 +
  65 + .line-select .fa-plus-circle:hover {
  66 + color: #A9A9A9;
  67 + }
  68 +
  69 + .selected .line {
  70 + display: inline-block !important;
  71 + }
  72 +
  73 + .load-text {
  74 + position: absolute;
  75 + top: 50%;
  76 + left: 50%;
  77 + transform: translate(-50%);
  78 + font-size: 14px;
  79 + font-family: 仿宋;
  80 + }
  81 +
  82 + /* .selected a{
  83 + position: absolute;
  84 + bottom: 20px;
  85 + }
  86 + .selected a.btn{
  87 + bottom: 10px;
  88 + } */
  89 +
  90 + .lb_panel {
  91 + position: absolute;
  92 + bottom: 20px;
  93 + }
  94 +
  95 + .lb_panel a {
  96 + margin-right: 5px;
  97 + }
  98 +
  99 + .gotoControl.red {
  100 + background: #ec7b7b;
  101 + border-color: #ec7b7b;
  102 + }
  103 +
  104 + .gotoControl.red:hover {
  105 + background: #d96262;
  106 + border-color: #d96262;
  107 + }
  108 +
  109 + #resetBtn, #historyBtn {
  110 + vertical-align: bottom;
  111 + display: inline-block;
  112 + margin-bottom: 5px;
  113 + }
  114 +
  115 + .main_type_checkbox{
  116 + vertical-align: bottom;
  117 + display: inline-block;
  118 + margin-bottom: 3px;
  119 + margin-right: 15px;
  120 + display: none;
  121 + }
  122 +
  123 + /** 闵行没有分公司,直接隐藏
  124 + .company, .sub-company {
  125 + display: none !important;
  126 + } */
  127 +</style>
  128 +
  129 +<div class="page-head">
  130 + <div class="page-title">
  131 + <h1>线路分配</h1>
  132 + </div>
  133 +</div>
  134 +
  135 +<ul class="page-breadcrumb breadcrumb">
  136 + <li><a href="/pages/home.html" data-pjax>首页</a> <i
  137 + class="fa fa-circle"></i></li>
  138 + <li><span class="active">线路调度管理</span> <i class="fa fa-circle"></i></li>
  139 + <li><span class="active">线路分配</span></li>
  140 +</ul>
  141 +
  142 +<div class="portlet light bordered">
  143 + <div class="portlet-title">
  144 + <div class="caption">
  145 + <i class="icon-social-dribbble font-green"></i> <span
  146 + class="caption-subject font-green bold uppercase">选择线路</span>
  147 + </div>
  148 + </div>
  149 + <div class="alert alert-info">
  150 + <a href="#xd_position"><span id="go_xd_position"></span></a>
  151 + <strong>ps</strong> 可选择的线路,进入后是监控还是主调模式。可在 权限管理-> 用户管理里 进行配置。 </div>
  152 + <div class="portlet-body">
  153 + <div class="row" style="margin-bottom: 30px;">
  154 + <div class="col-md-8 col-sm-12 col-md-offset-2" style="text-align: center;">
  155 + <div class="col-md-12 line-select">
  156 + <div class="col-md-12 search-input">
  157 + <div class="col-md-6" style="padding-left: 0;">
  158 + <div class="input-icon input-icon-lg right">
  159 + <i class="fa fa-search"></i>
  160 + <input type="text" id="searchLineInput" class="form-control input-lg"
  161 + placeholder="搜索线路"></div>
  162 + </div>
  163 + </div>
  164 + <div class="line-select-cont col-md-12">
  165 + <div class="line-select-body" style="margin-top: 20px;">
  166 + <span class="load-text">加载中...</span>
  167 + </div>
  168 + </div>
  169 + </div>
  170 +
  171 + <div class="col-md-12 line-select selected" style="text-align: left;">
  172 + <h5 style="font-family: 仿宋; display: block;">已选中线路</h5>
  173 + <div class="selected-body"></div>
  174 +
  175 + <div class="lb_panel">
  176 + <a href="javascript:;" class="btn btn-lg gotoControl grey" data-status=1>
  177 + <i class="fa fa-power-off"></i> 进入线路调度 </a>
  178 +
  179 +
  180 +
  181 + <div class="main_type_checkbox" >
  182 + <input type="checkbox" class="group-checkable icheck is_main_icheck" >
  183 + 主调模式登录
  184 + </div>
  185 + <a href="javascript:;" id="historyBtn" style="left: 180px;color: #f36a5a;">
  186 + <i class="fa fa-history"></i> 历史纪录 </a>
  187 + </div>
  188 + </div>
  189 + </div>
  190 + </div>
  191 + </div>
  192 +</div>
  193 +
  194 +<div class="clone_line">
  195 +</div>
  196 +
  197 +<script id="line_select_cont_temp" type="text/html">
  198 + {{each list as line i}}
  199 + <div class="line" name="line_{{line.lineCode}}" data-id={{line.lineCode}}>{{line.name}}</div>
  200 + {{/each}}
  201 +
  202 + {{if list.length == 0}}
  203 + <span style="color: #ff4444;font-family: 微软雅黑;"><i class="fa fa-question-circle"></i> 当前用户没有可调度的线路</span>
  204 + {{/if}}
  205 +</script>
  206 +<script src="/assets/js/eventproxy.js"></script>
  207 +<script>
  208 + $(function () {
  209 + $('.is_main_icheck').iCheck({
  210 + checkboxClass: 'icheckbox_flat-blue',
  211 + increaseArea: '20%'
  212 + });
  213 +
  214 + //大写字母映射
  215 + var camelChars = {};
  216 + //全拼映射
  217 + var fullChars = {};
  218 + //中文映射
  219 + var zhChars = {};
  220 + //合并所有映射
  221 + var allChars = {};
  222 +
  223 + //线路编码映射
  224 + var lineIdMap = {};
  225 +
  226 + //线路编码和名称对照 (写入localStorage,线调用)
  227 + var lineIds = {};
  228 +
  229 + var storage = window.localStorage;
  230 + //线调权限
  231 + var auth;
  232 + $get('/line/all', {destroy_eq: 0}, function (allLine) {
  233 + //用户分配的线路
  234 + $.get('/realControAuthority/findByCurrentUser', function (t) {
  235 + //console.log('ttt', t);
  236 + if(t.pattern==1){
  237 + $('.main_type_checkbox').css('display', 'inline-block');
  238 + $('.gotoControl').addClass('blue');
  239 +
  240 + //$('.is_main_icheck').attr('checked', 'checked').trigger('change');
  241 + $('.is_main_icheck').on('ifChanged', function () {
  242 + if(this.checked){
  243 + $('.gotoControl').removeClass('grey').addClass('blue');
  244 + }
  245 + else{
  246 + $('.gotoControl').removeClass('blue').addClass('grey');
  247 + }
  248 + }).iCheck('check');
  249 + }
  250 +
  251 + auth = t;
  252 + var newArray = [], authArray = [];
  253 +
  254 + try{
  255 + authArray = t.lineCodeStr.split(',');
  256 + }catch (e){}
  257 +
  258 + $.each(allLine, function () {
  259 + if (this.lineCode && authArray.indexOf(this.lineCode) != -1) {
  260 + newArray.push(this);
  261 + }
  262 + });
  263 +
  264 + var htmlStr = template('line_select_cont_temp', {list: newArray});
  265 + $('.line-select-body').html(htmlStr)
  266 + .slimscroll({//滚动条
  267 + height: '230px'
  268 + });
  269 +
  270 + //映射
  271 + $.each(allLine, function (s, line) {
  272 + camelChars[pinyin.getCamelChars(line.name)] = line.lineCode;
  273 + fullChars[pinyin.getFullChars(line.name).toUpperCase()] = line.lineCode;
  274 + zhChars[line.name] = line.lineCode;
  275 + lineIdMap[line.lineCode] = line;
  276 +
  277 + lineIds[line.lineCode] = line.name;
  278 + });
  279 + //合并映射
  280 + $.extend(allChars, camelChars, fullChars, zhChars);
  281 +
  282 + //线路选中事件
  283 + $('.line-select-body .line').on('click', function () {
  284 + if ($(this).hasClass('active')) {
  285 + $(this).removeClass('active');
  286 + $('.selected-body .line[name=' + $(this).attr('name') + ']').remove();
  287 + }
  288 + else {
  289 + $(this).addClass('active');
  290 + $('.selected-body').append($(this).clone());
  291 + }
  292 + });
  293 +
  294 + storage.setItem('lineIds', JSON.stringify(lineIds));
  295 + });
  296 +
  297 + $('#searchLineInput').focus();
  298 + });
  299 +
  300 + //搜索框事件
  301 + $('#searchLineInput').on('keyup', filterLines);
  302 +
  303 + $('.line-select .input-icon i').on('click', function () {
  304 + if ($(this).hasClass('fa-plus-circle')) {
  305 + $('#searchLineInput').val('');
  306 + filterLines();
  307 + }
  308 + });
  309 +
  310 + $('.selected-body').on('click', '.line', function () {
  311 + $('.line-select-body .line[name=' + $(this).attr('name') + ']').removeClass('active');
  312 + $(this).remove();
  313 + });
  314 +
  315 + //确定
  316 + $('.gotoControl').on('click', function () {
  317 + var lines = $('.selected-body .line');
  318 + if (lines.length == 0) {
  319 + layer.alert('你还没有选择线路!', {icon: 3});
  320 + return;
  321 + }
  322 +
  323 + showLoad('更新缓存信息...');
  324 + //清理一下localStorage
  325 + /*var rms=[];
  326 + for (var i=0, len = storage.length; i < len; i++){
  327 + var key = storage.key(i);
  328 + if(key=='car2DeviceId' || key.endsWith('_route'))
  329 + rms.push(key);
  330 + }
  331 + $.each(rms, function () {
  332 + storage.removeItem(this);
  333 + });*/
  334 +
  335 + //将选择的线路写入localstorage
  336 + var lsData = [];
  337 + $.each(lines, function (i, e) {
  338 + lsData.push(lineIdMap[$(e).data('id')]);
  339 + });
  340 + storage.setItem('lineControlItems', JSON.stringify(lsData));
  341 +
  342 + //ar operationMode = $(this).data('status');
  343 + //监控模式还是主调模式
  344 + storage.setItem('operationMode', $('.is_main_icheck')[0].checked?1:0);
  345 +
  346 + var ep = new EventProxy();
  347 + //缓存车辆自编号和设备号对照
  348 + //cacheCar2DeviceId(function () {
  349 + delayEmit(ep, 'cacheRoute');
  350 + //});
  351 +
  352 + //缓存线路路由
  353 + ep.tail('cacheRoute', function () {
  354 + cacheRoute(lsData, function (cacheData) {
  355 + delayEmit(ep, 'checkLineConfig');
  356 + });
  357 + });
  358 +
  359 + //检查线路配置信息
  360 + ep.tail('checkLineConfig', function () {
  361 + checkLineConfig(lsData, function (rs) {
  362 + if (rs.status == 0)
  363 + delayEmit(ep, 'gotoControl', rs);
  364 + else if (rs.status == 1)
  365 + delayEmit(ep, 'initLineConfig', rs);
  366 + });
  367 + });
  368 +
  369 + //初始化没有 线路配置信息 的线路
  370 + ep.tail('initLineConfig', function (rs) {
  371 + initLineConfig(rs.not, function () {
  372 + delayEmit(ep, 'gotoControl', rs);
  373 + });
  374 + });
  375 +
  376 + //进入线调
  377 + ep.tail('gotoControl', function () {
  378 + layer.closeAll();
  379 + window.location.href = "/real_control/v2_mobile";//移动端线调
  380 + });
  381 + });
  382 +
  383 + function checkLineConfig(lsData, cb) {
  384 + showLoad('检查线路配置信息...');
  385 + var lineCodeArray = [];
  386 + $.each(lsData, function () {
  387 + lineCodeArray.push(this.lineCode);
  388 + });
  389 +
  390 + $.ajax({
  391 + url: '/lineConfig/check',
  392 + traditional: true,
  393 + data: {codeArray: lineCodeArray},
  394 + method: 'POST',
  395 + success: cb
  396 + });
  397 + }
  398 +
  399 + function initLineConfig(arr, cb) {
  400 + var i = 0;
  401 + (function () {
  402 + if (i >= arr.length) {
  403 + cb && cb();
  404 + return;
  405 + }
  406 + var f = arguments.callee
  407 + , lineCode = arr[i];
  408 +
  409 + showLoad('初始化' + lineIds[lineCode] + '配置信息...');
  410 + $.post('/lineConfig/init/' + lineCode, function (rs) {
  411 + if (rs == 1) {
  412 + i++;
  413 + f();
  414 + }
  415 + });
  416 + })();
  417 + }
  418 +
  419 +/* function cacheCar2DeviceId(cb) {
  420 + //showLoad('缓存基础对照信息...');
  421 + $.get('/gps/Car2DeviceId', function (rs) {
  422 + storage.setItem('car2DeviceId', JSON.stringify(rs));
  423 + cb && cb();
  424 + });
  425 + }*/
  426 +
  427 + function cacheRoute(lsData, cb) {
  428 + //showLoad('缓存线路路由信息...');
  429 + //拼接线路编码
  430 + var idx='';
  431 + $.each(lsData, function () {
  432 + idx+=(this.lineCode + ',');
  433 + });
  434 + idx=idx.substr(0, idx.length - 1);
  435 + $.get('/realMap/findRouteByLine', {idx: idx}, function (rs) {
  436 + if (rs) {
  437 + //cacheData[item.lineCode] = rs;
  438 + for(var lineCode in rs){
  439 + storage.setItem(lineCode + '_route', JSON.stringify(rs[lineCode]));
  440 + }
  441 + cb && cb();
  442 + }
  443 + });
  444 +/* var i = 0, cacheData = {};
  445 + (function () {
  446 + if (i >= lsData.length) {
  447 + //写入localStorage
  448 + for (var lineCode in cacheData)
  449 + storage.setItem(lineCode + '_route', JSON.stringify(cacheData[lineCode]));
  450 +
  451 + cb && cb();
  452 + return;
  453 + }
  454 + var f = arguments.callee
  455 + , item = lsData[i];
  456 +
  457 + $.get('/realMap/findRouteByLine', {lineCode: item.lineCode}, function (rs) {
  458 + //$.get('/realSchedule/findRouteByLine', {lineCode: item.lineCode}, function(rs){
  459 + if (rs && rs.lineId) {
  460 + cacheData[item.lineCode] = rs;
  461 + i++;
  462 + f();
  463 + }
  464 + });
  465 + })();*/
  466 + }
  467 +
  468 + //历史纪录
  469 + $('#historyBtn').on('click', function () {
  470 + var lineControlItems = window.localStorage.getItem('lineControlItems');
  471 + if (!lineControlItems) {
  472 + layer.alert('没有在当前电脑找到历史纪录!', {icon: 3});
  473 + return;
  474 + }
  475 + else {
  476 + var array = JSON.parse(lineControlItems);
  477 + clear();
  478 + $.each(array, function (i, line) {
  479 + $('.line-select-body .line[name=line_' + line.lineCode + ']').click();
  480 + });
  481 + }
  482 + });
  483 +
  484 + //重置
  485 + //$('#resetBtn').on('click', clear);
  486 +
  487 + function clear() {
  488 + $('.line-select-body .line.active').removeClass('active');
  489 + $('.selected-body .line').remove();
  490 +
  491 + $('.line-select .input-icon i.fa-plus-circle').click();
  492 + filterLines();
  493 + }
  494 +
  495 + function filterLines() {
  496 + var t = $('#searchLineInput').val().toUpperCase()
  497 + , es = []
  498 + , bs = $('.line-select-body .line, .line-select-body .company, .line-select-body .sub-company')
  499 + , icon = $('.line-select .input-icon i');
  500 +
  501 + if (!t) {
  502 + bs.show();
  503 + icon.removeClass('fa-plus-circle').addClass('fa-search');
  504 + return;
  505 + }
  506 + else
  507 + icon.removeClass('fa-search').addClass('fa-plus-circle');
  508 +
  509 + for (var c in allChars) {
  510 + if (c.indexOf(t) != -1)
  511 + es.push('.line-select-body .line[name=line_' + allChars[c] + ']');
  512 + }
  513 +
  514 + bs.hide();
  515 + $.each(es, function (i, e) {
  516 + $(e).show();
  517 + });
  518 + }
  519 +
  520 + function groupData(array, g) {
  521 + var groups = {}, key;
  522 +
  523 + $.each(array, function (i, item) {
  524 + key = item[g];
  525 + if (!groups[key])
  526 + groups[key] = [];
  527 +
  528 + groups[key].push(item);
  529 + });
  530 +
  531 + return groups;
  532 + }
  533 +
  534 + function showLoad(text) {
  535 + layer.msg(text, {icon: 16, time: 0, shade: 0.3});
  536 + }
  537 +
  538 + function delayEmit(ep, t, p) {
  539 + setTimeout(function () {
  540 + ep.emit(t, p);
  541 + }, 300);
  542 + }
  543 +
  544 + ///////////////////////是否是移动端打开 start////////////////////////////////////////
  545 + 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))) {
  546 + setTimeout(function(){
  547 + document.getElementById("go_xd_position").click();
  548 + },50)
  549 + $(".lb_panel").find('a')[0].innerText = "进入移动端线调系统";
  550 + }
  551 + ///////////////////////是否是移动端打开 end////////////////////////////////////////
  552 + });
  553 +</script>
0 554 \ No newline at end of file
... ...
src/main/resources/static/pages/control/lineallot_v2/main.html
... ... @@ -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 303 var lineCode = $(this).data('id');
304 304 $('.item[data-id='+lineCode+']','.line_list_all_wrap').removeClass('active');
305 305 $(this).remove();
306   - });
  306 + });*/
307 307  
308 308 /**
309 309 * 搜索线路
... ... @@ -492,9 +492,15 @@
492 492 //进入线调
493 493 var eq = EventProxy.create('cache_route', 'check_line_config', function () {
494 494 var newWinOpen = $('input','.new_window_open_label')[0].checked;
495   - if(!newWinOpen)
  495 + if(!newWinOpen){
496 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 504 window.open("/real_control/v2");
499 505 $('#go_to_real_system_btn').html('已经尝试打开新窗口,如看不到,可能被浏览器阻止了');
500 506 }
... ... @@ -570,6 +576,39 @@
570 576 function show_btn_load(btn, msg) {
571 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 612 </script>
574 613 </body>
575 614 </html>
576 615 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/waybillQp.html
... ... @@ -14,6 +14,9 @@
14 14  
15 15 .table > tbody + tbody {
16 16 border-top: 1px solid; }
  17 + .table {
  18 + width: 90%;
  19 + }
17 20 </style>
18 21  
19 22 <div class="page-head">
... ... @@ -47,7 +50,7 @@
47 50 <div class="portlet-body">
48 51 <div class="row">
49 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 54 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
52 55 <thead>
53 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 */
... ...