Commit cfef8d72d5e378ca4f3498996b3f5136e1082a6c

Authored by 潘钊
1 parent a74f9f1b

懒得写备注

src/main/java/com/bsth/controller/UserController.java
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController; @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
14 import org.springframework.web.servlet.ModelAndView; 14 import org.springframework.web.servlet.ModelAndView;
15 15
16 import com.bsth.entity.sys.SysUser; 16 import com.bsth.entity.sys.SysUser;
  17 +import com.bsth.security.util.SecurityUtils;
17 18
18 @RestController 19 @RestController
19 @RequestMapping("user") 20 @RequestMapping("user")
@@ -58,4 +59,9 @@ public class UserController extends BaseController<SysUser, Integer>{ @@ -58,4 +59,9 @@ public class UserController extends BaseController<SysUser, Integer>{
58 } 59 }
59 return new ModelAndView("/"); 60 return new ModelAndView("/");
60 } 61 }
  62 +
  63 + @RequestMapping("/currentUser")
  64 + public SysUser currentUser(){
  65 + return SecurityUtils.getCurrentUser();
  66 + }
61 } 67 }
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -186,6 +186,18 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -186,6 +186,18 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
186 186
187 /** 187 /**
188 * 188 *
  189 + * @Title: schInfoFineTune
  190 + * @Description: TODO(发车信息微调)
  191 + * @param @param map
  192 + * @throws
  193 + */
  194 + @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST)
  195 + public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){
  196 + return scheduleRealInfoService.schInfoFineTune(map);
  197 + }
  198 +
  199 + /**
  200 + *
189 * @Title: trustStatus @Description: TODO(线路托管状态) @param @param lineCodes 201 * @Title: trustStatus @Description: TODO(线路托管状态) @param @param lineCodes
190 * 线路编码 @throws 202 * 线路编码 @throws
191 */ 203 */
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -544,4 +544,49 @@ public class ScheduleRealInfo { @@ -544,4 +544,49 @@ public class ScheduleRealInfo {
544 this.sflj = sflj; 544 this.sflj = sflj;
545 } 545 }
546 546
  547 + /**
  548 + *
  549 + * @Title: setFcsjAll
  550 + * @Description: TODO(设置计划发车时间)
  551 + * @throws
  552 + */
  553 + public void setFcsjAll(String fcsj){
  554 + try {
  555 + this.fcsjT = sdfyyyyMMddHHmm.parse(sdfyyyyMMdd.format(this.scheduleDate) + " " + fcsj).getTime();
  556 + this.fcsj = fcsj;
  557 + } catch (ParseException e) {
  558 + e.printStackTrace();
  559 + }
  560 + }
  561 +
  562 + /**
  563 + *
  564 + * @Title: setFcsjActualAll
  565 + * @Description: TODO(设置实际发车时间)
  566 + * @throws
  567 + */
  568 + public void setFcsjActualAll(String fcsjActual){
  569 + try {
  570 + this.fcsjActualTime = sdfyyyyMMddHHmm.parse(sdfyyyyMMdd.format(this.scheduleDate) + " " + fcsjActual).getTime();
  571 + this.fcsjActual = fcsjActual;
  572 + } catch (ParseException e) {
  573 + e.printStackTrace();
  574 + }
  575 + }
  576 +
  577 + /**
  578 + *
  579 + * @Title: setFcsjActualAll
  580 + * @Description: TODO(设置实际终点时间)
  581 + * @throws
  582 + */
  583 + public void setZdsjActualAll(String zdsjActual){
  584 + try {
  585 + this.zdsjActualTime = sdfyyyyMMddHHmm.parse(sdfyyyyMMdd.format(this.scheduleDate) + " " + zdsjActual).getTime();
  586 + this.zdsjActual = zdsjActual;
  587 + } catch (ParseException e) {
  588 + e.printStackTrace();
  589 + }
  590 + }
  591 +
547 } 592 }
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -76,4 +76,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -76,4 +76,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
76 76
77 Map<String, Object> spaceAdjust(Long[] ids, Integer space); 77 Map<String, Object> spaceAdjust(Long[] ids, Integer space);
78 78
  79 + Map<String, Object> schInfoFineTune(Map<String, String> map);
  80 +
79 } 81 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -241,7 +241,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -241,7 +241,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
241 t.setScheduleDate(new Date()); 241 t.setScheduleDate(new Date());
242 t.setCreateBy(user); 242 t.setCreateBy(user);
243 t.syncTime(); 243 t.syncTime();
244 - 244 + t.setSflj(true);
245 Map<String, Object> map = super.save(t); 245 Map<String, Object> map = super.save(t);
246 246
247 // 加入缓存 247 // 加入缓存
@@ -473,8 +473,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -473,8 +473,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
473 // 按发车时间排序 473 // 按发车时间排序
474 Collections.sort(list, new ScheduleBuffer.ScheduleComparator()); 474 Collections.sort(list, new ScheduleBuffer.ScheduleComparator());
475 475
476 - // 以第一个待发时间为起点,调整间隔  
477 - Long st = list.get(0).getDfsjT() 476 + // 以第一个实际发车/待发时间为起点,调整间隔
  477 + sch = list.get(0);
  478 + Long st = sch.getFcsjActualTime()==null?sch.getDfsjT():sch.getFcsjActualTime()
478 ,plus = space * 60 * 1000L; 479 ,plus = space * 60 * 1000L;
479 480
480 for(int i = 1; i < size; i ++){ 481 for(int i = 1; i < size; i ++){
@@ -495,4 +496,51 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -495,4 +496,51 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
495 } 496 }
496 return rs; 497 return rs;
497 } 498 }
  499 +
  500 + @Override
  501 + public Map<String, Object> schInfoFineTune(Map<String, String> map) {
  502 + Map<String, Object> rs = new HashMap<>();
  503 + try {
  504 + Long id = Long.parseLong(map.get("id"));
  505 + //班次类型
  506 + String bcType = map.get("bcType");
  507 + //车辆自编号
  508 + String clZbh = map.get("clZbh");
  509 + //计划发车时间
  510 + String fcsj = map.get("fcsj");
  511 + //实际发车时间
  512 + String fcsjActual = map.get("fcsjActual");
  513 + //驾驶员
  514 + String[] jsy = map.get("jsy").split("/");
  515 + //售票员
  516 + String[] spy = map.get("spy").split("/");
  517 + //实际终点时间
  518 + String zdsjActual = map.get("zdsjActual");
  519 + //备注
  520 + String remarks = map.get("remarks");
  521 +
  522 + ScheduleRealInfo sch = ScheduleBuffer.findOne(id);
  523 + if(null != sch){
  524 + sch.setBcType(bcType);
  525 + sch.setClZbh(clZbh);
  526 + sch.setFcsjAll(fcsj);
  527 + sch.setFcsjActualAll(fcsjActual);
  528 + sch.setZdsjActualAll(zdsjActual);
  529 + sch.setjGh(jsy[0]);
  530 + sch.setjName(jsy[1]);
  531 + sch.setsGh(spy[0]);
  532 + sch.setsName(spy[1]);
  533 + sch.setRemarks(remarks);
  534 + }
  535 +
  536 + ScheduleBuffer.persistentList.add(sch);
  537 +
  538 + rs.put("status", ResponseCode.SUCCESS);
  539 + rs.put("t", sch);
  540 + } catch (Exception e) {
  541 + logger.error("", e);
  542 + rs.put("status", ResponseCode.ERROR);
  543 + }
  544 + return rs;
  545 + }
