Commit d88f216cc3455d9dbaf5d218bb8cfe07b754b8da

Authored by 潘钊
1 parent e968bffb

update

Showing 28 changed files with 1164 additions and 146 deletions
src/main/java/com/bsth/controller/realcontrol/BasicDataController.java
... ... @@ -2,8 +2,13 @@ package com.bsth.controller.realcontrol;
2 2  
3 3 import com.alibaba.fastjson.JSON;
4 4 import com.alibaba.fastjson.serializer.PropertyFilter;
  5 +import com.bsth.common.ResponseCode;
5 6 import com.bsth.data.BasicData;
  7 +import org.slf4j.Logger;
  8 +import org.slf4j.LoggerFactory;
  9 +import org.springframework.beans.factory.annotation.Autowired;
6 10 import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
7 12 import org.springframework.web.bind.annotation.RestController;
8 13  
9 14 import java.util.HashMap;
... ... @@ -14,6 +19,10 @@ import java.util.Map;
14 19 @RequestMapping("/basic")
15 20 public class BasicDataController {
16 21  
  22 + @Autowired
  23 + BasicData.BasicDataLoader dataLoader;
  24 +
  25 + Logger logger = LoggerFactory.getLogger(this.getClass());
17 26  
18 27 @RequestMapping("/cars")
19 28 public Iterable<String> findAllNbbm(Map<String, Object> map){
... ... @@ -53,10 +62,6 @@ public class BasicDataController {
53 62  
54 63 @RequestMapping("/all_personnel")
55 64 public Map<String, String> all_personnel(){
56   - //Map<String, Object> rs = new HashMap<>();
57   - //PersonnelFieldFilter filter=new PersonnelFieldFilter();
58   -
59   - //rs.put("list", JSON.parse(JSON.toJSONString(BasicData.jsyMap.values(), filter)));
60 65 return BasicData.allPerson;
61 66 }
62 67  
... ... @@ -72,6 +77,41 @@ public class BasicDataController {
72 77 }
73 78 return false;
74 79 }
75   -
  80 + }
  81 +
  82 + /**
  83 + * 刷新车辆和设备号对照数据
  84 + * @return
  85 + */
  86 + @RequestMapping(value = "/refresh_nbbm2Device", method = RequestMethod.POST)
  87 + public Map<String, Object> refreshNbbm2DeviceId(){
  88 + Map<String, Object> rs = new HashMap<>();
  89 + try {
  90 + dataLoader.loadDeviceInfo();
  91 + rs.put("status", ResponseCode.SUCCESS);
  92 + }catch (Exception e){
  93 + rs.put("status", ResponseCode.ERROR);
  94 + rs.put("msg", e.getMessage());
  95 + logger.error("", e);
  96 + }
  97 + return rs;
  98 + }
  99 +
  100 + /**
  101 + * 刷新员工对照数据
  102 + * @return
  103 + */
  104 + @RequestMapping(value = "/refresh_person_data", method = RequestMethod.POST)
  105 + public Map<String, Object> refreshPersonData(){
  106 + Map<String, Object> rs = new HashMap<>();
  107 + try {
  108 + dataLoader.loadPersonnelInfo();
  109 + rs.put("status", ResponseCode.SUCCESS);
  110 + }catch (Exception e){
  111 + rs.put("status", ResponseCode.ERROR);
  112 + rs.put("msg", e.getMessage());
  113 + logger.error("", e);
  114 + }
  115 + return rs;
76 116 }
77 117 }
... ...
src/main/java/com/bsth/data/BasicData.java
... ... @@ -309,9 +309,6 @@ public class BasicData implements CommandLineRunner {
309 309 if (StringUtils.isEmpty(jobCode))
310 310 continue;
311 311  
312   - /*if (jobCode.indexOf("-") != -1) {
313   - jobCode = jobCode.split("-")[1];
314   - }*/
315 312 if (p.getPosts() != null) {
316 313 if (p.getPosts().equals("1"))
317 314 jsyTempMap.put(jobCode, p);
... ...
src/main/java/com/bsth/data/gpsdata/arrival/entity/ArrivalInfo.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival.entity;
  2 +
  3 +/**
  4 + * 到离站信息
  5 + * Created by panzhao on 2017/2/20.
  6 + */
  7 +public class ArrivalInfo {
  8 +
  9 + private String lineCode;
  10 +
  11 + private String deviceId;
  12 +
  13 + /** 时间戳 */
  14 + private Long ts;
  15 +
  16 + private String stop;
  17 +
  18 + private Integer upDown;
  19 +
  20 + private int inOut;
  21 +
  22 +
  23 +}
... ...
src/main/java/com/bsth/filter/ResourceFilter.java
1 1 package com.bsth.filter;
2 2  
3   -import java.io.File;
4   -import java.io.IOException;
  3 +import com.bsth.util.RequestUtils;
  4 +import org.apache.commons.lang3.StringUtils;
5 5  
6 6 import javax.servlet.FilterChain;
7 7 import javax.servlet.ServletException;
8 8 import javax.servlet.http.HttpServletRequest;
9 9 import javax.servlet.http.HttpServletResponse;
10   -
11   -import org.apache.commons.lang3.StringUtils;
12   -
13   -import com.bsth.util.RequestUtils;
  10 +import java.io.File;
  11 +import java.io.IOException;
14 12  
15 13 /**
16   - *
  14 + * @author PanZhao
17 15 * @ClassName: ResourceFilter
18 16 * @Description: TODO(HTML片段过滤器)
19   - * @author PanZhao
20 17 * @date 2016年3月19日 下午10:10:11
21   - *
22 18 */
23 19 public class ResourceFilter extends BaseFilter {
24   -
25   - String[] params = new String[]{"no"};
26 20  
27   - @Override
28   - public void doFilter(HttpServletRequest request,
29   - HttpServletResponse response, FilterChain chain)
30   - throws IOException, ServletException {
31   -
32   - String uri = request.getRequestURI();
33   - int len = uri.length();
34   - if (RequestUtils.isAjaxRequest(request) ||
35   - !uri.substring(len - 5, len).equals(".html")) {
36   - super.doFilter(request, response, chain);
37   - } else {
38   -
39   - String fPath = this.getClass().getResource("/").getPath()
40   - + "static/" + uri;
41   -
42   - File f = new File(fPath);
43   -
44   -
45   - if (f.exists() && f.isFile() ){
46   - request.getRequestDispatcher("/?initFragment=" + joinParam(request)).forward(request, response);;
47   - }else
48   - response.sendRedirect("/");
49   - }
50   - }
51   -
52   - /**
53   - * 拼接参数
54   - * @param request
55   - * @return
56   - */
57   - public String joinParam(HttpServletRequest request){
58   -
59   - StringBuilder sb = new StringBuilder();
60   -
61   - String v
62   - ,url = request.getRequestURI();
63   - for(String p : params){
64   - v = request.getParameter(p);
65   - if(!StringUtils.isEmpty(v))
66   - sb.append("&" + p + "=" + v);
67   - }
68   -
69   - if(sb.length() > 0)
70   - url += "?" + sb.substring(1, sb.length());
71   - return url;
72   - }
  21 + String[] params = new String[]{"no"};
  22 +
  23 + @Override
  24 + public void doFilter(HttpServletRequest request,
  25 + HttpServletResponse response, FilterChain chain)
  26 + throws IOException, ServletException {
  27 +
  28 + String uri = request.getRequestURI();
  29 + String origin = request.getParameter("origin");
  30 + int len = uri.length();
  31 + if (RequestUtils.isAjaxRequest(request)
  32 + || (origin != null && origin.equals("real_control_iframe"))//来自线调 iframe 的请求
  33 + || !uri.substring(len - 5, len).equals(".html")) {
  34 + super.doFilter(request, response, chain);
  35 + } else {
  36 +
  37 + String fPath = this.getClass().getResource("/").getPath()
  38 + + "static/" + uri;
  39 +
  40 + File f = new File(fPath);
  41 +
  42 +
  43 + if (f.exists() && f.isFile()) {
  44 + request.getRequestDispatcher("/?initFragment=" + joinParam(request)).forward(request, response);
  45 + ;
  46 + } else
  47 + response.sendRedirect("/");
  48 + }
  49 + }
  50 +
  51 + /**
  52 + * 拼接参数
  53 + *
  54 + * @param request
  55 + * @return
  56 + */
  57 + public String joinParam(HttpServletRequest request) {
  58 +
  59 + StringBuilder sb = new StringBuilder();
  60 +
  61 + String v, url = request.getRequestURI();
  62 + for (String p : params) {
  63 + v = request.getParameter(p);
  64 + if (!StringUtils.isEmpty(v))
  65 + sb.append("&" + p + "=" + v);
  66 + }
  67 +
  68 + if (sb.length() > 0)
  69 + url += "?" + sb.substring(1, sb.length());
  70 + return url;
  71 + }
73 72 }
... ...
src/main/java/com/bsth/security/WebSecurityConfig.java
... ... @@ -54,14 +54,13 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
54 54 //指定登录页
55 55 .loginPage(Constants.LOGIN_PAGE)
56 56 .loginProcessingUrl(Constants.LOGIN).permitAll()
57   - //.failureUrl(Constants.LOGIN_PAGE + "?error=true")登录失败跳转的链接
58   - //.successHandler(loginSuccessHandler())登录成功后处理
59 57 .and().logout()
60   - //.addLogoutHandler(logoutHandler())
61 58 //禁用CXRF
62 59 .and().csrf().disable()
63 60 //禁用匿名用户功能
64   - .anonymous().disable();
  61 + .anonymous().disable()
  62 + //允许同源 iframe
  63 + .headers().frameOptions().sameOrigin().httpStrictTransportSecurity().disable();
65 64  
66 65 // 同时只保持一个回话
67 66 http.sessionManagement().maximumSessions(1)
... ...
src/main/resources/static/assets/img/title-bg.jpg 0 → 100644

44 KB

src/main/resources/static/pages/control/lineallot/allot.html
... ... @@ -337,7 +337,8 @@
337 337 //alert('进入线调');
338 338 layer.closeAll();
339 339 //loadPage('/pages/control/line/index.html');
340   - window.location.href = "/real_control/v2";
  340 + //window.location.href = "/real_control/v2";
  341 + window.open("/real_control/v2");
341 342 });
342 343 });
343 344  
... ...
src/main/resources/static/pages/forms/statement/statisticsDaily.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>统计日报</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block;">
  31 + <span class="item-label" style="width: 80px;">线路: </span>
  32 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 15px;">
  35 + <span class="item-label" style="width: 80px;">时间: </span>
  36 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  37 + </div>
  38 + <div class="form-group">
  39 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  40 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  41 + </div>
  42 + </form>
  43 + </div>
  44 + <div class="portlet-body">
  45 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  46 + <label>早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
  47 + <table class="table table-bordered table-hover table-checkable" id="forms">
  48 + <thead>
  49 + <tr>
  50 + <th colspan="36">线路运营情况统计日报</th>
  51 + </tr>
  52 + <tr>
  53 + <td rowspan="3">路线别</td>
  54 + <td colspan="15">全日营运里程(公里)</td>
  55 + <td colspan="15">全日营运班次</td>
  56 + <td colspan="5">大间隔情况</td>
  57 + </tr>
  58 + <tr>
  59 + <td rowspan="2">计划</td>
  60 + <td rowspan="2">实驶</td>
  61 + <td rowspan="2">少驶</td>
  62 + <td colspan="11">少驶原因(公里)</td>
  63 + <td rowspan="2">临加公里</td>
  64 + <td colspan="3">计划班次</td>
  65 + <td colspan="3">实际班次</td>
  66 + <td colspan="3">临加班次</td>
  67 + <td colspan="3">放站班次</td>
  68 + <td colspan="3">调头班次</td>
  69 + <td colspan="3">发生次数</td>
  70 + <td rowspan="2">最大间隔时间(秒)</td>
  71 + <td rowspan="2">原因</td>
  72 + </tr>
  73 + <tr>
  74 + <td width="31px">路阻</td>
  75 + <td>吊慢</td>
  76 + <td>故障</td>
  77 + <td>纠纷</td>
  78 + <td>肇事</td>
  79 + <td>缺人</td>
  80 + <td>缺车</td>
  81 + <td>客稀</td>
  82 + <td>气候</td>
  83 + <td>援外</td>
  84 + <td>其他</td>
  85 + <td>全日</td>
  86 + <td>早高峰</td>
  87 + <td>晚高峰</td>
  88 + <td>全日</td>
  89 + <td>早高峰</td>
  90 + <td>晚高峰</td>
  91 + <td>全日</td>
  92 + <td>早高峰</td>
  93 + <td>晚高峰</td>
  94 + <td>全日</td>
  95 + <td>早高峰</td>
  96 + <td>晚高峰</td>
  97 + <td>全日</td>
  98 + <td>早高峰</td>
  99 + <td>晚高峰</td>
  100 + <td>全日</td>
  101 + <td>早高峰</td>
  102 + <td>晚高峰</td>
  103 + </tr>
  104 + </thead>
  105 + <tbody class="statisticsDaily">
  106 +
  107 + </tbody>
  108 + </table>
  109 + </div>
  110 + </div>
  111 + </div>
  112 + </div>
  113 +</div>
  114 +
  115 +<script>
  116 + $(function(){
  117 + $('#export').attr('disabled', "true");
  118 +
  119 + // 关闭左侧栏
  120 + if (!$('body').hasClass('page-sidebar-closed'))
  121 + $('.menu-toggler.sidebar-toggler').click();
  122 +
  123 + $("#date").datetimepicker({
  124 + format : 'YYYY-MM-DD',
  125 + locale : 'zh-cn'
  126 + });
  127 + $.get('/basic/lineCode2Name',function(result){
  128 + var data=[];
  129 +
  130 + data.push({id: "", text:"请选择"});
  131 + for(var code in result){
  132 + data.push({id: code, text: result[code]});
  133 + }
  134 + initPinYinSelect2('#line',data,'');
  135 +
  136 + })
  137 +
  138 +
  139 + var line ="";
  140 + var xlName ="";
  141 + var date = "";
  142 + $("#query").on("click",function(){
  143 + line = $("#line").val();
  144 + xlName = $("#select2-line-container").html();
  145 + date = $("#date").val();
  146 + if(line=="请选择"){
  147 + line="";
  148 + }
  149 + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){
  150 + // 把数据填充到模版中
  151 + var tbodyHtml = template('statisticsDaily',{list:result});
  152 + // 把渲染好的模版html文本追加到表格中
  153 + $('#forms .statisticsDaily').html(tbodyHtml);
  154 +
  155 + if(result.length == 0)
  156 + $("#export").attr('disabled',"true");
  157 + else
  158 + $("#export").removeAttr("disabled");
  159 + });
  160 + });
  161 +
  162 + $("#export").on("click",function(){
  163 + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"export"},function(result){
  164 + window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD"));
  165 + });
  166 + });
  167 +
  168 + });
  169 +</script>
  170 +<script type="text/html" id="statisticsDaily">
  171 + {{each list as obj i}}
  172 + <tr>
  173 + <td>{{obj.xlName}}</td>
  174 + <td>{{obj.jhlc}}</td>
  175 + <td>{{obj.sjgl}}</td>
  176 + <td>{{obj.ssgl}}</td>
  177 + <td>{{obj.ssgl_lz}}</td>
  178 + <td>{{obj.ssgl_dm}}</td>
  179 + <td>{{obj.ssgl_gz}}</td>
  180 + <td>{{obj.ssgl_jf}}</td>
  181 + <td>{{obj.ssgl_zs}}</td>
  182 + <td>{{obj.ssgl_qr}}</td>
  183 + <td>{{obj.ssgl_qc}}</td>
  184 + <td>{{obj.ssgl_kx}}</td>
  185 + <td>{{obj.ssgl_qh}}</td>
  186 + <td>{{obj.ssgl_yw}}</td>
  187 + <td>{{obj.ssgl_other}}</td>
  188 + <td>{{obj.ljgl}}</td>
  189 + <td>{{obj.jhbc}}</td>
  190 + <td>{{obj.jhbc_m}}</td>
  191 + <td>{{obj.jhbc_a}}</td>
  192 + <td>{{obj.sjbc}}</td>
  193 + <td>{{obj.sjbc_m}}</td>
  194 + <td>{{obj.sjbc_a}}</td>
  195 + <td>{{obj.ljbc}}</td>
  196 + <td>{{obj.ljbc_m}}</td>
  197 + <td>{{obj.ljbc_a}}</td>
  198 + <td>{{obj.fzbc}}</td>
  199 + <td>{{obj.fzbc_m}}</td>
  200 + <td>{{obj.fzbc_a}}</td>
  201 + <td>{{obj.dtbc}}</td>
  202 + <td>{{obj.dtbc_m}}</td>
  203 + <td>{{obj.dtbc_a}}</td>
  204 + <td>{{obj.djg}}</td>
  205 + <td>{{obj.djg_m}}</td>
  206 + <td>{{obj.djg_a}}</td>
  207 + <td>{{obj.djg_time}}</td>
  208 + <td>&nbsp;</td>
  209 + </tr>
  210 + {{/each}}
  211 + {{if list.length == 0}}
  212 + <tr>
  213 + <td colspan="36"><h6 class="muted">没有找到相关数据</h6></td>
  214 + </tr>
  215 + {{/if}}
  216 +</script>
