Commit 62716b49bcfee761b1887ab9c10ef8d60d4017bd
1 parent
bb7d840d
update
Showing
15 changed files
with
371 additions
and
110 deletions
src/main/java/com/bsth/entity/realcontrol/SvgAttribute.java
0 → 100644
| 1 | +package com.bsth.entity.realcontrol; | |
| 2 | + | |
| 3 | +import javax.persistence.Id; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * 主页SVG模拟图属性设置 | |
| 7 | + * Created by panzhao on 2017/1/6. | |
| 8 | + */ | |
| 9 | +public class SvgAttribute { | |
| 10 | + | |
| 11 | + @Id | |
| 12 | + private String lineCode; | |
| 13 | + | |
| 14 | + /** 要隐藏的站点编码 , 号分割多个 */ | |
| 15 | + private String hideStations; | |
| 16 | + | |
| 17 | + /** 站点别名 json对象字符串 */ | |
| 18 | + private String nicknames; | |
| 19 | +} | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -36,6 +36,7 @@ import com.bsth.util.*; |
| 36 | 36 | import com.bsth.websocket.handler.SendUtils; |
| 37 | 37 | import com.google.common.base.Splitter; |
| 38 | 38 | import com.google.common.collect.ArrayListMultimap; |
| 39 | +import com.google.common.collect.BiMap; | |
| 39 | 40 | import com.google.common.collect.Lists; |
| 40 | 41 | import com.google.common.collect.Multimap; |
| 41 | 42 | import org.apache.commons.lang3.StringUtils; |
| ... | ... | @@ -265,6 +266,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 265 | 266 | public Map<String, Object> save(ScheduleRealInfo t) { |
| 266 | 267 | Map<String, Object> rs = new HashMap<>(); |
| 267 | 268 | try{ |
| 269 | + if(BasicData.deviceId2NbbmMap.inverse().get(t.getClZbh()) == null){ | |
| 270 | + rs.put("msg", "车辆 " + t.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!"); | |
| 271 | + rs.put("status", ResponseCode.ERROR); | |
| 272 | + return rs; | |
| 273 | + } | |
| 274 | + | |
| 268 | 275 | SysUser user = SecurityUtils.getCurrentUser(); |
| 269 | 276 | String schDate = DayOfSchedule.currSchDateMap.get(t.getXlBm()); |
| 270 | 277 | |
| ... | ... | @@ -1725,9 +1732,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1725 | 1732 | Set<ScheduleRealInfo> set = new HashSet<>(); |
| 1726 | 1733 | |
| 1727 | 1734 | ScheduleRealInfo sch; |
| 1735 | + BiMap<String, String> map = BasicData.deviceId2NbbmMap.inverse(); | |
| 1728 | 1736 | |
| 1729 | 1737 | for(ChangePersonCar cpc : cpcs){ |
| 1730 | - | |
| 1738 | + | |
| 1739 | + if(map.get(cpc.getClZbh()) == null){ | |
| 1740 | + rs.put("msg", "车辆 " + cpc.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!"); | |
| 1741 | + rs.put("status", ResponseCode.ERROR); | |
| 1742 | + return rs; | |
| 1743 | + } | |
| 1744 | + | |
| 1731 | 1745 | sch = dayOfSchedule.get(cpc.getSchId()); |
| 1732 | 1746 | if(sch==null) |
| 1733 | 1747 | continue; |
| ... | ... | @@ -1741,13 +1755,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1741 | 1755 | if(StringUtils.isNotEmpty(cpc.getSpy())){ |
| 1742 | 1756 | persoChangeSPY(sch, cpc.getSpy().split("/")[0]); |
| 1743 | 1757 | } |
| 1744 | - | |
| 1758 | + | |
| 1745 | 1759 | //换车 |
| 1746 | 1760 | if(StringUtils.isNotEmpty(cpc.getClZbh())){ |
| 1747 | 1761 | set.add(sch); |
| 1748 | 1762 | set.addAll(dayOfSchedule.changeCar(sch, cpc.getClZbh())); |
| 1749 | 1763 | } |
| 1750 | - | |
| 1764 | + | |
| 1751 | 1765 | } |
| 1752 | 1766 | rs.put("ts", set); |
| 1753 | 1767 | rs.put("status", ResponseCode.SUCCESS); | ... | ... |
src/main/resources/static/real_control_v2/css/home.css
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | border: 1px solid #e6e6e6; |
| 40 | 40 | border-radius: 4px; |
| 41 | 41 | margin: 0 1px 4px 1px; |
| 42 | - min-height: 230px; | |
| 42 | + min-height: 240px; | |
| 43 | 43 | height: calc(100% / 3 - 12px); |
| 44 | 44 | padding: 3px; |
| 45 | 45 | } |
| ... | ... | @@ -75,30 +75,35 @@ |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | .home-gps-table dl dt:nth-of-type(3), .home-gps-table dl dd:nth-of-type(3) { |
| 78 | - width: 11% | |
| 78 | + width: 10% | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | .home-gps-table dl dt:nth-of-type(4), .home-gps-table dl dd:nth-of-type(4) { |
| 82 | - width: 19% | |
| 82 | + width: 10% | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | .home-gps-table dl dt:nth-of-type(5), .home-gps-table dl dd:nth-of-type(5) { |
| 86 | - width: 18% | |
| 86 | + width: 19% | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | .home-gps-table dl dt:nth-of-type(6), .home-gps-table dl dd:nth-of-type(6) { |
| 90 | - width: 10% | |
| 90 | + width: 18% | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | .home-gps-table dl dt:nth-of-type(7), .home-gps-table dl dd:nth-of-type(7) { |
| 94 | - width: 9% | |
| 94 | + width: 10% | |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | .home-gps-table dl dt:nth-of-type(8), .home-gps-table dl dd:nth-of-type(8) { |
| 98 | - width: 8%; | |
| 98 | + width: 9%; | |
| 99 | 99 | border-right: 0; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | +/*.home-gps-table dl dt:nth-of-type(9), .home-gps-table dl dd:nth-of-type(9) { | |
| 103 | + width: 8%; | |
| 104 | + border-right: 0; | |
| 105 | +}*/ | |
| 106 | + | |
| 102 | 107 | .data-wrap.up { |
| 103 | 108 | /*border-left: 1px solid #dadada;*/ |
| 104 | 109 | } |
| ... | ... | @@ -234,3 +239,30 @@ |
| 234 | 239 | .data-wrap.down::-webkit-scrollbar-thumb{ |
| 235 | 240 | box-shadow: 0 0 0 5px rgba(210, 103, 103, 0.44) inset; |
| 236 | 241 | }*/ |
| 242 | + | |
| 243 | +span.signal-state-outbounds{ | |
| 244 | + background: #f3ff00; | |
| 245 | + color: #d42727; | |
| 246 | + padding: 2px 3px; | |
| 247 | + border-radius: 3px; | |
| 248 | + font-size: 11px; | |
| 249 | +} | |
| 250 | + | |
| 251 | +.home-svg-edit-icon{ | |
| 252 | + position: absolute; | |
| 253 | + right: 10px; | |
| 254 | + top: 5px; | |
| 255 | + cursor: pointer; | |
| 256 | + z-index: 3; | |
| 257 | + opacity: 0; | |
| 258 | + transition: all .3s ease; | |
| 259 | +} | |
| 260 | + | |
| 261 | +.home-svg-edit-icon:hover{ | |
| 262 | + opacity: 1; | |
| 263 | +} | |
| 264 | + | |
| 265 | +.home-svg-edit-icon:before{ | |
| 266 | + font-family: FontAwesome; | |
| 267 | + content: "\f040"; | |
| 268 | +} | |
| 237 | 269 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/css/line_schedule.css
| ... | ... | @@ -151,13 +151,13 @@ |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | .ct_table .uk-badge { |
| 154 | - padding: 0 1px 0 1px; | |
| 155 | - text-indent: 0; | |
| 156 | - font-family: 华文细黑; | |
| 154 | + padding: 0 1px 0 1px; | |
| 155 | + text-indent: 0; | |
| 156 | + font-family: 华文细黑; | |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | .ct_table .uk-badge.uk-badge-notification{ |
| 160 | - text-indent: -1px; | |
| 160 | + text-indent: -1px; | |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | .schedule-body .ct_table dl._active, .schedule-body .ct_table>.ct_table_body dl._active:hover { |
| ... | ... | @@ -200,7 +200,7 @@ |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | .schedule-body .ct_table dl._search_hide{ |
| 203 | - display: none !important; | |
| 203 | + display: none !important; | |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | .context-menu-list.schedule-ct-menu { |
| ... | ... | @@ -246,34 +246,34 @@ span.fcsj-diff { |
| 246 | 246 | /** 图例 */ |
| 247 | 247 | |
| 248 | 248 | .tl-yzx { |
| 249 | - background: #c1ddf0; | |
| 249 | + background: rgb( 192,192,255); | |
| 250 | 250 | border-top: 1px solid #ebebeb !important; |
| 251 | 251 | color: #444; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | .tl-xxfc{ |
| 255 | - background: #ff7878; | |
| 256 | - color: #f1f1f1; | |
| 255 | + background: rgb(0,255,255); | |
| 256 | + color: #484747; | |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | .tl-wd{ |
| 260 | - background: #dede57; | |
| 260 | + background: rgb(255,255,0); | |
| 261 | 261 | color: #444; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | .tl-xxsd{ |
| 265 | - background: #e2de94; | |
| 266 | - color: #444; | |
| 265 | + background: rgb(205,133,63); | |
| 266 | + color: #f5f4f4; | |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | .tl-xxrd{ |
| 270 | - background: #c1ddf0; | |
| 270 | + background: rgb(255,99,71); | |
| 271 | 271 | border-top: 1px solid #ebebeb !important; |
| 272 | - color: #444; | |
| 272 | + color: #fff; | |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | .tl-qrlb { |
| 276 | - background: #7B6B24; | |
| 276 | + background: rgb( 128,128,0); | |
| 277 | 277 | color: #EAEBEC; |
| 278 | 278 | font-size: 13px; |
| 279 | 279 | } |
| ... | ... | @@ -283,7 +283,7 @@ span.fcsj-diff { |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | .tl-zzzx { |
| 286 | - background: #96F396; | |
| 286 | + background: rgb(173,255,47); | |
| 287 | 287 | color: #444; |
| 288 | 288 | } |
| 289 | 289 | |
| ... | ... | @@ -370,8 +370,8 @@ span.fcsj-diff { |
| 370 | 370 | |
| 371 | 371 | .ct-form-modal span.uk-form-help-inline, |
| 372 | 372 | .ct-form-modal p.uk-form-help-block{ |
| 373 | - color: #888888; | |
| 374 | - font-size: 13px; | |
| 373 | + color: #888888; | |
| 374 | + font-size: 13px; | |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | 377 | |
| ... | ... | @@ -532,8 +532,8 @@ dl.relevance-active dd:nth-child(n+2) { |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | dl.relevance-active.intimity dd:nth-child(n+2) { |
| 535 | - background: #76a6c7 !important; | |
| 536 | - color: white; | |
| 535 | + background: #8baabf !important; | |
| 536 | + color: white; | |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | dl.relevance-active.intimity dd:nth-child(n+2) a { |
| ... | ... | @@ -542,13 +542,24 @@ dl.relevance-active.intimity dd:nth-child(n+2) a { |
| 542 | 542 | |
| 543 | 543 | dl.relevance-active dd.tl-qrlb, |
| 544 | 544 | dl.relevance-active.intimity dd.tl-qrlb{ |
| 545 | - background: linear-gradient(to right, #7B6B24, #4992c3) !important; | |
| 545 | + background: linear-gradient(to right, #a9a911, #808000, #8baabf) !important; | |
| 546 | 546 | color: #f8e9cd; |
| 547 | 547 | } |
| 548 | 548 | |
| 549 | +dl.relevance-active dd.tl-wd, | |
| 550 | +dl.relevance-active.intimity dd.tl-wd{ | |
| 551 | + background: linear-gradient(to right, #ffff00, rgb(226, 226, 168), rgb(139, 170, 191)) !important; | |
| 552 | +} | |
| 553 | + | |
| 554 | +dl.relevance-active dd.tl-qrlb, | |
| 555 | +dl.relevance-active.intimity dd.tl-yzx{ | |
| 556 | + background: linear-gradient(to right, #dcdcfd, #c0c0ff, #8baabf) !important; | |
| 557 | + color: #272727; | |
| 558 | +} | |
| 559 | + | |
| 549 | 560 | dl.relevance-active dd.tl-zzzx, |
| 550 | 561 | dl.relevance-active.intimity dd.tl-zzzx { |
| 551 | - background: linear-gradient(to right, #96F396, #4992c3) !important; | |
| 562 | + background: linear-gradient(to right, #def5bb, #adff2f, #8baabf) !important; | |
| 552 | 563 | color: #565252; |
| 553 | 564 | } |
| 554 | 565 | |
| ... | ... | @@ -557,8 +568,23 @@ dl.relevance-active.intimity dd.tl-zzzx span.fcsj-diff { |
| 557 | 568 | color: #5e5a5a |
| 558 | 569 | } |
| 559 | 570 | |
| 571 | +dl.relevance-active dd.tl-xxsd, | |
| 572 | +dl.relevance-active.intimity dd.tl-xxsd { | |
| 573 | + background: linear-gradient(to right, #8baabf, #cd853f, #dc9958) !important; | |
| 574 | +} | |
| 575 | + | |
| 576 | +dl.relevance-active dd.tl-xxrd, | |
| 577 | +dl.relevance-active.intimity dd.tl-xxrd { | |
| 578 | + background: linear-gradient(to right, #8baabf, #ff6347, #ff8f7b) !important; | |
| 579 | +} | |
| 580 | + | |
| 581 | +dl.relevance-active dd.tl-xxfc, | |
| 582 | +dl.relevance-active.intimity dd.tl-xxfc { | |
| 583 | + background: linear-gradient(to right, #8baabf, rgb(43, 185, 185), rgb(0,255,255)) !important; | |
| 584 | +} | |
| 585 | + | |
| 560 | 586 | dl.relevance-active.intimity dd span.fcsj-diff { |
| 561 | - color: #d7d6d6; | |
| 587 | + color: #616060; | |
| 562 | 588 | } |
| 563 | 589 | |
| 564 | 590 | dl.relevance-active dd span.fcsj-diff{ |
| ... | ... | @@ -604,10 +630,10 @@ div.drop-rail.over { |
| 604 | 630 | } |
| 605 | 631 | |
| 606 | 632 | label.destroy-sch{ |
| 607 | - color: #928e8e; | |
| 633 | + color: #928e8e; | |
| 608 | 634 | } |
| 609 | 635 | label.destroy-sch small{ |
| 610 | - color: #e25e5e; | |
| 636 | + color: #e25e5e; | |
| 611 | 637 | } |
| 612 | 638 | |
| 613 | 639 | .main-schedule-table dl dt:nth-of-type(1), .main-schedule-table dl dd:nth-of-type(1) { |
| ... | ... | @@ -639,20 +665,20 @@ label.destroy-sch small{ |
| 639 | 665 | .main-schedule-table.ct_table dl.active, |
| 640 | 666 | .main-schedule-table.ct_table>.ct_table_body dl.active:hover, |
| 641 | 667 | .main-schedule-table.ct_table>.ct_table_body dl.context-menu-active{ |
| 642 | - background: #9393bf; | |
| 643 | - box-shadow: 0 0 4px #656c71; | |
| 644 | - color: white; | |
| 668 | + background: #9393bf; | |
| 669 | + box-shadow: 0 0 4px #656c71; | |
| 670 | + color: white; | |
| 645 | 671 | } |
| 646 | 672 | |
| 647 | 673 | .main-schedule-table span.sjfc-time{ |
| 648 | - color:#07d | |
| 674 | + color:#07d | |
| 649 | 675 | } |
| 650 | 676 | |
| 651 | 677 | .main-schedule-table dl.active span.sjfc-time{ |
| 652 | - background: white; | |
| 653 | - border-radius: 5px; | |
| 654 | - padding: 2px 1px; | |
| 655 | - vertical-align: middle; | |
| 678 | + background: white; | |
| 679 | + border-radius: 5px; | |
| 680 | + padding: 2px 1px; | |
| 681 | + vertical-align: middle; | |
| 656 | 682 | } |
| 657 | 683 | |
| 658 | 684 | .sub-task-table dl dt:nth-of-type(1), .sub-task-table dl dd:nth-of-type(1) { |
| ... | ... | @@ -682,7 +708,7 @@ label.destroy-sch small{ |
| 682 | 708 | } |
| 683 | 709 | |
| 684 | 710 | .sub-task-table>.ct_table_body>dl:last-child dd{ |
| 685 | - border-bottom: 0; | |
| 711 | + border-bottom: 0; | |
| 686 | 712 | } |
| 687 | 713 | |
| 688 | 714 | .add-temp-sch-icon{ |
| ... | ... | @@ -700,16 +726,16 @@ label.destroy-sch small{ |
| 700 | 726 | |
| 701 | 727 | |
| 702 | 728 | input.i-cbox[type=checkbox]{ |
| 703 | - width: 20px; | |
| 704 | - height: 18px; | |
| 705 | - vertical-align: middle; | |
| 706 | - margin-top: -3px; | |
| 729 | + width: 20px; | |
| 730 | + height: 18px; | |
| 731 | + vertical-align: middle; | |
| 732 | + margin-top: -3px; | |
| 707 | 733 | } |
| 708 | 734 | |
| 709 | 735 | .sys-note-80, |
| 710 | 736 | .sys-note-42{ |
| 711 | - width: calc(100% - 10px) !important; | |
| 712 | - margin: 5px !important; | |
| 737 | + width: calc(100% - 10px) !important; | |
| 738 | + margin: 5px !important; | |
| 713 | 739 | cursor: default; |
| 714 | 740 | } |
| 715 | 741 | |
| ... | ... | @@ -720,21 +746,21 @@ input.i-cbox[type=checkbox]{ |
| 720 | 746 | |
| 721 | 747 | .sys-note-80 .uk-panel-box, |
| 722 | 748 | .sys-note-42 .uk-panel-box{ |
| 723 | - padding: 10px; | |
| 749 | + padding: 10px; | |
| 724 | 750 | } |
| 725 | 751 | .sys-note-80 .uk-panel-title{ |
| 726 | - margin-bottom: 3px; | |
| 727 | - font-size: 15px; | |
| 752 | + margin-bottom: 3px; | |
| 753 | + font-size: 15px; | |
| 728 | 754 | } |
| 729 | 755 | |
| 730 | 756 | .sys-note-42 .title{ |
| 731 | - font-family: 微软雅黑; | |
| 732 | - margin-bottom: 3px; | |
| 757 | + font-family: 微软雅黑; | |
| 758 | + margin-bottom: 3px; | |
| 733 | 759 | } |
| 734 | 760 | .sys-note-80 .uk-button-group, |
| 735 | 761 | .sys-note-42 .uk-button-group{ |
| 736 | - display: block; | |
| 737 | - margin-top: 5px; | |
| 762 | + display: block; | |
| 763 | + margin-top: 5px; | |
| 738 | 764 | } |
| 739 | 765 | |
| 740 | 766 | |
| ... | ... | @@ -759,7 +785,7 @@ input.i-cbox[type=checkbox]{ |
| 759 | 785 | .sch-tzrc-table.ct_table dl.active, |
| 760 | 786 | .sch-tzrc-table.ct_table>.ct_table_body dl.active:hover, |
| 761 | 787 | .sch-tzrc-table.ct_table>.ct_table_body dl.context-menu-active{ |
| 762 | - background: #e6e6e6; | |
| 788 | + background: #e6e6e6; | |
| 763 | 789 | } |
| 764 | 790 | |
| 765 | 791 | .search_sch_panel{ |
| ... | ... | @@ -767,17 +793,17 @@ input.i-cbox[type=checkbox]{ |
| 767 | 793 | } |
| 768 | 794 | |
| 769 | 795 | .search_sch_panel .uk-form input[type=text]{ |
| 770 | - width: 80px; | |
| 771 | - background: #fafafa; | |
| 772 | - border: 0; | |
| 773 | - border-bottom: 1px solid #ddd; | |
| 774 | - font-size: 14px; | |
| 775 | - height: 20px; | |
| 776 | - transition: all .3s ease; | |
| 796 | + width: 80px; | |
| 797 | + background: #fafafa; | |
| 798 | + border: 0; | |
| 799 | + border-bottom: 1px solid #ddd; | |
| 800 | + font-size: 14px; | |
| 801 | + height: 20px; | |
| 802 | + transition: all .3s ease; | |
| 777 | 803 | } |
| 778 | 804 | |
| 779 | 805 | .search_sch_panel .uk-form div.uk-form-icon.active input[type=text]{ |
| 780 | - width: 145px; | |
| 806 | + width: 145px; | |
| 781 | 807 | } |
| 782 | 808 | |
| 783 | 809 | .search_sch_panel .uk-form div.uk-form-icon i.cancel{ |
| ... | ... | @@ -802,8 +828,8 @@ input.i-cbox[type=checkbox]{ |
| 802 | 828 | } |
| 803 | 829 | |
| 804 | 830 | .search_sch_panel .uk-form input[type=text]::-webkit-input-placeholder{ |
| 805 | - font-size: 12px; | |
| 806 | - color: #cecece; | |
| 831 | + font-size: 12px; | |
| 832 | + color: #cecece; | |
| 807 | 833 | } |
| 808 | 834 | .device_event_str{ |
| 809 | 835 | font-size: 10px; |
| ... | ... | @@ -1057,7 +1083,7 @@ i.signal_state_icon.uk-icon-reply{ |
| 1057 | 1083 | |
| 1058 | 1084 | .child-task-status.fail{ |
| 1059 | 1085 | color: red; |
| 1060 | - text-shadow: red 0px 0px 20px; | |
| 1086 | + /*text-shadow: red 0px 0px 20px;*/ | |
| 1061 | 1087 | } |
| 1062 | 1088 | |
| 1063 | 1089 | .child-task-status.fail span.calc-detail{ | ... | ... |
src/main/resources/static/real_control_v2/css/main.css
| ... | ... | @@ -147,11 +147,11 @@ svg.line-chart text.station_text { |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | svg.line-chart text.station_text.up { |
| 150 | - fill: #5E96D2; | |
| 150 | + fill: #4556b6; | |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | svg.line-chart text.station_text.down { |
| 154 | - fill: #C92121; | |
| 154 | + fill: #c94f21; | |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | svg.line-chart g.item:first-child>text { |
| ... | ... | @@ -166,7 +166,7 @@ svg.line-chart g.item:nth-last-child(3)>text { |
| 166 | 166 | |
| 167 | 167 | svg.line-chart g.gps-wrap>rect { |
| 168 | 168 | width: 34px; |
| 169 | - height: 18px; | |
| 169 | + height: 15px; | |
| 170 | 170 | /*fill: #fff;*/ |
| 171 | 171 | rx: 4px; |
| 172 | 172 | cursor: pointer; |
| ... | ... | @@ -188,7 +188,7 @@ svg.line-chart g.gps-wrap>rect.hover { |
| 188 | 188 | |
| 189 | 189 | svg.line-chart g.gps-wrap>text { |
| 190 | 190 | font-size: 13px; |
| 191 | - transform: translate(2px, 14px); | |
| 191 | + transform: translate(2px, 12px); | |
| 192 | 192 | pointer-events: none; |
| 193 | 193 | } |
| 194 | 194 | |
| ... | ... | @@ -506,3 +506,70 @@ li.map-panel{ |
| 506 | 506 | fill: #dd3829; |
| 507 | 507 | } |
| 508 | 508 | |
| 509 | + | |
| 510 | +.svg-edit-panel-wrap{ | |
| 511 | + width: 48%; | |
| 512 | + border: 1px solid #e1d3d3; | |
| 513 | + padding: 12px 0 0 0; | |
| 514 | + border-radius: 4px; | |
| 515 | + position: relative; | |
| 516 | + display: inline-block; | |
| 517 | + vertical-align: top; | |
| 518 | +} | |
| 519 | + | |
| 520 | +.svg-edit-panel-wrap .title-badge{ | |
| 521 | + position: absolute; | |
| 522 | + top: -10px; | |
| 523 | + left: 7px; | |
| 524 | + font-size: 13px; | |
| 525 | + background: #fff; | |
| 526 | + padding: 0 3px; | |
| 527 | + color: #888888; | |
| 528 | +} | |
| 529 | + | |
| 530 | +.station-list{ | |
| 531 | + width: 190px; | |
| 532 | + padding: 2px 7px; | |
| 533 | + height: 440px; | |
| 534 | + overflow: auto; | |
| 535 | + display: inline-block; | |
| 536 | +} | |
| 537 | + | |
| 538 | +.station-list .station-item{ | |
| 539 | + padding: 3px 0; | |
| 540 | + margin: 5px 0; | |
| 541 | + border-radius: 3px; | |
| 542 | + font-size: 13px; | |
| 543 | + text-indent: 7px; | |
| 544 | + cursor: pointer; | |
| 545 | + white-space: nowrap; | |
| 546 | + overflow: hidden; | |
| 547 | + text-overflow: ellipsis; | |
| 548 | +} | |
| 549 | + | |
| 550 | +.station-list .station-item.disable, | |
| 551 | +.station-list .station-item.disable:hover{ | |
| 552 | + background: #d5c9c9 !important; | |
| 553 | + color: #686565 !important; | |
| 554 | +} | |
| 555 | + | |
| 556 | +.station-list.up .station-item{ | |
| 557 | + background: #5364c3; | |
| 558 | + color: white; | |
| 559 | +} | |
| 560 | + | |
| 561 | +.station-list.up .station-item:hover{ | |
| 562 | + box-shadow: 0px 3px 6px 0 rgba(0, 0, 0, 0.2), 0px 1px 4px 0 rgba(0, 0, 0, 0.19); | |
| 563 | + background: #4556b6; | |
| 564 | +} | |
| 565 | + | |
| 566 | + | |
| 567 | +.station-list.down .station-item{ | |
| 568 | + background: #f95858; | |
| 569 | + color: white; | |
| 570 | +} | |
| 571 | + | |
| 572 | +.station-list.down .station-item:hover{ | |
| 573 | + box-shadow: 0px 3px 6px 0 rgba(0, 0, 0, 0.2), 0px 1px 4px 0 rgba(0, 0, 0, 0.19); | |
| 574 | + background: #e95151; | |
| 575 | +} | |
| 509 | 576 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/home/layout.html
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | <div class="uk-grid home-line-card" data-line-code="{{line.lineCode}}"> |
| 23 | 23 | <div class="uk-width-medium-1-5 data-wrap up" id="home_{{line.lineCode}}_0"></div> |
| 24 | 24 | <div class="uk-width-medium-3-5 svg-chart-wrap"> |
| 25 | + <div class="home-svg-edit-icon" data-line-code="{{line.lineCode}}"></div> | |
| 25 | 26 | <div class="top-center-big-text"> |
| 26 | 27 | {{line.name}} |
| 27 | 28 | </div> | ... | ... |
src/main/resources/static/real_control_v2/fragments/home/line_panel.html
| ... | ... | @@ -10,12 +10,12 @@ |
| 10 | 10 | <dl> |
| 11 | 11 | <dt>车辆编码</dt> |
| 12 | 12 | <dt>速度</dt> |
| 13 | - <dt>终点时间</dt> | |
| 13 | + <dt>终点</dt> | |
| 14 | + <dt>状态</dt> | |
| 14 | 15 | <dt>当前站点</dt> |
| 15 | 16 | <dt>终点站</dt> |
| 16 | 17 | <dt>计划到达</dt> |
| 17 | 18 | <dt>驾驶员</dt> |
| 18 | - <dt>售票员</dt> | |
| 19 | 19 | </dl> |
| 20 | 20 | </div> |
| 21 | 21 | <div class="ct_table_body"></div> |
| ... | ... | @@ -29,11 +29,29 @@ |
| 29 | 29 | <dd title="{{nbbm}}"><a>{{nbbm}}</a></dd> |
| 30 | 30 | <dd>{{speed}}</dd> |
| 31 | 31 | <dd>{{expectStopTime}}</dd> |
| 32 | + <dd> | |
| 33 | + {{if abnormal != null}} | |
| 34 | + {{if abnormal == 'outBounds'}} | |
| 35 | + 越界 | |
| 36 | + {{/if}} | |
| 37 | + {{else}} | |
| 38 | + 正常 | |
| 39 | + {{/if}} | |
| 40 | + </dd> | |
| 32 | 41 | <dd title="{{stationName}}">{{stationName}}</dd> |
| 33 | 42 | <dd></dd> |
| 34 | 43 | <dd></dd> |
| 35 | 44 | <dd></dd> |
| 36 | - <dd></dd> | |
| 37 | 45 | </dl> |
| 38 | -</script> | |
| 46 | + </script> | |
| 47 | + | |
| 48 | + <script id="home-gps-abnormal-temp" type="text/html"> | |
| 49 | + {{if abnormal != null}} | |
| 50 | + {{if abnormal == 'outBounds'}} | |
| 51 | + <span class="signal-state-outbounds">越界</span> | |
| 52 | + {{/if}} | |
| 53 | + {{else}} | |
| 54 | + 正常 | |
| 55 | + {{/if}} | |
| 56 | + </script> | |
| 39 | 57 | </div> | ... | ... |
src/main/resources/static/real_control_v2/fragments/home/svg_edit.html
0 → 100644
| 1 | +<div class="uk-modal" id="home-svg-edit-modal"> | |
| 2 | + <div class="uk-modal-dialog" style="width: 930px;"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <div class="uk-modal-header"> | |
| 5 | + <h2>模拟图数据编辑</h2></div> | |
| 6 | + | |
| 7 | + <div class="svg-edit-panel-wrap station-list-wrap" > | |
| 8 | + <span class="title-badge">站点缩略</span> | |
| 9 | + </div> | |
| 10 | + | |
| 11 | + | |
| 12 | + <div class="svg-edit-panel-wrap" style="margin-left: 25px;"> | |
| 13 | + <span class="title-badge">站点重命名</span> | |
| 14 | + </div> | |
| 15 | + | |
| 16 | + </div> | |
| 17 | + | |
| 18 | + <script id="svg-edit-station-list-temp" type="text/html"> | |
| 19 | + <div class="station-list up"> | |
| 20 | + {{each list[0] as s i}} | |
| 21 | + <div class="station-item">{{s.stationName}}</div> | |
| 22 | + {{/each}} | |
| 23 | + </div> | |
| 24 | + | |
| 25 | + <div class="station-list down" style="margin-left: 8px;"> | |
| 26 | + {{each list[1] as s i}} | |
| 27 | + <div class="station-item">{{s.stationName}}</div> | |
| 28 | + {{/each}} | |
| 29 | + </div> | |
| 30 | + </script> | |
| 31 | + | |
| 32 | + <script> | |
| 33 | + (function () { | |
| 34 | + var modal = '#home-svg-edit-modal', | |
| 35 | + lineCode; | |
| 36 | + | |
| 37 | + $(modal).on('init', function (e, data) { | |
| 38 | + lineCode = data.lineCode; | |
| 39 | + //站点路由 | |
| 40 | + var routeArray = gb_common.groupBy(gb_data_basic.stationRoutes(lineCode), 'directions'); | |
| 41 | + //下行倒序 | |
| 42 | + routeArray[1].sort(function (a, b) { | |
| 43 | + return b.stationRouteCode - a.stationRouteCode; | |
| 44 | + }); | |
| 45 | + $('.station-list-wrap', modal).append(template('svg-edit-station-list-temp', {list: routeArray})); | |
| 46 | + | |
| 47 | + $('.station-item', modal).on('click', function () { | |
| 48 | + if($(this).hasClass('disable')){ | |
| 49 | + $(this).removeClass('disable'); | |
| 50 | + } | |
| 51 | + else | |
| 52 | + $(this).addClass('disable'); | |
| 53 | + }); | |
| 54 | + }); | |
| 55 | + })(); | |
| 56 | + </script> | |
| 57 | +</div> | ... | ... |
src/main/resources/static/real_control_v2/js/data/data_basic.js
| ... | ... | @@ -98,11 +98,11 @@ var gb_data_basic = (function () { |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | return null; |
| 101 | - } | |
| 101 | + }; | |
| 102 | 102 | |
| 103 | 103 | var getLineInformation = function (lineCode) { |
| 104 | 104 | return lineInformations[lineCode]; |
| 105 | - } | |
| 105 | + }; | |
| 106 | 106 | //文件载入完毕 |
| 107 | 107 | res_load_ep.emitLater('load_data_basic'); |
| 108 | 108 | ... | ... |
src/main/resources/static/real_control_v2/js/data/data_gps.js
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | var gb_data_gps = (function() { |
| 4 | 4 | |
| 5 | 5 | //fixed time refresh delay |
| 6 | - var delay = 1000 * 6; | |
| 6 | + var delay = 1000 * 5; | |
| 7 | 7 | //deviceId ——> gps |
| 8 | 8 | var realData = {}; |
| 9 | 9 | //refresh after callback |
| ... | ... | @@ -34,6 +34,7 @@ var gb_data_gps = (function() { |
| 34 | 34 | upArr = [], |
| 35 | 35 | upDownChange = []; |
| 36 | 36 | |
| 37 | + var schArray; | |
| 37 | 38 | $.each(rs, function() { |
| 38 | 39 | old = realData[this.deviceId]; |
| 39 | 40 | if (old) { |
| ... | ... | @@ -45,16 +46,26 @@ var gb_data_gps = (function() { |
| 45 | 46 | } else |
| 46 | 47 | addArr.push(this); |
| 47 | 48 | |
| 49 | + //班次信息 | |
| 50 | + if(this.schId){ | |
| 51 | + schArray=gb_schedule_table.findScheduleByLine(this.lineId); | |
| 52 | + if(schArray) | |
| 53 | + this.sch = schArray[this.schId]; | |
| 54 | + } | |
| 55 | + | |
| 48 | 56 | //时间格式化 |
| 49 | 57 | this.dateStr = moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss'); |
| 58 | + //异常检测 | |
| 59 | + gb_gps_abnormal.check(this); | |
| 50 | 60 | realData[this.deviceId] = this; |
| 51 | 61 | }); |
| 52 | 62 | |
| 53 | - console.log('add array size: ' + addArr.length, 'up array size: ' + upArr.length); | |
| 63 | + //console.log('add array size: ' + addArr.length, 'up array size: ' + upArr.length); | |
| 54 | 64 | //CCCallFuncN |
| 55 | 65 | $.each(refreshEventCallbacks, function(i, cb) { |
| 56 | 66 | cb(addArr, upArr, upDownChange); |
| 57 | 67 | }); |
| 68 | + | |
| 58 | 69 | }; |
| 59 | 70 | |
| 60 | 71 | var startFixedTime; |
| ... | ... | @@ -81,11 +92,11 @@ var gb_data_gps = (function() { |
| 81 | 92 | }; |
| 82 | 93 | |
| 83 | 94 | var findOne = function(deviceId){ |
| 84 | - return realData[deviceId]; | |
| 95 | + return realData[deviceId]; | |
| 85 | 96 | }; |
| 86 | 97 | |
| 87 | 98 | var findGpsByNbbm = function(nbbm){ |
| 88 | - return realData[gb_data_basic.nbbm2deviceMap()[nbbm]]; | |
| 99 | + return realData[gb_data_basic.nbbm2deviceMap()[nbbm]]; | |
| 89 | 100 | }; |
| 90 | 101 | |
| 91 | 102 | return { | ... | ... |
src/main/resources/static/real_control_v2/js/data/gps_abnormal.js
| ... | ... | @@ -24,7 +24,16 @@ var gb_gps_abnormal = (function () { |
| 24 | 24 | min = distance; |
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | - //console.log('最短距离', min, gps); | |
| 27 | + //越界阈值 120米 | |
| 28 | + var threshold=120; | |
| 29 | + if(gps.sch && gps.sch.bcType == 'in') | |
| 30 | + return; | |
| 31 | + | |
| 32 | + if(min > threshold){ | |
| 33 | + gps.abnormal = 'outBounds'; | |
| 34 | + gps.outBoundsDistance = min; | |
| 35 | + } | |
| 36 | + //console.log('最短距离', min, gps.nbbm); | |
| 28 | 37 | }; |
| 29 | 38 | |
| 30 | 39 | /** | ... | ... |
src/main/resources/static/real_control_v2/js/home/layout.js
| 1 | 1 | /* home js */ |
| 2 | 2 | |
| 3 | -var gb_home_layout = (function() { | |
| 3 | +var gb_home_layout = (function () { | |
| 4 | 4 | |
| 5 | 5 | var temps; |
| 6 | 6 | |
| 7 | - var layout = function(cb) { | |
| 7 | + var layout = function (cb) { | |
| 8 | 8 | //footer line name tabs |
| 9 | 9 | var codeArray = gb_data_basic.line_idx.split(','), |
| 10 | 10 | tabsArray = [], |
| 11 | 11 | len = codeArray.length; |
| 12 | 12 | for (var i = 0; i < len;) { |
| 13 | - tabsArray.push(connectArr(codeArray.slice(i, i += 3), ',', function(item) { | |
| 13 | + tabsArray.push(connectArr(codeArray.slice(i, i += 3), ',', function (item) { | |
| 14 | 14 | return gb_data_basic.codeToLine[item].name; |
| 15 | 15 | })); |
| 16 | 16 | } |
| 17 | 17 | //load template |
| 18 | - $.get('/real_control_v2/fragments/home/layout.html', function(dom) { | |
| 18 | + $.get('/real_control_v2/fragments/home/layout.html', function (dom) { | |
| 19 | 19 | temps = gb_common.compileTempByDom(dom); |
| 20 | 20 | |
| 21 | 21 | var htmlStr = temps['home-layout-tab-temp']({ |
| ... | ... | @@ -26,7 +26,7 @@ var gb_home_layout = (function() { |
| 26 | 26 | //render line panel |
| 27 | 27 | var i = 0, |
| 28 | 28 | data, renderFun = temps['home-layout-line-temp']; |
| 29 | - $('ul#home-main-content li').each(function() { | |
| 29 | + $('ul#home-main-content li').each(function () { | |
| 30 | 30 | data = gb_data_basic.findLineByCodes(codeArray.slice(i, i += 3)); |
| 31 | 31 | |
| 32 | 32 | $(this).html(renderFun({list: data})); |
| ... | ... | @@ -36,7 +36,12 @@ var gb_home_layout = (function() { |
| 36 | 36 | |
| 37 | 37 | cb && cb(); |
| 38 | 38 | }); |
| 39 | - } | |
| 39 | + }; | |
| 40 | + | |
| 41 | + //click svg edit icon | |
| 42 | + $(document).on('click', '.home-svg-edit-icon', function () { | |
| 43 | + open_modal('/real_control_v2/fragments/home/svg_edit.html', {lineCode: $(this).data('line-code')}); | |
| 44 | + }); | |
| 40 | 45 | |
| 41 | 46 | //文件载入完毕 |
| 42 | 47 | res_load_ep.emitLater('load_home_layout'); | ... | ... |
src/main/resources/static/real_control_v2/js/home/line_panel.js
| ... | ... | @@ -83,21 +83,18 @@ var gb_home_line_panel = (function() { |
| 83 | 83 | $(cells[1]).text(t.speed); |
| 84 | 84 | $(cells[2]).html(t.expectStopTime == null ? '' : t.expectStopTime); |
| 85 | 85 | |
| 86 | + //状态 | |
| 87 | + $(cells[3]).html(temps['home-gps-abnormal-temp'](t)); | |
| 88 | + | |
| 86 | 89 | if(!t.stationName) |
| 87 | 90 | t.stationName=''; |
| 88 | - $(cells[3]).text(t.stationName).attr('title', t.stationName); | |
| 91 | + $(cells[4]).text(t.stationName).attr('title', t.stationName); | |
| 89 | 92 | |
| 90 | 93 | //班次信息 |
| 91 | - if(t.schId){ | |
| 92 | - var sch=gb_schedule_table.findScheduleByLine(t.lineId)[t.schId]; | |
| 93 | - if(!sch) | |
| 94 | - return; | |
| 95 | - | |
| 96 | - $(cells[4]).text(sch.zdzName); | |
| 97 | - $(cells[5]).text(sch.zdsj); | |
| 98 | - $(cells[6]).text(sch.jName); | |
| 99 | - if(sch.sName) | |
| 100 | - $(cells[7]).text(sch.sName); | |
| 94 | + if(t.sch){ | |
| 95 | + $(cells[5]).text(t.sch.zdzName); | |
| 96 | + $(cells[6]).text(t.sch.zdsj); | |
| 97 | + $(cells[7]).text(t.sch.jName); | |
| 101 | 98 | } |
| 102 | 99 | }; |
| 103 | 100 | ... | ... |
src/main/resources/static/real_control_v2/js/main.js
src/main/resources/static/real_control_v2/js/utils/svg_chart.js
| ... | ... | @@ -3,9 +3,11 @@ |
| 3 | 3 | var gb_svg_chart = (function () { |
| 4 | 4 | |
| 5 | 5 | //chart height |
| 6 | - var chart_height = 123; | |
| 6 | + var chart_height = 122; | |
| 7 | 7 | //left right padding |
| 8 | 8 | var x_padd = 30; |
| 9 | + //上空白部分 | |
| 10 | + var y_top_padd = 14; | |
| 9 | 11 | //text max size |
| 10 | 12 | var t_max_size = 7; |
| 11 | 13 | //svg namespace |
| ... | ... | @@ -24,7 +26,7 @@ var gb_svg_chart = (function () { |
| 24 | 26 | var h = wrap.actual('outerHeight'); |
| 25 | 27 | //隐藏元素取最外层的高度 |
| 26 | 28 | return h < 20 ? wrap.parent().actual('outerHeight') - 2 : h; |
| 27 | - } | |
| 29 | + }; | |
| 28 | 30 | |
| 29 | 31 | var draw_line = function (lineCode, wrap) { |
| 30 | 32 | |
| ... | ... | @@ -40,7 +42,7 @@ var gb_svg_chart = (function () { |
| 40 | 42 | return xScale(i); |
| 41 | 43 | }, |
| 42 | 44 | cy = function () { |
| 43 | - return (h - chart_height) / 2; | |
| 45 | + return (h - chart_height) / 2 + y_top_padd; | |
| 44 | 46 | }, |
| 45 | 47 | ty = function (d) { |
| 46 | 48 | return cy() + calc_text_y(cat_text(d.name[0])); |
| ... | ... | @@ -62,7 +64,7 @@ var gb_svg_chart = (function () { |
| 62 | 64 | |
| 63 | 65 | $(that).after(dText); |
| 64 | 66 | return cx(d, i) - 8; |
| 65 | - } | |
| 67 | + }; | |
| 66 | 68 | |
| 67 | 69 | //add svg dom |
| 68 | 70 | var svg = d3.select(wrap[0]).append('svg') |
| ... | ... | @@ -125,7 +127,10 @@ var gb_svg_chart = (function () { |
| 125 | 127 | items.append('text').classed({ |
| 126 | 128 | 'station_text': true, |
| 127 | 129 | 'up': function (d) { |
| 128 | - return d.type == 3 ? true : false; | |
| 130 | + return d.type == 3 || d.type == 0 ? true : false; | |
| 131 | + }, | |
| 132 | + 'down': function (d) { | |
| 133 | + return d.type == 1 ? true : false; | |
| 129 | 134 | } |
| 130 | 135 | }) |
| 131 | 136 | .text(function (d) { |
| ... | ... | @@ -168,7 +173,7 @@ var gb_svg_chart = (function () { |
| 168 | 173 | var circle = get_circle(gps.stopNo + '_' + gps.upDown, svg); |
| 169 | 174 | if (!circle) return -100; |
| 170 | 175 | |
| 171 | - return circle.attr('cx') - 14; | |
| 176 | + return circle.attr('cx') - 17.5; | |
| 172 | 177 | }, |
| 173 | 178 | gy = function (gps, svg) { |
| 174 | 179 | var circle = get_circle(gps.stopNo + '_' + gps.upDown, svg); |
| ... | ... | @@ -177,7 +182,7 @@ var gb_svg_chart = (function () { |
| 177 | 182 | var cy = parseInt(circle.attr('cy')), |
| 178 | 183 | index = line_gps_index[gps.lineId][gps.stopNo + '_' + gps.upDown][gps.deviceId]; |
| 179 | 184 | |
| 180 | - return gps.upDown == 0 ? cy - 25 - (index * 21) : cy + 7 + (index * 21); | |
| 185 | + return gps.upDown == 0 ? cy - 22 - (index * 17) : cy + 6 + (index * 19); | |
| 181 | 186 | }, |
| 182 | 187 | ups_gps = function (d) { |
| 183 | 188 | return d.gpsUps; |
| ... | ... | @@ -209,7 +214,7 @@ var gb_svg_chart = (function () { |
| 209 | 214 | return d.deviceId; |
| 210 | 215 | }, |
| 211 | 216 | gps_update_point = function (e, svg) { |
| 212 | - e.transition().attr('x', function (d) { | |
| 217 | + e.transition().duration(3000).attr('x', function (d) { | |
| 213 | 218 | return gx(d, svg); |
| 214 | 219 | }) |
| 215 | 220 | .attr('y', function (d) { |
| ... | ... | @@ -226,7 +231,7 @@ var gb_svg_chart = (function () { |
| 226 | 231 | }, |
| 227 | 232 | tx_id = function (d) { |
| 228 | 233 | return 'tx_' + d.deviceId; |
| 229 | - } | |
| 234 | + }; | |
| 230 | 235 | |
| 231 | 236 | var setGps = function (lineCode) { |
| 232 | 237 | var svgs = $('.line-chart[data-code=' + lineCode + ']'), | ... | ... |