498 } 546 }
src/main/java/com/bsth/vehicle/directive/service/DirectiveServiceImpl.java
@@ -281,7 +281,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;Directive60, Integer&gt; @@ -281,7 +281,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;Directive60, Integer&gt;
281 }else{ 281 }else{
282 logger.error("send60 upDownChange error, code: " + code); 282 logger.error("send60 upDownChange error, code: " + code);
283 } 283 }
284 - return 0; 284 + return code;
285 } 285 }
286 286
287 /** 287 /**
src/main/java/com/bsth/vehicle/directive/util/HttpUtils.java
@@ -2,6 +2,7 @@ package com.bsth.vehicle.directive.util; @@ -2,6 +2,7 @@ package com.bsth.vehicle.directive.util;
2 2
3 import java.io.IOException; 3 import java.io.IOException;
4 4
  5 +import org.apache.http.client.config.RequestConfig;
5 import org.apache.http.client.methods.CloseableHttpResponse; 6 import org.apache.http.client.methods.CloseableHttpResponse;
6 import org.apache.http.client.methods.HttpPost; 7 import org.apache.http.client.methods.HttpPost;
7 import org.apache.http.entity.StringEntity; 8 import org.apache.http.entity.StringEntity;
@@ -34,8 +35,15 @@ public class HttpUtils { @@ -34,8 +35,15 @@ public class HttpUtils {
34 try{ 35 try{
35 httpClient = HttpClients.createDefault(); 36 httpClient = HttpClients.createDefault();
36 37
  38 + //超时时间
  39 + RequestConfig requestConfig = RequestConfig.custom()
  40 + .setConnectTimeout(3000).setConnectionRequestTimeout(1000)
  41 + .setSocketTimeout(3000).build();
  42 +
37 HttpPost post = new HttpPost(Consts.SEND_DIRECTIVE_URL); 43 HttpPost post = new HttpPost(Consts.SEND_DIRECTIVE_URL);
38 44
  45 + post.setConfig(requestConfig);
  46 +
39 post.setEntity(new StringEntity(jsonStr, "utf-8")); 47 post.setEntity(new StringEntity(jsonStr, "utf-8"));
40 48
41 CloseableHttpResponse response = httpClient.execute(post); 49 CloseableHttpResponse response = httpClient.execute(post);
src/main/resources/static/assets/img/logo_text.png 0 → 100644

14.7 KB

src/main/resources/static/assets/js/common.js
@@ -114,7 +114,7 @@ function initPinYinSelect2(selector, data, cb){ @@ -114,7 +114,7 @@ function initPinYinSelect2(selector, data, cb){
114 }) 114 })
115 }); 115 });
116 116
117 - cb && cb(); 117 + cb && cb($(selector));
118 }); 118 });
119 119
120 return $(selector); 120 return $(selector);
src/main/resources/static/index.html
@@ -108,6 +108,17 @@ tr.row-active td { @@ -108,6 +108,17 @@ tr.row-active td {
108 .page-content.active{ 108 .page-content.active{
109 display: block !important; 109 display: block !important;
110 } 110 }
  111 +
  112 +.page-header.navbar .page-logo {
  113 + width: 335px;
  114 +}
  115 +
  116 +.page-header.navbar .page-logo .logo-default {
  117 + margin: 0;
  118 +}
  119 +.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle {
  120 + background-color: #284a99;
  121 +}
111 </style> 122 </style>
112 123
113 <!-- ocLazyLoading载入文件的位置 --> 124 <!-- ocLazyLoading载入文件的位置 -->
@@ -115,28 +126,18 @@ tr.row-active td { @@ -115,28 +126,18 @@ tr.row-active td {
115 126
116 </head> 127 </head>
117 <body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed"> 128 <body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed">
118 - <div class="page-header navbar navbar-fixed-top"> 129 + <div class="page-header navbar navbar-fixed-top" style="background: #23438e;">
119 <div class="page-header-inner "> 130 <div class="page-header-inner ">
120 <!-- LOGO --> 131 <!-- LOGO -->
121 <div class="page-logo"> 132 <div class="page-logo">
122 <a href="index.html"> 133 <a href="index.html">
123 - <img src="" alt="logo" class="logo-default" /> </a> 134 + <img src="/assets/img/logo_text.png" alt="logo" class="logo-default" /> </a>
124 <div class="menu-toggler sidebar-toggler"> 135 <div class="menu-toggler sidebar-toggler">
125 </div> 136 </div>
126 </div> 137 </div>
127 <!-- END LOGO --> 138 <!-- END LOGO -->
128 <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"> </a> 139 <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"> </a>
129 <div class="page-top"> 140 <div class="page-top">
130 - <form class="search-form" action="page_general_search_2.html" method="GET">  
131 - <div class="input-group">  
132 - <input type="text" class="form-control input-sm" placeholder="Search..." name="query">  
133 - <span class="input-group-btn">  
134 - <a href="javascript:;" class="btn submit">  
135 - <i class="fa fa-search"></i>  
136 - </a>  
137 - </span>  
138 - </div>  
139 - </form>  
140 <div class="top-menu"> 141 <div class="top-menu">
141 <ul class="nav navbar-nav pull-right"> 142 <ul class="nav navbar-nav pull-right">
142 <!-- 信息通知区 --> 143 <!-- 信息通知区 -->
@@ -158,7 +159,7 @@ tr.row-active td { @@ -158,7 +159,7 @@ tr.row-active td {
158 </li> 159 </li>
159 <li class="dropdown dropdown-user dropdown-dark"> 160 <li class="dropdown dropdown-user dropdown-dark">
160 <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true"> 161 <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
161 - <span class="username username-hide-on-mobile" style="vertical-align: middle;">潘钊 <i class="fa fa-user"></i></span> 162 + <span id="indexTopUName" class="username username-hide-on-mobile" style="vertical-align: middle;"> <i class="fa fa-user"></i></span>
162 </a> 163 </a>
163 <ul class="dropdown-menu dropdown-menu-default"> 164 <ul class="dropdown-menu dropdown-menu-default">
164 <li> 165 <li>
@@ -301,12 +302,12 @@ tr.row-active td { @@ -301,12 +302,12 @@ tr.row-active td {
301 <!-- angularJS相关库 --> 302 <!-- angularJS相关库 -->
302 <!-- 这个是基于angularjs 1.4.10修改的版本,主要是修改了history控制部分,用于兼容route和pjax的同时操作history的冲突 --> 303 <!-- 这个是基于angularjs 1.4.10修改的版本,主要是修改了history控制部分,用于兼容route和pjax的同时操作history的冲突 -->
303 <script src="/assets/js/angular.js" data-autocephaly=1></script> 304 <script src="/assets/js/angular.js" data-autocephaly=1></script>
304 -<script src="/assets/bower_components/angular-resource/angular-resource.min.js" data-autocephaly=1></script>  
305 -<script src="/assets/bower_components/angular-sanitize/angular-sanitize.min.js" data-autocephaly=1></script>  
306 -<script src="/assets/bower_components/angular-touch/angular-touch.min.js" data-autocephaly=1></script>  
307 -<script src="/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js" data-autocephaly=1></script>  
308 -<script src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js" data-autocephaly=1></script>  
309 -<script src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" data-autocephaly=1></script> 305 +<script src="/assets/bower_components/angular-resource/angular-resource.min.js" data-exclude=1></script>
  306 +<script src="/assets/bower_components/angular-sanitize/angular-sanitize.min.js" data-exclude=1></script>
  307 +<script src="/assets/bower_components/angular-touch/angular-touch.min.js" data-exclude=1></script>
  308 +<script src="/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js" data-exclude=1></script>
  309 +<script src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js" data-exclude=1></script>
  310 +<script src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" data-exclude=1></script>
310 <!-- schedule计划调度AngularJS模块主JS --> 311 <!-- schedule计划调度AngularJS模块主JS -->
311 <script src="/pages/scheduleApp/module/main.js" data-exclude=1></script> 312 <script src="/pages/scheduleApp/module/main.js" data-exclude=1></script>
312 313
@@ -320,6 +321,10 @@ var pjaxContainer = &#39;#pjax-container&#39; @@ -320,6 +321,10 @@ var pjaxContainer = &#39;#pjax-container&#39;
320 ,angJsContainer = '#route-container'; 321 ,angJsContainer = '#route-container';
321 322
322 $(function(){ 323 $(function(){
  324 + $.get('/user/currentUser', function(user){
  325 + $('#indexTopUName').text(user.userName);
  326 + });
  327 +
323 //带 data-pjax 的链接由pjax加载 328 //带 data-pjax 的链接由pjax加载
324 $(document).pjax('a[data-pjax]', pjaxContainer); 329 $(document).pjax('a[data-pjax]', pjaxContainer);
325 330
src/main/resources/static/pages/control/line/css/lineControl.css
  1 +.load-anim{
  2 + position: fixed;z-index: 9999999;width: 100%;height: 100%;
  3 + background: rgba(8, 47, 74, 0.89);top: 0;left: 0;
  4 +}
  5 +.load-anim .loader{
  6 + margin: auto !important;
  7 + position: absolute;
  8 + top: 0;
  9 + left: 0;
  10 + bottom: 0;
  11 + right: 0;
  12 +}
  13 +
  14 +
  15 +.load8 .loader {
  16 + font-size: 10px;
  17 + text-indent: -9999em;
  18 + border-top: 1.1em solid rgba(255, 255, 255, 0.2);
  19 + border-right: 1.1em solid rgba(255, 255, 255, 0.2);
  20 + border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
  21 + border-left: 1.1em solid #ffffff;
  22 + -webkit-animation: load8 1.1s infinite linear;
  23 + animation: load8 1.1s infinite linear;
  24 +}
  25 +.load8 .loader,
  26 +.load8 .loader:after {
  27 + border-radius: 50% !important;
  28 + width: 8em;
  29 + height: 8em;
  30 +}
  31 +@-webkit-keyframes load8 {
  32 + 0% {
  33 + -webkit-transform: rotate(0deg);
  34 + transform: rotate(0deg);
  35 + }
  36 + 100% {
  37 + -webkit-transform: rotate(360deg);
  38 + transform: rotate(360deg);
  39 + }
  40 +}
  41 +@keyframes load8 {
  42 + 0% {
  43 + -webkit-transform: rotate(0deg);
  44 + transform: rotate(0deg);
  45 + }
  46 + 100% {
  47 + -webkit-transform: rotate(360deg);
  48 + transform: rotate(360deg);
  49 + }
  50 +}
  51 +
  52 +
1 label { 53 label {
2 max-width: none; 54 max-width: none;
3 } 55 }
@@ -220,7 +272,7 @@ body{ @@ -220,7 +272,7 @@ body{
220 } 272 }
221 273
222 .card_wrap{ 274 .card_wrap{
223 - height: 268px; 275 + min-height: 268px;
224 text-align: center; 276 text-align: center;
225 } 277 }
226 278
@@ -425,7 +477,7 @@ body{ @@ -425,7 +477,7 @@ body{
425 477
426 .station_text{ 478 .station_text{
427 writing-mode: tb; 479 writing-mode: tb;
428 - letter-spacing: -2.6px; 480 + /* letter-spacing: -2.6px; */
429 } 481 }
430 482
431 .station_text:hover{ 483 .station_text:hover{
@@ -877,6 +929,10 @@ height: 400px; @@ -877,6 +929,10 @@ height: 400px;
877 .pb-table tr td:nth-child(9){ 929 .pb-table tr td:nth-child(9){
878 width: 55px; 930 width: 55px;
879 } 931 }
  932 +
  933 + .station_text {
  934 + letter-spacing: -2.6px;
  935 + }
880 } 936 }
881 937
882 .pb-table.head tr td{ 938 .pb-table.head tr td{
@@ -911,6 +967,14 @@ height: 400px; @@ -911,6 +967,14 @@ height: 400px;
911 .pb-table tr td:nth-child(8){ 967 .pb-table tr td:nth-child(8){
912 width: 15%; 968 width: 15%;
913 } 969 }
  970 +
  971 + .card_wrap .col-lg-2 .table td{
  972 + font-size: 12px;
  973 + }
  974 +
  975 + .station_text {
  976 + letter-spacing: 1px;
  977 + }
914 } 978 }
915 979
916 /** 1310px 以下 */ 980 /** 1310px 以下 */
@@ -946,6 +1010,9 @@ height: 400px; @@ -946,6 +1010,9 @@ height: 400px;
946 1010
947 .table.pb-table>tbody>tr>td{ 1011 .table.pb-table>tbody>tr>td{
948 line-height: 1.43257; 1012 line-height: 1.43257;
  1013 + white-space: nowrap;
  1014 + overflow: hidden;
  1015 + text-overflow: ellipsis;
949 } 1016 }
950 1017
951 .pic-panel{ 1018 .pic-panel{
@@ -2094,4 +2161,29 @@ tr._tr_active.active-line-no .in-badge{ @@ -2094,4 +2161,29 @@ tr._tr_active.active-line-no .in-badge{
2094 2161
2095 tr._tr_active.active-line-no .out-badge{ 2162 tr._tr_active.active-line-no .out-badge{
2096 background: #67a3a8; 2163 background: #67a3a8;
2097 -}  
2098 \ No newline at end of file 2164 \ No newline at end of file
  2165 +}
  2166 +
  2167 +.sfsj-sch-detail{
  2168 + list-style: none;
  2169 + padding: 3px;
  2170 + /* color: black; */
  2171 + font-family: 微软雅黑;
  2172 +}
  2173 +.sfsj-sch-detail li{
  2174 + font-size: 14px;
  2175 + margin: 6px 4px;
  2176 +}
  2177 +
  2178 +.sfsj-sch-detail li span{
  2179 + display: inline-block;
  2180 + width: 75px;
  2181 + text-align: right;
  2182 + /* color: #818181; */
  2183 +}
  2184 +
  2185 +.vehicDataTable a{
  2186 + text-decoration: underline;
  2187 + color: black;
  2188 +}
  2189 +
  2190 +
src/main/resources/static/pages/control/line/index.html
1 <link href="css/lineControl.css" rel="stylesheet" type="text/css" /> 1 <link href="css/lineControl.css" rel="stylesheet" type="text/css" />
2 <link href="/metronic_v4.5.4/css/animate.min.css" rel="stylesheet" type="text/css" /> 2 <link href="/metronic_v4.5.4/css/animate.min.css" rel="stylesheet" type="text/css" />
3 3
  4 +<!-- 初始load动画 -->
  5 +<div class="load-anim load8" >
  6 +<div class="loader">Loading...</div>
  7 +</div>
  8 +
4 <div class="portlet light portlet-fullscreen" style="transition: all .5s ease;padding: 0;" oncontextmenu=self.event.returnValue=false> 9 <div class="portlet light portlet-fullscreen" style="transition: all .5s ease;padding: 0;" oncontextmenu=self.event.returnValue=false>
  10 +
5 <div class="portlet-title" style="padding: 17px 20px 0px 20px;border-bottom: none;margin-bottom: 0;background: linear-gradient(to right ,#082F4A, #125688,#0a3f64);padding-bottom: 5px;"> 11 <div class="portlet-title" style="padding: 17px 20px 0px 20px;border-bottom: none;margin-bottom: 0;background: linear-gradient(to right ,#082F4A, #125688,#0a3f64);padding-bottom: 5px;">
6 <div class="caption col_hide_1280" style="color: #FFF;"> 12 <div class="caption col_hide_1280" style="color: #FFF;">
7 <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span 13 <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span
8 - class="caption-subject bold" style="font-size: 24px;">线路调度系统</span> 14 + class="caption-subject bold" style="font-size: 24px;">闵行公交线路调度系统</span>
9 </div> 15 </div>
10 <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;"> 16 <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;">
11 - panzhao,在线! 17 + <span class="top_username"></span>,在线!
12 </div> 18 </div>
13 <div class="actions col_hide_1280" > 19 <div class="actions col_hide_1280" >
14 <div class="btn-group"> 20 <div class="btn-group">
@@ -84,6 +90,7 @@ @@ -84,6 +90,7 @@
84 </div> 90 </div>
85 <div id="tooltipShade" class="animated fadeIn"></div> 91 <div id="tooltipShade" class="animated fadeIn"></div>
86 92
  93 +<!-- 线路调度右键菜单 -->
87 <menu class="menu" id="rightMenu"> 94 <menu class="menu" id="rightMenu">
88 <li class="menu-item" > 95 <li class="menu-item" >
89 <button type="button" class="menu-btn" data-method="outgoAdjust"> 96 <button type="button" class="menu-btn" data-method="outgoAdjust">
@@ -122,6 +129,11 @@ @@ -122,6 +129,11 @@
122 <span class="menu-text">误点调整</span> 129 <span class="menu-text">误点调整</span>
123 </button> 130 </button>
124 </li> 131 </li>
  132 + <li class="menu-item" >
  133 + <button type="button" class="menu-btn" data-method="schInfoFineTune">
  134 + <span class="menu-text">发车信息微调</span>
  135 + </button>
  136 + </li>
125 <li class="menu-separator"></li> 137 <li class="menu-separator"></li>
126 <li class="menu-item" > 138 <li class="menu-item" >
127 <button type="button" class="menu-btn" data-method="childTask"> 139 <button type="button" class="menu-btn" data-method="childTask">
@@ -137,13 +149,6 @@ @@ -137,13 +149,6 @@
137 </button> 149 </button>
138 </li> 150 </li>
139 <li class="menu-separator"></li> 151 <li class="menu-separator"></li>
140 -<!-- <li class="menu-item" >  
141 - <button type="button" class="menu-btn" data-method="temporaryAdd">  
142 - <i class="fa fa-plus"></i>  
143 - <span class="menu-text">临加班次</span>  
144 - </button>  
145 - </li> -->  
146 - <li class="menu-separator"></li>  
147 <li class="menu-item" > 152 <li class="menu-item" >
148 <button type="button" class="menu-btn" data-method="vehicAndPerAdjust"> 153 <button type="button" class="menu-btn" data-method="vehicAndPerAdjust">
149 <i class="fa fa-retweet"></i> 154 <i class="fa fa-retweet"></i>
@@ -158,6 +163,37 @@ @@ -158,6 +163,37 @@
158 </button> 163 </button>
159 </li> 164 </li>
160 </menu> 165 </menu>
  166 +<!-- 主页右键菜单 -->
  167 +<menu class="menu" id="homeMenu">
  168 + <li class="menu-item disabled" id="menu-linename">
  169 + <button type="button" class="menu-btn">
  170 + <span class="menu-text">--- W2B-102 ---</span>
  171 + </button>
  172 + </li>
  173 + <li class="menu-item" >
  174 + <button type="button" class="menu-btn" data-method="sendPhrase">
  175 + <span class="menu-text">发送消息短语</span>
  176 + </button>
  177 + </li>
  178 + <li class="menu-separator"></li>
  179 + <li class="menu-item submenu">
  180 + <button type="button" class="menu-btn">
  181 + <span class="menu-text">车辆状态发送</span>
  182 + </button>
  183 + <menu class="menu">
  184 + <li class="menu-item">
  185 + <button type="button" class="menu-btn" data-method="changeUp">
  186 + <span class="menu-text">上行营运</span>
  187 + </button>
  188 + </li>
  189 + <li class="menu-item">
  190 + <button type="button" class="menu-btn" data-method="changeDown">
  191 + <span class="menu-text">下行营运</span>
  192 + </button>
  193 + </li>
  194 + </menu>
  195 + </li>
  196 +</menu>
161 197
162 </div> 198 </div>
163 <div id="temps"></div> 199 <div id="temps"></div>
@@ -169,6 +205,7 @@ @@ -169,6 +205,7 @@
169 <script src="/pages/control/line/js/drawSvg.js"></script> 205 <script src="/pages/control/line/js/drawSvg.js"></script>
170 <script src="/pages/control/line/js/data.js"></script> 206 <script src="/pages/control/line/js/data.js"></script>
171 <script src="/pages/control/line/js/rightMenu.js"></script> 207 <script src="/pages/control/line/js/rightMenu.js"></script>
  208 +<script src="/pages/control/line/js/homeMenu.js"></script>
172 <script src="/pages/control/line/js/alone.js"></script> 209 <script src="/pages/control/line/js/alone.js"></script>
173 <script src="/pages/control/line/js/main.js"></script> 210 <script src="/pages/control/line/js/main.js"></script>
174 <script src="/pages/control/line/js/console.js"></script> 211 <script src="/pages/control/line/js/console.js"></script>
@@ -179,10 +216,16 @@ var lineCodes = &#39;&#39; //全部线路编码字符串,由data.js初始化 @@ -179,10 +216,16 @@ var lineCodes = &#39;&#39; //全部线路编码字符串,由data.js初始化
179 , lineMap = {} //编码和线路详细对照,由data.js初始化; 216 , lineMap = {} //编码和线路详细对照,由data.js初始化;
180 ,animationend = 'webkitAnimationEnd animationend'; 217 ,animationend = 'webkitAnimationEnd animationend';
181 moment.locale('zh-cn'); 218 moment.locale('zh-cn');
  219 +
  220 +var cUser;
  221 +//当前用户
  222 +$.get('/user/currentUser', function(user){
  223 + cUser = user;
  224 + $('.portlet-fullscreen .top_username').text(cUser.userName);
  225 +});
182 $(function() { 226 $(function() {
183 //加载模板文件 227 //加载模板文件
184 getTemp('temps/home_tp.html'); 228 getTemp('temps/home_tp.html');
185 - getTemp('temps/home_table_tp.html');  
186 getTemp('temps/tooltip_tp.html'); 229 getTemp('temps/tooltip_tp.html');
187 getTemp('temps/alone_tp.html'); 230 getTemp('temps/alone_tp.html');
188 getTemp('temps/child_task_case_tp.html'); 231 getTemp('temps/child_task_case_tp.html');
src/main/resources/static/pages/control/line/js/alone.js
@@ -98,11 +98,6 @@ var _alone = (function(){ @@ -98,11 +98,6 @@ var _alone = (function(){
98 calculateLineNo: calculateLineNo 98 calculateLineNo: calculateLineNo
99 } 99 }
100 100
101 - //实发时间单元格事件  
102 - $('.portlet-fullscreen').on('click', 'table.pb-table .sfsj-item', function(){  
103 -  
104 - });  
105 -  
106 //计算行号 101 //计算行号
107 function calculateLineNo(table){ 102 function calculateLineNo(table){
108 var rows = table.rows; 103 var rows = table.rows;
@@ -162,13 +157,22 @@ var _alone = (function(){ @@ -162,13 +157,22 @@ var _alone = (function(){
162 var tgTools = $('#tgTools_' + line); 157 var tgTools = $('#tgTools_' + line);
163 158
164 tgTools.html(tgHtml[status]).data('status', status); 159 tgTools.html(tgHtml[status]).data('status', status);
  160 + var array = $('#top-tabs-wrap a[data-id='+line+'] span zz');
  161 +
165 if(status == 0){ 162 if(status == 0){
166 //托管Question 163 //托管Question
167 $('.tgQuestion', tgTools).popover(tgPopoverOps); 164 $('.tgQuestion', tgTools).popover(tgPopoverOps);
168 tgTools.removeClass('hand'); 165 tgTools.removeClass('hand');
  166 +
  167 + $(array[2]).text('托管');
169 } 168 }
170 - else 169 + else{
171 tgTools.addClass('hand'); 170 tgTools.addClass('hand');
  171 + $(array[2]).text('');
  172 + }
  173 +
  174 + //tab 头改变
  175 +
172 } 176 }
173 177
174 function initRemarksPop(){ 178 function initRemarksPop(){
src/main/resources/static/pages/control/line/js/drawSvg.js
@@ -49,6 +49,10 @@ var drawSvg = (function(){ @@ -49,6 +49,10 @@ var drawSvg = (function(){
49 svg = drawSvgObject.init(lineId, data, container, w, 80); 49 svg = drawSvgObject.init(lineId, data, container, w, 80);
50 //线路编码 和 首页SVG对照 50 //线路编码 和 首页SVG对照
51 homeSvgMapp[lineId] = svg; 51 homeSvgMapp[lineId] = svg;
  52 + //双击事件
  53 + $(svg[0]).dblclick(function(){
  54 + $('#top-tabs-wrap .nav-tabs a[data-id='+this.id+']').click();
  55 + });
52 }, 56 },
53 initAloneSvg: function(lineId, data, container){ 57 initAloneSvg: function(lineId, data, container){
54 var w = $(document).width(), 58 var w = $(document).width(),
@@ -371,5 +375,8 @@ var drawSvg = (function(){ @@ -371,5 +375,8 @@ var drawSvg = (function(){
371 } 375 }
372 } 376 }
373 377
  378 + //双击svg切换
  379 + //$('.line_chart svg').
  380 +
374 return drawSvgObject; 381 return drawSvgObject;
375 })(); 382 })();
src/main/resources/static/pages/control/line/js/homeMenu.js 0 → 100644
  1 +var _home_menu = (function(){
  2 +
  3 + $('#homeMenu .menu-item button').on('click', function(){
  4 + var method = $(this).data('method');
  5 + if(!method)return;
  6 + var nbbm = $('.vehicDataTable tr._home_tr_active').data('nbbm');
  7 +
  8 + if(!nbbm){
  9 + layer.alert('无法获取车辆自编号,请尝试刷新页面!', {icon: 2, title: '异常'});
  10 + return;
  11 + }
  12 + menuObject[method](nbbm);
  13 + });
  14 +
  15 + //右键事件
  16 + $('.portlet-fullscreen').on('contextmenu', '.vehicDataTable tr td', function(e){
  17 + e.preventDefault();
  18 + $('.vehicDataTable tr._home_tr_active').removeClass('_home_tr_active');
  19 + $(this).parent().addClass('_home_tr_active');
  20 + showMenu(e.pageX, e.pageY + 3);
  21 + $(document).one('click', function() {
  22 + $('#homeMenu').removeClass('show-menu');
  23 + });
  24 + });
  25 +
  26 +
  27 + function showMenu(x, y) {
  28 + var menu = $('#homeMenu'),
  29 + docWidth = $(document).width(), docHeight = $(document).height(),
  30 + menuHeight = menu.height(),
  31 + menuWidth = menu.width(),
  32 + offset = 12;
  33 + /* 边界 */
  34 + if (y > (docHeight - menuHeight)) {
  35 + y = docHeight - menuHeight - offset;
  36 + }
  37 +
  38 + if (x > (docWidth - (menuWidth * 2))) {
  39 + x = docWidth - (menuWidth * 2) - offset;
  40 + }
  41 +
  42 + menu.css('left', x + 'px')
  43 + .css('top', y + 'px')
  44 + .addClass('show-menu');
  45 + }
  46 +
  47 + var menuObject = {
  48 + //发送消息短语
  49 + sendPhrase: function(nbbm){
  50 + layer.prompt({title: '请输入短语信息', formType: 2 , shift: 5
  51 + }, function(space){
  52 + $.post('/directive/phrase', {nbbm: nbbm, text: space}, function(rs){
  53 + if(rs == 0)
  54 + layer.msg('发送成功!');
  55 + else
  56 + layer.alert('发送短语信息失败!', {icon: 2, title: '操作失败'});
  57 + });
  58 + });
  59 + },
  60 + //上行营运
  61 + changeUp: function(nbbm){
  62 + $.post('/directive/upDownChange', {nbbm: nbbm, upDown: 0}, function(rs){
  63 + if(rs == 0)
  64 + layer.msg('发送指令成功!');
  65 + else
  66 + layer.alert('发送指令失败!', {icon: 2, title: '操作失败'});
  67 + });
  68 + },
  69 + //下行营运
  70 + changeDown: function(nbbm){
  71 + $.post('/directive/upDownChange', {nbbm: nbbm, upDown: 1}, function(rs){
  72 + if(rs == 0)
  73 + layer.msg('发送指令成功!');
  74 + else
  75 + layer.alert('发送指令失败!', {icon: 2, title: '操作失败'});
  76 + });
  77 + }
  78 + }
  79 +})();
  80 +
src/main/resources/static/pages/control/line/js/keyboardListen.js
1 /** 键盘监听 */ 1 /** 键盘监听 */
2 2
3 //禁止选中 3 //禁止选中
4 -$(document).on('selectstart','table.pb-table', function(event){ 4 +$(document).on('selectstart','table.pb-table,svg', function(event){
5 event = window.event||event; 5 event = window.event||event;
6 event.returnValue = false; 6 event.returnValue = false;
7 }); 7 });
src/main/resources/static/pages/control/line/js/main.js
@@ -36,6 +36,10 @@ @@ -36,6 +36,10 @@
36 var homeHtmlStr = template('line_control_home_temp', {tabList: tabData}); 36 var homeHtmlStr = template('line_control_home_temp', {tabList: tabData});
37 37
38 $('#tab_home').html(homeHtmlStr); 38 $('#tab_home').html(homeHtmlStr);
  39 + //计算高度 40 页脚
  40 + var ah = $('#top-tabs-wrap .tab-content').height() - 40 - 5;
  41 + console.log(ah);
  42 + $('.card_wrap').css('height', ah / 3);
39 43
40 //滚动条 44 //滚动条
41 $('.card_wrap .table_wrap').slimscroll({ 45 $('.card_wrap .table_wrap').slimscroll({
@@ -61,6 +65,7 @@ @@ -61,6 +65,7 @@
61 65
62 //按线路分组 66 //按线路分组
63 var listMap = groupByLine(addList); 67 var listMap = groupByLine(addList);
  68 + console.log('listMap', listMap);
64 for(var key in listMap){ 69 for(var key in listMap){
65 var htmlStr = template('home_table_temp', {list: listMap[key]}); 70 var htmlStr = template('home_table_temp', {list: listMap[key]});
66 $('#tab_' + key).find('tbody').html(htmlStr); 71 $('#tab_' + key).find('tbody').html(htmlStr);
@@ -69,16 +74,15 @@ @@ -69,16 +74,15 @@
69 } 74 }
70 }); 75 });
71 76
72 -  
73 setTimeout(function(){ 77 setTimeout(function(){
  78 + //打开GPS定时刷新
74 _data.startRefreshGpsTimer(); 79 _data.startRefreshGpsTimer();
75 - }, 300);  
76 - /* setTimeout(function(){  
77 - homeObject.refreshGps(function(add, update){  
78 - //将新增的点画到模拟图上  
79 - drawSvg.drawVehicle(add);  
80 - });  
81 - }, 300);*/ 80 +
  81 + setTimeout(function(){
  82 + //去掉loading
  83 + $('.load-anim').fadeOut();
  84 + }, 500);
  85 + }, 400);
82 86
83 } 87 }
84 } 88 }
@@ -88,7 +92,7 @@ setTimeout(function(){ @@ -88,7 +92,7 @@ setTimeout(function(){
88 var topTabs = '', tabPanels = ''; 92 var topTabs = '', tabPanels = '';
89 $.each(_data.getLines(), function(i, line){ 93 $.each(_data.getLines(), function(i, line){
90 topTabs += '<li ><a data-id="'+line.lineCode+'" href="#tab_line_'+line.lineCode+'" data-toggle="tab" '+ 94 topTabs += '<li ><a data-id="'+line.lineCode+'" href="#tab_line_'+line.lineCode+'" data-toggle="tab" '+
91 - 'aria-expanded="false"> '+line.name+'<span>(0,0 托管)</span> </a></li>'; 95 + 'aria-expanded="false"> '+line.name+'<span>(<zz>0</zz>,<zz>0</zz> <zz>托管</zz>)</span> </a></li>';
92 96
93 tabPanels += '<div class="tab-pane fade tab_line" data-id="'+line.lineCode+'" id="tab_line_'+line.lineCode+'"></div>'; 97 tabPanels += '<div class="tab-pane fade tab_line" data-id="'+line.lineCode+'" id="tab_line_'+line.lineCode+'"></div>';
94 98
src/main/resources/static/pages/control/line/js/rightMenu.js
@@ -87,6 +87,21 @@ var _menu = (function() { @@ -87,6 +87,21 @@ var _menu = (function() {
87 return $(firstCell).addClass('selected').parent().addClass('_tr_active active-line-no'); 87 return $(firstCell).addClass('selected').parent().addClass('_tr_active active-line-no');
88 } 88 }
89 89
  90 + //实发时间单元格事件
  91 + var layerTip;
  92 + $('.portlet-fullscreen').on('click', 'table.pb-table .sfsj-item', function(){
  93 + var id = $(this).parent().data('id');
  94 + var sch = _data.getSchedulById(id);
  95 +
  96 + layerTip = layer.tips(template('sfsj_sch-detail-temp', sch), this, {
  97 + tips: [2, '#709d94'],shift:5, time: 5000
  98 + });
  99 + });
  100 +
  101 + $('.portlet-fullscreen').on('dbclick', 'table.pb-table .sfsj-item', function(){
  102 + alert(11);
  103 + });
  104 +
90 //选中关联班次 105 //选中关联班次
91 function selCognateSch($ctr){ 106 function selCognateSch($ctr){
92 //选中关联班次 107 //选中关联班次
@@ -119,6 +134,10 @@ var _menu = (function() { @@ -119,6 +134,10 @@ var _menu = (function() {
119 $('.pb-table tr td.' + ac).removeClass(ac); 134 $('.pb-table tr td.' + ac).removeClass(ac);
120 $('.pb-table tr.selected').removeClass('selected'); 135 $('.pb-table tr.selected').removeClass('selected');
121 $('.pb-table tr.next-sch').removeClass('next-sch'); 136 $('.pb-table tr.next-sch').removeClass('next-sch');
  137 + if(layerTip){
  138 + layer.close(layerTip);
  139 + layerTip = null;
  140 + }
122 } 141 }
123 function resetAllState(){ 142 function resetAllState(){
124 $('.pb-table tr td.' + ac).removeClass(ac); 143 $('.pb-table tr td.' + ac).removeClass(ac);
@@ -128,6 +147,10 @@ var _menu = (function() { @@ -128,6 +147,10 @@ var _menu = (function() {
128 $('.pb-table.data tr td.selected[name=lineNo]').removeClass('selected'); 147 $('.pb-table.data tr td.selected[name=lineNo]').removeClass('selected');
129 148
130 prveSelRow = null; 149 prveSelRow = null;
  150 + if(layerTip){
  151 + layer.close(layerTip);
  152 + layerTip = null;
  153 + }
131 } 154 }
132 155
133 //根据起止行号选中多行 156 //根据起止行号选中多行
@@ -163,14 +186,34 @@ var _menu = (function() { @@ -163,14 +186,34 @@ var _menu = (function() {
163 title: '待发调整', 186 title: '待发调整',
164 success: function(){ 187 success: function(){
165 dictionaryUtils.transformDom($('#outgoAdjustForm .nt-dictionary')); 188 dictionaryUtils.transformDom($('#outgoAdjustForm .nt-dictionary'));
  189 + //驾驶员
  190 + $.get('/realSchedule/driver', {lineCode: schedul.xlBm}, function(rs){
  191 + initPinYinSelect2('#outgoAdjustForm select[name=jsy]', rs, function(that){
  192 + //默认选中
  193 + that.val(schedul.jGh + '/' + schedul.jName).change();
  194 + });
  195 + });
  196 + //售票员
  197 + $.get('/realSchedule/conductor', {lineCode: schedul.xlBm}, function(rs){
  198 + initPinYinSelect2('#outgoAdjustForm select[name=spy]' , rs, function(that){
  199 + //默认选中
  200 + that.val(schedul.sGh + '/' + schedul.sName).change();
  201 + });
  202 + });
  203 + //车辆
  204 + $.get('/realSchedule/cars', {lineCode: schedul.xlBm}, function(rs){
  205 + $('#outgoAdjustForm select[name=clZbh]').select2({data: rs}).val(schedul.clZbh).change();
  206 + });
  207 +
166 $('#outgoAdjustForm button.confirm').one('click', function(){ 208 $('#outgoAdjustForm button.confirm').one('click', function(){
  209 +
167 var params = $('#outgoAdjustForm').serializeJSON(); 210 var params = $('#outgoAdjustForm').serializeJSON();
168 $post('/realSchedule/outgoAdjust', params, function(rs){ 211 $post('/realSchedule/outgoAdjust', params, function(rs){
169 layer.close(index); 212 layer.close(index);
170 - layer.msg('调整成功!');  
171 schedul.dfsj = rs.dfsj; 213 schedul.dfsj = rs.dfsj;
172 schedul.remarks = rs.remarks; 214 schedul.remarks = rs.remarks;
173 _alone.refreshSchedule(schedul); 215 _alone.refreshSchedule(schedul);
  216 + layer.msg('调整成功!');
174 }); 217 });
175 }); 218 });
176 } 219 }
@@ -413,6 +456,64 @@ var _menu = (function() { @@ -413,6 +456,64 @@ var _menu = (function() {
413 layer.alert('发送调度指令失败', {icon: 2, title: '操作失败'}); 456 layer.alert('发送调度指令失败', {icon: 2, title: '操作失败'});
414 }); 457 });
415 }); 458 });
  459 + },
  460 + //发车信息微调
  461 + schInfoFineTune: function(schedul){
  462 + var index = layer.open({
  463 + type: 1,
  464 + area: '630px',
  465 + maxmin: true,
  466 + content: template('schinfo_fine_tune_temp', schedul),
  467 + shift: 5,
  468 + title: '发车信息微调',
  469 + success: function(){
  470 + var ntds = $('#schinfoFineTune .nt-dictionary');
  471 + dictionaryUtils.transformDom(ntds);
  472 + //驾驶员
  473 + $.get('/realSchedule/driver', {lineCode: schedul.xlBm}, function(rs){
  474 + initPinYinSelect2('#schinfoFineTune select[name=jsy]', rs, function(that){
  475 + //默认选中
  476 + that.val(schedul.jGh + '/' + schedul.jName).change();
  477 + });
  478 +
  479 + });
  480 + //售票员
  481 + $.get('/realSchedule/conductor', {lineCode: schedul.xlBm}, function(rs){
  482 + initPinYinSelect2('#schinfoFineTune select[name=spy]' , rs, function(rs){
  483 + initPinYinSelect2('#outgoAdjustForm select[name=spy]' , rs, function(that){
  484 + //默认选中
  485 + that.val(schedul.sGh + '/' + schedul.sName).change();
  486 + });
  487 + });
  488 + });
  489 + //车辆
  490 + $.get('/realSchedule/cars', {lineCode: schedul.xlBm}, function(rs){
  491 + $('#schinfoFineTune select[name=clZbh]').select2({data: rs}).val(schedul.clZbh).change();
  492 + });
  493 +
  494 +
  495 + //调整说明
  496 + $('#schinfoFineTune select[name=reason]').on('change', function(){
  497 + var t = $(this).val();
  498 + if(!t) return;
  499 + var textarea = $('#schinfoFineTune textarea[name=remarks]');
  500 + textarea.val(textarea.val() + t + ',');
  501 + });
  502 + //确定
  503 + $('#schinfoFineTune button.confirm').on('click', function(){
  504 + var params = $('form#schinfoFineTune').serializeJSON();
  505 + if(!$.trim(params.fcsj)){
  506 + layer.msg('计发时间不能为空!');
  507 + return;
  508 + }
  509 + $post('/realSchedule/schInfoFineTune', params, function(rs){
  510 + layer.close(index);
  511 + if(rs.t)
  512 + _alone.refreshSchedule(rs.t);
  513 + });
  514 + });
  515 + }
  516 + });
416 } 517 }
417 } 518 }
418 519
src/main/resources/static/pages/control/line/js/webSocketHandle.js
@@ -8,7 +8,7 @@ setTimeout(function(){ @@ -8,7 +8,7 @@ setTimeout(function(){
8 $.post('/realSchedule/registerLine', {lineCodes: lineCodes} 8 $.post('/realSchedule/registerLine', {lineCodes: lineCodes}
9 ,function(rs){ 9 ,function(rs){
10 if(rs == 0){ 10 if(rs == 0){
11 - layer.msg('注册线路成功!'); 11 + console.log('注册线路成功!');
12 initWebSocket(); 12 initWebSocket();
13 } 13 }
14 }); 14 });
src/main/resources/static/pages/control/line/temps/alone_tp.html
@@ -212,7 +212,7 @@ @@ -212,7 +212,7 @@
212 <div class="form-custom-row"> 212 <div class="form-custom-row">
213 <div class="item"> 213 <div class="item">
214 <span class="item-label" style="width: 80px;">班次类型:</span> 214 <span class="item-label" style="width: 80px;">班次类型:</span>
215 - <input class="form-control nt-dictionary" disabled data-code={{bcType}} data-group=ScheduleType> 215 + <select class="form-control nt-dictionary" data-code={{bcType}} data-group=ScheduleType></select>
216 </div> 216 </div>
217 </div> 217 </div>
218 <div class="form-custom-row"> 218 <div class="form-custom-row">
@@ -236,7 +236,7 @@ @@ -236,7 +236,7 @@
236 <div class="form-custom-row"> 236 <div class="form-custom-row">
237 <div class="item"> 237 <div class="item">
238 <span class="item-label" style="width: 80px;">车辆编码: </span> 238 <span class="item-label" style="width: 80px;">车辆编码: </span>
239 - <input class="form-control" disabled value="{{clZbh}}" name="clZbh"> 239 + <select class="form-control" value="{{clZbh}}" name="clZbh"></select>
240 </div> 240 </div>
241 <div class="item"> 241 <div class="item">
242 <span class="item-label" style="width: 80px;">路&nbsp;牌: </span> 242 <span class="item-label" style="width: 80px;">路&nbsp;牌: </span>
@@ -258,11 +258,11 @@ @@ -258,11 +258,11 @@
258 <div class="form-custom-row"> 258 <div class="form-custom-row">
259 <div class="item"> 259 <div class="item">
260 <span class="item-label" style="width: 80px;">驾驶员: </span> 260 <span class="item-label" style="width: 80px;">驾驶员: </span>
261 - <input class="form-control" disabled value="{{jName}}" name="jName"> 261 + <select class="form-control" value="{{jName}}" name="jsy"></select>
262 </div> 262 </div>
263 <div class="item"> 263 <div class="item">
264 <span class="item-label" style="width: 80px;">售票员: </span> 264 <span class="item-label" style="width: 80px;">售票员: </span>
265 - <input class="form-control" disabled value="{{sName}}" name="sName"> 265 + <select class="form-control" value="{{sName}}" name="spy"></select>
266 </div> 266 </div>
267 </div> 267 </div>
268 <hr> 268 <hr>
@@ -351,6 +351,105 @@ @@ -351,6 +351,105 @@
351 </form> 351 </form>
352 </script> 352 </script>
353 353
  354 +<!-- 发车信息微调 -->
  355 +<script id="schinfo_fine_tune_temp" type="text/html">
  356 +<form action="#" class="form-horizontal form-custom" id="schinfoFineTune">
  357 + <input value={{id}} type="hidden" name="id">
  358 + <div class="form-body">
  359 + <div class="form-custom-row">
  360 + <div class="item">
  361 + <span class="item-label" style="width: 80px;">发车站点: </span>
  362 + <input class="form-control" disabled value="{{qdzName}}" name="qdzName">
  363 + </div>
  364 + <div class="item">
  365 + <span class="item-label" style="width: 80px;">结束站点: </span>
  366 + <input class="form-control" disabled value="{{zdzName}}" name="zdzName">
  367 + </div>
  368 + </div>
  369 +
  370 + <div class="form-custom-row">
  371 + <div class="item">
  372 + <span class="item-label" style="width: 80px;">车辆编码: </span>
  373 + <select class="form-control" value="{{clZbh}}" name="clZbh"></select>
  374 + </div>
  375 + <div class="item">
  376 + <span class="item-label" style="width: 80px;">路&nbsp;牌: </span>
  377 + <input class="form-control" disabled value="{{lpName}}" name="lpName">
  378 + </div>
  379 + </div>
  380 +
  381 + <div class="form-custom-row">
  382 + <div class="item">
  383 + <span class="item-label" style="width: 80px;">驾驶员: </span>
  384 + <select class="form-control" value="{{jName}}" name="jsy"></select>
  385 + </div>
  386 + <div class="item">
  387 + <span class="item-label" style="width: 80px;">售票员: </span>
  388 + <select class="form-control" value="{{sName}}" name="spy"></select>
  389 + </div>
  390 + </div>
  391 +
  392 + <div class="form-custom-row">
  393 + <div class="item">
  394 + <span class="item-label" style="width: 80px;">计发时刻: </span>
  395 + <input type="time" class="form-control" value="{{fcsj}}" name="fcsj">
  396 + </div>
  397 + <div class="item">
  398 + <span class="item-label" style="width: 80px;">实际时刻: </span>
  399 + <input type="time" class="form-control" value="{{fcsjActual}}" name="fcsjActual">
  400 + </div>
  401 + </div>
  402 +
  403 + <div class="form-custom-row">
  404 + <div class="item">
  405 + <span class="item-label" style="width: 80px;">到达时刻: </span>
  406 + <input type="time" class="form-control" value="{{zdsjActual}}" name="zdsjActual">
  407 + </div>
  408 + <div class="item">
  409 + <span class="item-label" style="width: 80px;">班次类型: </span>
  410 + <select type="text" class="form-control nt-dictionary" data-group="ScheduleType" data-code="{{bcType}}" name="bcType"></select>
  411 + </div>
  412 + </div>
  413 +
  414 + <div class="form-custom-row">
  415 + <div class="item full">
  416 + <span class="item-label" style="width: 80px;">调整说明: </span><br>
  417 + <select class="form-control" style="width: 100%;margin-top: 4px;" name="reason">
  418 + <option value="">请选择..</option>
  419 + <option value="配车">配车</option>
  420 + <option value="保养">保养</option>
  421 + <option value="故障">故障</option>
  422 + <option value="肇事">肇事</option>
  423 + <option value="路阻">路阻</option>
  424 + <option value="纠纷">纠纷</option>
  425 + <option value="缺人">缺人</option>
  426 + <option value="客稀">客稀</option>
  427 + <option value="缺车">缺车</option>
  428 + <option value="气候">气候</option>
  429 + <option value="援外">援外</option>
  430 + <option value="吊慢">吊慢</option>
  431 + <option value="抽减">抽减</option>
  432 + <option value="其他">其他</option>
  433 + </select>
  434 + </div>
  435 + </div>
  436 +
  437 + <div class="form-custom-row">
  438 + <div class="item full">
  439 + <textarea class="form-control" rows="4" placeholder="备注" name="remarks">{{remarks}}</textarea>
  440 + </div>
  441 + </div>
  442 +
  443 + <hr>
  444 + <div class="form-custom-footer">
  445 + <button type="button" class="btn blue-madison confirm"> <i class="fa fa-check"></i> &nbsp;&nbsp;确&nbsp;&nbsp;定 </button>
  446 + <button type="button" class="btn layui-layer-close"> 取消 </button>
  447 + </div>
  448 + </div>
  449 +</form>
  450 +<br>
  451 +</script>
  452 +
354 <script id="real_outgo_adjust_body_temp" type="text/html"> 453 <script id="real_outgo_adjust_body_temp" type="text/html">
355 <form action="#" class="form-horizontal form-custom" id="realOutgoAdjust"> 454 <form action="#" class="form-horizontal form-custom" id="realOutgoAdjust">
356 <input type="hidden" name="id" value={{id}}> 455 <input type="hidden" name="id" value={{id}}>
@@ -396,4 +495,18 @@ @@ -396,4 +495,18 @@
396 <button type="button" class="btn layui-layer-close"> 取消 </button> 495 <button type="button" class="btn layui-layer-close"> 取消 </button>
397 </div> 496 </div>
398 </form> 497 </form>
399 -</script>  
400 \ No newline at end of file 498 \ No newline at end of file
  499 +</script>
  500 +
  501 +<script id="sfsj_sch-detail-temp" type="text/html">
  502 +<ul class="sfsj-sch-detail">
  503 + <li><span>路牌名:</span>{{lpName}}</li>
  504 + <li><span>车辆编码:</span>{{clZbh}}</li>
  505 + <li><span>计发时刻:</span>{{fcsj}}</li>
  506 + <li><span>实发时刻:</span>{{fcsjActual}}</li>
  507 + <li><span>计达时刻:</span>{{zdsj}}</li>
  508 + <li><span>实达时刻:</span>{{zdsjActual}}</li>
  509 + <li><span>驾驶员:</span>{{jName}}</li>
  510 + <li><span>售票员:</span>{{sName}}</li>
  511 + <li><span>终点站:</span>{{zdzName}}</li>
  512 +</ul>
  513 +</script>
src/main/resources/static/pages/control/line/temps/home_table_tp.html deleted 100644 → 0
1 -<script id="home_table_temp" type="text/html">  
2 -{{each list as obj i}}  
3 -<tr>  
4 - <td style="width: 22%;"> {{obj.nbbm}} </td>  
5 - <td style="width: 17%;">  
6 - {{if obj.currSch != null}}  
7 - {{obj.currSch.lpName}}  
8 - {{else}}  
9 - 无  
10 - {{/if}}  
11 - </td>  
12 - <td style="width: 17%;"> {{obj.speed}} </td>  
13 - <td style="width: 22%;" > 暂无 </td>  
14 - <td style="width: 22%;" class="col_hide_1680">  
15 -{{if obj.nextSch != null}}  
16 - {{obj.nextSch.dfsj}}  
17 -{{else}}  
18 - 无  
19 -{{/if}}  
20 - </td>  
21 -</tr>  
22 -{{/each}}  
23 -</script>  
24 \ No newline at end of file 0 \ No newline at end of file
src/main/resources/static/pages/control/line/temps/home_tp.html
@@ -43,7 +43,8 @@ @@ -43,7 +43,8 @@
43 <table 43 <table
44 class="table table-striped table-bordered table-advance table-hover vehicDataTable" 44 class="table table-striped table-bordered table-advance table-hover vehicDataTable"
45 style="table-layout: fixed;" id="tab_{{lineObj.lineCode}}_0"> 45 style="table-layout: fixed;" id="tab_{{lineObj.lineCode}}_0">
46 - <tbody></tbody> 46 + <tbody>
  47 + </tbody>
47 </table> 48 </table>
48 </div> 49 </div>
49 </div> 50 </div>
@@ -118,6 +119,30 @@ @@ -118,6 +119,30 @@
118 </div> 119 </div>
119 </script> 120 </script>
120 121
  122 +<script id="home_table_temp" type="text/html">
  123 +{{each list as obj i}}
  124 +<tr data-nbbm="{{obj.nbbm}}">
  125 + <td style="width: 22%;"> {{obj.nbbm}} </td>
  126 + <td style="width: 17%;">
  127 + {{if obj.currSch != null}}
  128 + {{obj.currSch.lpName}}
  129 + {{else}}
  130 + 无
  131 + {{/if}}
  132 + </td>
  133 + <td style="width: 17%;"> {{obj.speed}} </td>
  134 + <td style="width: 22%;" > 暂无 </td>
  135 + <td style="width: 22%;" class="col_hide_1680">
  136 +{{if obj.nextSch != null}}
  137 + {{obj.nextSch.dfsj}}
  138 +{{else}}
  139 + 无
  140 +{{/if}}
  141 + </td>
  142 +</tr>
  143 +{{/each}}
  144 +</script>
  145 +
121 <script id="ctrl_f_search_temp" type="text/html"> 146 <script id="ctrl_f_search_temp" type="text/html">
122 <div class="ctrl_f_search"> 147 <div class="ctrl_f_search">
123 <select class="form-control pd90" id="ctrlFSearchSelect" ></select> 148 <select class="form-control pd90" id="ctrlFSearchSelect" ></select>