0 217 \ No newline at end of file
... ...
src/main/resources/static/pages/permission/user/controlAllot.html
... ... @@ -28,8 +28,8 @@
28 28 }
29 29 </style>
30 30  
31   - <h4>
32   - mky001/ 系统管理员
  31 + <h4 class="user-nfo-text">
  32 +
33 33 </h4>
34 34  
35 35 <div style="border: 1px solid #cccbcb;height: 190px;position: relative;">
... ... @@ -77,6 +77,13 @@
77 77 $(wrap).on('init', function (e, id) {
78 78 e.stopPropagation();
79 79 userId = id;
  80 + //用户信息
  81 + $.get('/user', {'id_eq': userId}, function (rs) {
  82 + if(rs.content.length > 0){
  83 + var user = rs.content[0];
  84 + $('.user-nfo-text').text(user.userName + '/' + user.name);
  85 + }
  86 + });
80 87  
81 88 $.get('/line/all', {'destroy_eq': 0}, function (rs) {
82 89 var data = [];
... ...
src/main/resources/static/real_control_v2/css/north.css
... ... @@ -5,7 +5,8 @@
5 5 }
6 6  
7 7 .north.main {
8   - background: linear-gradient(to right, #082F4A, #125688, #0a3f64);
  8 + /*background: linear-gradient(to right, #082F4A, #125688, #0a3f64);*/
  9 + background-image: url('/assets/img/title-bg.jpg');
9 10 }
10 11  
11 12 .north.monitor {
... ... @@ -38,7 +39,7 @@
38 39 }
39 40  
40 41 .north-toolbar {
41   - width: 595px;
  42 + width: 645px;
42 43 position: absolute;
43 44 right: 10px;
44 45 }
... ... @@ -116,6 +117,14 @@
116 117 width: 336px;
117 118 }
118 119  
  120 +.uk-dropdown.dropdown-column-2-lg {
  121 + width: 388px;
  122 +}
  123 +
  124 +.uk-dropdown.dropdown-column-3{
  125 + width: 496px;
  126 +}
  127 +
119 128 #north_toolbar_panel li.event a i {
120 129 margin-right: 4px;
121 130 color: #b4b2b2;
... ...
src/main/resources/static/real_control_v2/electron/imgs/bg1.jpg 0 → 100644

53.6 KB

src/main/resources/static/real_control_v2/electron/imgs/minus.png 0 → 100644

2.74 KB

src/main/resources/static/real_control_v2/electron/imgs/remove.png 0 → 100644

2.86 KB

src/main/resources/static/real_control_v2/electron/login.html
... ... @@ -7,6 +7,10 @@
7 7 <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css"/>
8 8  
9 9 <style type="text/css">
  10 + html,body{
  11 + background: transparent;
  12 + }
  13 +
10 14 body {
11 15 overflow: hidden;
12 16 }
... ... @@ -31,20 +35,54 @@
31 35 }
32 36  
33 37 #loginPanel{
34   - background: linear-gradient(to bottom, #ffffff, #b5c0c7, #3b4044);
  38 + background-image: url(/real_control_v2/electron/imgs/bg1.jpg);
  39 + background-repeat: no-repeat;
  40 + box-shadow: 1px 0px 20px 0 rgb(42, 65, 109), 1px 3px 20px 0 rgb(38, 61, 105);
  41 + background-position: -15px -18px;
  42 + border: 1px solid #4068b0;
  43 + border-radius: 5px;
  44 + }
  45 +
  46 + .top-tools{
  47 + height:35px;
  48 + position: relative;
  49 + }
  50 +
  51 + .icon-span{
  52 + padding: 6px 13px 10px 13px;
  53 + cursor: default;
  54 + -webkit-app-region: no-drag;
  55 + }
  56 +
  57 + .icon-span:hover{
  58 + background: rgba(255, 255, 255, 0.29);
  59 + border-radius: 3px;
35 60 }
36 61  
  62 + .icon-span.close-icon:hover{
  63 + background: rgb(255, 118, 118);
  64 + }
37 65 </style>
38 66 </head>
39 67  
40 68 <body>
41   -<div class="wrapper ng-scope">
  69 +<div class="wrapper ng-scope" style="padding: 10px;">
42 70 <div id="loginPanel" class="dialog dialog-shadow">
  71 + <div class="top-tools" style="-webkit-app-region: drag">
  72 + <div style="position: absolute;right: 5px;top: 5px;">
  73 + <span class="icon-span" id="mnavbarIconBtnMIN">
  74 + <img src="/real_control_v2/electron/imgs/minus.png">
  75 + </span>
  76 + <span class="icon-span close-icon" id="mnavbarIconBtnCLOSE">
  77 + <img src="/real_control_v2/electron/imgs/remove.png">
  78 + </span>
  79 + </div>
  80 + </div>
43 81 <div class="uk-grid">
44 82 <div class="uk-width-5-10">
45 83 </div>
46 84 <div class="uk-width-5-10">
47   - <div class="uk-panel" style="padding: 56px 25px 36px 0;">
  85 + <div class="uk-panel" style="padding: 36px 25px 36px 0;">
48 86 <form class="uk-form">
49 87 <div class="uk-form-row">
50 88 <div class="uk-form-icon">
... ... @@ -59,7 +97,6 @@
59 97 <input class="uk-form-large" name="password" type="password" placeholder="输入密码">
60 98 </div>
61 99 </div>
62   -
63 100 <br>
64 101 <br>
65 102 <div class="uk-form-row">
... ... @@ -83,7 +120,6 @@
83 120 <script src="/real_control_v2/assets/plugins/uikit-2.27.1/uikit.min.js"></script>
84 121 <script src="/assets/plugins/jsencrypt.min.js"></script>
85 122 <script>
86   - //if() process
87 123 if(typeof(process)=='undefined' || !process){
88 124 alert('不支持当前环境!!');
89 125 }
... ... @@ -154,6 +190,14 @@
154 190 return rs.status == 'ERROR' || rs.status == 500;
155 191 }
156 192  
  193 + $('#mnavbarIconBtnMIN').on('click', function () {
  194 + ipcMain.send('webPageLoginWindowMinimize');
  195 + });
  196 +
  197 + $('#mnavbarIconBtnCLOSE').on('click', function () {
  198 + ipcMain.send('webPageLoginWindowClose');
  199 + });
  200 +
157 201 }();
158 202 </script>
159 203 </body>
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/all_devices.html
... ... @@ -104,13 +104,13 @@
104 104 $(modal).on('init', function(e, data) {
105 105 e.stopPropagation();
106 106 //车辆 autocomplete
107   - $.get('/basic/cars', function(rs) {
  107 + $.get('/basic/cars?t='+Math.random(), function(rs) {
108 108 gb_common.carAutocomplete($('.autocomplete-cars', modal), rs);
109 109 });
110 110 //线路 autocomplete
111 111 gb_common.lineAutocomplete($('.autocomplete-line', modal));
112 112 //设备号autocomplete
113   - $.get('/gps/allDevices', function(rs){
  113 + $.get('/gps/allDevices?t='+Math.random(), function(rs){
114 114 var data=[];
115 115 $.each(rs, function(){
116 116 data.push({value: this});
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/cache_data/list.html
... ... @@ -12,8 +12,12 @@
12 12 <td>车辆自编号和设备号对照数据</td>
13 13 <td>
14 14 <div class="uk-button-group" style="margin-top: 2px;">
15   - <button data-type="nbbm2DeviceId" class="uk-button uk-button-primary show-data"><i class="uk-icon-search"></i> 查看</button>
16   - <button class="uk-button"><i class="uk-icon-refresh"></i> 刷新数据</button>
  15 + <button data-type="nbbm2DeviceId" class="uk-button uk-button-primary show-data"><i
  16 + class="uk-icon-search"></i> 查看
  17 + </button>
  18 + <button data-type="nbbm2DeviceId" class="uk-button refresh-data"><i
  19 + class="uk-icon-refresh"></i> 刷新数据
  20 + </button>
17 21 </div>
18 22 </td>
19 23 </tr>
... ... @@ -22,8 +26,12 @@
22 26 <td>人员工号和姓名对照数据</td>
23 27 <td>
24 28 <div class="uk-button-group" style="margin-top: 2px;">
25   - <button data-type="work2Name" class="uk-button uk-button-primary show-data"><i class="uk-icon-search"></i> 查看</button>
26   - <button class="uk-button"><i class="uk-icon-refresh"></i> 刷新数据</button>
  29 + <button data-type="work2Name" class="uk-button uk-button-primary show-data"><i
  30 + class="uk-icon-search"></i> 查看
  31 + </button>
  32 + <button data-type="work2Name" class="uk-button refresh-data"><i class="uk-icon-refresh"></i>
  33 + 刷新数据
  34 + </button>
27 35 </div>
28 36 </td>
29 37 </tr>
... ... @@ -43,15 +51,64 @@
43 51  
44 52 var showDetailData = {
45 53 nbbm2DeviceId: function () {
46   - open_modal('/real_control_v2/fragments/north/nav/cache_data/nbbm_deviceid.html', {}, {bgclose: false, modal: false})
  54 + open_modal('/real_control_v2/fragments/north/nav/cache_data/nbbm_deviceid.html', {}, {
  55 + bgclose: false,
  56 + modal: false
  57 + })
  58 + },
  59 + work2Name: function () {
  60 + open_modal('/real_control_v2/fragments/north/nav/cache_data/person_work_name.html', {}, {
  61 + bgclose: false,
  62 + modal: false
  63 + })
47 64 }
48 65 };
49   -
  66 +
  67 + var refreshCacheData = {
  68 + nbbm2DeviceId: function () {
  69 + gb_common.$post('/basic/refresh_nbbm2Device', {}, function () {
  70 + setTimeout(function () {
  71 + $('button.refresh-data[data-type=nbbm2DeviceId]', modal)
  72 + .removeAttr('disabled')
  73 + .find('i.uk-icon-refresh')
  74 + .removeClass('uk-icon-spin');
  75 +
  76 + notify_succ('刷新车辆设备对照信息成功');
  77 + }, 1200);
  78 + });
  79 + },
  80 + work2Name: function () {
  81 + //刷新服务端缓存
  82 + gb_common.$post('/basic/refresh_person_data', {}, function () {
  83 + //刷新本地缓存
  84 + gb_data_basic.refreshAllPersonnel(function () {
  85 + setTimeout(function () {
  86 + $('button.refresh-data[data-type=work2Name]', modal)
  87 + .removeAttr('disabled')
  88 + .find('i.uk-icon-refresh')
  89 + .removeClass('uk-icon-spin');
  90 +
  91 + notify_succ('刷新人员信息成功');
  92 + }, 1000);
  93 + });
  94 + });
  95 + }
  96 + };
  97 +
  98 + //查看数据
50 99 $('.show-data', modal).on('click', function () {
51 100 var type = $(this).data('type');
52   - if(type)
  101 + if (type)
53 102 showDetailData[type]();
54 103 });
  104 +
  105 + //刷新数据
  106 + $('button.refresh-data', modal).on('click', function () {
  107 + $(this).attr('disabled', 'disabled').find('i.uk-icon-refresh').addClass('uk-icon-spin');
  108 + var type = $(this).data('type');
  109 + if (type)
  110 + refreshCacheData[type]();
  111 + });
55 112 })();
56 113 </script>
57 114 </div>
58 115 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/cache_data/nbbm_deviceid.html
1 1 <div class="uk-modal" id="cache_data_nbbm_deviceid-modal">
2   - <div class="uk-modal-dialog" style="width: 480px;">
  2 + <div class="uk-modal-dialog" style="width: 410px;">
3 3 <a href="" class="uk-modal-close uk-close"></a>
4   - <h3>车辆自编号和设备号对照数据</h3>
5 4 <div>
6   -
7   - <table class="uk-table">
  5 + <form class="uk-form search-form">
  6 + <fieldset>
  7 + <legend>车辆自编号和设备号</legend>
  8 + <div class="uk-form-icon">
  9 + <i class="uk-icon-search"></i>
  10 + <input type="text" name="searchInput" placeholder="自编号/设备号" style="width: 160px">
  11 + </div>
  12 + <button class="uk-button" name="searchBtn">搜索</button>
  13 + <span id="countSpan" style="color: red;font-size: 12px;display: inline-block;vertical-align: bottom;margin-left: 5px;"></span>
  14 + </fieldset>
  15 + </form>
  16 +
  17 + <table class="uk-table" style="width: 94%;margin-left: 3%;">
8 18 <thead>
9 19 <tr>
10 20 <th>自编号</th>
... ... @@ -12,21 +22,90 @@
12 22 </tr>
13 23 </thead>
14 24 <tbody>
15   - <tr>
16   - <td>W2b-023</td>
17   - <td>559L0028</td>
18   - </tr>
19 25 </tbody>
20 26 </table>
21 27  
22 28 </div>
  29 + <div class="uk-modal-footer uk-text-right pagination-wrap">
  30 + </div>
23 31 </div>
24 32  
25 33 <script>
26 34 (function () {
27 35 var modal = '#cache_data_nbbm_deviceid-modal';
  36 + var dataArray;
  37 + var page = 0, pageSize = 12;
  38 +
  39 + jsDuQuery();
  40 +
  41 + $('[name=searchBtn]', modal).on('click', function () {
  42 + page = 0;
  43 + jsDuQuery();
  44 + return false;
  45 + });
  46 +
  47 + function jsDuQuery() {
  48 + $.get('/basic/nbbm2deviceId?t='+Math.random(), function (rs) {
  49 + var t = $('[name=searchInput]', modal).val();
  50 +
  51 + var list = [];
  52 + if (t != "" && $.trim(t).length > 0) {
  53 + //过滤数据
  54 + for (var nbbm in rs) {
  55 + if (nbbm.indexOf(t) != -1 || rs[nbbm].indexOf(t) != -1) {
  56 + list.push({nbbm: nbbm, device: rs[nbbm]});
  57 + }
  58 + }
  59 + }
  60 + else {
  61 + for (var nbbm in rs) {
  62 + list.push({nbbm: nbbm, device: rs[nbbm]});
  63 + }
  64 + }
  65 +
  66 + dataArray = list;
  67 + $('#countSpan', modal).text('合计: ' + dataArray.length);
  68 + //分页
  69 + pagination();
  70 + renderTBody();
  71 + });
  72 + }
  73 +
  74 + function pagination() {
  75 + var len = dataArray.length;
  76 + var max = len % pageSize == 0 ? len / pageSize : parseInt(len / pageSize) + 1;
  77 +
  78 + var wrap = $('.pagination-wrap', modal).empty()
  79 + , e = $('<ul class="uk-pagination"></ul>').appendTo(wrap);
  80 +
  81 + var pagination = UIkit.pagination(e, {
  82 + pages: max,
  83 + currentPage: 0
  84 + });
  85 +
  86 + e.on('select.uk.pagination', function (e, pageIndex) {
  87 + page = pageIndex;
  88 + renderTBody();
  89 + });
  90 + }
  91 +
  92 + function renderTBody() {
  93 + var len = dataArray.length;
  94 + var s = page * pageSize
  95 + , e = s + pageSize > len ? len : s + pageSize;
  96 +
  97 + var list = dataArray.slice(s, e);
28 98  
  99 + var htmlStr = '';
  100 + $.each(list, function () {
  101 + htmlStr += '<tr>' +
  102 + '<td>' + this.nbbm + '</td>' +
  103 + '<td>' + this.device + '</td>' +
  104 + '</tr>';
  105 + });
29 106  
  107 + $('table tbody', modal).html(htmlStr);
  108 + }
30 109 })();
31 110 </script>
32 111 </div>
33 112 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/cache_data/person_work_name.html 0 → 100644
  1 +<div class="uk-modal" id="person_work_name-modal">
  2 + <div class="uk-modal-dialog" style="width: 410px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div>
  5 + <form class="uk-form search-form">
  6 + <fieldset>
  7 + <legend>人员</legend>
  8 + <div class="uk-form-icon">
  9 + <i class="uk-icon-search"></i>
  10 + <input type="text" name="searchInput" placeholder="员工号/姓名" style="width: 160px">
  11 + </div>
  12 + <button class="uk-button" name="searchBtn">搜索</button>
  13 + <span id="countSpan"
  14 + style="color: red;font-size: 12px;display: inline-block;vertical-align: bottom;margin-left: 5px;"></span>
  15 + </fieldset>
  16 + </form>
  17 +
  18 + <table class="uk-table">
  19 + <thead>
  20 + <tr>
  21 + <th>工号/姓名</th>
  22 + <th>全拼</th>
  23 + <th>简拼</th>
  24 + </tr>
  25 + </thead>
  26 + <tbody>
  27 + </tbody>
  28 + </table>
  29 +
  30 + </div>
  31 + <div class="uk-modal-footer uk-text-right pagination-wrap">
  32 + </div>
  33 + </div>
  34 +
  35 + <script>
  36 + (function () {
  37 + var modal = '#person_work_name-modal';
  38 + var dataArray;
  39 + var page = 0, pageSize = 12;
  40 +
  41 + jsDuQuery();
  42 +
  43 + $('[name=searchBtn]', modal).on('click', function () {
  44 + page = 0;
  45 + jsDuQuery();
  46 + return false;
  47 + });
  48 +
  49 + function jsDuQuery() {
  50 + var list = [], all = gb_data_basic.allPersonnel();
  51 +
  52 + var t = $('[name=searchInput]', modal).val();
  53 + if (t != "" && $.trim(t).length > 0) {
  54 + t = t.toUpperCase();
  55 + //过滤数据
  56 + $.each(all, function () {
  57 + if (this.value.indexOf(t) != -1
  58 + || this.camelChars.indexOf(t) != -1
  59 + || this.fullChars.indexOf(t) != -1) {
  60 + list.push(this);
  61 + }
  62 + });
  63 + }
  64 + else {
  65 + list = all;
  66 + }
  67 +
  68 + dataArray = list;
  69 + $('#countSpan', modal).text('合计: ' + dataArray.length);
  70 + //分页
  71 + pagination();
  72 + renderTBody();
  73 + }
  74 +
  75 + function pagination() {
  76 + var len = dataArray.length;
  77 + var max = len % pageSize == 0 ? len / pageSize : parseInt(len / pageSize) + 1;
  78 +
  79 + var wrap = $('.pagination-wrap', modal).empty()
  80 + , e = $('<ul class="uk-pagination"></ul>').appendTo(wrap);
  81 +
  82 + var pagination = UIkit.pagination(e, {
  83 + pages: max,
  84 + currentPage: 0
  85 + });
  86 +
  87 + e.on('select.uk.pagination', function (e, pageIndex) {
  88 + page = pageIndex;
  89 + renderTBody();
  90 + });
  91 + }
  92 +
  93 + function renderTBody() {
  94 + var len = dataArray.length;
  95 + var s = page * pageSize
  96 + , e = s + pageSize > len ? len : s + pageSize;
  97 +
  98 + var list = dataArray.slice(s, e);
  99 +
  100 + var htmlStr = '';
  101 + $.each(list, function () {
  102 + htmlStr += '<tr>' +
  103 + '<td>' + this.value + '</td>' +
  104 + '<td>' + this.fullChars.toLocaleLowerCase() + '</td>' +
  105 + '<td>' + this.camelChars.toLocaleLowerCase() + '</td>' +
  106 + '</tr>';
  107 + });
  108 +
  109 + $('table tbody', modal).html(htmlStr);
  110 + }
  111 + })();
  112 + </script>
  113 +</div>
0 114 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/toolbar.html
... ... @@ -3,7 +3,7 @@
3 3 <div class="uk-margin" id="north_toolbar_panel">
4 4 <nav class="uk-navbar">
5 5 <a class="uk-navbar-brand" >
6   - <span><i class="uk-icon-user"></i> <span id="north_toolbar_user">{{user.userName}}</span>,在线</span><i class="uk-icon-ellipsis-v"></i>
  6 + <span><i class="uk-icon-user"></i> <span id="north_toolbar_user">{{user.userName}}</span></span><i class="uk-icon-ellipsis-v"></i>
7 7 </a>
8 8 <ul class="uk-navbar-nav">
9 9 {{each list as obj i}}
... ... @@ -55,7 +55,7 @@
55 55 </li>
56 56 {{/each}}
57 57 </ul>
58   - <div class="uk-navbar-content uk-navbar-flip uk-hidden-small">
  58 + <div class="uk-navbar-content uk-navbar-flip uk-hidden-small" style="padding-left: 0;">
59 59 <div class="uk-button-group">
60 60 <button class="uk-button uk-button-danger exit-system">退出线调</button>
61 61 </div>
... ...
src/main/resources/static/real_control_v2/js/common.js
... ... @@ -268,23 +268,6 @@ var gb_common = (function () {
268 268 });
269 269 };
270 270  
271   - // function whichTransitionEvent() {
272   - // var t;
273   - // var el = document.createElement('fakeelement');
274   - // var transitions = {
275   - // 'transition': 'transitionend',
276   - // 'OTransition': 'oTransitionEnd',
277   - // 'MozTransition': 'transitionend',
278   - // 'WebkitTransition': 'webkitTransitionEnd',
279   - // 'MsTransition': 'msTransitionEnd'
280   - // }
281   - // for (t in transitions) {
282   - // if (el.style[t] !== undefined) {
283   - // return transitions[t];
284   - // }
285   - // }
286   - // }
287   -
288 271 var accAdd = function (a, b) {
289 272 var c, d, e;
290 273 try {
... ...
src/main/resources/static/real_control_v2/js/data/data_basic.js
... ... @@ -51,21 +51,24 @@ var gb_data_basic = (function () {
51 51 });
52 52  
53 53 //人员信息
54   - $.get('/basic/all_personnel', function (rs) {
55   - //转换成自动补全组件需要的数据
56   - var data = [], name;
57   - for (var jobCode in rs) {
58   - name = rs[jobCode];
59   - /*if(jobCode.indexOf("-")!=-1)
60   - jobCode=jobCode.split('-')[1];*/
61   - data.push({
62   - value: jobCode + '/' + name,
63   - fullChars: pinyin.getFullChars(name).toUpperCase(),
64   - camelChars: pinyin.getCamelChars(name)
65   - });
66   - }
  54 + loadAllPersonnel(function (data) {
67 55 ep.emit('all_personnel', data);
68 56 });
  57 + function loadAllPersonnel(cb) {
  58 + $.get('/basic/all_personnel', function (rs) {
  59 + //转换成自动补全组件需要的数据
  60 + var data = [], name;
  61 + for (var jobCode in rs) {
  62 + name = rs[jobCode];
  63 + data.push({
  64 + value: jobCode + '/' + name,
  65 + fullChars: pinyin.getFullChars(name).toUpperCase(),
  66 + camelChars: pinyin.getCamelChars(name)
  67 + });
  68 + }
  69 + cb && cb(data);
  70 + });
  71 + }
69 72  
70 73 var carparks = {};
71 74 //停车场数据
... ... @@ -163,22 +166,29 @@ var gb_data_basic = (function () {
163 166 var data = gb_common.groupBy(stationRoutes[lineCode], 'directions');
164 167 //如果上行起终点距离50米内 并且下行只有2个站点
165 168 var len = data[0].length;
166   - if(len > 0 && data[1].length == 2){
  169 + if (len > 0 && data[1].length == 2) {
167 170 var first = data[0][0],
168 171 end = data[0][len - 1];
169 172  
170 173 /*if(first.stationName != end.stationName)
171   - return false;*/
  174 + return false;*/
172 175  
173 176 var fPoint = {latitude: first.station.gLaty, longitude: first.station.gLonx}
174   - ,ePoint = {latitude: end.station.gLaty, longitude: end.station.gLonx};
  177 + , ePoint = {latitude: end.station.gLaty, longitude: end.station.gLonx};
175 178  
176   - if(geolib.getDistance(fPoint, ePoint) < 40){
  179 + if (geolib.getDistance(fPoint, ePoint) < 40) {
177 180 return true;
178 181 }
179 182 }
180 183  
181 184 return false;
  185 + },
  186 + //刷新员工信息
  187 + refreshAllPersonnel: function (cb) {
  188 + loadAllPersonnel(function (data) {
  189 + allPersonnel = data;
  190 + cb && cb();
  191 + });
182 192 }
183 193 };
184 194 })();
... ...
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
... ... @@ -8,55 +8,55 @@
8 8 "grid": [
9 9 [
10 10 {
11   - "id": 1.12,
  11 + "id": 1.1,
12 12 "text": "数据管理",
13 13 "header": 1
14 14 },
15 15 {
16   - "id": 1.52,
  16 + "id": 1.2,
17 17 "text": "历史班次维护",
18 18 "event": "history_sch_maintain"
19 19 },
20 20 {
21   - "id": 1.53,
  21 + "id": 1.3,
22 22 "text": "缓存数据管理",
23 23 "event": "cache_data_manage"
24 24 }
25 25 ],
26 26 [
27 27 {
28   - "id": 1.1,
  28 + "id": 2.1,
29 29 "text": "统计分析",
30 30 "header": 1
31 31 },
32 32 {
33   - "id": 1.2,
  33 + "id": 2.2,
34 34 "text": "出车率",
35 35 "event": "turnout_rate",
36 36 "icon": "uk-icon-pie-chart"
37 37 },
38 38 {
39   - "id": 1.3,
  39 + "id": 2.3,
40 40 "text": "设备上线率",
41 41 "event": "device_online_rate",
42 42 "icon": "uk-icon-pie-chart"
43 43 },
44 44 {
45   - "id": 1.4,
  45 + "id": 2.4,
46 46 "divider": true
47 47 },
48 48 {
49   - "id": 1.6,
  49 + "id": 2.5,
50 50 "text": "线路首末班准点率",
51 51 "event": "s_e_punctuality_rate_line",
52 52 "icon": "uk-icon-pie-chart"
53 53 },
54 54 {
55   - "id": 1.8,
  55 + "id": 2.6,
56 56 "divider": true
57 57 },
58 58 {
59   - "id": 1.9,
  59 + "id": 2.7,
60 60 "text": "班次执行率",
61 61 "event": "sch_exec_rate",
62 62 "icon": "uk-icon-pie-chart"
... ... @@ -65,6 +65,185 @@
65 65 ]
66 66 },
67 67 {
  68 + "id": 1,
  69 + "text": "报表管理",
  70 + "clazz": "dropdown-column-2-lg",
  71 + "columns": true,
  72 + "cls_class": "uk-width-1-2",
  73 + "grid": [
  74 + [
  75 + {
  76 + "id": 2.1,
  77 + "text": "报表管理",
  78 + "header": 1
  79 + },
  80 + {
  81 + "id": 4.5,
  82 + "text": "月存油报表",
  83 + "event": "form_oilListMonth",
  84 + "icon": "uk-icon-table"
  85 + },
  86 + {
  87 + "id": 4.6,
  88 + "text": "时刻表分析",
  89 + "event": "form_scheduleAnaly",
  90 + "icon": "uk-icon-table"
  91 + },
  92 + {
  93 + "id": 4.7,
  94 + "text": "调度消息分析",
  95 + "event": "form_message",
  96 + "icon": "uk-icon-table"
  97 + },
  98 + {
  99 + "id": 4.8,
  100 + "text": "指令状态分析",
  101 + "event": "form_commandState",
  102 + "icon": "uk-icon-table"
  103 + },
  104 + {
  105 + "id": 4.9,
  106 + "text": "线路首末班查询",
  107 + "event": "form_firstAndLastBus",
  108 + "icon": "uk-icon-table"
  109 + },
  110 + {
  111 + "id": 5.0,
  112 + "text": "路单数据",
  113 + "event": "form_singledata",
  114 + "icon": "uk-icon-table"
  115 + },
  116 + {
  117 + "id": 5.1,
  118 + "text": "车辆加注",
  119 + "event": "form_vehicleloading",
  120 + "icon": "uk-icon-table"
  121 + },
  122 + {
  123 + "id": 5.2,
  124 + "text": "运营服务阶段报表",
  125 + "event": "form_operationservice",
  126 + "icon": "uk-icon-table"
  127 + },
  128 + {
  129 + "id": 5.3,
  130 + "text": "线路客流量报表",
  131 + "event": "form_linepassengerflow",
  132 + "icon": "uk-icon-table"
  133 + },
  134 + {
  135 + "id": 5.4,
  136 + "text": "换人换车情况统计表",
  137 + "event": "form_changetochange",
  138 + "icon": "uk-icon-table"
  139 + },
  140 + {
  141 + "id": 5.5,
  142 + "text": "营运线路出车率统计表",
  143 + "event": "form_turnoutrate",
  144 + "icon": "uk-icon-table"
  145 + },
  146 + {
  147 + "id": 5.6,
  148 + "text": "班次执行率统计表",
  149 + "event": "form_executionrate",
  150 + "icon": "uk-icon-table"
  151 + },
  152 + {
  153 + "id": 5.6,
  154 + "text": "营运线路名称统计表",
  155 + "event": "form_allline",
  156 + "icon": "uk-icon-table"
  157 + }
  158 + ],
  159 + [
  160 + {
  161 + "id": 3.1,
  162 + "text": "报表管理",
  163 + "header": 1
  164 + },
  165 + {
  166 + "id": 3.2,
  167 + "text": "行车路单",
  168 + "event": "form_waybill",
  169 + "icon": "uk-icon-table"
  170 + },
  171 + {
  172 + "id": 3.3,
  173 + "text": "调度历史消息",
  174 + "event": "form_history_message",
  175 + "icon": "uk-icon-table"
  176 + },
  177 + {
  178 + "id": 3.4,
  179 + "text": "驾驶员请求台账",
  180 + "event": "form_account",
  181 + "icon": "uk-icon-table"
  182 + },
  183 + {
  184 + "id": 3.5,
  185 + "text": "班次日报表",
  186 + "event": "form_daily",
  187 + "icon": "uk-icon-table"
  188 + },
  189 + {
  190 + "id": 3.6,
  191 + "text": "修正报表",
  192 + "event": "form_correctForm",
  193 + "icon": "uk-icon-table"
  194 + },
  195 + {
  196 + "id": 3.7,
  197 + "text": "统计日报",
  198 + "event": "form_statisticsDaily",
  199 + "icon": "uk-icon-table"
  200 + },
  201 + {
  202 + "id": 3.8,
  203 + "text": "调度日报",
  204 + "event": "form_scheduleDaily",
  205 + "icon": "uk-icon-table"
  206 + },
  207 + {
  208 + "id": 3.9,
  209 + "text": "行车路单日报表",
  210 + "event": "form_waybillday",
  211 + "icon": "uk-icon-table"
  212 + },
  213 + {
  214 + "id": 4.0,
  215 + "text": "班次到离站",
  216 + "event": "form_inoutstation",
  217 + "icon": "uk-icon-table"
  218 + },
  219 + {
  220 + "id": 4.1,
  221 + "text": "班次车辆人员日报表",
  222 + "event": "form_shifday",
  223 + "icon": "uk-icon-table"
  224 + },
  225 + {
  226 + "id": 4.2,
  227 + "text": "班次车辆人员月报表",
  228 + "event": "form_shiftuehiclemanth",
  229 + "icon": "uk-icon-table"
  230 + },
  231 + {
  232 + "id": 4.3,
  233 + "text": "营运服务日报表",
  234 + "event": "form_workDaily",
  235 + "icon": "uk-icon-table"
  236 + },
  237 + {
  238 + "id": 4.4,
  239 + "text": "计划车辆班次人员",
  240 + "event": "form_peopleCarPlan",
  241 + "icon": "uk-icon-table"
  242 + }
  243 + ]
  244 + ]
  245 + },
  246 + {
68 247 "id": 2,
69 248 "text": "车载设备",
70 249 "children": [
... ... @@ -98,8 +277,8 @@
98 277 "id": 3.1,
99 278 "text": "线路配置",
100 279 "event": "line_config"
101   - }
102   - ,{
  280 + },
  281 + {
103 282 "id": 3.2,
104 283 "text": "TTS",
105 284 "event": "tts_config"
... ...
src/main/resources/static/real_control_v2/js/forms/form_embed.js 0 → 100644
  1 +/**
  2 + * 嵌入表单片段 处理模块
  3 + *
  4 + */
  5 +
  6 +var gb_embed_form_hanlde = (function () {
  7 +
  8 +
  9 + var temps;
  10 + $.get('/real_control_v2/js/forms/temps.html', function (dom) {
  11 + temps = gb_common.compileTempByDom(dom, {escape: false});
  12 + });
  13 +
  14 + //setTimeout(loadPlugins, 5000);
  15 +
  16 + return {
  17 + temps: function () {
  18 + return temps;
  19 + }
  20 + }
  21 +})();
  22 +
  23 +/**
  24 + * 打开表单片段
  25 + * @param pageUrl
  26 + */
  27 +var open_modal_form_fragment = function (pageUrl, title) {
  28 + //将片段路径写入 localStorage
  29 + window.localStorage.setItem('real_control_form_embed_pageUrl', pageUrl);
  30 + //包裹页面
  31 + var wrapUrl = '/real_control_v2/js/forms/wrap.html?origin=real_control_iframe';
  32 + //modal ID
  33 + var id = '#formFragmentModal';
  34 +
  35 + var htmlStr = gb_embed_form_hanlde.temps()['forms-embed-modal-temp']({pageUrl: wrapUrl, title: title});
  36 + $(document.body).append(htmlStr);
  37 + UIkit.modal(id, {bgclose: false}).show();
  38 +};
  39 +
  40 +
  41 +/*function setIframeHeight(iframe) {
  42 + setTimeout(function () {
  43 + if (iframe) {
  44 + var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
  45 + if (iframeWin.document.body) {
  46 + iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
  47 + }
  48 + }
  49 + }, 800);
  50 +};*/
... ...
src/main/resources/static/real_control_v2/js/forms/temps.html 0 → 100644
  1 +<div>
  2 + <script id="forms-embed-modal-temp" type="text/html">
  3 + <div class="uk-modal" id="formFragmentModal">
  4 + <div class="uk-modal-dialog" style="width: 95%;">
  5 + <a href="" class="uk-modal-close uk-close"></a>
  6 + <div class="uk-modal-header">
  7 + <h2>{{title}}</h2></div>
  8 + <iframe style="min-height: 329px;" scrolling="no" frameborder="0" src="{{pageUrl}}" width="100%" height="100%" id="formFragmentModalIframe">
  9 + </iframe>
  10 + </div>
  11 + </div>
  12 + </script>
  13 +</div>
... ...
src/main/resources/static/real_control_v2/js/forms/wrap.html 0 → 100644
  1 +<html>
  2 +<head>
  3 + <!-- Bootstrap style -->
  4 + <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
  5 + <!-- METRONIC style -->
  6 + <link href="/metronic_v4.5.4/layout4/css/themes/light.min.css" rel="stylesheet" type="text/css" id="style_color"/>
  7 + <link href="/metronic_v4.5.4/css/components.css" rel="stylesheet" type="text/css"/>
  8 + <link href="/metronic_v4.5.4/css/plugins.css" rel="stylesheet" type="text/css"/>
  9 + <link href="/metronic_v4.5.4/layout4/css/layout.min.css" rel="stylesheet" type="text/css"/>
  10 + <!-- select2 下拉框插件 -->
  11 + <link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css"/>
  12 + <link href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css"/>
  13 + <!-- iCheck 单选框和复选框 -->
  14 + <link href="/metronic_v4.5.4/plugins/icheck/skins/all.css" rel="stylesheet" type="text/css"/>
  15 + <!-- 日期控件 -->
  16 + <link href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css"
  17 + rel="stylesheet" type="text/css"/>
  18 +
  19 +
  20 + <!-- jQuery -->
  21 + <script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
  22 + <script src="/assets/plugins/pinyin.js"></script>
  23 + <!-- select2 下拉框 -->
  24 + <script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>
  25 + <!-- moment.js 日期处理类库 -->
  26 + <script src="/assets/plugins/moment-with-locales.js"></script>
  27 + <!-- 日期控件 -->
  28 + <script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
  29 + <!-- art-template 模版引擎 -->
  30 + <script src="/assets/plugins/template.js"></script>
  31 + <script src="/pages/forms/statement/js/jquery.PrintArea.js"></script>
  32 +
  33 + <style>
  34 + body{
  35 + background: #fff;
  36 + }
  37 + .form-page-content>.page-head{
  38 + display: none !important;
  39 + }
  40 +
  41 + .form-page-content .portlet{
  42 + margin-bottom: 0px !important;
  43 + }
  44 + </style>
  45 +</head>
  46 +<body>
  47 +
  48 +<div class="form-page-content">
  49 +</div>
  50 +
  51 +<script>
  52 + (function () {
  53 + var storage = window.localStorage;
  54 + var key = 'real_control_form_embed_pageUrl';
  55 + //加载表单片段
  56 + var pageUrl = storage.getItem(key);
  57 + if (!pageUrl) {
  58 + alert('失败,缺少片段路径!');
  59 + return;
  60 + }
  61 + storage.removeItem(key);
  62 + $('.form-page-content').load(pageUrl);
  63 +
  64 + //iframe 自适应高度
  65 + var iframeHeight;
  66 + var ifm = top.document.getElementById("formFragmentModalIframe");
  67 +
  68 + function changeFrameHeight() {
  69 + iframeHeight = $('.form-page-content').height()
  70 + ifm.height = iframeHeight + 'px';
  71 + }
  72 +
  73 + document.body.onload = function () {
  74 + setTimeout(changeFrameHeight, 500);
  75 + };
  76 + //定时重置iframe高度,在片段内容不可控的情况下。 这是目前能想到的最好办法了
  77 + window.setInterval(function () {
  78 + var h = $('.form-page-content').height();
  79 + if (iframeHeight != h)
  80 + ifm.height = h + 'px';
  81 + }, 800);
  82 +
  83 + })();
  84 +
  85 + function initPinYinSelect2(selector, data, cb) {
  86 +
  87 + $.each(data, function () {
  88 + this.fullChars = pinyin.getFullChars(this.text).toUpperCase();
  89 + this.camelChars = pinyin.getCamelChars(this.text);
  90 + });
  91 +
  92 + $.fn.select2.amd.require(['select2/compat/matcher'], function (oldMatcher) {
  93 + $(selector).select2({
  94 + data: data,
  95 + matcher: oldMatcher(function (term, text, item) {
  96 + if (!item.id)
  97 + return;
  98 + var upTerm = term.toUpperCase();
  99 + if (item.fullChars.indexOf(upTerm) != -1
  100 + || item.camelChars.indexOf(upTerm) != -1)
  101 + return true;
  102 +
  103 + return text.indexOf(term) != -1;
  104 + })
  105 + });
  106 +
  107 + cb && cb($(selector));
  108 + });
  109 +
  110 + return $(selector);
  111 + }
  112 +
  113 + var $get = top.gb_common.$get;
  114 + var $post = top.gb_common.$post;
  115 +</script>
  116 +</body>
  117 +</html>
0 118 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
... ... @@ -169,7 +169,8 @@ var gb_schedule_context_menu = (function () {
169 169 },
170 170 'sep3': '---------',
171 171 'lp_change': {
172   - name: '路牌对调'
  172 + name: '路牌对调',
  173 + disabled: true
173 174 }
174 175 }
175 176 });
... ...
src/main/resources/static/real_control_v2/js/north/toolbar.js
... ... @@ -98,6 +98,84 @@ var gb_northToolbar = (function () {
98 98 },
99 99 cache_data_manage: function () {
100 100 open_modal('/real_control_v2/fragments/north/nav/cache_data/list.html', {}, modal_opts);
  101 + },
  102 + form_waybill: function () {
  103 + open_modal_form_fragment('/pages/forms/statement/waybill.html', '行车路单');
  104 + },
  105 + form_history_message: function () {
  106 + open_modal_form_fragment('/pages/forms/statement/historyMessage.html', '调度历史消息');
  107 + },
  108 + form_account: function () {
  109 + open_modal_form_fragment('/pages/forms/statement/account.html', '驾驶员请求台账');
  110 + },
  111 + form_daily: function () {
  112 + open_modal_form_fragment('/pages/forms/statement/daily.html', '班次日报表');
  113 + },
  114 + form_correctForm: function () {
  115 + open_modal_form_fragment('/pages/forms/statement/correctForm.html', '修正报表');
  116 + },
  117 + form_statisticsDaily: function () {
  118 + open_modal_form_fragment('/pages/forms/statement/statisticsDaily.html', '统计日报');
  119 + },
  120 + form_scheduleDaily: function () {
  121 + open_modal_form_fragment('/pages/forms/statement/scheduleDaily.html', '调度日报');
  122 + },
  123 + form_waybillday: function () {
  124 + open_modal_form_fragment('/pages/forms/statement/waybillday.html', '行车路单日报表');
  125 + },
  126 + form_inoutstation: function () {
  127 + open_modal_form_fragment('/pages/report/inoutstation.html', '班次到离站');
  128 + },
  129 + form_shifday: function () {
  130 + open_modal_form_fragment('/pages/mforms/shifdays/shifday.html', '班次车辆人员日报表');
  131 + },
  132 + form_shiftuehiclemanth: function () {
  133 + open_modal_form_fragment('/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html', '班次车辆人员月报表');
  134 + },
  135 + form_workDaily: function () {
  136 + open_modal_form_fragment('/pages/forms/statement/workDaily.html', '营运服务日报表');
  137 + },
  138 + form_peopleCarPlan: function () {
  139 + open_modal_form_fragment('/pages/forms/statement/peopleCarPlan.html', '计划车辆班次人员');
  140 + },
  141 + form_oilListMonth: function () {
  142 + open_modal_form_fragment('/pages/report/oil/oilListMonth.html', '月存油报表');
  143 + },
  144 + form_scheduleAnaly: function () {
  145 + open_modal_form_fragment('/pages/forms/statement/scheduleAnaly.html', '时刻表分析');
  146 + },
  147 + form_message: function () {
  148 + open_modal_form_fragment('/pages/report/message/message.html', '调度消息分析');
  149 + },
  150 + form_commandState: function () {
  151 + open_modal_form_fragment('/pages/forms/statement/commandState.html', '指令状态分析');
  152 + },
  153 + form_firstAndLastBus: function () {
  154 + open_modal_form_fragment('/pages/forms/statement/firstAndLastBus.html', '线路首末班查询');
  155 + },
  156 + form_singledata: function () {
  157 + open_modal_form_fragment('/pages/mforms/singledatas/singledata.html', '路单数据');
  158 + },
  159 + form_vehicleloading: function () {
  160 + open_modal_form_fragment('/pages/mforms/vehicleloadings/vehicleloading.html', '车辆加注');
  161 + },
  162 + form_operationservice: function () {
  163 + open_modal_form_fragment('/pages/mforms/operationservices/operationservice.html', '运营服务阶段报表');
  164 + },
  165 + form_linepassengerflow: function () {
  166 + open_modal_form_fragment('/pages/mforms/linepassengerflows/linepassengerflow.html', '线路客流量报表');
  167 + },
  168 + form_changetochange: function () {
  169 + open_modal_form_fragment('/pages/mforms/changetochanges/changetochange.html', '换人换车情况统计表');
  170 + },
  171 + form_turnoutrate: function () {
  172 + open_modal_form_fragment('/pages/mforms/changetochanges/turnoutrate.html', '营运线路出车率统计表');
  173 + },
  174 + form_executionrate: function () {
  175 + open_modal_form_fragment('/pages/mforms/executionrates/executionrate.html', '班次执行率统计表');
  176 + },
  177 + form_allline: function () {
  178 + open_modal_form_fragment('/pages/mforms/alllines/allline.html', '营运线路名称统计表');
101 179 }
102 180 };
103 181  
... ...
src/main/resources/static/real_control_v2/main.html
... ... @@ -31,8 +31,8 @@
31 31 <link rel="stylesheet" href="/real_control_v2/assets/plugins/jstree/default/style.min.css"/>
32 32 <!-- tooltip css-->
33 33 <link rel="stylesheet" href="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.css"/>
34   -
35 34 <link rel="stylesheet" href="/real_control_v2/css/pace.css"/>
  35 +
36 36 </head>
37 37  
38 38 <body>
... ... @@ -178,6 +178,9 @@
178 178  
179 179 <script src="/real_control_v2/js/signal_state/signal_state.js"></script>
180 180 <script src="/real_control_v2/js/utils/dispatch_pattern.js"></script>
  181 +
  182 +<!-- 处理表单片段嵌入问题 -->
  183 +<script src="/real_control_v2/js/forms/form_embed.js"></script>
181 184 </body>
182 185  
183 186 </html>
... ...