Commit 10f61394b67e0eb6a1a7eda9a03b64d0c77588e9

Authored by 潘钊
1 parent 78cdf33f

线调页面完善

Showing 41 changed files with 3022 additions and 491 deletions

Too many changes to show.

To preserve performance only 41 of 79 files are displayed.

src/main/java/com/bsth/common/Constants.java
... ... @@ -24,7 +24,7 @@ public class Constants {
24 24 /**
25 25 * 线调部分子页面不做拦截,便于浏览器缓存
26 26 */
27   - public static final String XD_CHILD_PAGES = "/pages/control/line/child_pages/**";
  27 + public static final String XD_CHILD_PAGES = "/real_control_v2/**";
28 28 public static final String XD_TEMPS = "/pages/control/line/temps/**";
29 29  
30 30 //车载网关上行接口
... ...
src/main/java/com/bsth/controller/realcontrol/BasicDataController.java
1 1 package com.bsth.controller.realcontrol;
2 2  
  3 +import java.util.HashMap;
  4 +import java.util.List;
3 5 import java.util.Map;
4 6  
5 7 import org.springframework.web.bind.annotation.RequestMapping;
6 8 import org.springframework.web.bind.annotation.RestController;
7 9  
  10 +import com.alibaba.fastjson.JSON;
  11 +import com.alibaba.fastjson.serializer.PropertyFilter;
8 12 import com.bsth.data.BasicData;
9 13  
10 14 @RestController
... ... @@ -21,4 +25,40 @@ public class BasicDataController {
21 25 public Map<String, String> findLineCodeMap(){
22 26 return BasicData.lineCode2NameMap;
23 27 }
  28 +
  29 + @RequestMapping("/parks")
  30 + public Map<String, String> findParks(){
  31 + Map<String, String> rs = new HashMap<>();
  32 + List<String> codes = BasicData.parkCodeList;
  33 + for(String code : codes){
  34 + rs.put(code, BasicData.stationCode2NameMap.get(code));
  35 + }
  36 + return rs;
  37 + }
  38 +
  39 + @RequestMapping("/personnel")
  40 + public Map<String, Object> findPersonnelInfo(){
  41 + Map<String, Object> rs = new HashMap<>();
  42 + PersonnelFieldFilter filter=new PersonnelFieldFilter();
  43 + //驾驶员
  44 + rs.put("jsy", JSON.parse(JSON.toJSONString(BasicData.jsyMap.values(), filter)));
  45 + //售票员
  46 + rs.put("spy", JSON.parse(JSON.toJSONString(BasicData.spyMap.values(), filter)));
  47 + return rs;
  48 + }
  49 +
  50 +
  51 + public class PersonnelFieldFilter implements PropertyFilter{
  52 +
  53 + String[] whiteList=new String[]{"jobCode", "personnelName", "brancheCompany"};
  54 + @Override
  55 + public boolean apply(Object object, String name, Object value) {
  56 + for(String f : whiteList){
  57 + if(name.equals(f))
  58 + return true;
  59 + }
  60 + return false;
  61 + }
  62 +
  63 + }
24 64 }
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -7,6 +7,7 @@ import java.util.List;
7 7 import java.util.Map;
8 8  
9 9 import org.apache.commons.lang3.StringEscapeUtils;
  10 +import org.drools.core.runtime.help.impl.XStreamJSon.JSonAbortWorkItemConverter;
10 11 import org.springframework.beans.factory.annotation.Autowired;
11 12 import org.springframework.web.bind.annotation.PathVariable;
12 13 import org.springframework.web.bind.annotation.RequestMapping;
... ... @@ -14,7 +15,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
14 15 import org.springframework.web.bind.annotation.RequestParam;
15 16 import org.springframework.web.bind.annotation.RestController;
16 17  
  18 +import com.alibaba.fastjson.JSON;
  19 +import com.alibaba.fastjson.JSONArray;
17 20 import com.bsth.controller.BaseController;
  21 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  22 +import com.bsth.controller.realcontrol.dto.DfsjChange;
18 23 import com.bsth.data.BasicData;
19 24 import com.bsth.data.schedule.DayOfSchedule;
20 25 import com.bsth.entity.realcontrol.ScheduleRealInfo;
... ... @@ -42,10 +47,12 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
42 47  
43 48 /**
44 49 *
  50 + * 改由通过 websocket 注册监听!!!
  51 + *
45 52 * @Title: registerLine @Description: TODO(注册线路,后续才能收到数据推送) @param @param
46 53 * lineCodes @throws
47 54 * 用GET 防止监控模式下被拦截
48   - */
  55 +
49 56 @RequestMapping(value = "/registerLine", method = RequestMethod.GET)
50 57 public int registerLine(@RequestParam String lineCodes) {
51 58 List<String> list = Splitter.on(",").trimResults().omitEmptyStrings().splitToList(lineCodes);
... ... @@ -58,7 +65,7 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
58 65 BasicData.lineCode2SocketUserMap.put(line, userName);
59 66  
60 67 return 0;
61   - }
  68 + }*/
62 69  
63 70 /**
64 71 *
... ... @@ -67,20 +74,19 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
67 74 */
68 75 @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST)
69 76 public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks,
70   - @RequestParam String dfsj, String clZbh, String jsy, String spy) {
71   - return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, clZbh, jsy, spy);
  77 + @RequestParam String dfsj/*, String clZbh, String jsy, String spy*/) {
  78 + return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj/*, clZbh, jsy, spy*/);
72 79 }
73 80  
74 81 /**
75 82 *
76   - * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID
77   - * ,分隔 @param @param spaceAdjust 自动调整后续间隔(1 是 -1 否) @param @param remarks
78   - * 备注 @param @param reason 理由 @param @param spaceNum 间隔(分钟) @throws
  83 + * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔
79 84 */
80 85 @RequestMapping(value = "/destroy", method = RequestMethod.POST)
81   - public Map<String, Object> destroy(@RequestParam String idsStr, @RequestParam(defaultValue = "-1") int spaceAdjust,
82   - @RequestParam String remarks, @RequestParam String reason, @RequestParam(defaultValue = "0") int spaceNum) {
83   - return scheduleRealInfoService.destroy(idsStr, spaceAdjust, remarks, reason, spaceNum);
  86 + public Map<String, Object> destroy(@RequestParam String idsStr
  87 + /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/,
  88 + @RequestParam String remarks/*, @RequestParam String reason, @RequestParam(defaultValue = "0") int spaceNum*/) {
  89 + return scheduleRealInfoService.destroy(idsStr/*, spaceAdjust*/, remarks/*, reason, spaceNum*/);
84 90 }
85 91  
86 92 /**
... ... @@ -380,4 +386,18 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
380 386 public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){
381 387 return scheduleRealInfoService.realScheduleList(line,date);
382 388 }
  389 +
  390 + @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST)
  391 + public Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){
  392 + cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson);
  393 + List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class);
  394 + return scheduleRealInfoService.multi_tzrc(cpcs);
  395 + }
  396 +
  397 + @RequestMapping(value="/multi_dftz", method=RequestMethod.POST)
  398 + public Map<String, Object> multi_dftz(@RequestParam String dcsJson){
  399 + dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson);
  400 + List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class);
  401 + return scheduleRealInfoService.multi_dftz(dfsjcs);
  402 + }
383 403 }
... ...
src/main/java/com/bsth/controller/realcontrol/dto/ChangePersonCar.java 0 → 100644
  1 +package com.bsth.controller.realcontrol.dto;
  2 +
  3 +/**
  4 + *
  5 + * @ClassName: ChangePersonCar
  6 + * @Description: TODO(换人换车)
  7 + * @author PanZhao
  8 + * @date 2016年10月30日 下午10:06:54
  9 + *
  10 + */
  11 +public class ChangePersonCar {
  12 +
  13 + /** 班次ID */
  14 + private Long schId;
  15 +
  16 + /** 要更换的车辆自编号 */
  17 + private String clZbh;
  18 +
  19 + /** 驾驶员 工号/姓名 */
  20 + private String jsy;
  21 +
  22 + /** 售票员 工号/姓名 */
  23 + private String spy;
  24 +
  25 + public Long getSchId() {
  26 + return schId;
  27 + }
  28 +
  29 + public void setSchId(Long schId) {
  30 + this.schId = schId;
  31 + }
  32 +
  33 + public String getJsy() {
  34 + return jsy;
  35 + }
  36 +
  37 + public void setJsy(String jsy) {
  38 + this.jsy = jsy;
  39 + }
  40 +
  41 + public String getSpy() {
  42 + return spy;
  43 + }
  44 +
  45 + public void setSpy(String spy) {
  46 + this.spy = spy;
  47 + }
  48 +
  49 + public String getClZbh() {
  50 + return clZbh;
  51 + }
  52 +
  53 + public void setClZbh(String clZbh) {
  54 + this.clZbh = clZbh;
  55 + }
  56 +
  57 +}
... ...
src/main/java/com/bsth/controller/realcontrol/dto/DfsjChange.java 0 → 100644
  1 +package com.bsth.controller.realcontrol.dto;
  2 +
  3 +/**
  4 + *
  5 + * @ClassName: DfsjChange
  6 + * @Description: TODO(待发调整)
  7 + * @author PanZhao
  8 + * @date 2016年10月31日 上午1:00:11
  9 + *
  10 + */
  11 +public class DfsjChange {
  12 +
  13 + private Long schId;
  14 +
  15 + private String old_dfsj;
  16 +
  17 + private String new_dfsj;
  18 +
  19 + public Long getSchId() {
  20 + return schId;
  21 + }
  22 +
  23 + public void setSchId(Long schId) {
  24 + this.schId = schId;
  25 + }
  26 +
  27 + public String getOld_dfsj() {
  28 + return old_dfsj;
  29 + }
  30 +
  31 + public void setOld_dfsj(String old_dfsj) {
  32 + this.old_dfsj = old_dfsj;
  33 + }
  34 +
  35 + public String getNew_dfsj() {
  36 + return new_dfsj;
  37 + }
  38 +
  39 + public void setNew_dfsj(String new_dfsj) {
  40 + this.new_dfsj = new_dfsj;
  41 + }
  42 +
  43 +}
... ...
src/main/java/com/bsth/data/BasicData.java
... ... @@ -17,12 +17,14 @@ import com.bsth.Application;
17 17 import com.bsth.entity.CarPark;
18 18 import com.bsth.entity.Cars;
19 19 import com.bsth.entity.Line;
  20 +import com.bsth.entity.Personnel;
20 21 import com.bsth.entity.Station;
21 22 import com.bsth.entity.StationRoute;
22 23 import com.bsth.entity.schedule.CarConfigInfo;
23 24 import com.bsth.repository.CarParkRepository;
24 25 import com.bsth.repository.CarsRepository;
25 26 import com.bsth.repository.LineRepository;
  27 +import com.bsth.repository.PersonnelRepository;
26 28 import com.bsth.repository.StationRepository;
27 29 import com.bsth.repository.StationRouteRepository;
28 30 import com.bsth.repository.schedule.CarConfigInfoRepository;
... ... @@ -74,6 +76,14 @@ public class BasicData implements CommandLineRunner{
74 76 //线路Code和shangHaiLinecode 对照
75 77 public static Map<String, String> lineCode2ShangHaiCodeMap;
76 78  
  79 + //驾驶员工号 和 personnel 对象映射
  80 + public static Map<String, Personnel> jsyMap;
  81 + //售票员工号 和 personnel 对象映射
  82 + public static Map<String, Personnel> spyMap;
  83 + //全量员工 工号和姓名对照
  84 + public static Map<String, String> allPerson;
  85 +
  86 +
77 87 static Logger logger = LoggerFactory.getLogger(BasicData.class);
78 88  
79 89 @Autowired
... ... @@ -106,6 +116,9 @@ public class BasicData implements CommandLineRunner{
106 116 @Autowired
107 117 StationRouteRepository stationRouteRepository;
108 118  
  119 + @Autowired
  120 + PersonnelRepository personnelRepository;
  121 +
109 122  
110 123 @Override
111 124 public void run() {
... ... @@ -118,12 +131,18 @@ public class BasicData implements CommandLineRunner{
118 131 */
119 132 public int loadAllData(){
120 133 try{
  134 + //设备信息
121 135 loadDeviceInfo();
  136 + //站点信息
122 137 loadStationInfo();
  138 + //线路信息
123 139 loadLineInfo();
  140 + //车辆和线路映射信息
124 141 loadNbbm2LineInfo();
125   -
  142 + //站点路由信息
126 143 loadStationRouteInfo();
  144 + //人员信息
  145 + loadPersonnelInfo();
127 146 logger.info("加载基础数据成功!," );
128 147 }catch(Exception e){
129 148 logger.error("加载基础数据时出现异常," , e);
... ... @@ -235,5 +254,37 @@ public class BasicData implements CommandLineRunner{
235 254 lineId2ShangHaiCodeMap = id2SHcode;
236 255 lineCode2ShangHaiCodeMap = code2SHcode;
237 256 }
  257 +
  258 + /**
  259 + *
  260 + * @Title: loadPersonnelInfo
  261 + * @Description: TODO(加载人员信息)
  262 + */
  263 + public void loadPersonnelInfo() {
  264 + Iterator<Personnel> iterator = personnelRepository.findAll().iterator();
  265 +
  266 + Map<String, Personnel> jsyTempMap=new HashMap<>()
  267 + , spyTempMap=new HashMap<>();
  268 + Map<String, String> allPersonMap=new HashMap<>();
  269 +
  270 + Personnel p;
  271 +
  272 + while(iterator.hasNext()){
  273 + p = iterator.next();
  274 +
  275 + if(p.getPosts() != null){
  276 + if(p.getPosts().equals("1"))
  277 + jsyTempMap.put(p.getJobCode(), p);
  278 + else if(p.getPosts().equals("2"))
  279 + spyTempMap.put(p.getJobCode(), p);
  280 + }
  281 +
  282 + allPersonMap.put(p.getJobCode(), p.getPersonnelName());
  283 + }
  284 +
  285 + jsyMap=jsyTempMap;
  286 + spyMap=spyTempMap;
  287 + allPerson=allPersonMap;
  288 + }
238 289 }
239 290 }
... ...
src/main/java/com/bsth/data/arrival/AnalyseArrivalData.java renamed to src/main/java/com/bsth/data/arrival/AnalyseData.java
... ... @@ -20,9 +20,9 @@ import com.bsth.data.BasicData;
20 20 *
21 21 */
22 22 @Component
23   -public class AnalyseArrivalData {
  23 +public class AnalyseData {
24 24  
25   - Logger logger = LoggerFactory.getLogger(AnalyseArrivalData.class);
  25 + Logger logger = LoggerFactory.getLogger(AnalyseData.class);
26 26  
27 27 public void analyse(Set<String> cars){
28 28 try{
... ...
src/main/java/com/bsth/data/arrival/ArrivalData_GPS.java
... ... @@ -64,7 +64,7 @@ public class ArrivalData_GPS implements CommandLineRunner{
64 64 DayOfSchedule dayOfSchedule;
65 65  
66 66 @Autowired
67   - AnalyseArrivalData analyseData;
  67 + AnalyseData analyseData;
68 68  
69 69 @Override
70 70 public void run() {
... ...
src/main/java/com/bsth/data/directive/FirstScheduleCheckThread.java
... ... @@ -43,6 +43,9 @@ public class FirstScheduleCheckThread extends Thread{
43 43 List<ScheduleRealInfo> schList;
44 44 ScheduleRealInfo first;
45 45 for(String car : cars){
  46 + if(car.equals("SXC-CD1004")){
  47 + System.out.println("debugger...");
  48 + }
46 49 schList = dayOfSchedule.findByNbbm(car);
47 50  
48 51 if(null == schList || schList.size() == 0)
... ... @@ -54,7 +57,7 @@ public class FirstScheduleCheckThread extends Thread{
54 57 && first.getBcType().equals("out")){
55 58  
56 59 //没有计划里程的出场班次,出场既是首发站,发送下一班次的营运指令
57   - if(first.getJhlc() == null)
  60 + if(first.getJhlc() == null && first.getXlDir().equals(schList.get(1).getXlDir()))
58 61 first = schList.get(1);
59 62  
60 63 //为首班补发指令
... ...
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
... ... @@ -72,7 +72,7 @@ public class GpsRealData implements CommandLineRunner{
72 72  
73 73 @Override
74 74 public void run(String... arg0) throws Exception {
75   - Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 18, TimeUnit.SECONDS);
  75 + Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 6, TimeUnit.SECONDS);
76 76 }
77 77  
78 78 public GpsEntity add(GpsEntity gps) {
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -24,10 +24,8 @@ import org.springframework.stereotype.Component;
24 24 import com.alibaba.fastjson.JSON;
25 25 import com.alibaba.fastjson.JSONArray;
26 26 import com.bsth.Application;
27   -import com.bsth.data.BasicData;
28 27 import com.bsth.data.LineConfigData;
29 28 import com.bsth.data.directive.FirstScheduleCheckThread;
30   -import com.bsth.data.gpsdata.GpsEntity;
31 29 import com.bsth.data.gpsdata.GpsRealData;
32 30 import com.bsth.data.schedule.thread.ScheduleLateThread;
33 31 import com.bsth.data.schedule.thread.SchedulePstThread;
... ... @@ -124,7 +122,7 @@ public class DayOfSchedule implements CommandLineRunner {
124 122 //入库
125 123 Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
126 124 //首班出场指令补发器
127   - Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 60, 60, TimeUnit.SECONDS);
  125 + Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 10, 60, TimeUnit.SECONDS);
128 126 //班次误点扫描
129 127 Application.mainServices.scheduleWithFixedDelay(scheduleLateThread, 60, 60, TimeUnit.SECONDS);
130 128 }
... ... @@ -262,6 +260,7 @@ public class DayOfSchedule implements CommandLineRunner {
262 260 for(ScheduleRealInfo sch : remList){
263 261 if(null != sch){
264 262 nbbmScheduleMap.remove(sch.getClZbh(), sch);
  263 + id2SchedulMap.remove(sch.getId());
265 264 count ++;
266 265 }
267 266 }
... ... @@ -467,9 +466,23 @@ public class DayOfSchedule implements CommandLineRunner {
467 466 id2SchedulMap.put(sch.getId(), sch);
468 467 }
469 468  
  469 + public void delete(ScheduleRealInfo sch) {
  470 + //ScheduleRealInfo sch = id2SchedulMap.get(id);
  471 + if(!sch.isSflj())
  472 + return;
  473 +
  474 + nbbmScheduleMap.remove(sch.getClZbh(), sch);
  475 + id2SchedulMap.remove(sch.getId());
  476 + //return sch;
  477 + }
  478 +
470 479 public void calcQdzTimePlan(String nbbm){
471 480 schAttrCalculator.calcQdzTimePlan(nbbmScheduleMap.get(nbbm));
472 481 }
  482 +
  483 + public List<ScheduleRealInfo> updateQdzTimePlan(String nbbm){
  484 + return schAttrCalculator.updateQdzTimePlan(nbbmScheduleMap.get(nbbm));
  485 + }
473 486  
474 487 /**
475 488 *
... ... @@ -596,15 +609,6 @@ public class DayOfSchedule implements CommandLineRunner {
596 609 }
597 610 return outList;
598 611 }
599   -
600   - public ScheduleRealInfo delete(Long id) {
601   - ScheduleRealInfo sch = id2SchedulMap.get(id);
602   - if(!sch.isSflj())
603   - return null;
604   -
605   - nbbmScheduleMap.remove(sch.getClZbh(), sch);
606   - return sch;
607   - }
608 612  
609 613 public Set<String> allCar(){
610 614 return nbbmScheduleMap.keySet();
... ... @@ -625,6 +629,33 @@ public class DayOfSchedule implements CommandLineRunner {
625 629 public Map<String, ScheduleRealInfo> execPlamMap(){
626 630 return carExecutePlanMap;
627 631 }
  632 +
  633 + /**
  634 + * @Title: changeCar
  635 + * @Description: TODO(班次换车) 返回有更新的班次
  636 + * @param @param sch
  637 + * @param @param newClZbh 新的车辆自编号
  638 + */
  639 + public List<ScheduleRealInfo> changeCar(ScheduleRealInfo sch , String newClZbh){
  640 + List<ScheduleRealInfo> ups = new ArrayList<>();
  641 + String oldClzbh = sch.getClZbh();
  642 + if(oldClzbh.equals(newClZbh))
  643 + return ups;
  644 +
  645 +
  646 + //变更相关映射信息
  647 + nbbmScheduleMap.remove(sch.getClZbh(), sch);
  648 +
  649 + sch.setClZbh(newClZbh);
  650 + nbbmScheduleMap.put(newClZbh, sch);
  651 + nbbm2SEStationMap.put(newClZbh, sch.getQdzCode());
  652 + nbbm2SEStationMap.put(newClZbh, sch.getZdzCode());
  653 +
  654 + //重新计算班次应到时间
  655 + ups.addAll(updateQdzTimePlan(oldClzbh));
  656 + ups.addAll(updateQdzTimePlan(newClZbh));
  657 + return ups;
  658 + }
628 659  
629 660 /**
630 661 *
... ...
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
... ... @@ -2,6 +2,7 @@ package com.bsth.data.schedule;
2 2  
3 3 import java.text.ParseException;
4 4 import java.text.SimpleDateFormat;
  5 +import java.util.ArrayList;
5 6 import java.util.Collections;
6 7 import java.util.Date;
7 8 import java.util.List;
... ... @@ -44,15 +45,20 @@ public class SchAttrCalculator {
44 45 if (null == sch.getFcsjT())
45 46 calcFcsjTime(sch);
46 47  
  48 + SimpleDateFormat sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd");
47 49 /*
48 50 * 早于线路开始运营时间的,加一天
49 51 * 如该线路 2点开始运营,2016-08-23的班次,则 2016-08-23 0:25 的班次应该调整成 2016-08-24 0:25
50   - */
51   - SimpleDateFormat sdfyyyyMMddHHmm = new SimpleDateFormat("yyyy-MM-ddHH:mm")
  52 +
  53 +
52 54 ,sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd");
53 55 long st = sdfyyyyMMddHHmm.parse(sch.getScheduleDateStr() + conf.getStartOpt()).getTime();
54 56 if (st > sch.getFcsjT())
  57 + sch.setFcsjAll(sch.getFcsjT() + DAY_TIME);*/
  58 +
  59 + if(sch.getFcsj().compareTo(conf.getStartOpt()) < 0){
55 60 sch.setFcsjAll(sch.getFcsjT() + DAY_TIME);
  61 + }
56 62  
57 63 sch.setRealExecDate(sdfyyyyMMdd.format(new Date(sch.getFcsjT())));
58 64 } catch (Exception e) {
... ... @@ -108,6 +114,43 @@ public class SchAttrCalculator {
108 114  
109 115 /**
110 116 *
  117 + * @Title: updateQdzTimePlan
  118 + * @Description: TODO(更新班次的起点应到时间,list 必须是同一辆车的班次) 并返回被更新的班次
  119 + */
  120 + public List<ScheduleRealInfo> updateQdzTimePlan(List<ScheduleRealInfo> list){
  121 + Collections.sort(list, new ScheduleComparator.FCSJ());
  122 +
  123 + List<ScheduleRealInfo> updateList = new ArrayList<>();
  124 + int len = list.size();
  125 + if(len == 0)
  126 + return updateList;
  127 +
  128 + ScheduleRealInfo prve = list.get(0), curr;
  129 + for(int i = 1; i < len; i ++){
  130 + curr = list.get(i);
  131 +
  132 + if(prve.getZdzName().equals(curr.getQdzName())){
  133 +
  134 + if(curr.getQdzArrDateJH() != null && prve.getZdsj().equals(curr.getQdzArrDateJH())){
  135 + prve = curr;
  136 + continue;
  137 + }
  138 +
  139 + curr.setQdzArrDateJH(prve.getZdsj());
  140 + updateList.add(curr);
  141 + }
  142 + else{
  143 + curr.setQdzArrDateJH(null);
  144 + updateList.add(curr);
  145 + }
  146 + prve = curr;
  147 + }
  148 +
  149 + return updateList;
  150 + }
  151 +
  152 + /**
  153 + *
111 154 * @Title: connectOutSchedule
112 155 * @Description: TODO(关联出场班次)
113 156 */
... ...
src/main/java/com/bsth/entity/realcontrol/LineConfig.java
... ... @@ -49,9 +49,9 @@ public class LineConfig {
49 49 /** 开始运营时间 HH:mm */
50 50 private String startOpt;
51 51  
52   - /** 当天开始营运时间戳 */
  52 + /** 当天开始营运时间戳
53 53 @Transient
54   - private long currStartTime;
  54 + private long currStartTime;*/
55 55  
56 56 /** 托管状态 */
57 57 private boolean trust;
... ...
src/main/java/com/bsth/oplog/http/HttpOpLogInterceptor.java
... ... @@ -25,11 +25,11 @@ public class HttpOpLogInterceptor implements HandlerInterceptor {
25 25 private final PathMatcher pathMatcher = new AntPathMatcher();
26 26  
27 27 // GET 白名单
28   - private String[] httpGetWhiteList = { "/user/login/**", "/user/currentUser", "/dictionary/**", "/module/findByCurrentUser", "/gps/**", "/error/**" };
  28 + private String[] httpGetWhiteList = { "/user/login/**", "/user/currentUser","/dictionary/**", "/module/findByCurrentUser", "/gps/**", "/error/**" };
29 29  
30 30 // POST 白名单
31 31 private String[] httpPostWhiteList = {
32   -
  32 + "/control/upstream"
33 33 };
34 34  
35 35 @Autowired
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -6,6 +6,8 @@ import java.util.Map;
6 6  
7 7 import org.springframework.stereotype.Service;
8 8  
  9 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  10 +import com.bsth.controller.realcontrol.dto.DfsjChange;
9 11 import com.bsth.entity.realcontrol.ScheduleRealInfo;
10 12 import com.bsth.service.BaseService;
11 13  
... ... @@ -14,9 +16,9 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
14 16  
15 17 Map<String, Collection<ScheduleRealInfo>> findByLines(String lines);
16 18  
17   - Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj,String nbbm,String jsy,String spy);
  19 + Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj/*,String nbbm,String jsy,String spy*/);
18 20  
19   - Map<String, Object> destroy(String idsStr, int spaceAdjust, String remarks, String reason, int spaceNum);
  21 + Map<String, Object> destroy(String idsStr/*, int spaceAdjust*/, String remarks/*, String reason, int spaceNum*/);
20 22  
21 23 List<Map<String, String>> findDriverByLine(String lineCode);
22 24  
... ... @@ -112,4 +114,8 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
112 114 List<ScheduleRealInfo> realScheduleList(String line,String date);
113 115  
114 116 List<Map<String,Object>> yesterdayDataList(String line);
  117 +
  118 + Map<String, Object> multi_tzrc(List<ChangePersonCar> cpcs);
  119 +
  120 + Map<String, Object> multi_dftz(List<DfsjChange> dfsjcs);
115 121 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ChildTaskPlanServiceImpl.java
... ... @@ -41,7 +41,7 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl&lt;ChildTaskPlan, Lon
41 41 //再关联主任务
42 42 ScheduleRealInfo sch = dayOfSchedule.get(t.getSchedule().getId());
43 43 sch.getcTasks().add(t);
44   - //rs = scheduleRealInfoService.save(sch);
  44 + dayOfSchedule.save(sch);
45 45  
46 46 rs.put("t", sch);
47 47 return rs;
... ... @@ -57,6 +57,8 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl&lt;ChildTaskPlan, Lon
57 57 sch.getcTasks().remove(cPlan);
58 58 //删除子任务
59 59 rs = super.delete(id);
  60 + dayOfSchedule.save(sch);
  61 +
60 62 rs.put("t", sch);
61 63 return rs;
62 64 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -8,6 +8,7 @@ import java.util.Collection;
8 8 import java.util.Collections;
9 9 import java.util.Date;
10 10 import java.util.HashMap;
  11 +import java.util.HashSet;
11 12 import java.util.Iterator;
12 13 import java.util.List;
13 14 import java.util.Map;
... ... @@ -24,10 +25,14 @@ import org.springframework.stereotype.Service;
24 25 import com.alibaba.fastjson.JSONArray;
25 26 import com.alibaba.fastjson.JSONObject;
26 27 import com.bsth.common.ResponseCode;
  28 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  29 +import com.bsth.controller.realcontrol.dto.DfsjChange;
27 30 import com.bsth.data.BasicData;
  31 +import com.bsth.data.LineConfigData;
28 32 import com.bsth.data.arrival.ArrivalData_GPS;
29 33 import com.bsth.data.arrival.ArrivalEntity;
30 34 import com.bsth.data.schedule.DayOfSchedule;
  35 +import com.bsth.data.schedule.SchAttrCalculator;
31 36 import com.bsth.data.schedule.ScheduleComparator;
32 37 import com.bsth.entity.Cars;
33 38 import com.bsth.entity.Line;
... ... @@ -93,7 +98,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
93 98  
94 99 @Autowired
95 100 DayOfSchedule dayOfSchedule;
  101 +
  102 + @Autowired
  103 + SchAttrCalculator schAttrCalculator;
96 104  
  105 + @Autowired
  106 + LineConfigData lineConfigData;
  107 +
97 108 Logger logger = LoggerFactory.getLogger(this.getClass());
98 109  
99 110 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
... ... @@ -113,7 +124,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
113 124 }
114 125  
115 126 @Override
116   - public Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj, String nbbm,String jsy,String spy) {
  127 + public Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj/*, String nbbm,String jsy,String spy*/) {
117 128 Map<String, Object> map = new HashMap<>();
118 129 try {
119 130  
... ... @@ -121,18 +132,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
121 132 schedule.setDfsjT(sdfMinute.parse(schedule.getRealExecDate() + " " + dfsj).getTime());
122 133 schedule.setDfsj(dfsj);
123 134 schedule.addRemarks(remarks);
124   - schedule.setClZbh(nbbm);
125   - if(jsy != null && jsy.indexOf("/") != -1){
126   - String[] jsyArray = jsy.split("/");
127   - schedule.setjGh(jsyArray[0]);
128   - schedule.setjName(jsyArray[1]);
129   - }
130   -
131   - if(spy != null && spy.indexOf("/") != -1){
132   - String[] spyArray = spy.split("/");
133   - schedule.setsGh(spyArray[0]);
134   - schedule.setsName(spyArray[1]);
135   - }
  135 +// schedule.setClZbh(nbbm);
  136 +// if(jsy != null && jsy.indexOf("/") != -1){
  137 +// String[] jsyArray = jsy.split("/");
  138 +// schedule.setjGh(jsyArray[0]);
  139 +// schedule.setjName(jsyArray[1]);
  140 +// }
  141 +//
  142 +// if(spy != null && spy.indexOf("/") != -1){
  143 +// String[] spyArray = spy.split("/");
  144 +// schedule.setsGh(spyArray[0]);
  145 +// schedule.setsName(spyArray[1]);
  146 +// }
136 147  
137 148 List<ScheduleRealInfo> ts = new ArrayList<>();
138 149 ts.add(schedule);
... ... @@ -157,11 +168,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
157 168 }
158 169  
159 170 @Override
160   - public Map<String, Object> destroy(String idsStr, int spaceAdjust, String remarks, String reason, int spaceNum) {
  171 + public Map<String, Object> destroy(String idsStr, /*int spaceAdjust, */String remarks/*, String reason, int spaceNum*/) {
161 172  
162 173 Map<String, Object> map = new HashMap<>();
163 174 List<ScheduleRealInfo> rsList = new ArrayList<>();
164   - map.put("list", rsList);
  175 + map.put("ts", rsList);
165 176 try {
166 177 List<String> idList = Lists.newArrayList(Splitter.on(',').trimResults().omitEmptyStrings().split(idsStr));
167 178  
... ... @@ -182,48 +193,48 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
182 193 }
183 194  
184 195 // 调整间隔
185   - if (spaceAdjust == 1) {
186   -
187   - ScheduleRealInfo first = dayOfSchedule.get(Long.parseLong(idList.get(0)));
188   - String lineCode = first.getXlBm() + "";
189   - String upDown = first.getXlDir();
190   -
191   - List<ScheduleRealInfo> schList = dayOfSchedule.findByLineCode(lineCode),
192   - dirList = new ArrayList<>();
193   - // 筛选走向
194   - for (ScheduleRealInfo s : schList) {
195   - if (s.getXlDir().equals(upDown)) {
196   - dirList.add(s);
197   - }
198   - }
199   -
200   - int size = dirList.size();
201   - Long st = null;
202   - int diff = spaceNum * 60 * 1000;
203   - for (int i = 0; i < size; i++) {
204   - schedule = dirList.get(i);
205   -
206   - if (schedule.getId() == first.getId()) {
207   - if (i == 0)
208   - st = schedule.getDfsjT() - diff;
209   - else
210   - st = dirList.get(i - 1).getDfsjT();
211   - continue;
212   - }
213   - if (null == st || schedule.getStatus() == -1)
214   - continue;
215   -
216   - st = st + diff;
217   - schedule.setDfsjT(st);
218   - schedule.setDfsj(sdfShort.format(new Date(st)));
219   -
220   - dayOfSchedule.save(schedule);
221   - //scheduleRealInfoRepository.save(schedule);
222   - //ScheduleBuffer.persistentList.add(schedule);
223   - // 将调整的班次返回给页面
224   - rsList.add(schedule);
225   - }
226   - }
  196 +// if (spaceAdjust == 1) {
  197 +//
  198 +// ScheduleRealInfo first = dayOfSchedule.get(Long.parseLong(idList.get(0)));
  199 +// String lineCode = first.getXlBm() + "";
  200 +// String upDown = first.getXlDir();
  201 +//
  202 +// List<ScheduleRealInfo> schList = dayOfSchedule.findByLineCode(lineCode),
  203 +// dirList = new ArrayList<>();
  204 +// // 筛选走向
  205 +// for (ScheduleRealInfo s : schList) {
  206 +// if (s.getXlDir().equals(upDown)) {
  207 +// dirList.add(s);
  208 +// }
  209 +// }
  210 +//
  211 +// int size = dirList.size();
  212 +// Long st = null;
  213 +// int diff = spaceNum * 60 * 1000;
  214 +// for (int i = 0; i < size; i++) {
  215 +// schedule = dirList.get(i);
  216 +//
  217 +// if (schedule.getId() == first.getId()) {
  218 +// if (i == 0)
  219 +// st = schedule.getDfsjT() - diff;
  220 +// else
  221 +// st = dirList.get(i - 1).getDfsjT();
  222 +// continue;
  223 +// }
  224 +// if (null == st || schedule.getStatus() == -1)
  225 +// continue;
  226 +//
  227 +// st = st + diff;
  228 +// schedule.setDfsjT(st);
  229 +// schedule.setDfsj(sdfShort.format(new Date(st)));
  230 +//
  231 +// dayOfSchedule.save(schedule);
  232 +// //scheduleRealInfoRepository.save(schedule);
  233 +// //ScheduleBuffer.persistentList.add(schedule);
  234 +// // 将调整的班次返回给页面
  235 +// rsList.add(schedule);
  236 +// }
  237 +// }
227 238  
228 239 map.put("status", ResponseCode.SUCCESS);
229 240 } catch (Exception e) {
... ... @@ -302,6 +313,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
302 313 return rsList;
303 314 }
304 315  
  316 +
305 317 /**
306 318 * 临加班次
307 319 */
... ... @@ -312,41 +324,85 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
312 324 SysUser user = SecurityUtils.getCurrentUser();
313 325 String schDate = DayOfSchedule.currSchDateMap.get(t.getXlBm());
314 326  
315   - SimpleDateFormat sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd");
  327 + SimpleDateFormat sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd")
  328 + ,sdfyyyyMMddHHmm = new SimpleDateFormat("yyyy-MM-ddHH:mm");
  329 +
  330 + if(StringUtils.isEmpty(t.getjGh())){
  331 + rs.put("status", ResponseCode.ERROR);
  332 + rs.put("msg", "驾驶员工号不能为空!");
  333 + return rs;
  334 + }
  335 +
316 336 t.setScheduleDateStr(schDate);
317 337 t.setScheduleDate(sdfyyyyMMdd.parse(schDate));
318 338 t.setRealExecDate(schDate);
319 339 t.setCreateBy(user);
320 340 t.setSflj(true);
321 341 t.setLate(false);
  342 + t.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + t.getZdsj()).getTime());
  343 +
  344 +
322 345 //班次历时
323 346 t.setBcsj(DateUtils.calcHHmmDiff(t.getFcsj(), t.getZdsj()) / 1000 / 60);
324   -
  347 +
  348 + //起终点名称
  349 + t.setQdzName(BasicData.stationCode2NameMap.get(t.getQdzCode()));
  350 + t.setZdzName(BasicData.stationCode2NameMap.get(t.getZdzCode()));
  351 +
  352 + //计算班次实际时间
  353 + schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t);
  354 + if(t.getZdsjT() < t.getFcsjT()){
  355 + rs.put("status", ResponseCode.ERROR);
  356 + rs.put("msg", "起终点时间异常!");
  357 + return rs;
  358 + }
  359 +
325 360 //实时入库
326   - rs = super.save(t);
  361 + super.save(t);
  362 +
327 363 // 加入缓存
328 364 dayOfSchedule.put(t);
329 365  
330   - dayOfSchedule.calcQdzTimePlan(t.getClZbh());
331   - //将该临加之后的班次作为更新返回页面
332   - List<ScheduleRealInfo> list = dayOfSchedule.nextAll(t)
333   - ,rsList = null;
  366 + //更新起点应到时间
  367 + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(t.getClZbh());
334 368  
335   - for(ScheduleRealInfo sch : list){
336   - if(sch.getId() == t.getId())
337   - rsList = new ArrayList<>();
338   -
339   - if(rsList != null)
340   - rsList.add(sch);
341   - }
342 369  
343   - rs.put("ups", rsList);
  370 + rs.put("ts", ts);
  371 + rs.put("t", t);
344 372 }catch(Exception e){
345 373 logger.error("", e);
346 374 rs.put("status", ResponseCode.ERROR);
347 375 }
348 376 return rs;
349 377 }
  378 +
  379 + @Override
  380 + public Map<String, Object> delete(Long id) {
  381 + Map<String, Object> rs = new HashMap<>();
  382 + rs.put("status", ResponseCode.ERROR);
  383 +
  384 + ScheduleRealInfo sch = dayOfSchedule.get(id);
  385 + if(sch == null){
  386 + rs.put("msg", "无效的id号");
  387 + return rs;
  388 + }
  389 +
  390 + if(!sch.isSflj()){
  391 + rs.put("msg", "你只能删除临加班次");
  392 + return rs;
  393 + }
  394 +
  395 + dayOfSchedule.delete(sch);
  396 + //ScheduleRealInfo sch = dayOfSchedule.delete(id);
  397 + //数据库删除
  398 + rs = super.delete(id);
  399 + //更新起点应到时间
  400 + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh());
  401 + rs.put("ts", ts);
  402 + rs.put("delete", sch);
  403 +
  404 + return rs;
  405 + }
350 406  
351 407 @Override
352 408 public List<Map<String, String>> sreachVehic(String nbbm) {
... ... @@ -783,11 +839,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
783 839 try {
784 840 Long id = Long.parseLong(map.get("id"));
785 841 //班次类型
786   - String bcType = map.get("bcType");
  842 + //String bcType = map.get("bcType");
787 843 //车辆自编号
788   - String clZbh = map.get("clZbh");
  844 + //String clZbh = map.get("clZbh");
789 845 //计划发车时间
790   - String fcsj = map.get("fcsj");
  846 + //String fcsj = map.get("fcsj");
791 847 //实际发车时间
792 848 String fcsjActual = map.get("fcsjActual");
793 849  
... ... @@ -798,23 +854,23 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
798 854  
799 855 ScheduleRealInfo sch = dayOfSchedule.get(id);
800 856 if(null != sch){
801   - //驾驶员
802   - if(StringUtils.isNotBlank(map.get("jsy"))){
803   - String[] jsy = map.get("jsy").split("/");
804   - sch.setjGh(jsy[0]);
805   - sch.setjName(jsy[1]);
806   - }
  857 +// //驾驶员
  858 +// if(StringUtils.isNotBlank(map.get("jsy"))){
  859 +// String[] jsy = map.get("jsy").split("/");
  860 +// sch.setjGh(jsy[0]);
  861 +// sch.setjName(jsy[1]);
  862 +// }
807 863  
808 864 //售票员
809   - if(StringUtils.isNotBlank(map.get("spy"))){
810   - String[] spy = map.get("spy").split("/");
811   - sch.setsGh(spy[0]);
812   - sch.setsName(spy[1]);
813   - }
  865 +// if(StringUtils.isNotBlank(map.get("spy"))){
  866 +// String[] spy = map.get("spy").split("/");
  867 +// sch.setsGh(spy[0]);
  868 +// sch.setsName(spy[1]);
  869 +// }
814 870  
815   - sch.setBcType(bcType);
816   - sch.setClZbh(clZbh);
817   - sch.setFcsjAll(fcsj);
  871 + //sch.setBcType(bcType);
  872 + //sch.setClZbh(clZbh);
  873 + //sch.setFcsjAll(fcsj);
818 874  
819 875 if(StringUtils.isNotBlank(fcsjActual)){
820 876 //调整实发
... ... @@ -1410,19 +1466,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1410 1466 return scheduleRealInfoRepository.scheduleByDateAndLine(line, date);
1411 1467 }
1412 1468  
1413   - @Override
1414   - public Map<String, Object> delete(Long id) {
1415   - Map<String, Object> rs = new HashMap<>();
1416   - ScheduleRealInfo sch = dayOfSchedule.delete(id);
1417   - if(null != sch){
1418   - rs = super.delete(id);
1419   - rs.put("t", sch);
1420   - }
1421   - else
1422   - rs.put("status", ResponseCode.ERROR);
1423   -
1424   - return rs;
1425   - }
1426 1469  
1427 1470 public List<Map<String,Object>> yesterdayDataList(String line) {
1428 1471 //前一天日期
... ... @@ -1471,4 +1514,99 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1471 1514 }
1472 1515 return yesterdayDataList;
1473 1516 }
  1517 +
  1518 + /**
  1519 + * 批量调整人车
  1520 + */
  1521 + @Override
  1522 + public Map<String, Object> multi_tzrc(List<ChangePersonCar> cpcs) {
  1523 + Map<String, Object> rs = new HashMap<>();
  1524 + Set<ScheduleRealInfo> set = new HashSet<>();
  1525 +
  1526 + ScheduleRealInfo sch;
  1527 +
  1528 + for(ChangePersonCar cpc : cpcs){
  1529 +
  1530 + sch = dayOfSchedule.get(cpc.getSchId());
  1531 + if(sch==null)
  1532 + continue;
  1533 +
  1534 + if(StringUtils.isNotEmpty(cpc.getJsy())){
  1535 + //换驾驶员
  1536 + persoChange(sch, cpc.getJsy().split("/")[0]);
  1537 + }
  1538 +
  1539 + //换售票员
  1540 + if(StringUtils.isNotEmpty(cpc.getSpy())){
  1541 + persoChangeSPY(sch, cpc.getSpy().split("/")[0]);
  1542 + }
  1543 +
  1544 + //换车
  1545 + if(StringUtils.isNotEmpty(cpc.getClZbh())){
  1546 + set.add(sch);
  1547 + set.addAll(dayOfSchedule.changeCar(sch, cpc.getClZbh()));
  1548 + }
  1549 +
  1550 + }
  1551 + rs.put("ts", set);
  1552 + rs.put("status", ResponseCode.SUCCESS);
  1553 + return rs;
  1554 + }
  1555 +
  1556 + /**
  1557 + *
  1558 + * @Title: persoChange
  1559 + * @Description: TODO(班次换驾驶员)
  1560 + */
  1561 + public void persoChange(ScheduleRealInfo sch, String jGh){
  1562 + if(sch.getjGh().equals(jGh))
  1563 + return;
  1564 + String jName = BasicData.allPerson.get(jGh);
  1565 + if(StringUtils.isNotEmpty(jName)){
  1566 + sch.setjGh(jGh);
  1567 + sch.setjName(jName);
  1568 + }
  1569 + }
  1570 +
  1571 + /**
  1572 + *
  1573 + * @Title: persoChange
  1574 + * @Description: TODO(班次换售票员)
  1575 + */
  1576 + public void persoChangeSPY(ScheduleRealInfo sch, String sGh){
  1577 + if(sch.getsGh().equals(sGh))
  1578 + return;
  1579 + String sName = BasicData.allPerson.get(sGh);
  1580 + if(StringUtils.isNotEmpty(sName)){
  1581 + sch.setsGh(sGh);
  1582 + sch.setsName(sName);
  1583 + }
  1584 + }
  1585 +
  1586 + /**
  1587 + * 批量待发调整
  1588 + */
  1589 + @Override
  1590 + public Map<String, Object> multi_dftz(List<DfsjChange> dfsjcs) {
  1591 + Map<String, Object> rs = new HashMap<>();
  1592 + List<ScheduleRealInfo> list = new ArrayList<>();
  1593 +
  1594 + ScheduleRealInfo sch;
  1595 + for(DfsjChange dc : dfsjcs){
  1596 + if(StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj()))
  1597 + continue;
  1598 +
  1599 + sch = dayOfSchedule.get(dc.getSchId());
  1600 + if(sch==null)
  1601 + continue;
  1602 +
  1603 + sch.setDfsjAll(dc.getNew_dfsj());
  1604 +
  1605 + list.add(sch);
  1606 + }
  1607 +
  1608 + rs.put("status", ResponseCode.SUCCESS);
  1609 + rs.put("ts", list);
  1610 + return rs;
  1611 + }
1474 1612 }
... ...
src/main/java/com/bsth/websocket/handler/RealControlSocketHandler.java
... ... @@ -2,6 +2,9 @@ package com.bsth.websocket.handler;
2 2  
3 3 import java.io.IOException;
4 4 import java.util.ArrayList;
  5 +import java.util.HashMap;
  6 +import java.util.List;
  7 +import java.util.Map;
5 8 import java.util.Set;
6 9  
7 10 import org.slf4j.Logger;
... ... @@ -13,11 +16,13 @@ import org.springframework.web.socket.WebSocketHandler;
13 16 import org.springframework.web.socket.WebSocketMessage;
14 17 import org.springframework.web.socket.WebSocketSession;
15 18  
  19 +import com.alibaba.fastjson.JSONObject;
16 20 import com.bsth.common.Constants;
17 21 import com.bsth.data.BasicData;
  22 +import com.google.common.base.Splitter;
  23 +import com.google.common.collect.ArrayListMultimap;
18 24  
19 25 /**
20   - * 注意:在sendMsg时,多线程状态下有几率出现连接状态脏读,建议 synchronized
21 26 * @author PanZhao
22 27 */
23 28 @Component
... ... @@ -26,27 +31,57 @@ public class RealControlSocketHandler implements WebSocketHandler {
26 31 Logger logger = LoggerFactory.getLogger(this.getClass());
27 32  
28 33 private static final ArrayList<WebSocketSession> users;
  34 + private static final ArrayListMultimap<String, WebSocketSession> listenMap;
29 35  
30 36 static {
31 37 users = new ArrayList<WebSocketSession>();
  38 + listenMap = ArrayListMultimap.create();
32 39 }
33 40  
34 41 @Override
35 42 public void afterConnectionClosed(WebSocketSession session, CloseStatus arg1)
36 43 throws Exception {
37 44 users.remove(session);
  45 + //清理监听
  46 + Set<String> keys = listenMap.keySet();
  47 + Map<String, WebSocketSession> remMap = new HashMap<>();
  48 + for(String k : keys){
  49 + if(listenMap.get(k).contains(session))
  50 + remMap.put(k, session);
  51 + }
  52 +
  53 + Set<String> remSet = remMap.keySet();
  54 + for(String k : remSet){
  55 + listenMap.remove(k, remMap.get(k));
  56 + logger.info("web socket close, remove listen K: "+ k);
  57 + }
  58 + logger.info("listen values size: " + listenMap.values().size());
38 59 }
39 60  
40 61 @Override
41 62 public void afterConnectionEstablished(WebSocketSession session)
42 63 throws Exception {
43 64 users.add(session);
44   - logger.info("###############users size" + users.size());
45 65 }
46 66  
47 67 @Override
48   - public void handleMessage(WebSocketSession arg0, WebSocketMessage<?> arg1)
  68 + public void handleMessage(WebSocketSession session, WebSocketMessage<?> msg)
49 69 throws Exception {
  70 + JSONObject jsonObj = JSONObject.parseObject(msg.getPayload().toString());
  71 + switch (jsonObj.getString("operCode")) {
  72 + case "register_line":
  73 + //注册线路监听
  74 + List<String> idx = Splitter.on(",").splitToList(jsonObj.getString("idx"));
  75 + for(String lineCode : idx){
  76 + if(BasicData.lineCode2NameMap.containsKey(lineCode))
  77 + listenMap.put(lineCode, session);
  78 + }
  79 + break;
  80 +
  81 + default:
  82 + break;
  83 + }
  84 + System.out.println(msg);
50 85 }
51 86  
52 87 @Override
... ... @@ -108,20 +143,21 @@ public class RealControlSocketHandler implements WebSocketHandler {
108 143 * @param message
109 144 */
110 145 public synchronized void sendMessageToLine(String lineCode, String msg) {
111   - Set<String> uids = BasicData.lineCode2SocketUserMap.get(lineCode);
112   - if(null == uids || uids.size() == 0)
113   - return;
  146 + //Set<String> uids = BasicData.lineCode2SocketUserMap.get(lineCode);
  147 + //if(null == uids || uids.size() == 0)
  148 + // return;
114 149  
115 150 TextMessage message = new TextMessage(msg.getBytes());
116   - for (WebSocketSession user : users) {
117   - if (uids.contains(user.getAttributes().get(Constants.SESSION_USERNAME))) {
118   - try {
119   - if (user.isOpen()) {
120   - user.sendMessage(message);
121   - }
122   - } catch (IOException e) {
123   - logger.error("sendMessageToLine error ....", e);
  151 +
  152 + List<WebSocketSession> sessList = listenMap.get(lineCode);
  153 +
  154 + for (WebSocketSession user : sessList) {
  155 + try {
  156 + if (user.isOpen()) {
  157 + user.sendMessage(message);
124 158 }
  159 + } catch (IOException e) {
  160 + logger.error("sendMessageToLine error ....", e);
125 161 }
126 162 }
127 163 }
... ...
src/main/java/com/bsth/websocket/handler/SendUtils.java
... ... @@ -169,7 +169,7 @@ public class SendUtils{
169 169  
170 170 twins.setFcsjActualAll(sch.getFcsjActualTime());
171 171 //刷新关联的出场班次
172   - refreshSch(twins);
  172 + //refreshSch(twins);
173 173 }
174 174 }catch(Exception e){
175 175 logger.error("", e);
... ... @@ -186,7 +186,7 @@ public class SendUtils{
186 186  
187 187 twins.setZdsjActualAll(sch.getZdsjActualTime());
188 188 //刷新关联的出场班次
189   - refreshSch(twins);
  189 + //refreshSch(twins);
190 190 }
191 191 }catch(Exception e){
192 192 logger.error("", e);
... ...
src/main/resources/static/index.html
... ... @@ -307,7 +307,7 @@ tr.row-active td {
307 307 <!-- 表格控件 -->
308 308 <!-- 统计图控件 -->
309 309 <script src="/assets/global/getEchart.js"></script>
310   -<script src="/assets/global/echarts.js"></script>
  310 +<!-- <script src="/assets/global/echarts.js"></script> -->
311 311 <script src="/assets/js/common.js"></script>
312 312 <script src="/assets/js/dictionary.js"></script>
313 313  
... ...
src/main/resources/static/pages/control/line/js/messenger.js
1 1 var _messenger = (function(){
2 2  
3 3 //定时到离站信使清理掉(不包含80)
4   - !function(){
5   - var f = arguments.callee
6   - ,ct = Date.parse(new Date()) / 1000
7   - ,list, time, lineCode;
8   -
9   - try {
10   - var lineArray = _data.getLines();
11   -
12   - $.each(lineArray, function(){
13   - lineCode = this.lineCode;
14   -
15   - list = $('#messengerList' + lineCode).find('.log-item.fache,.log-item.zhongdian');
16   - $.each(list, function(){
17   - time = parseInt($(this).data('time'));
18   - if(ct - time >= 30)
19   - removeLogItem($(this));
20   - });
21   - //更新未处理的消息数量
22   - setUntreatedNum(lineCode);
23   - });
24   - } catch (e) {
25   - console.log(e);
26   - }
27   - setTimeout(f, 3000);
28   - }();
  4 +// !function(){
  5 +// var f = arguments.callee
  6 +// ,ct = Date.parse(new Date()) / 1000
  7 +// ,list, time, lineCode;
  8 +//
  9 +// try {
  10 +// var lineArray = _data.getLines();
  11 +//
  12 +// $.each(lineArray, function(){
  13 +// lineCode = this.lineCode;
  14 +//
  15 +// list = $('#messengerList' + lineCode).find('.log-item.fache,.log-item.zhongdian');
  16 +// $.each(list, function(){
  17 +// time = parseInt($(this).data('time'));
  18 +// if(ct - time >= 30)
  19 +// removeLogItem($(this));
  20 +// });
  21 +// //更新未处理的消息数量
  22 +// setUntreatedNum(lineCode);
  23 +// });
  24 +// } catch (e) {
  25 +// console.log(e);
  26 +// }
  27 +// setTimeout(f, 30000);
  28 +// }();
29 29  
30 30 //未处理消息数量
31 31 function setUntreatedNum(lineCode){
... ...
src/main/resources/static/pages/control/line/js/webSocketHandle.js
... ... @@ -3,13 +3,13 @@ var _socket = (function(){
3 3  
4 4 //将当前用户和线路绑定到后台
5 5 setTimeout(function(){
6   - $.get('/realSchedule/registerLine', {lineCodes: lineCodes}
7   - ,function(rs){
8   - if(rs == 0){
9   - console.log('注册线路成功!');
  6 +// $.get('/realSchedule/registerLine', {lineCodes: lineCodes}
  7 +// ,function(rs){
  8 +// if(rs == 0){
  9 +// console.log('注册线路成功!');
10 10 initWebSocket();
11   - }
12   - });
  11 +// }
  12 +// });
13 13 }, 500);
14 14  
15 15 //初始化webSocket
... ... @@ -20,6 +20,12 @@ var initWebSocket = function(){
20 20 msgSock.onopen = function(e) {
21 21 console.log('webSocket[realcontrol] onopen');
22 22 countDown('webSocketHandle.js');
  23 + //注册线路监听
  24 + var data = {
  25 + operCode: 'register_line',
  26 + idx: '63002'
  27 + }
  28 + msgSock.send(JSON.stringify(data));
23 29 };
24 30 //接收消息
25 31 msgSock.onmessage = function(e) {
... ...
src/main/resources/static/pages/control/lineallot/allot.html
... ... @@ -163,8 +163,8 @@
163 163 <a href="javascript:;" class="btn btn-lg blue gotoControl red" data-status=1>
164 164 <i class="fa fa-power-off"></i> 主调模式 </a>
165 165  
166   - <a href="javascript:;" id="monitor" class="btn btn-lg grey gotoControl" data-status=0>
167   - <i class="fa fa-tv"></i> 监控模式 </a>
  166 + <!-- <a href="javascript:;" id="monitor" class="btn btn-lg grey gotoControl" data-status=0>
  167 + <i class="fa fa-tv"></i> 监控模式 </a> -->
168 168 &nbsp;
169 169 <a href="javascript:;" id="resetBtn" style="left: 120px;color: #3598DC;">
170 170 <i class="fa fa-history"></i> 重置</a>
... ... @@ -340,7 +340,8 @@ $(function(){
340 340 ep.tail('gotoControl', function(){
341 341 //alert('进入线调');
342 342 layer.closeAll();
343   - loadPage('/pages/control/line/index.html');
  343 + //loadPage('/pages/control/line/index.html');
  344 + window.location.href="/real_control_v2/main.html";
344 345 });
345 346 });
346 347  
... ...
src/main/resources/static/pages/mapmonitor/real/css/real.css
... ... @@ -27,7 +27,7 @@ label.BMapLabel{
27 27  
28 28 #mapContainer{
29 29 min-width: 100%;
30   - width: calc(100% + 26px);
  30 + width: calc(100% + 26px);
31 31 margin-top: -28px;
32 32 border: 2px solid #fdfdfd;
33 33 }
... ... @@ -48,9 +48,9 @@ label.BMapLabel{
48 48 background-color: #3B3F51;
49 49 top: 98px;
50 50 /* padding-top: 15px; */
51   -
  51 +
52 52 transition: all .3s ease;
53   -
  53 +
54 54 }
55 55  
56 56 .mapRightWrap.vehicle .slimScrollBar{
... ... @@ -77,7 +77,7 @@ label.BMapLabel{
77 77  
78 78 .mapRightWrap.to_searchPanel{
79 79 transform:rotateY(180deg);
80   - height: 200px;
  80 + height: 200px;
81 81 }
82 82  
83 83 .mapRightWrap.to_vehicle{
... ... @@ -186,7 +186,7 @@ label.BMapLabel{
186 186 color: #ddd;
187 187 padding-top: 7px;
188 188 top: 20px;
189   -
  189 +
190 190 transition: all .5s ease;
191 191 }
192 192  
... ... @@ -274,7 +274,7 @@ html{
274 274 height: 100%;
275 275 width: 6px;
276 276 display: inline-block;
277   -
  277 +
278 278 -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
279 279 animation: sk-stretchdelay 1.2s infinite ease-in-out;
280 280 }
... ... @@ -300,15 +300,15 @@ html{
300 300 }
301 301  
302 302 @-webkit-keyframes sk-stretchdelay {
303   - 0%, 40%, 100% { -webkit-transform: scaleY(0.4) }
  303 + 0%, 40%, 100% { -webkit-transform: scaleY(0.4) }
304 304 20% { -webkit-transform: scaleY(1.0) }
305 305 }
306 306  
307 307 @keyframes sk-stretchdelay {
308   - 0%, 40%, 100% {
  308 + 0%, 40%, 100% {
309 309 transform: scaleY(0.4);
310 310 -webkit-transform: scaleY(0.4);
311   - } 20% {
  311 + } 20% {
312 312 transform: scaleY(1.0);
313 313 -webkit-transform: scaleY(1.0);
314 314 }
... ... @@ -326,7 +326,7 @@ html{
326 326 background-color: #69D7E1;
327 327 float: left;
328 328 -webkit-animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
329   - animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
  329 + animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
330 330 }
331 331 .sk-cube-grid .sk-cube1 {
332 332 -webkit-animation-delay: 0.2s;
... ... @@ -362,7 +362,7 @@ html{
362 362 transform: scale3D(1, 1, 1);
363 363 } 35% {
364 364 -webkit-transform: scale3D(0, 0, 1);
365   - transform: scale3D(0, 0, 1);
  365 + transform: scale3D(0, 0, 1);
366 366 }
367 367 }
368 368  
... ... @@ -373,7 +373,7 @@ html{
373 373 } 35% {
374 374 -webkit-transform: scale3D(0, 0, 1);
375 375 transform: scale3D(0, 0, 1);
376   - }
  376 + }
377 377 }
378 378 /* spinner load end ------------------------------- */
379 379  
... ... @@ -406,7 +406,7 @@ html{
406 406 font-size: 24px;
407 407 color: #7C8994;
408 408 transition: all .5s ease;
409   -
  409 +
410 410 }
411 411  
412 412 .mapRightWrap.vehicle p.head>span.icon.rotate{
... ... @@ -451,7 +451,7 @@ html{
451 451  
452 452 .mapRightWrap.vehicle .vehicle-item.online_0 div.text span.nbbm:hover{
453 453 color: #45D245;
454   -}
  454 +}
455 455  
456 456 .mapRightWrap.vehicle .vehicle-item.online_1 div.text span.nbbm:hover{
457 457 color: #f16454;
... ... @@ -490,7 +490,7 @@ html{
490 490 width: 100%;
491 491 top: 60px;
492 492 color: #e5e5e5;
493   -
  493 +
494 494 max-height: 500px;
495 495 overflow: auto;
496 496 }
... ... @@ -638,7 +638,7 @@ html{
638 638 .mapRightWrap.gaode .search_result .item_vehicle.state_online{
639 639 color: #3d3dec;
640 640 }
641   -
  641 +
642 642 .mapRightWrap.gaode .search_result .result_item span.sub_text{
643 643 color: #8E8D8D;
644 644 }
... ... @@ -733,7 +733,7 @@ html{
733 733 background: #2d2b2b;
734 734 width: 0;
735 735 cursor: pointer;
736   -
  736 +
737 737 /* transition: all 1s ease; */
738 738 }
739 739  
... ... @@ -780,11 +780,11 @@ html{
780 780 }
781 781  
782 782 .pback-logs-item.out{
783   - color: #f58f83;
  783 + color: #f58f83;
784 784 }
785 785  
786 786 .pback-logs-item.in{
787   - color: #8181d4;
  787 + color: #8181d4;
788 788 }
789 789  
790 790 .pback-logs-item{
... ... @@ -910,4 +910,4 @@ html{
910 910  
911 911 #bufferAreaConfigPanel ul.list li:FIRST-CHILD {
912 912 margin-top: 0px;
913   -}
914 913 \ No newline at end of file
  914 +}
... ...
src/main/resources/static/pages/mapmonitor/real/js/map/iMap.js
1 1 /** 各个地图平台通用接口定义 */
2 2 var iMap = (function(){
3   -
  3 +
4 4 var storage = window.localStorage;
5 5 // 地图DOM容器
6 6 var mapContainer = $('#mapContainer');
... ... @@ -11,7 +11,7 @@ var iMap = (function(){
11 11 //添加一个地图实例
12 12 addMap: function(name, text, instance){
13 13 maps[name] = {name: name, text: text, instance: instance};
14   -
  14 +
15 15 if(!currentMap)
16 16 currentMap = name;
17 17 return mapProxy;
... ... @@ -26,14 +26,14 @@ var iMap = (function(){
26 26 $(consts.mapContainer).html('');
27 27 //解除实时路况按钮点击事件
28 28 $(consts.trafficBtn).unbind('click');
29   -
  29 +
30 30 //新地图 INIT
31 31 var text = maps[mapName].text;
32 32 layer.msg('正在切换到' + text + '...', {icon : 16,shade : [ 0.6, '#393D49' ],time : 0});
33 33 var newMap = maps[mapName].instance;
34 34 newMap.init();
35 35 setText(text);
36   -
  36 +
37 37 currentMap = mapName;
38 38 //收拢线路
39 39 $('.mapRightWrap .collapse.in').collapse('hide');
... ... @@ -44,7 +44,7 @@ var iMap = (function(){
44 44 call: function(f, opts){
45 45 if(f == 'init')
46 46 setText(maps[currentMap].text);
47   -
  47 +
48 48 var instance = maps[currentMap].instance;
49 49 if(instance[f])
50 50 instance[f](opts);
... ... @@ -53,23 +53,23 @@ var iMap = (function(){
53 53 return mapProxy;
54 54 }
55 55 }
56   -
  56 +
57 57 //绘制车辆icon
58 58 function createCarIcon(gps, w){
59 59 var canvas = $('<canvas></canvas>')[0];
60 60 var ctx = canvas.getContext('2d');
61   -
  61 +
62 62 var colours = color(gps);
63   -
  63 +
64 64 ctx.shadowOffsetX = 5; // 阴影Y轴偏移
65 65 ctx.shadowOffsetY = 5; // 阴影X轴偏移
66 66 ctx.shadowBlur = 1; // 模糊尺寸
67 67 ctx.shadowColor = colours.shadow; // 颜色
68   -
  68 +
69 69 //绘制背景
70 70 if(!w)
71 71 w = 70;
72   -
  72 +
73 73 ctx.roundRect(0, 0, w, 25, 5).stroke();
74 74 ctx.fillStyle=colours.bgColor;
75 75 ctx.fill();
... ... @@ -77,10 +77,10 @@ var iMap = (function(){
77 77 ctx.font="14px arial";
78 78 ctx.fillStyle = "#fff";
79 79 ctx.fillText(gps.nbbm, 8, 18);
80   -
  80 +
81 81 return canvas.toDataURL();
82 82 }
83   -
  83 +
84 84 function color(g){
85 85 var colours = {};
86 86 switch (g.state) {
... ... @@ -108,18 +108,18 @@ var iMap = (function(){
108 108 colours['shadow'] = 'rgba(136, 133, 133, 0.3)';
109 109 break;
110 110 }
111   -
  111 +
112 112 return colours;
113 113 }
114   -
  114 +
115 115 function alertErr(text){
116 116 layer.alert(text, {icon: 2, title: '来自地图的异常'});
117 117 }
118   -
  118 +
119 119 function setText(text) {
120 120 $('.leftUtils span.dropdown-toggle').html(
121 121 text + ' <i class="fa fa-angle-down"></i>');
122 122 }
123   -
  123 +
124 124 return mapProxy;
125   -})();
126 125 \ No newline at end of file
  126 +})();
... ...
src/main/resources/static/pages/mapmonitor/real/js/map/platform/baidu.js
1 1 /** 百度地图相关接口封装 */
2 2 var baiduMap = (function(){
3   -
  3 +
4 4 var map;
5 5 var realMarkers = {};
6 6 var topMarker;
... ... @@ -16,10 +16,10 @@ var baiduMap = (function(){
16 16 //中心点和缩放级别
17 17 map.centerAndZoom(new BMap.Point(consts.center_point.lng, consts.center_point.lat), 15);
18 18 map.enableScrollWheelZoom();
19   -
  19 +
20 20 layer.closeAll();
21 21 window.localStorage.setItem('real_map', 'baidu');
22   -
  22 +
23 23 // 路况控件
24 24 var ctrl = new BMapLib.TrafficControl();
25 25 map.addControl(ctrl);
... ... @@ -54,13 +54,13 @@ var baiduMap = (function(){
54 54 },
55 55 //画线路图层
56 56 drawLine: function(opts){
57   -
  57 +
58 58 map.clearOverlays();
59 59 linePolyline = [];
60 60 //从localStorage里读取路由信息
61 61 var upLineOps = {strokeColor:"blue", strokeWeight:6, strokeOpacity:0.5}
62 62 ,downLineOps = {strokeColor:"red", strokeWeight:6, strokeOpacity:0.5};
63   -
  63 +
64 64 var upPos = [], downPos = [], tempArray;
65 65 var route = opts.route;
66 66 //上行
... ... @@ -69,12 +69,12 @@ var baiduMap = (function(){
69 69 tempArray = this.split(' ');
70 70 upPos.push(new BMap.Point(tempArray[0], tempArray[1]));
71 71 });
72   -
  72 +
73 73 var upLine = new BMap.Polyline(upPos, upLineOps);
74 74 map.addOverlay(upLine);
75   -
  75 +
76 76 linePolyline.push(upLine);
77   -
  77 +
78 78 map.panTo(upPos[parseInt(upPos.length / 2)]);
79 79 }
80 80 //下行
... ... @@ -83,10 +83,10 @@ var baiduMap = (function(){
83 83 tempArray = this.split(' ');
84 84 downPos.push(new BMap.Point(tempArray[0], tempArray[1]));
85 85 });
86   -
  86 +
87 87 var downLine = new BMap.Polyline(downPos, downLineOps);
88 88 map.addOverlay(downLine);
89   -
  89 +
90 90 linePolyline.push(downLine);
91 91 }
92 92 },
... ... @@ -141,7 +141,7 @@ var baiduMap = (function(){
141 141 circle.setStrokeColor(opts.color);
142 142 if(opts.weight)
143 143 circle.setStrokeWeight(opts.weight);
144   -
  144 +
145 145 map.addOverlay(circle);
146 146 buffAreas[opts.id] = circle;
147 147 },
... ... @@ -153,7 +153,7 @@ var baiduMap = (function(){
153 153 coord = TransGPS.wgsToBD(parseFloat(wgs[1]), parseFloat(wgs[0]));
154 154 points.push(new BMap.Point(coord.lng, coord.lat));
155 155 });
156   -
  156 +
157 157 var polygon = new BMap.Polygon(points, {strokeColor: opts.color, strokeWeight: opts.weight, strokeOpacity: 0.7});
158 158 map.addOverlay(polygon);
159 159 buffAreas[opts.id] = polygon;
... ... @@ -166,23 +166,23 @@ var baiduMap = (function(){
166 166 }
167 167 }
168 168 };
169   -
  169 +
170 170 return baiduInstance;
171   -
  171 +
172 172 var bd_gps_info_win_opts = {
173 173 width : 190,
174 174 height: 255,
175 175 enableMessage:true
176 176 };
177 177 function createBDMarkerByGps(gpsData){
178   -
  178 +
179 179 var point = new BMap.Point(gpsData.bd_lon, gpsData.bd_lat);
180 180 var marker = new BMap.Marker(point);
181   -
  181 +
182 182 //根据编码长度 计算marker 宽度
183 183 var w = gpsData.nbbm.length * 10;
184 184 marker.setIcon(new BMap.Icon(iMap.createCarIcon(gpsData, w), new BMap.Size(w,25)));
185   -
  185 +
186 186 marker.infoWindow = new BMap.InfoWindow(bd_gps_info_win_opts);
187 187 marker.gpsData = gpsData;
188 188 //click
... ... @@ -195,29 +195,29 @@ var baiduMap = (function(){
195 195 });
196 196 return marker;
197 197 }
198   -
  198 +
199 199 //隐藏线路线条
200 200 function hideLinePolyline(){
201 201 if(!linePolyline || linePolyline.length == 0)
202 202 return;
203   -
  203 +
204 204 layer.msg('隐藏线路图层',{offset: 'ct', shift : 5});
205 205 $.each(linePolyline, function(){
206 206 this.setStrokeOpacity(0.1);
207 207 });
208 208 }
209   -
  209 +
210 210 //显示线路线条
211 211 function showLinePolyline(){
212 212 if(!linePolyline || linePolyline.length == 0)
213 213 return;
214   -
  214 +
215 215 layer.msg('显示线路图层',{offset: 'ct', shift : 5});
216 216 $.each(linePolyline, function(){
217 217 this.setStrokeOpacity(0.5);
218 218 });
219 219 }
220   -
  220 +
221 221 function moveMarker(m, gps){
222 222 m.setPosition(new BMap.Point(gps.bd_lon, gps.bd_lat));
223 223 m.gpsData = gps;
... ... @@ -225,24 +225,24 @@ var baiduMap = (function(){
225 225 //根据编码长度 计算marker 宽度
226 226 var w = gps.nbbm.length * 10;
227 227 m.setIcon(new BMap.Icon(iMap.createCarIcon(gps, w), new BMap.Size(w,25)));
228   -
  228 +
229 229 //更新 infoWindow
230 230 if(m.infoWindow.isOpen()){
231 231 bdOpenWindow(m);
232 232 }
233 233 }
234   -
  234 +
235 235 function setTop(m){
236 236 if(topMarker)
237 237 topMarker.setTop(false);
238 238 m.setTop(true);
239 239 topMarker = m;
240 240 }
241   -
  241 +
242 242 function bdOpenWindow(marker){
243 243 marker.gpsData.fromNow = moment(marker.gpsData.timestamp).fromNow();
244   -
  244 +
245 245 marker.infoWindow.setContent(template('gps_info_win_temp', marker.gpsData));
246 246 map.openInfoWindow(marker.infoWindow, marker.point);
247 247 }
248   -})();
249 248 \ No newline at end of file
  249 +})();
... ...
src/main/resources/static/pages/mapmonitor/real/js/playBack.js
... ... @@ -18,7 +18,7 @@ var playBack = (function() {
18 18 var step = 10;
19 19 //1个px多少秒
20 20 var secondPX;
21   -
  21 +
22 22 var tRange;
23 23 //进度条宽度
24 24 var pWidth;
... ... @@ -47,13 +47,13 @@ var playBack = (function() {
47 47 var firstDeviceId;
48 48 //是否启用焦点跟踪
49 49 var isEnableFocus;
50   -
  50 +
51 51 var car2DeviceId;
52   -
  52 +
53 53 //事件监听
54 54 $('.play-back-btns .playBtn').on('click', function(){
55 55 var status = $(this).data('status');
56   -
  56 +
57 57 //开始播放
58 58 if(status == 0){
59 59 maxWidth = $('.play-back-progress').width();
... ... @@ -65,7 +65,7 @@ var playBack = (function() {
65 65 $(this).removeClass('fa-pause').addClass('fa-play').data('status', 0);
66 66 }
67 67 });
68   -
  68 +
69 69 $('.progress-body').mousemove(function(e){
70 70 var w = e.clientX - 20
71 71 showMarkTextMouse(w);
... ... @@ -76,7 +76,7 @@ var playBack = (function() {
76 76 goToByTime(sTime + w * secondPX);
77 77 hideMarkTextMouse();
78 78 });
79   -
  79 +
80 80 //退出
81 81 $('.play-back-close').on('click', function(){
82 82 stop();
... ... @@ -94,7 +94,7 @@ var playBack = (function() {
94 94 //动画
95 95 $('.play-back-list').removeClass('fadeInRightBig').addClass('fadeOutRightBig');
96 96 $('.play-back-btns,.progress-wrap').removeClass('fadeInUpBig').addClass('fadeOutDownBig');
97   -
  97 +
98 98 setTimeout(function(){
99 99 $('.mapRightWrap,.mapTools,.leftUtilsWrap').fadeIn();
100 100 //隐藏元素,还原样式
... ... @@ -102,13 +102,13 @@ var playBack = (function() {
102 102 $('.play-back-btns,.progress-wrap').hide().removeClass('fadeOutDownBig').addClass('fadeInUpBig');
103 103 }, 500);
104 104 });
105   -
  105 +
106 106 function showMarkText(w){
107 107 var text = moment(cTime * 1000).format('HH:mm.ss');
108   -
  108 +
109 109 $presMark.text(text).css('left', w - $presMark.width() / 2).show();
110 110 }
111   -
  111 +
112 112 //添加进出站日志
113 113 function addInOutText(gps){
114 114 var info = gps.inout_stop_info;
... ... @@ -122,10 +122,10 @@ var playBack = (function() {
122 122 gps.nbbm + ' '+ (info.inOut==1?'出':'进') +'站 '+info.stopName+' '+
123 123 '<span class="pback-logs-item-date">'+ date +'</span>'+
124 124 '</div>';
125   -
  125 +
126 126 $('.pback-logs').prepend(html);
127 127 }
128   -
  128 +
129 129 //播放速度
130 130 $('.play-speed-select li').on('click', function(){
131 131 stop();
... ... @@ -133,7 +133,7 @@ var playBack = (function() {
133 133 $('#playSpeedText').text(speed);
134 134 play();
135 135 });
136   -
  136 +
137 137 //被选中的缓冲区
138 138 var buffAeraArray = {}, bConfLayer;
139 139 //缓冲区
... ... @@ -143,12 +143,12 @@ var playBack = (function() {
143 143 bConfLayer = null;
144 144 return;
145 145 }
146   -
  146 +
147 147 //计算弹出位置
148 148 var top = $(this).offset().top - 450
149 149 ,left = $(this).offset().left - 230 / 2;
150 150 $.get('/pages/mapmonitor/real/bufferAreaConfig.html', function(rs){
151   -
  151 +
152 152 bConfLayer = layer.open({
153 153 type: 1,
154 154 area: ['280px', '430px'],
... ... @@ -167,11 +167,11 @@ var playBack = (function() {
167 167 });
168 168 });
169 169 });
170   -
  170 +
171 171 function hideMarkText(w){
172 172 $presMark.hide();
173 173 }
174   -
  174 +
175 175 function showMarkTextMouse(w){
176 176 var text = moment((sTime + w * secondPX) * 1000).format('HH:mm.ss');
177 177 $presMarkMouse.text(text).css('left', w - $presMarkMouse.width() / 2).show();
... ... @@ -179,7 +179,7 @@ var playBack = (function() {
179 179 function hideMarkTextMouse(){
180 180 $presMarkMouse.hide();
181 181 }
182   -
  182 +
183 183 //日志区域滚动条
184 184 $('.pback-logs').slimscroll({
185 185 height: '100%',
... ... @@ -188,9 +188,9 @@ var playBack = (function() {
188 188  
189 189 var exports = {
190 190 init : function() {
191   -
  191 +
192 192 lineGroup.clear();
193   -
  193 +
194 194 car2DeviceId = JSON.parse(window.localStorage.getItem('car2DeviceId'));
195 195 var htmlStr = template('play_back_panel_temp', {})
196 196 ,carSel = '.mapRightWrap select[name="nbbm[]"]';
... ... @@ -205,10 +205,10 @@ var playBack = (function() {
205 205 //获取对应线路
206 206 defaultLine = e.params.data.lineCode;
207 207 });
208   -
  208 +
209 209 //点击轨迹回放按钮
210 210 $('#playBackBtn').on('click', playBackBtnClick);
211   -
  211 +
212 212 //默认值,当前时间前2小时
213 213 var m = moment()
214 214 ,rq='YYYY-MM-DD', sj='HH:mm';
... ... @@ -222,19 +222,19 @@ var playBack = (function() {
222 222 defaultLine = lineCode;
223 223 }
224 224 };
225   -
  225 +
226 226 function playBackBtnClick(){
227 227 //表单校验
228 228 if(!customFormValidate('#playBackForm'))
229 229 return;
230   -
  230 +
231 231 var params = $('#playBackForm').serializeJSON();
232 232 //查询历史gps数据
233 233 var fs = 'YYYY-MM-DDHH:mm'
234 234 ,st = moment(params.sDate + params.sTime, fs).format('X')
235 235 ,et = moment(params.eDate + params.eTime, fs).format('X')
236 236 ,nbbm = params.nbbm;
237   -
  237 +
238 238 isEnableFocus = params.enableFocus;
239 239 layer.msg('查询历史GPS...', {icon: 16, time: 0,shade:0.3});
240 240 $.ajax({
... ... @@ -246,7 +246,7 @@ var playBack = (function() {
246 246 layer.alert('服务器没有返回数据,请检查你的输入参数!', {icon: 3});
247 247 return;
248 248 }
249   -
  249 +
250 250 gpsArray = rs;
251 251 size = gpsArray.length;
252 252 layer.closeAll();
... ... @@ -257,33 +257,33 @@ var playBack = (function() {
257 257 sTime = parseInt(st);
258 258 eTime = parseInt(et);
259 259 tRange = et - st;
260   -
  260 +
261 261 //获取进度条宽度
262 262 pWidth = $('.progress-body').width();
263 263 secondPX = tRange / pWidth;
264 264 //清理地图
265 265 iMap.call('clear');
266   -
  266 +
267 267 firstCar = params.nbbm[0];
268 268 firstDeviceId = car2DeviceId[firstCar];
269   -
  269 +
270 270 if(defaultLine){
271 271 layer.msg('加载线路图层数据...', {icon: 16, time: 0,shade:0.3});
272 272 $.get('/realSchedule/findRouteByLine', {lineCode: defaultLine}
273 273 ,function(route){
274 274 lineRoute = route;
275 275 iMap.call('drawLine', {route: lineRoute});
276   -
  276 +
277 277 cTime = sTime;
278 278 play();
279   -
  279 +
280 280 //自动定位到第一辆车的第一个点
281 281 var nbbm = params.nbbm[0]
282 282 ,firstTime = searchFirst(gpsArray, nbbm);
283 283 if(firstTime){
284 284 layer.msg('从该时区内 ' + nbbm + ' 的首个信号点,' + moment(firstTime).format('HH:mm') + '开始'
285 285 ,{offset: 'ct', shift : 5, skin: 'layer-bg-green'});
286   -
  286 +
287 287 goToByTime(firstTime / 1000);
288 288 }
289 289 else
... ... @@ -296,7 +296,7 @@ var playBack = (function() {
296 296 }
297 297 });
298 298 }
299   -
  299 +
300 300 //搜索时间范围内第一个gps点的时间
301 301 function searchFirst(list, nbbm){
302 302 var time;
... ... @@ -306,10 +306,10 @@ var playBack = (function() {
306 306 break;
307 307 }
308 308 }
309   -
  309 +
310 310 return time;
311 311 }
312   -
  312 +
313 313 function stop(){
314 314 _stopFocusTimer = 1;
315 315 clearInterval(focusTimer);
... ... @@ -318,13 +318,13 @@ var playBack = (function() {
318 318 $('.play-back-btns .playBtn').removeClass('fa-pause').addClass('fa-play').data('status', 0);
319 319 prgTimer = null;
320 320 }
321   -
  321 +
322 322 function play(){
323 323 $('#progress-mark-time').show();
324 324 $('.play-back-btns .playBtn').removeClass('fa-play').addClass('fa-pause').data('status', 1);
325 325 //开始播放
326 326 start();
327   -
  327 +
328 328 //启动焦点定位(单独用一个定时器做缓冲)
329 329 console.log('isEnableFocus', isEnableFocus);
330 330 if(isEnableFocus){
... ... @@ -332,46 +332,46 @@ var playBack = (function() {
332 332 startTrackFocus();
333 333 }
334 334 }
335   -
  335 +
336 336 var _stopFocusTimer, focusTimer;
337 337 function startTrackFocus(){
338 338 trackFocus();
339 339 if(!_stopFocusTimer)
340 340 focusTimer = setTimeout(startTrackFocus, 1800);
341 341 }
342   -
  342 +
343 343 function trackFocus(){
344 344 //定位焦点
345 345 if(firstDeviceId)
346 346 iMap.call('goToMarker', {deviceId: firstDeviceId});
347 347 }
348   -
  348 +
349 349 function start(){
350 350 prgTimer = setTimeout(start, 1000 / speed);
351 351 run();
352 352 }
353   -
  353 +
354 354 var cw = 0;
355 355 function run(){
356 356 cTime += step;
357   -
  357 +
358 358 cw = (cTime - sTime) / secondPX;
359 359 //显示时间标记
360 360 showMarkText(cw);
361 361 //移动GPS点
362 362 moveGpsByTime(cTime);
363   -
  363 +
364 364 if(cw >= pWidth){
365 365 stop();
366 366 $('#progress-mark-time').hide();
367 367 cw = pWidth;
368   -
  368 +
369 369 layer.msg('本次轨迹回放已结束'
370 370 ,{offset: 'ct', shift : 5 , skin: 'layer-bg-red'});
371 371 }
372 372 $pmk.css('width', cw + 'px');
373 373 }
374   -
  374 +
375 375 //根据时间移动GPS
376 376 function moveGpsByTime(t){
377 377 t = t * 1000;
... ... @@ -382,28 +382,28 @@ var playBack = (function() {
382 382 rs[gps.nbbm] = gps;
383 383 else
384 384 break;
385   -
  385 +
386 386 //到离站信息
387 387 if(gps.inout_stop != -1)
388 388 addInOutText(gps);
389 389 }
390   -
  390 +
391 391 //绘制到地图
392 392 var marker, gpsList = [];
393 393 for(var nbbm in rs){
394 394 gps = rs[nbbm];
395 395 gpsList.push(gps);
396 396 }
397   -
  397 +
398 398 iMap.call('drawRealGpsMarker', {gpsList: gpsList});
399 399 }
400   -
  400 +
401 401 function goToByTime(time){
402 402 //停止播放
403 403 clearInterval(prgTimer);
404 404 prgTimer = null;
405 405 cIndex = 0;
406   -
  406 +
407 407 cTime = time;
408 408 //清空右侧日志信息
409 409 $('.pback-logs').html('');
... ... @@ -411,16 +411,16 @@ var playBack = (function() {
411 411 removeAllGps();
412 412 play();
413 413 }
414   -
415   -
  414 +
  415 +
416 416 //removeMarker
417 417 function removeAllGps(){
418 418 for(var nbbm in markerMap)
419 419 iMap.call('clear');
420   -
  420 +
421 421 markerMap = {};
422 422 }
423   -
  423 +
424 424 /**
425 425 * 自定义表单校验
426 426 */
... ... @@ -428,7 +428,7 @@ var playBack = (function() {
428 428 var rs = true;
429 429 //所有可见的项
430 430 var es = $('input,select', f);
431   -
  431 +
432 432 for(var i = 0, e; e = es[i++];){
433 433 if($(e).attr('required') && ( $(e).val() == null || $(e).val() == '')){
434 434 if($(e).hasClass('select2-hidden-accessible'))
... ... @@ -444,12 +444,12 @@ var playBack = (function() {
444 444 $(e).removeClass('custom-val-error');
445 445 }
446 446 }
447   -
  447 +
448 448 if(!rs){
449   - layer.alert('数据完整性校验失败,请检查输入项', {icon: 2, title: '操作失败', shift: 5});
  449 + layer.alert('数据完整性校验失败,请检查输入项', {icon: 2, title: '操作失败', shift: 5});
450 450 }
451 451 return rs;
452 452 }
453 453  
454 454 return exports;
455   -})();
456 455 \ No newline at end of file
  456 +})();
... ...
src/main/resources/static/pages/mapmonitor/real/js/real.js
1 1 !function() {
2 2 //css3动画结束事件
3 3 var animationend = 'webkitAnimationEnd animationend';
4   -
  4 +
5 5 var playAnimation;
6 6 //地图右侧容器
7 7 var mrw = $('.mapRightWrap');
8 8 //加载动画
9   - var spinnerLoad = '<div class="spinner">'
  9 + var spinnerLoad = '<div class="spinner">'
10 10 + ' <div class="rect1"></div>'
11   - + ' <div class="rect2"></div>'
  11 + + ' <div class="rect2"></div>'
12 12 + ' <div class="rect3"></div>'
13   - + ' <div class="rect4"></div>'
  13 + + ' <div class="rect4"></div>'
14 14 + ' <div class="rect5"></div>'
15 15 + '</div>';
16   -
  16 +
17 17 // mapRightWrap 角度恢复
18 18 function resetRotate(cb, midCallback) {
19 19 mrw.one('transitionend', function() {
... ... @@ -21,22 +21,22 @@
21 21 $(this).css('transition', 'none').addClass('rotate0');
22 22  
23 23 midCallback && midCallback();
24   -
  24 +
25 25 setTimeout(function() {
26 26 mrw.css('transition', 'all .5s ease-in-out')
27 27 .removeClass('disable');
28 28 playAnimation = false;
29   -
  29 +
30 30 cb && cb();
31 31 }, 500);
32 32  
33 33 });
34 34 }
35   -
  35 +
36 36 $('#openWindow').on('click', function(){
37 37 window.open('/pages/mapmonitor/alone/wrap.html','alone_map' );
38 38 });
39   -
  39 +
40 40 // tools点击
41 41 $('.mapTools div.item').on('click', function() {
42 42 if ($(this).hasClass('active')) {
... ... @@ -54,7 +54,7 @@
54 54 $(this).addClass('active');
55 55 //清理地图
56 56 iMap.call('clear');
57   -
  57 +
58 58 toolsEvent.clearStyle();
59 59 toolsEvent[method]();
60 60 });
... ... @@ -76,7 +76,7 @@
76 76 playBack : function() {
77 77 mrw.html('').addClass('playBack');
78 78 playBack.init();
79   -
  79 +
80 80 },
81 81 clearStyle : function() {
82 82 mrw.removeClass(
... ... @@ -98,5 +98,5 @@
98 98  
99 99 mrw.html(spinnerLoad);
100 100 lineGroup.showDataLazy();
101   -
102   -}();
103 101 \ No newline at end of file
  102 +
  103 +}();
... ...
src/main/resources/static/real_control_v2/css/ct_table.css
... ... @@ -6,9 +6,9 @@
6 6 }
7 7  
8 8 .ct_table {
9   - position: relative;
10   - padding-top: 30px;
11   - font-size: 13px;
  9 + position: relative;
  10 + padding-top: 30px;
  11 + font-size: 13px;
12 12 }
13 13  
14 14 .ct_table>.ct_table_head {
... ... @@ -20,31 +20,30 @@
20 20 line-height: 30px;
21 21 }
22 22  
23   -.ct_table>.ct_table_head dl{
24   - border-bottom: 0;
  23 +.ct_table>.ct_table_head dl {
  24 + border-bottom: 0;
25 25 }
26 26  
27   -.ct_table>.ct_table_head dl dt{
28   - font-weight: normal;
  27 +.ct_table>.ct_table_head dl dt {
  28 + font-weight: normal;
29 29 }
30 30  
31   -.ct_table>.ct_table_body{
32   - width: 100%;
  31 +.ct_table>.ct_table_body {
  32 + width: 100%;
33 33 }
34 34  
35 35 .ct_table dl {
36   - display: block;
37   - width: 100%;
38   - margin: 0;
39   - border-bottom: 1px solid #eee;
40   - height: 30px;
41   - cursor: default;
  36 + display: block;
  37 + width: 100%;
  38 + margin: 0;
  39 + /*border-bottom: 1px solid;*/
  40 + height: 30px;
  41 + cursor: default;
42 42 }
43 43  
44   -.ct_table>.ct_table_body dl:hover,
45   -.ct_table>.ct_table_body dl.context-menu-active{
46   - box-shadow: 0 0 6px #656c71;
47   - background: #f5fbff;
  44 +.ct_table>.ct_table_body dl:hover, .ct_table>.ct_table_body dl.context-menu-active {
  45 + box-shadow: 0 0 4px #656c71;
  46 + background: #f5fbff;
48 47 }
49 48  
50 49  
... ... @@ -53,35 +52,84 @@
53 52 }*/
54 53  
55 54 .ct_table dl dd, .ct_table dl dt {
56   - display: inline-block;
57   - white-space: nowrap;
58   - overflow: hidden;
59   - text-overflow: ellipsis;
60   - height: 100%;
61   - line-height: 30px;
62   - border-right: 1px solid;
63   - border-right-color: #e6e6e6;
64   - text-indent: 5px;
  55 + display: inline-block;
  56 + white-space: nowrap;
  57 + overflow: hidden;
  58 + text-overflow: ellipsis;
  59 + height: 100%;
  60 + line-height: 30px;
  61 + border-right: 1px solid;
  62 + text-indent: 5px;
65 63 }
66 64  
67   -.ct_table_wrap{
68   - border: 1px solid #e6e6e6;
69   - border-left: 0;
  65 +.ct_table_wrap {
  66 + border: 1px solid #e6e6e6;
  67 + border-left: 0;
70 68 }
71 69  
72   -/*.ct_table dl dt{
73   - border-right-color: #fff;
74   -}*/
  70 +.ct_table>.ct_table_head {
  71 + border-bottom: 1px solid #dedede;
  72 +}
  73 +
  74 +.ct_table dl {
  75 + font-size: 0;
  76 + white-space: nowrap;
  77 +}
75 78  
76   -dl.ct_row_active,
77   -.ct_table>.ct_table_body dl.ct_row_active:hover {
  79 +.ct_table dl dd, .ct_table dl dt {
  80 + border-right-color: #dedede;
  81 + font-size: 13px;
  82 + border-bottom: 1px solid #dedede;
  83 +}
  84 +
  85 +dl.ct_row_active, .ct_table>.ct_table_body dl.ct_row_active:hover {
78 86 /*background-image: -webkit-linear-gradient(top, #5e96d2, #ffffff, #ffffff, #5e96d2);*/
79 87 }
80 88  
  89 +dt[sort-field] {
  90 + cursor: pointer;
  91 +}
  92 +
  93 +dt[sort-field] i.uk-icon-sort-asc {
  94 + vertical-align: middle;
  95 + margin-top: 3px;
  96 +}
81 97  
82   -/*.ct_table dl dd.ct_fixed, .ct_table dl dt.ct_fixed{
83   - position: absolute;
84   - background: #fff;
85   - height: 30px;
86   - border-right: 1px solid red;
87   -}*/
  98 +dt[sort-field] i.uk-icon-sort-desc {
  99 + vertical-align: middle;
  100 + margin-top: -8px;
  101 +}
  102 +
  103 +.ct_table_wrap.ct_table_no_border{
  104 + height: 350px;
  105 + border: 0;
  106 + margin-top: 15px;
  107 +}
  108 +
  109 +.ct_table_no_border .ct_table{
  110 + padding-top: 35px;
  111 +}
  112 +
  113 +.ct_table_no_border .ct_table>.ct_table_head,.ct_table_no_border .ct_table dl {
  114 + height: 35px;
  115 + line-height: 35px;
  116 + background: white;
  117 +}
  118 +.ct_table dl{
  119 + transition: all .1s ease;
  120 +}
  121 +
  122 +.ct_table_no_border .ct_table>.ct_table_head dl dt {
  123 + font-weight: 600;
  124 + font-size: 13px;
  125 +}
  126 +
  127 +.ct_table_no_border .ct_table dl dd,.ct_table_no_border .ct_table dl dt {
  128 + font-size: 14px;
  129 + border-right: 0;
  130 +}
  131 +
  132 +.ct_table .uk-icon-question-circle{
  133 + color: #b3b2b2;
  134 + cursor: pointer;
  135 +}
... ...
src/main/resources/static/real_control_v2/css/home.css
... ... @@ -36,18 +36,19 @@
36 36  
37 37 .uk-grid.home-line-card {
38 38 background: #fafafa;
39   - border: 1px solid #e5e5e5;
  39 + border: 1px solid #e6e6e6;
40 40 border-radius: 4px;
41   - margin: 0 2px 4px;
  41 + margin: 0 1px 4px 1px;
42 42 min-height: 230px;
43   - height: calc(100% / 3 - 6px);
  43 + height: calc(100% / 3 - 12px);
  44 + padding: 3px;
44 45 }
45 46  
46 47 .uk-grid.home-line-card .svg-chart-wrap {
47 48 background: #fff;
48   - border: 1px double #dadada;
49   - border-radius: 4px;
50 49 position: relative;
  50 + border-left: 1px solid #e6e6e6;
  51 + border-right: 1px solid #e6e6e6;
51 52 }
52 53  
53 54 .uk-grid.home-line-card .data-wrap {
... ... @@ -57,7 +58,7 @@
57 58 }
58 59  
59 60 .home-gps-table {
60   - width: 620px;
  61 + width: 560px;
61 62 }
62 63  
63 64 .home-gps-table small {
... ... @@ -65,12 +66,12 @@
65 66 }
66 67  
67 68 .home-gps-table dl dt:nth-of-type(1), .home-gps-table dl dd:nth-of-type(1) {
68   - width: 13%;
  69 + width: 15%;
69 70 font-size: 14px;
70 71 }
71 72  
72 73 .home-gps-table dl dt:nth-of-type(2), .home-gps-table dl dd:nth-of-type(2) {
73   - width: 7%
  74 + width: 8%
74 75 }
75 76  
76 77 .home-gps-table dl dt:nth-of-type(3), .home-gps-table dl dd:nth-of-type(3) {
... ... @@ -78,11 +79,11 @@
78 79 }
79 80  
80 81 .home-gps-table dl dt:nth-of-type(4), .home-gps-table dl dd:nth-of-type(4) {
81   - width: 17%
  82 + width: 19%
82 83 }
83 84  
84 85 .home-gps-table dl dt:nth-of-type(5), .home-gps-table dl dd:nth-of-type(5) {
85   - width: 17%
  86 + width: 18%
86 87 }
87 88  
88 89 .home-gps-table dl dt:nth-of-type(6), .home-gps-table dl dd:nth-of-type(6) {
... ... @@ -99,18 +100,18 @@
99 100 }
100 101  
101 102 .data-wrap.up {
102   - border-left: 1px solid #dadada;
  103 + /*border-left: 1px solid #dadada;*/
103 104 }
104 105  
105 106 .data-wrap.down {
106   - border-right: 1px solid #dadada;
  107 + /*border-right: 1px solid #dadada;*/
107 108 }
108 109  
109 110 .data-wrap .data-title {
110 111 height: 25px;
111 112 line-height: 25px;
112 113 font-size: 13px;
113   - padding: 3px 0 3px;
  114 + padding: 0 0 3px;
114 115 }
115 116  
116 117 .data-wrap .data-title span.data-title-text {
... ... @@ -122,12 +123,12 @@
122 123  
123 124 .data-wrap.up .data-title span.data-title-text {
124 125 background: #5e96d2;
125   - background-image: -webkit-linear-gradient(top, #5e96d2, #5788bb);
  126 + /*background-image: -webkit-linear-gradient(top, #5e96d2, #5788bb);*/
126 127 }
127 128  
128 129 .data-wrap.down .data-title span.data-title-text {
129   - background: #c92121;
130   - background-image: -webkit-linear-gradient(top, #d66868, #bf6363);
  130 + background: #d66868;
  131 + /*background-image: -webkit-linear-gradient(top, #d66868, #bf6363);*/
131 132 }
132 133  
133 134 .data-wrap .data-body {
... ... @@ -182,19 +183,54 @@
182 183 padding-left: 10px;
183 184 }
184 185  
185   -#show-multi-send-modal ul.uk-list li span{
186   - font-size: 12px;
  186 +#show-multi-send-modal ul.uk-list li span {
  187 + font-size: 12px;
187 188 }
188   -#show-multi-send-modal ul.uk-list li span.text-lg{
189   - font-size: 15px;
190   - margin-right: 5px;
  189 +
  190 +#show-multi-send-modal ul.uk-list li span.text-lg {
  191 + font-size: 15px;
  192 + margin-right: 5px;
191 193 }
192 194  
193 195 #show-multi-send-modal ul.uk-list-line>li:nth-child(n+2) {
194 196 border-top: 1px solid #f1f1f1;
195 197 }
196 198  
197   -/*#context-menu-layer{
198   - opacity: 0.1 !Important;
199   - background-color: rgb(179, 179, 179) !Important;
  199 +.modal-loading {
  200 + position: relative;
  201 + height: 60px;
  202 +}
  203 +
  204 +.modal-loading .uk-modal-spinner {
  205 + position: absolute;
  206 + top: 10%;
  207 + left: 50%;
  208 + -webkit-transform: translate(-50%, -50%);
  209 + transform: translate(-50%, -10%);
  210 + font-size: 25px;
  211 + color: #ddd;
  212 +}
  213 +
  214 +.modal-loading .text {
  215 + position: absolute;
  216 + top: 20%;
  217 + left: 51%;
  218 + -webkit-transform: translate(-55%, -50%);
  219 + transform: translate(-49%, 20px);
  220 + font-size: 13px;
  221 + color: #717171;
  222 +}
  223 +
  224 +#c0a3_detail_panel .uk-table th {
  225 + text-align: right;
  226 + width: 50%;
  227 + padding-right: 20px;
  228 +}
  229 +
  230 +/*.data-wrap.up::-webkit-scrollbar-thumb{
  231 + box-shadow: 0 0 0 5px rgba(94, 150, 210, 0.61) inset;
  232 +}
  233 +
  234 +.data-wrap.down::-webkit-scrollbar-thumb{
  235 + box-shadow: 0 0 0 5px rgba(210, 103, 103, 0.44) inset;
200 236 }*/
... ...
src/main/resources/static/real_control_v2/css/line_schedule.css 0 → 100644
  1 +.line_schedule {
  2 + height: 100%;
  3 + overflow: hidden;
  4 +}
  5 +
  6 +.line_schedule .uk-grid {
  7 + margin-left: 0;
  8 +}
  9 +
  10 +.line_schedule .uk-grid>* {
  11 + padding: 0;
  12 +}
  13 +
  14 +.line_schedule div.uk-width-1-6, .line_schedule div.uk-width-1-2 {
  15 + padding: 0 2px 2px 2px;
  16 +}
  17 +
  18 +.line_schedule .footer-chart {
  19 + height: 243px;
  20 + margin-top: 5px;
  21 +}
  22 +
  23 +.line_schedule .uk-grid.top-container {
  24 + height: calc(100% - 260px);
  25 + margin-top: 5px;
  26 + overflow: hidden;
  27 +}
  28 +
  29 +.line_schedule .card-panel {
  30 + padding: 0;
  31 + height: 100%;
  32 + border: 1px solid #ddd;
  33 + background: #fafafa;
  34 + border-radius: 4px;
  35 + moz-user-select: -moz-none;
  36 + -moz-user-select: none;
  37 + -o-user-select: none;
  38 + -khtml-user-select: none;
  39 + -webkit-user-select: none;
  40 + -ms-user-select: none;
  41 + user-select: none;
  42 +}
  43 +
  44 +.line_schedule .ct_table {
  45 + padding-top: 36px;
  46 +}
  47 +
  48 +.line_schedule .ct_table>.ct_table_head {
  49 + height: 36px;
  50 + line-height: 36px;
  51 +}
  52 +
  53 +.line_schedule .schedule-wrap {
  54 + height: calc(100% - 1px);
  55 + padding: 0;
  56 +}
  57 +
  58 +.line_schedule .schedule-wrap h3 {
  59 + margin: 7px 0 5px;
  60 + text-indent: 5px;
  61 +}
  62 +
  63 +.line_schedule .schedule-wrap.up h3 {
  64 + color: #2765A7;
  65 +}
  66 +
  67 +.line_schedule .schedule-wrap.down h3 {
  68 + color: #C92121;
  69 +}
  70 +
  71 +.line-schedule-table dl dt:nth-of-type(1), .line-schedule-table dl dd:nth-of-type(1) {
  72 + width: 50px;
  73 +}
  74 +
  75 +.line-schedule-table dl dd:nth-of-type(1) {
  76 + background: #eae8e8;
  77 + /*border-bottom: 1px solid #b3b3b3;*/
  78 + border-right: 1px solid #b3b3b3;
  79 + text-align: center;
  80 + text-indent: -3px;
  81 +}
  82 +
  83 +.line-schedule-table dl dt:nth-of-type(2), .line-schedule-table dl dd:nth-of-type(2) {
  84 + width: 55px;
  85 + text-align: center;
  86 +}
  87 +
  88 +.line-schedule-table dl dt:nth-of-type(3), .line-schedule-table dl dd:nth-of-type(3) {
  89 + width: calc(2% + 86px);
  90 +}
  91 +
  92 +.line-schedule-table dl dt:nth-of-type(4), .line-schedule-table dl dd:nth-of-type(4) {
  93 + width: 10%;
  94 + /*color: #676767;*/
  95 +}
  96 +
  97 +.line-schedule-table dl dt:nth-of-type(5), .line-schedule-table dl dd:nth-of-type(5) {
  98 + width: 11%;
  99 +}
  100 +
  101 +.line-schedule-table dl dt:nth-of-type(6), .line-schedule-table dl dd:nth-of-type(6) {
  102 + width: calc(15% + 8px);
  103 + /*color: #676767;*/
  104 +}
  105 +
  106 +.line-schedule-table dl dt:nth-of-type(7), .line-schedule-table dl dd:nth-of-type(7) {
  107 + width: 10%;
  108 +}
  109 +
  110 +.line-schedule-table dl dt:nth-of-type(8), .line-schedule-table dl dd:nth-of-type(8) {
  111 + width: calc(48% - 228px);
  112 +}
  113 +
  114 +.line-schedule-table dl dt:nth-of-type(9), .line-schedule-table dl dd:nth-of-type(9) {
  115 + width: 50px;
  116 + border-right: 0;
  117 +}
  118 +
  119 +.schedule-body {
  120 + height: calc(100% - 37px);
  121 + background: #fff;
  122 +}
  123 +
  124 +.schedule-body .ct_table_wrap {
  125 + height: 100%;
  126 + border-bottom: 0;
  127 + overflow-x: hidden;
  128 +}
  129 +
  130 +.schedule-body .ct_table_wrap .ct_table .ct_table_body dl:last-child {
  131 + border-bottom: 0;
  132 +}
  133 +
  134 +.schedule-body .ct_table>.ct_table_body dl:hover dd:nth-of-type(1) {
  135 + background: #fafafa;
  136 + background: linear-gradient(to right, #fafafa, #f5fbff);
  137 +}
  138 +
  139 +.schedule-body .ct_table dl dd, .schedule-body .ct_table dl dt {
  140 + font-size: 14px;
  141 + line-height: 37px;
  142 +}
  143 +
  144 +.ct_table .uk-badge {
  145 + padding: 0 1px 0 1px;
  146 + text-indent: 0;
  147 + font-family: 华文细黑;
  148 +}
  149 +
  150 +.ct_table .uk-badge.uk-badge-notification{
  151 + text-indent: -1px;
  152 +}
  153 +
  154 +.schedule-body .ct_table dl._active, .schedule-body .ct_table>.ct_table_body dl._active:hover {
  155 + background: #dedede;
  156 +}
  157 +
  158 +.schedule-body .ct_table dl._active dd {
  159 + background: #cef9e3!important;
  160 + color: #484848;
  161 +}
  162 +
  163 +.schedule-body .ct_table dl._active dd a {
  164 + color: #0162b5;
  165 +}
  166 +
  167 +.schedule-body .ct_table dl._active dd.seq_no {
  168 + background: #94e6bd !important;
  169 + color: #156138;
  170 + font-weight: 600;
  171 +}
  172 +
  173 +.schedule-body .ct_table dl.drag-active, .schedule-body .ct_table>.ct_table_body dl.drag-active:hover {
  174 + background: #dedede;
  175 +}
  176 +
  177 +.schedule-body .ct_table dl.drag-active dd {
  178 + background: #cef9e3!important;
  179 + color: #484848;
  180 + border-top: 1px solid #e0d7d7;
  181 +}
  182 +
  183 +.schedule-body .ct_table dl.drag-active dd a {
  184 + color: #0162b5;
  185 +}
  186 +
  187 +.schedule-body .ct_table dl.drag-active dd.seq_no {
  188 + background: #94e6bd !important;
  189 + color: #156138;
  190 + font-weight: 600;
  191 +}
  192 +
  193 +.context-menu-list.schedule-ct-menu {
  194 + /*font-size: 13px;*/
  195 + font-family: 微软雅黑;
  196 +}
  197 +
  198 +.context-menu-list.schedule-ct-menu .context-menu-item {
  199 + padding: .25em 2em;
  200 +}
  201 +
  202 +.context-menu-list.schedule-ct-menu-input {
  203 + width: 88px !important;
  204 + min-width: 80px !important;
  205 + font-family: 微软雅黑;
  206 +}
  207 +
  208 +.context-menu-list.schedule-ct-menu-input .context-menu-item {
  209 + padding: .25em 2em;
  210 +}
  211 +
  212 +.db-input {
  213 + width: calc(100% - 8px);
  214 + height: calc(100% - 9px);
  215 + margin-left: -4px;
  216 + vertical-align: top;
  217 + font-size: 13px;
  218 + color: red;
  219 + font-family: 微软雅黑;
  220 + margin-top: 1px;
  221 +}
  222 +
  223 +.schedule-body .ct_table dl {
  224 + height: 36px;
  225 +}
  226 +
  227 +span.fcsj-diff {
  228 + color: gray;
  229 + margin-left: 3px;
  230 +}
  231 +
  232 +
  233 +/** 图例 */
  234 +
  235 +dd.tl-yzx {
  236 + background: #c1ddf0;
  237 + border-bottom: 0 !important;
  238 + border-top: 1px solid #f5f5f5;
  239 +}
  240 +
  241 +dd.tl-qrlb {
  242 + background: #7B6B24;
  243 + color: #EAEBEC;
  244 + font-size: 13px;
  245 +}
  246 +
  247 +dd.tl-qrlb::before {
  248 + content: '烂班';
  249 +}
  250 +
  251 +dd.tl-zzzx {
  252 + background: #96F396;
  253 +}
  254 +
  255 +.ct_table>.ct_table_body dl:hover dd.tl-yzx, .ct_table>.ct_table_body dl.context-menu-active dd.tl-yzx, .ct_table>.ct_table_body dl:hover dd.tl-zzzx, .ct_table>.ct_table_body dl.context-menu-active dd.tl-zzzx {
  256 + background: none;
  257 +}
  258 +
  259 +.ct_table>.ct_table_body dl:hover dd.tl-qrlb, .ct_table>.ct_table_body dl.context-menu-active dd.tl-qrlb {
  260 + font-weight: 600;
  261 +}
  262 +
  263 +.schedule-body .ct_table dl.drag-active dd.tl-qrlb {
  264 + color: red;
  265 + font-weight: 600;
  266 +}
  267 +
  268 +.line_schedule .footer-chart .svg-wrap {
  269 + width: 100%;
  270 + height: 100%;
  271 + position: relative;
  272 +}
  273 +
  274 +.ct-form-modal form .uk-grid+.uk-grid {
  275 + margin-top: 10px;
  276 +}
  277 +
  278 +.ct-form-modal form small {
  279 + color: #928e8e;
  280 + margin-left: 3px;
  281 +}
  282 +
  283 +.ct-form-modal form input, .ct-form-modal form select {
  284 + width: 100%;
  285 + height: 34px!important;
  286 +}
  287 +
  288 +.ct-form-modal form small.font-danger {
  289 + color: red;
  290 +}
  291 +
  292 +.ct-form-modal form.uk-form-horizontal .uk-form-label {
  293 + width: 80px;
  294 +}
  295 +
  296 +.ct-form-modal form.uk-form-horizontal .uk-form-controls {
  297 + margin-left: 85px;
  298 +}
  299 +
  300 +.sch-time-checkbox-list {
  301 + height: 240px;
  302 + overflow: auto;
  303 + border: 1px solid #c4c4c4;
  304 + border-radius: 4px;
  305 + padding: 9px 0;
  306 +}
  307 +
  308 +.sch-time-checkbox-list label {
  309 + display: block;
  310 + font-size: 16px;
  311 + border-bottom: 1px dashed #e6e3e3;
  312 + height: 30px;
  313 + line-height: 30px;
  314 + padding-left: 12px;
  315 +}
  316 +
  317 +/*.sch-time-checkbox-list label input[type=checkbox] {
  318 + width: 20px;
  319 + height: 18px !important;
  320 + vertical-align: middle;
  321 + margin-top: -3px;
  322 +}*/
  323 +
  324 +.ct-form-modal form.uk-form-horizontal .ct-stacked .uk-form-label {
  325 + width: 100%;
  326 +}
  327 +
  328 +.ct-form-modal form.uk-form-horizontal .ct-stacked .uk-form-controls {
  329 + margin: 32px 0 0 0;
  330 +}
  331 +
  332 +.ct-form-modal form.uk-form-horizontal .ct-stacked .uk-form-controls textarea {
  333 + width: 100%;
  334 +}
  335 +
  336 +
  337 +/** 批量待发调整 */
  338 +
  339 +.ct_table.multi-dftz-table {
  340 + width: 100%;
  341 + border-left: 1px solid #e6e6e6;
  342 + padding-top: 35px;
  343 + vertical-align: top;
  344 + -webkit-user-select: none;
  345 + -moz-user-select: none;
  346 + -ms-user-select: none;
  347 + user-select: none;
  348 +}
  349 +
  350 +.ct_table.multi-dftz-table>.ct_table_head, .ct_table.multi-dftz-table dl {
  351 + height: 35px;
  352 + line-height: 35px;
  353 +}
  354 +
  355 +.ct_table.multi-dftz-table dl dd, .ct_table.multi-dftz-table dl dt {
  356 + line-height: 37px;
  357 +}
  358 +
  359 +.ct_table.multi-dftz-table dl dd, .ct_table.multi-dftz-table dl dt {
  360 + font-size: 14px;
  361 +}
  362 +
  363 +.multi-dftz-table dl dt:nth-of-type(1), .multi-dftz-table dl dd:nth-of-type(1) {
  364 + width: 10%;
  365 + text-align: center;
  366 +}
  367 +
  368 +.multi-dftz-table dl dt:nth-of-type(2), .multi-dftz-table dl dd:nth-of-type(2) {
  369 + width: 14%;
  370 +}
  371 +
  372 +.multi-dftz-table dl dt:nth-of-type(3), .multi-dftz-table dl dd:nth-of-type(3) {
  373 + width: 14%;
  374 +}
  375 +
  376 +.multi-dftz-table dl dt:nth-of-type(4), .multi-dftz-table dl dd:nth-of-type(4) {
  377 + width: 15%;
  378 +}
  379 +
  380 +.multi-dftz-table dl dt:nth-of-type(5), .multi-dftz-table dl dd:nth-of-type(5) {
  381 + width: 15%;
  382 +}
  383 +
  384 +.multi-dftz-table dl dt:nth-of-type(6), .multi-dftz-table dl dd:nth-of-type(6) {
  385 + width: 31%;
  386 + border-right: 0;
  387 + position: relative;
  388 +}
  389 +
  390 +.ct_table.multi-dftz-table input {
  391 + width: 70%;
  392 + height: 27px;
  393 + font-family: 微软雅黑;
  394 + color: #545353;
  395 + border: 1px solid #b1b1b1;
  396 + border-radius: 3px;
  397 + font-size: 14px;
  398 +}
  399 +
  400 +.ct_table.multi-dftz-table input.modify {
  401 + color: #447eb1;
  402 + border: 1px solid #689cd0;
  403 +}
  404 +
  405 +span.modify-num {
  406 + position: absolute;
  407 + bottom: 2px;
  408 + right: 3px;
  409 + color: blue;
  410 + font-family: 华文细黑;
  411 + height: 25px;
  412 + width: 35px;
  413 + line-height: 25px;
  414 + text-align: center;
  415 + text-indent: 0;
  416 +}
  417 +
  418 +span.modify-num.negative {
  419 + color: red;
  420 +}
  421 +
  422 +span.drag-panel {
  423 + padding: 6px 7px;
  424 + display: inline-block;
  425 + margin-bottom: 5px;
  426 + background: #fafafa;
  427 + color: #666;
  428 + border: 1px solid #e5e5e5;
  429 + border-radius: 4px;
  430 + width: 120px;
  431 + cursor: move;
  432 + position: absolute;
  433 + z-index: 2;
  434 + transition: all .2s ease;
  435 +}
  436 +
  437 +span.drag-panel.no-anim {
  438 + transition: none;
  439 +}
  440 +
  441 +span.drag-panel.disable {
  442 + opacity: 0.2;
  443 + cursor: no-drop;
  444 +}
  445 +
  446 +span.drag-panel.draging {
  447 + opacity: 0;
  448 +}
  449 +
  450 +div.drop-rail:before {
  451 + font-size: 12px;
  452 + color: #eeeaea;
  453 + width: 100%;
  454 + display: block;
  455 + text-align: center;
  456 + margin-top: 7px;
  457 + content: ' '
  458 +}
  459 +
  460 +div.drop-rail[data-type="people"]:before {
  461 + content: "驾驶员";
  462 +}
  463 +
  464 +div.drop-rail[data-type="car"]:before {
  465 + content: "车辆";
  466 +}
  467 +
  468 +#schedule-multi-tzrc-modal {
  469 + -webkit-user-select: none;
  470 + -moz-user-select: none;
  471 + -ms-user-select: none;
  472 + user-select: none;
  473 +}
  474 +
  475 +#schedule-multi-tzrc-modal .tm-grid-truncate>.uk-width-medium-1-4 {
  476 + padding: 7px 0 10px 10px;
  477 +}
  478 +
  479 +.drag-panel-wrap {
  480 + width: 163px;
  481 + height: 94px;
  482 +}
  483 +
  484 +.drag-panel-wrap.over {
  485 + border: 1px dashed #b3b2b2;
  486 +}
  487 +
  488 +dl.relevance-active dd:nth-child(n+2) {
  489 + background: #76a6c7 !important;
  490 + color: white;
  491 +}
  492 +
  493 +dl.relevance-active dd.tl-qrlb {
  494 + background: linear-gradient(to right, #7B6B24, #4992c3) !important;
  495 + color: #f8e9cd;
  496 +}
  497 +
  498 +dl.relevance-active dd.tl-zzzx {
  499 + background: linear-gradient(to right, #96F396, #4992c3) !important;
  500 + color: #565252;
  501 +}
  502 +
  503 +dl.relevance-active dd.tl-zzzx span.fcsj-diff {
  504 + color: #5e5a5a
  505 +}
  506 +
  507 +dl.relevance-active dd span.fcsj-diff {
  508 + color: #d7d6d6;
  509 +}
  510 +
  511 +dl.relevance-active a {
  512 + color: #dff0ff;
  513 +}
  514 +
  515 +.right-text-lp {
  516 + position: absolute;
  517 + right: 7px;
  518 + padding: 0 5px;
  519 + border-radius: 5px;
  520 + font-size: 12px;
  521 + color: #a0a0a0;
  522 +}
  523 +
  524 +div.drop-rail {
  525 + position: absolute;
  526 + width: 140px;
  527 + height: 36px;
  528 + margin: -2px 0 0 -3px;
  529 + background: transparent;
  530 + z-index: 1;
  531 +}
  532 +
  533 +div.drop-rail.over {
  534 + border: 1px dashed #dddddd;
  535 +}
  536 +
  537 +.uk-table.comf-result tbody tr td:nth-of-type(1) {
  538 + font-family: 微软雅黑;
  539 +}
  540 +
  541 +.uk-table.comf-result tbody tr td:nth-of-type(3) {
  542 + color: #888686;
  543 +}
  544 +
  545 +.uk-table.comf-result tbody tr td:nth-of-type(4) {
  546 + color: #366fad;
  547 +}
  548 +
  549 +label.destroy-sch{
  550 + color: #928e8e;
  551 +}
  552 +label.destroy-sch small{
  553 + color: #e25e5e;
  554 +}
  555 +
  556 +.main-schedule-table dl dt:nth-of-type(1), .main-schedule-table dl dd:nth-of-type(1) {
  557 + width: 6%;
  558 + text-align: center;
  559 +}
  560 +.main-schedule-table dl dt:nth-of-type(2), .main-schedule-table dl dd:nth-of-type(2) {
  561 + width: 14%;
  562 +}
  563 +.main-schedule-table dl dt:nth-of-type(3), .main-schedule-table dl dd:nth-of-type(3) {
  564 + width: 10%;
  565 +}
  566 +.main-schedule-table dl dt:nth-of-type(4), .main-schedule-table dl dd:nth-of-type(4) {
  567 + width: 19%;
  568 +}
  569 +.main-schedule-table dl dt:nth-of-type(5), .main-schedule-table dl dd:nth-of-type(5) {
  570 + width: 19%;
  571 +}
  572 +.main-schedule-table dl dt:nth-of-type(6), .main-schedule-table dl dd:nth-of-type(6) {
  573 + width: 10%;
  574 +}
  575 +.main-schedule-table dl dt:nth-of-type(7), .main-schedule-table dl dd:nth-of-type(7) {
  576 + width: 12%;
  577 +}
  578 +.main-schedule-table dl dt:nth-of-type(8), .main-schedule-table dl dd:nth-of-type(8) {
  579 + width: 10%;
  580 +}
  581 +
  582 +.main-schedule-table.ct_table dl.active,
  583 +.main-schedule-table.ct_table>.ct_table_body dl.active:hover,
  584 +.main-schedule-table.ct_table>.ct_table_body dl.context-menu-active{
  585 + background: #9393bf;
  586 + box-shadow: 0 0 4px #656c71;
  587 + color: white;
  588 +}
  589 +
  590 +.main-schedule-table span.sjfc-time{
  591 + color:#07d
  592 +}
  593 +
  594 +.main-schedule-table dl.active span.sjfc-time{
  595 + background: white;
  596 + border-radius: 5px;
  597 + padding: 2px 1px;
  598 + vertical-align: middle;
  599 +}
  600 +
  601 +.sub-task-table dl dt:nth-of-type(1), .sub-task-table dl dd:nth-of-type(1) {
  602 + width: 6%;
  603 + text-align: center;
  604 +}
  605 +.sub-task-table dl dt:nth-of-type(2), .sub-task-table dl dd:nth-of-type(2) {
  606 + width: 15%;
  607 +}
  608 +.sub-task-table dl dt:nth-of-type(3), .sub-task-table dl dd:nth-of-type(3) {
  609 + width: 16%;
  610 +}
  611 +.sub-task-table dl dt:nth-of-type(4), .sub-task-table dl dd:nth-of-type(4) {
  612 + width: 16%;
  613 +}
  614 +.sub-task-table dl dt:nth-of-type(5), .sub-task-table dl dd:nth-of-type(5) {
  615 + width: 11%;
  616 +}
  617 +.sub-task-table dl dt:nth-of-type(6), .sub-task-table dl dd:nth-of-type(6) {
  618 + width: 11%;
  619 +}
  620 +.sub-task-table dl dt:nth-of-type(7), .sub-task-table dl dd:nth-of-type(7) {
  621 + width: 14%;
  622 +}
  623 +.sub-task-table dl dt:nth-of-type(8), .sub-task-table dl dd:nth-of-type(8) {
  624 + width: 9%;
  625 +}
  626 +
  627 +.sub-task-table>.ct_table_body>dl:last-child dd{
  628 + border-bottom: 0;
  629 +}
  630 +
  631 +i.add-temp-sch-icon{
  632 + float: right;
  633 + font-size: 18px;
  634 + cursor: pointer;
  635 + color: #4592b8;
  636 + margin: 10px 15px 0;
  637 +}
  638 +i.add-temp-sch-icon:hover{
  639 + color: #2d7091;
  640 +}
  641 +
  642 +
  643 +input.i-cbox[type=checkbox]{
  644 + width: 20px;
  645 + height: 18px !important;
  646 + vertical-align: middle;
  647 + margin-top: -3px;
  648 +}
  649 +
  650 +.sys-note-80,
  651 +.sys-note-42{
  652 + width: calc(100% - 10px) !important;
  653 + margin: 5px !important;
  654 +}
  655 +.sys-note-80 .uk-panel-box,
  656 +.sys-note-42 .uk-panel-box{
  657 + padding: 10px;
  658 +}
  659 +.sys-note-80 .uk-panel-title{
  660 + margin-bottom: 3px;
  661 + font-size: 15px;
  662 +}
  663 +
  664 +.sys-note-42 .title{
  665 + font-family: 微软雅黑;
  666 + margin-bottom: 3px;
  667 +}
  668 +.sys-note-80 .uk-button-group,
  669 +.sys-note-42 .uk-button-group{
  670 + display: block;
  671 + margin-top: 5px;
  672 +}
  673 +
  674 +
  675 +
  676 +.sch-tzrc-table dl dt:nth-of-type(1), .sch-tzrc-table dl dd:nth-of-type(1) {
  677 + width: 30%;
  678 +}
  679 +.sch-tzrc-table dl dt:nth-of-type(2), .sch-tzrc-table dl dd:nth-of-type(2) {
  680 + width: 25%;
  681 +}
  682 +.sch-tzrc-table dl dt:nth-of-type(3), .sch-tzrc-table dl dd:nth-of-type(3) {
  683 + width: 25%;
  684 +}
  685 +.sch-tzrc-table dl dt:nth-of-type(4), .sch-tzrc-table dl dd:nth-of-type(4) {
  686 + width: 20%;
  687 +}
  688 +
  689 +.ct-form-modal .uk-autocomplete{
  690 + width: 100%;
  691 +}
  692 +
  693 +.sch-tzrc-table.ct_table dl.active,
  694 +.sch-tzrc-table.ct_table>.ct_table_body dl.active:hover,
  695 +.sch-tzrc-table.ct_table>.ct_table_body dl.context-menu-active{
  696 + background: #e6e6e6;
  697 +}
... ...
src/main/resources/static/real_control_v2/css/main.css
... ... @@ -4,8 +4,8 @@
4 4 display: none;
5 5 }
6 6  
7   -audio, canvas, img, svg, video{
8   - max-width: none;
  7 +audio, canvas, img, svg, video {
  8 + max-width: none;
9 9 }
10 10  
11 11 html, body {
... ... @@ -166,12 +166,12 @@ svg.line-chart g.gps-wrap&gt;rect {
166 166 cursor: pointer;
167 167 }
168 168  
169   -svg.line-chart g.gps-wrap>rect[updown="0"]{
170   - stroke: #5e96d2;
  169 +svg.line-chart g.gps-wrap>rect[updown="0"] {
  170 + stroke: #5e96d2;
171 171 }
172 172  
173   -svg.line-chart g.gps-wrap>rect[updown="1"]{
174   - stroke: #c92121;
  173 +svg.line-chart g.gps-wrap>rect[updown="1"] {
  174 + stroke: #c92121;
175 175 }
176 176  
177 177 svg.line-chart g.gps-wrap>rect.hover {
... ... @@ -184,12 +184,12 @@ svg.line-chart g.gps-wrap&gt;text {
184 184 pointer-events: none;
185 185 }
186 186  
187   -svg.line-chart g.gps-wrap>text[updown="0"]{
188   - fill: #5e96d2;
  187 +svg.line-chart g.gps-wrap>text[updown="0"] {
  188 + fill: #5e96d2;
189 189 }
190 190  
191   -svg.line-chart g.gps-wrap>text[updown="1"]{
192   - fill: #c92121;
  191 +svg.line-chart g.gps-wrap>text[updown="1"] {
  192 + fill: #c92121;
193 193 }
194 194  
195 195 svg.line-chart .merge_hide {
... ... @@ -209,35 +209,48 @@ svg.line-chart g.merge-item text {
209 209 pointer-events: none;
210 210 }
211 211  
  212 +.qtip-multi-gps {
  213 + max-width: 716px !important;
  214 +}
212 215  
213   -/*.tooltip{
214   - position: absolute;
215   - z-index: 99999;
216   - /* border-radius: 5px !important;
217   - border: 1px solid rgba(94, 150, 210, 1);
218   - background: rgba(255, 255, 255, 0.95);
219   - box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
220   - width: 185px;
221   -}*/
  216 +.qtip-bootstrap.qtip-multi-gps .qtip-content {
  217 + padding: 0;
  218 +}
222 219  
223 220 .tooltip {
224 221 position: relative;
225   - padding-bottom: 130px;
226   - width: 208px;
  222 + padding-bottom: 160px;
  223 + width: 220px;
227 224 }
228 225  
229   -.tooltip hr {
230   - border-top: 1px solid #6b6b6b;
231   - width: calc(100% + 20px);
232   - margin: 13px 0 13px -10px;
  226 +.multi-tooltip-wrap{
  227 + width: 100%;
  228 + max-height: 350px;
  229 + overflow: auto;
  230 +}
  231 +
  232 +.tip_map_wrap.multi{
  233 + width: 100%;
  234 + height: 130px;
233 235 }
234 236  
  237 +.tooltip.multi-tooltip {
  238 + width: 160px;
  239 + display: inline-block;
  240 + padding: 10px 0 10px 15px;
  241 + border-right: 1px solid #eeeeee;
  242 + border-bottom: 1px solid #eeeeee;
  243 +}
235 244  
236   -/*.tooltip.fixed{
237   - transition: all .5s ease;
238   - border: 1px solid #fff;
239   - background: #fff;
240   -}*/
  245 +.tooltip hr {
  246 + border-top: 1px solid #eeeeee;
  247 + width: calc(100% + 30px);
  248 + margin: 7px 0 11px -15px;
  249 +}
  250 +
  251 +.tooltip.multi-tooltip hr {
  252 + width: calc(100% + 16px);
  253 +}
241 254  
242 255 .tooltip .tooltip-container {
243 256 padding: 1px;
... ... @@ -246,84 +259,43 @@ svg.line-chart g.merge-item text {
246 259 .tooltip .tooltip-container div, .tooltip .tooltip-container div a {
247 260 margin: 7px 1px;
248 261 font-size: 13px;
249   - color: rgb(236, 236, 236);
  262 + color: rgb(76, 76, 76);
250 263 }
251 264  
252 265 .tooltip .tooltip-container div.title {
253 266 margin: 8px 1px 12px;
254 267 }
255 268  
256   -
257   -/*.tooltip .tooltip-container div a{
258   - color: #fff;
259   -}*/
260   -
261 269 .tooltip .tooltip-container .title a {
262 270 font-size: 18px;
263 271 font-family: 微软雅黑;
264   - color: #fff;
265 272 }
266 273  
267   -
268   -/*
269   -.tooltip .tooltip-container .subtitle,
270   -.tooltip .tooltip-container .subtitle a{
271   - color: #999;
272   - font-size: 13px;
273   -}*/
274   -
275 274 .tooltip span.field {
276   - color: #c0c0c0;
  275 + color: #7d7d7b;
277 276 margin-right: 5px;
278 277 }
279 278  
280 279 .tooltip .tip_map_wrap {
281 280 position: absolute;
282   - bottom: -12px;
283   - left: -10px;
284   - width: calc(100% + 18px);
  281 + bottom: -16px;
  282 + left: -15px;
  283 + width: calc(100% + 28px);
285 284 background: #fff;
286   - height: 130px;
  285 + height: 165px;
287 286 border-radius: 0 0 5px 5px;
  287 + border-top: 1px solid #e6e4e4;
288 288 }
289 289  
290   -
291   -/*.tooltip.tooltip-modal{
292   -width: 700px;
293   -height: 400px;
294   - box-shadow: 0 12px 15px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
295   -}
296   -
297   -.tooltip #tip_map_wrap{
298   - width: 100%;
299   - height: 100%;
300   -}*/
301   -
302   -
303   -/*svg g.gps-wrap>g.down>g.gps>rect{
304   - stroke:#e43a45;
305   -}
306   -
307   -svg g.down>g.gps>text{
308   - fill:#e43a45;
309   -}*/
310   -
311   -
312   -/*svg g.gps-wrap>g.up>g.gps>text{
313   - transform: translate(3px, 17px);
  290 +canvas.crosshair-layer {
  291 + position: absolute;
  292 + width: 100%;
  293 + height: 100%;
  294 + background: rgba(255, 255, 255, 0.33);
  295 + left: 0;
314 296 }
315 297  
316   -svg g.gps-wrap>g.down>g.gps>text{
317   - transform: translate(3px, -17px);
318   -}*/
319   -
320   -
321   -/*.uk-modal .uk-form-row.readonly-checkbox{
322   - margin: 8px 0 -10px;
323   - font-size: 12px;
324   - color: grey;
  298 +li.map-panel{
  299 + height: 100%;
  300 + position: relative;
325 301 }
326   -
327   -.uk-modal .uk-form-row.readonly-checkbox input{
328   - vertical-align: middle;
329   -}*/
... ...
src/main/resources/static/real_control_v2/css/north.css
... ... @@ -66,3 +66,7 @@
66 66 border-color: #fff;
67 67 background: #fff;
68 68 }
  69 +
  70 +#north_toolbar_panel li.disabled a{
  71 + cursor: no-drop !important;
  72 +}
... ...
src/main/resources/static/real_control_v2/fragments/home/c0_a3.html 0 → 100644
  1 +<div class="uk-modal" id="home-c0a3-modal">
  2 + <div class="uk-modal-dialog">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>B-91071 设备参数</h2></div>
  6 +
  7 + <div class="modal-loading">
  8 + <div class="uk-modal-spinner"></div>
  9 + <div class="text">正在下发指令...</div>
  10 + </div>
  11 +
  12 +
  13 + <div id="c0a3_detail_panel" style="display: none;">
  14 + <table class="uk-table uk-table-striped uk-table-hover">
  15 + <tr>
  16 + <th>设备编号:</th>
  17 + <td>559L0018</td>
  18 + </tr>
  19 + <tr>
  20 + <th>网关IP地址:</th>
  21 + <td>222.68.12.48</td>
  22 + </tr>
  23 + <tr>
  24 + <th>网关端口:</th>
  25 + <td>30020</td>
  26 + </tr>
  27 + <tr>
  28 + <th>定时定距上报模式:</th>
  29 + <td>0</td>
  30 + </tr>
  31 + <tr>
  32 + <th>定时上报时间间隔:</th>
  33 + <td>0</td>
  34 + </tr>
  35 + <tr>
  36 + <th>定距上报距离间隔:</th>
  37 + <td>0</td>
  38 + </tr>
  39 + <tr>
  40 + <th>非线路状态超速阀门:</th>
  41 + <td>0</td>
  42 + </tr>
  43 + <tr>
  44 + <th>预警阀门:</th>
  45 + <td>0</td>
  46 + </tr>
  47 + <tr>
  48 + <th>pos机IP地址:</th>
  49 + <td>192.168.2.52</td>
  50 + </tr>
  51 + <tr>
  52 + <th>pos机端口:</th>
  53 + <td>8090</td>
  54 + </tr>
  55 + <tr>
  56 + <th>延迟机关时间:</th>
  57 + <td>0</td>
  58 + </tr>
  59 + <tr>
  60 + <th>中门视频切换到码表界面速度阀门:</th>
  61 + <td>0</td>
  62 + </tr>
  63 + <tr>
  64 + <th>码表界面切换到中门视频速度阀门:</th>
  65 + <td>0</td>
  66 + </tr>
  67 + <tr>
  68 + <th>对比度:</th>
  69 + <td>0</td>
  70 + </tr>
  71 + <tr>
  72 + <th>亮度:</th>
  73 + <td>0</td>
  74 + </tr>
  75 + <tr>
  76 + <th>饱和度:</th>
  77 + <td>0</td>
  78 + </tr>
  79 + </table>
  80 + </div>
  81 + </div>
  82 + <script>
  83 + (function() {
  84 + var modal = '#home-c0a3-modal';
  85 + $(modal).on('init', function(e, data) {
  86 + $.post('/directive/c0a4', {nbbm: 'B-99999'});
  87 + //console.log('init...');
  88 + setTimeout(function() {
  89 + $('.modal-loading .text', modal).text('等待设备响应数据...');
  90 + }, 1500);
  91 +
  92 + setTimeout(function() {
  93 + //$('.modal-loading .text', modal).text('等待设备响应数据...');
  94 + $('.modal-loading', modal).remove();
  95 +
  96 + $('#c0a3_detail_panel').show();
  97 + }, 4500);
  98 + });
  99 + })();
  100 + </script>
  101 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/home/tooltip.html
... ... @@ -6,7 +6,7 @@
6 6 <a href="javascript:;" data-for="station" class="tip_modal">{{nbbm}}</a>
7 7 </div>
8 8 <div>
9   - <span class="field">站点:</span><a href="javascript:;" >{{stationName}}</a>
  9 + <span class="field">站点:</span>{{stationName}}
10 10 </div>
11 11 <!-- <div>
12 12 {{lineName}} -{{if upDown==0}}上行{{else}}下行{{/if}}
... ... @@ -15,10 +15,7 @@
15 15 <span class="field">设备:</span>{{deviceId}}
16 16 </div>
17 17 <div>
18   - <span class="field">经度:</span>{{lon}}
19   - </div>
20   - <div>
21   - <span class="field">纬度:</span>{{lat}}
  18 + <span class="field">坐标:</span>{{lon}} {{lat}}
22 19 </div>
23 20 <div>
24 21 <span class="field">速度:</span>{{speed}}</div>
... ... @@ -27,15 +24,36 @@
27 24 预计 {{expectStopTime}} 分钟到达终点</div>
28 25 <!-- <hr> -->
29 26 <!-- <div class="subtitle">更新时间: 10:34.26</div> -->
30   - <div class="tip_map_wrap">
  27 + <div class="tip_map_wrap"></div>
  28 + </div>
  29 + </div>
  30 + </script>
31 31  
  32 + <script id="tooltip_multi_gps_temp" type="text/html">
  33 + <div class="multi-tooltip-wrap">
  34 + {{each list as gps i}}
  35 + <div class="tooltip multi-tooltip" >
  36 + <div class="tooltip-container">
  37 + <div class="title">
  38 + <a href="javascript:;" data-for="station" class="tip_modal">{{gps.nbbm}}</a>
32 39 </div>
33   - <!-- <div class="subtitle" style="margin-top: 8px;">
34   - <a href="javascript:;" data-for="map" class="tip_modal" data-lon={{lon}} data-lat={{lat}} data-nbbm={{nbbm}}>
35   - <i class="fa fa-map-marker"></i> 地图查看
36   - </a>
37   - </div> -->
  40 + <div>
  41 + <span class="field">站点:</span>{{gps.stationName}}
  42 + </div>
  43 + <div>
  44 + <span class="field">设备:</span>{{gps.deviceId}}
  45 + </div>
  46 + <div>
  47 + <span class="field">进站时间:</span>?
  48 + </div>
  49 + <div>
  50 + <span class="field">计划发出:</span>?
  51 + </div>
  52 +
38 53 </div>
39   - </div>
  54 + </div>
  55 + {{/each}}
  56 + </div>
  57 + <div class="tip_map_wrap multi"></div>
40 58 </script>
41 59 </div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/add_temp_sch.html 0 → 100644
  1 +<div class="uk-modal ct-form-modal" id="schedule-addsch-modal">
  2 + <div class="uk-modal-dialog">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>新增临加班次</h2></div>
  6 + <form class="uk-form uk-form-horizontal">
  7 + </form>
  8 + </div>
  9 +
  10 + <script id="schedule-addsch-form-temp" type="text/html">
  11 + <div class="uk-grid">
  12 + <div class="uk-width-1-2">
  13 + <div class="uk-form-row">
  14 + <label class="uk-form-label">班次类型</label>
  15 + <div class="uk-form-controls">
  16 + <select class="form-control nt-dictionary" name="bcType" data-code="{{bcType}}" data-group=ScheduleType></select>
  17 + </div>
  18 + </div>
  19 + </div>
  20 + <div class="uk-width-1-2">
  21 + <div class="uk-form-row">
  22 + <label class="uk-form-label">上下行</label>
  23 + <div class="uk-form-controls">
  24 + <select name="xlDir">
  25 + <option value="0">上行</option>
  26 + <option value="1">下行</option>
  27 + </select>
  28 + </div>
  29 + </div>
  30 + </div>
  31 + </div>
  32 + <div class="uk-grid">
  33 + <div class="uk-width-1-2">
  34 + <div class="uk-form-row">
  35 + <label class="uk-form-label">起点站</label>
  36 + <div class="uk-form-controls">
  37 + <select name="qdzCode" required>
  38 + </select>
  39 + </div>
  40 + </div>
  41 + </div>
  42 + <div class="uk-width-1-2">
  43 + <div class="uk-form-row">
  44 + <label class="uk-form-label">终点站</label>
  45 + <div class="uk-form-controls">
  46 + <select name="zdzCode" required>
  47 + </select>
  48 + </div>
  49 + </div>
  50 + </div>
  51 + </div>
  52 + <div class="uk-grid">
  53 + <div class="uk-width-1-2">
  54 + <div class="uk-form-row">
  55 + <label class="uk-form-label">开始时间</label>
  56 + <div class="uk-form-controls">
  57 + <input type="time" value="{{zdsj}}" name="fcsj" required>
  58 + </div>
  59 + </div>
  60 + </div>
  61 + <div class="uk-width-1-2">
  62 + <div class="uk-form-row">
  63 + <label class="uk-form-label">结束时间</label>
  64 + <div class="uk-form-controls">
  65 + <input type="time" name="zdsj" required>
  66 + </div>
  67 + </div>
  68 + </div>
  69 + </div>
  70 + <div class="uk-grid">
  71 + <div class="uk-width-1-2">
  72 + <div class="uk-form-row">
  73 + <label class="uk-form-label">车辆</label>
  74 + <div class="uk-form-controls">
  75 + <div class="uk-autocomplete uk-form car-autocom">
  76 + <input type="text" value="{{clZbh}}" name="clZbh" required>
  77 + </div>
  78 + </div>
  79 + </div>
  80 + </div>
  81 + <div class="uk-width-1-2">
  82 + <div class="uk-form-row">
  83 + <label class="uk-form-label">里程</label>
  84 + <div class="uk-form-controls">
  85 + <input type="text" name="jhlc" value="{{jhlc}}" max=222 data-fv-lessthan-inclusive="false" required>
  86 + </div>
  87 + </div>
  88 + </div>
  89 + </div>
  90 + <div class="uk-grid">
  91 + <div class="uk-width-1-2">
  92 + <div class="uk-form-row">
  93 + <label class="uk-form-label">驾驶员 <i class="uk-icon-question-circle" data-uk-tooltip title="如果有驾驶员未提示,请至后台“基础信息 -人员信息”里纠正该员工的“工种”类别 "></i></label>
  94 + <div class="uk-form-controls">
  95 + <div class="uk-autocomplete uk-form jsy-autocom">
  96 + <input type="text" value="{{jGh}}/{{jName}}" name="jsy" required>
  97 + </div>
  98 + </div>
  99 + </div>
  100 + </div>
  101 + <div class="uk-width-1-2">
  102 + <div class="uk-form-row">
  103 + <label class="uk-form-label">售票员</label>
  104 + <div class="uk-form-controls">
  105 + <div class="uk-autocomplete uk-form spy-autocom">
  106 + <input type="text" name="spy" value="{{sGh}}/{{sName}}">
  107 + </div>
  108 + </div>
  109 + </div>
  110 + </div>
  111 + </div>
  112 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  113 + <button type="button" class="uk-button uk-modal-close">取消</button>
  114 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  115 + </div>
  116 + </script>
  117 +
  118 + <script>
  119 + (function() {
  120 + var modal = '#schedule-addsch-modal',
  121 + sch, stationRoutes, parks;
  122 + $(modal).on('init', function(e, data) {
  123 + sch = data.sch;
  124 + var formHtml = template('schedule-addsch-form-temp', sch);
  125 + $('form', modal).html(formHtml);
  126 + //字典转换
  127 + dictionaryUtils.transformDom($('.nt-dictionary', modal));
  128 +
  129 + //----------- Autocomplete --------------
  130 + $.get('/basic/cars', function(rs) {
  131 + //车辆
  132 + gb_common.carAutocomplete($('.car-autocom', modal), rs);
  133 + });
  134 + $.get('/basic/personnel', function(rs) {
  135 + //驾驶员
  136 + gb_common.personAutocomplete($('.jsy-autocom', modal), rs.jsy);
  137 + //售票员
  138 + gb_common.personAutocomplete($('.spy-autocom', modal), rs.spy);
  139 + });
  140 +
  141 + //站点路由
  142 + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function(a, b){
  143 + return a.stationRouteCode-b.stationRouteCode;
  144 + }), 'directions');
  145 + //停车场
  146 + $.get('/basic/parks', function(rs){
  147 + parks=rs;
  148 + });
  149 +
  150 + //submit
  151 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  152 + f.on('success.form.fv', function(e) {
  153 + e.preventDefault();
  154 + var data = $(this).serializeJSON();
  155 + data.xlBm=sch.xlBm;
  156 + data.xlName=sch.xlName;
  157 + data.lpName=sch.lpName;
  158 + //拆分驾驶员工号和姓名
  159 + data.jGh = data.jsy.split('/')[0];
  160 + data.jName = data.jsy.split('/')[1];
  161 + delete data.jsy;
  162 + //拆分售票员工号和姓名
  163 + if(data.sGh != null){
  164 + data.sGh = data.spy.split('/')[0];
  165 + data.sName = data.spy.split('/')[1];
  166 + delete data.spy;
  167 + }
  168 +
  169 + gb_common.$post('/realSchedule', data, function(rs){
  170 + //插入
  171 + gb_schedule_table.insertSchedule(rs.t, rs.ts);
  172 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t});
  173 + UIkit.modal(modal).hide();
  174 + notify_succ('新增临加班次成功');
  175 + });
  176 + });
  177 +
  178 + //班次类型 和 上下行切换
  179 + $('[name=bcType],[name=xlDir]', f).on('change', function(){
  180 + var bcType_e=$('[name=bcType]', f)
  181 + , xlDir_e=$('[name=xlDir]', f);
  182 +
  183 + var routes=stationRoutes[xlDir_e.val()]
  184 + ,lastCode=routes[routes.length-1].stationCode
  185 + ,opts='',park_opts='';
  186 + //station options
  187 + $.each(routes, function(){
  188 + opts+='<option value="'+this.stationCode+'">'+this.stationName+'</option>'
  189 + });
  190 + //park options
  191 + for(var code in parks)
  192 + park_opts+='<option value="'+code+'">'+parks[code]+'</option>';
  193 +
  194 + var qdz=$('[name=qdzCode]', f),zdz=$('[name=zdzCode]', f);
  195 + switch (bcType_e.val()) {
  196 + case 'out':
  197 + qdz.html(park_opts);
  198 + zdz.html(opts);
  199 + break;
  200 + case 'in':
  201 + qdz.html(opts);
  202 + zdz.html(park_opts);
  203 + break;
  204 + default:
  205 + qdz.html(opts);
  206 + zdz.html(opts).val(lastCode);
  207 + }
  208 + }).trigger('change');
  209 +
  210 + });
  211 + })();
  212 + </script>
  213 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html 0 → 100644
  1 +<div class="uk-modal ct-form-modal" id="schedule-dftz-modal">
  2 + <div class="uk-modal-dialog">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>待发调整</h2></div>
  6 + <form class="uk-form uk-form-horizontal">
  7 + </form>
  8 + </div>
  9 +
  10 + <script id="schedule-dftz-form-temp" type="text/html">
  11 + <input type="hidden" name="id" value="{{id}}"/>
  12 + <div class="uk-grid">
  13 + <div class="uk-width-1-2">
  14 + <div class="uk-form-row">
  15 + <label class="uk-form-label" >班次类型</label>
  16 + <div class="uk-form-controls">
  17 + <select class="form-control nt-dictionary" data-code="{{bcType}}" data-group=ScheduleType></select>
  18 + </div>
  19 + </div>
  20 + </div>
  21 + </div>
  22 +
  23 + <div class="uk-grid">
  24 + <div class="uk-width-1-2">
  25 + <div class="uk-form-row">
  26 + <label class="uk-form-label" >从<small>(起点站)</small></label>
  27 + <div class="uk-form-controls">
  28 + <input type="text" value="{{qdzName}}" disabled>
  29 + </div>
  30 + </div>
  31 + </div>
  32 + <div class="uk-width-1-2">
  33 + <div class="uk-form-row">
  34 + <label class="uk-form-label" >到<small>(终点站)</small></label>
  35 + <div class="uk-form-controls">
  36 + <input type="text" value="{{zdzName}}" disabled>
  37 + </div>
  38 + </div>
  39 + </div>
  40 + </div>
  41 + <div class="uk-grid">
  42 + <div class="uk-width-1-1">
  43 + <div class="uk-form-row ct-stacked">
  44 + <label class="uk-form-label" for="form-s-t">备注<small class="font-danger">(不超过20个字符)</small></label>
  45 + <div class="uk-form-controls">
  46 + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" ></textarea>
  47 + </div>
  48 + </div>
  49 + </div>
  50 + </div>
  51 +
  52 + <div class="uk-grid">
  53 + <div class="uk-width-1-2">
  54 + <div class="uk-form-row">
  55 + <label class="uk-form-label" >车辆编码: </label>
  56 + <div class="uk-form-controls">
  57 + <input type="text" value="{{clZbh}}" disabled>
  58 + </div>
  59 + </div>
  60 + </div>
  61 + <div class="uk-width-1-2">
  62 + <div class="uk-form-row">
  63 + <label class="uk-form-label" >路牌:</label>
  64 + <div class="uk-form-controls">
  65 + <input type="text" value="{{lpName}}" disabled>
  66 + </div>
  67 + </div>
  68 + </div>
  69 + </div>
  70 +
  71 + <div class="uk-grid">
  72 + <div class="uk-width-1-2">
  73 + <div class="uk-form-row">
  74 + <label class="uk-form-label" >计发时刻: </label>
  75 + <div class="uk-form-controls">
  76 + <input type="time" value="{{fcsj}}" disabled>
  77 + </div>
  78 + </div>
  79 + </div>
  80 + <div class="uk-width-1-2">
  81 + <div class="uk-form-row">
  82 + <label class="uk-form-label" >预发时刻</label>
  83 + <div class="uk-form-controls">
  84 + <input type="time" name="dfsj" value="{{dfsj}}" required autofocus>
  85 + </div>
  86 + </div>
  87 + </div>
  88 + </div>
  89 +
  90 + <div class="uk-grid">
  91 + <div class="uk-width-1-2">
  92 + <div class="uk-form-row">
  93 + <label class="uk-form-label" >驾驶员 </label>
  94 + <div class="uk-form-controls">
  95 + <input type="text" value="{{jGh}}/{{jName}}" disabled>
  96 + </div>
  97 + </div>
  98 + </div>
  99 + <div class="uk-width-1-2">
  100 + <div class="uk-form-row">
  101 + <label class="uk-form-label" >售票员</label>
  102 + <div class="uk-form-controls">
  103 + <input type="text" value="{{sGh}}/{{sName}}" disabled>
  104 + </div>
  105 + </div>
  106 + </div>
  107 + </div>
  108 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  109 + <button type="button" class="uk-button uk-modal-close">取消</button>
  110 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  111 + </div>
  112 + </script>
  113 +
  114 + <script>
  115 + (function() {
  116 + var modal = '#schedule-dftz-modal'
  117 + ,sch;
  118 + $(modal).on('init', function(e, data) {
  119 + sch=data.sch;
  120 + var formHtml = template('schedule-dftz-form-temp', sch);
  121 + $('form', modal).html(formHtml);
  122 + //字典转换
  123 + dictionaryUtils.transformDom($('.nt-dictionary', modal));
  124 +
  125 + //submit
  126 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  127 + f.on('success.form.fv', function(e) {
  128 + e.preventDefault();
  129 + var data = $(this).serializeJSON();
  130 + if(data.dfsj==sch.dfsj && data.remarks==''){
  131 + return;
  132 + }
  133 + gb_common.$post('/realSchedule/outgoAdjust', data, function(rs){
  134 + //更新班次信息
  135 + gb_schedule_table.updateSchedule(rs.ts);
  136 + notify_succ('操作成功!');
  137 + UIkit.modal(modal).hide();
  138 + });
  139 + });
  140 +
  141 + //班次类型
  142 + if(sch.bcType=='out'||sch.bcType=='in')
  143 + $('select[name=bcType]', f).attr('disabled','disabled');
  144 + else {
  145 + //正常班次只能改为直放 和 放大站
  146 + $('select[name=bcType] option', f).each(function(){
  147 + var whiteList=['venting', 'major', sch.bcType];
  148 + if(whiteList.indexOf($(this).val()) == -1)
  149 + $(this).remove();
  150 + });
  151 + }
  152 + });
  153 + })();
  154 + </script>
  155 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html 0 → 100644
  1 +<div class="uk-modal ct-form-modal" id="schedule-fcxxwt-modal">
  2 + <div class="uk-modal-dialog">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>发车信息微调</h2></div>
  6 + <form class="uk-form uk-form-horizontal">
  7 + </form>
  8 + </div>
  9 +
  10 + <script id="schedule-fcxxwt-form-temp" type="text/html">
  11 + <input type="hidden" name="id" value="{{sch.id}}"/>
  12 +
  13 + <div class="uk-grid">
  14 + <div class="uk-width-1-2">
  15 + <div class="uk-form-row">
  16 + <label class="uk-form-label" >发车站点</label>
  17 + <div class="uk-form-controls">
  18 + <input type="text" value="{{sch.qdzName}}" disabled>
  19 + </div>
  20 + </div>
  21 + </div>
  22 + <div class="uk-width-1-2">
  23 + <div class="uk-form-row">
  24 + <label class="uk-form-label" >结束站点</label>
  25 + <div class="uk-form-controls">
  26 + <input type="text" value="{{sch.zdzName}}" disabled>
  27 + </div>
  28 + </div>
  29 + </div>
  30 + </div>
  31 + <div class="uk-grid">
  32 + <div class="uk-width-1-2">
  33 + <div class="uk-form-row">
  34 + <label class="uk-form-label" >车辆编码</label>
  35 + <div class="uk-form-controls">
  36 + <input type="text" value="{{sch.clZbh}}" disabled>
  37 + </div>
  38 + </div>
  39 + </div>
  40 + <div class="uk-width-1-2">
  41 + <div class="uk-form-row">
  42 + <label class="uk-form-label" >路 牌</label>
  43 + <div class="uk-form-controls">
  44 + <input type="text" value="{{sch.lpName}}" disabled>
  45 + </div>
  46 + </div>
  47 + </div>
  48 + </div>
  49 +
  50 + <div class="uk-grid">
  51 + <div class="uk-width-1-2">
  52 + <div class="uk-form-row">
  53 + <label class="uk-form-label" >驾驶员</label>
  54 + <div class="uk-form-controls">
  55 + <input type="text" value="{{sch.jGh}}/{{sch.jName}}" disabled>
  56 + </div>
  57 + </div>
  58 + </div>
  59 + <div class="uk-width-1-2">
  60 + <div class="uk-form-row">
  61 + <label class="uk-form-label" >售票员</label>
  62 + <div class="uk-form-controls">
  63 + <input type="text" value="{{sch.sGh}}/{{sch.sName}}" disabled>
  64 + </div>
  65 + </div>
  66 + </div>
  67 + </div>
  68 +
  69 + <div class="uk-grid">
  70 + <div class="uk-width-1-2">
  71 + <div class="uk-form-row">
  72 + <label class="uk-form-label" >计发时刻</label>
  73 + <div class="uk-form-controls">
  74 + <input type="text" value="{{sch.fcsj}}" disabled>
  75 + </div>
  76 + </div>
  77 + </div>
  78 + <div class="uk-width-1-2">
  79 + <div class="uk-form-row">
  80 + <label class="uk-form-label" >实际时刻</label>
  81 + <div class="uk-form-controls">
  82 + <input type="time" value="{{sch.fcsjActual}}" name="fcsjActual" {{if sch.status==0}}autofocus{{/if}}>
  83 + </div>
  84 + </div>
  85 + </div>
  86 + </div>
  87 +
  88 + <div class="uk-grid">
  89 + <div class="uk-width-1-2">
  90 + <div class="uk-form-row">
  91 + <label class="uk-form-label" >到达时刻</label>
  92 + <div class="uk-form-controls">
  93 + <input type="time" value="{{sch.zdsjActual}}" name="zdsjActual" {{if sch.status==1}}autofocus{{/if}}>
  94 + </div>
  95 + </div>
  96 + </div>
  97 + <div class="uk-width-1-2">
  98 + <div class="uk-form-row">
  99 + <label class="uk-form-label" >班次类型</label>
  100 + <div class="uk-form-controls">
  101 + <select class="form-control nt-dictionary" data-code="{{sch.bcType}}" name="bcType" data-group=ScheduleType></select>
  102 + </div>
  103 + </div>
  104 + </div>
  105 + </div>
  106 +
  107 + <div class="uk-grid">
  108 + <div class="uk-width-1-1">
  109 + <div class="uk-form-row">
  110 + <label class="uk-form-label" >调整说明</label>
  111 + <div class="uk-form-controls">
  112 + <select name="adjustExps">
  113 + <option value="">请选择..</option>
  114 + {{each adjustExps as exp i}}
  115 + <option value="{{exp}}">{{exp}}</option>
  116 + {{/each}}
  117 + </select>
  118 + </div>
  119 + </div>
  120 + </div>
  121 + </div>
  122 + <div class="uk-grid">
  123 + <div class="uk-width-1-1">
  124 + <div class="uk-form-row ct-stacked">
  125 + <div class="uk-form-controls" style="margin-top: 5px;">
  126 + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="备注,不超过20个字符"></textarea>
  127 + </div>
  128 + </div>
  129 + </div>
  130 + </div>
  131 +
  132 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  133 + <button type="button" class="uk-button uk-modal-close">取消</button>
  134 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  135 + </div>
  136 + </script>
  137 +
  138 + <script>
  139 + (function() {
  140 + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
  141 + var modal = '#schedule-fcxxwt-modal'
  142 + ,sch;
  143 + $(modal).on('init', function(e, data) {
  144 + sch=data.sch;
  145 + var formHtml = template('schedule-fcxxwt-form-temp', {sch: sch, adjustExps:adjustExps});
  146 + $('form', modal).html(formHtml);
  147 + //字典转换
  148 + dictionaryUtils.transformDom($('.nt-dictionary', modal));
  149 +
  150 + //submit
  151 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  152 + f.on('success.form.fv', function(e) {
  153 + e.preventDefault();
  154 + var data = $(this).serializeJSON();
  155 +
  156 + gb_common.$post('/realSchedule/schInfoFineTune', data, function(rs){
  157 + gb_schedule_table.updateSchedule(rs.ts);
  158 + UIkit.modal(modal).hide();
  159 + notify_succ('操作成功!');
  160 + });
  161 + });
  162 +
  163 + //班次类型
  164 + if(sch.bcType=='out'||sch.bcType=='in')
  165 + $('select[name=bcType]', f).attr('disabled','disabled');
  166 + else {
  167 + //正常班次只能改为直放 和 放大站
  168 + $('select[name=bcType] option', f).each(function(){
  169 + var whiteList=['venting', 'major', sch.bcType];
  170 + if(whiteList.indexOf($(this).val()) == -1)
  171 + $(this).remove();
  172 + });
  173 + }
  174 +
  175 + $('[name=adjustExps]', f).on('change', function(){
  176 + var rem=$('[name=remarks]', f);
  177 + rem.val(rem.val() + $(this).val() + ',').trigger('input');
  178 + });
  179 + });
  180 + })();
  181 + </script>
  182 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/jhlb.html 0 → 100644
  1 +<div class="uk-modal ct-form-modal" id="schedule-jhlb-modal">
  2 + <div class="uk-modal-dialog" style="width: 370px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>计划烂班</h2></div>
  6 + <form class="uk-form uk-form-horizontal">
  7 + </form>
  8 + </div>
  9 +
  10 + <script id="schedule-jhlb-form-temp" type="text/html">
  11 + <div class="uk-grid">
  12 + <div class="uk-width-1-1">
  13 + <div class="uk-form-row">
  14 + <label class="uk-form-label" >内部编码</label>
  15 + <div class="uk-form-controls">
  16 + <input value="{{sch.clZbh}}" disabled/>
  17 + </div>
  18 + </div>
  19 + </div>
  20 + </div>
  21 +
  22 + <div class="uk-grid">
  23 + <div class="uk-width-1-1">
  24 + <div class="uk-form-row">
  25 + <label class="uk-form-label" >班次</label>
  26 + <div class="uk-form-controls sch-time-checkbox-list">
  27 + {{each list as sch i}}
  28 + <label {{if sch.destroy}}class="destroy-sch"{{/if}}>
  29 + <input class="i-cbox" name="ids[]" value="{{sch.id}}" type="checkbox" {{if sch.destroy}}disabled{{/if}}>
  30 + {{sch.dfsj}}
  31 + {{if sch.bcType == "out"}}
  32 + <span class="uk-badge uk-badge-success">出场</span>
  33 + {{else if sch.bcType == "in"}}
  34 + <span class="uk-badge uk-badge-warning">进场</span>
  35 + {{/if}}
  36 + {{if sch.destroy}}
  37 + <small>已烂班</small>
  38 + {{/if}}
  39 + </label>
  40 + {{/each}}
  41 + </div>
  42 + </div>
  43 + </div>
  44 + </div>
  45 + <div class="uk-grid">
  46 + <div class="uk-width-1-1">
  47 + <div class="uk-form-row">
  48 + <label class="uk-form-label" >调整说明</label>
  49 + <div class="uk-form-controls">
  50 + <select name="adjustExps">
  51 + <option value="">请选择..</option>
  52 + {{each adjustExps as exp i}}
  53 + <option value="{{exp}}">{{exp}}</option>
  54 + {{/each}}
  55 + </select>
  56 + </div>
  57 + </div>
  58 + </div>
  59 + </div>
  60 + <div class="uk-grid">
  61 + <div class="uk-width-1-1">
  62 + <div class="uk-form-row ct-stacked">
  63 + <div class="uk-form-controls" style="margin-top: 5px;">
  64 + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-notempty data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="烂班说明,不超过20个字符"></textarea>
  65 + </div>
  66 + </div>
  67 + </div>
  68 + </div>
  69 +
  70 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  71 + <button type="button" class="uk-button uk-modal-close">取消</button>
  72 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  73 + </div>
  74 + </script>
  75 +
  76 + <script>
  77 + (function() {
  78 + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
  79 + var modal = '#schedule-jhlb-modal',
  80 + sch;
  81 + $(modal).on('init', function(e, data) {
  82 + sch = data.sch;
  83 + //获取车辆所有班次
  84 + var schArr = gb_common.get_vals(gb_schedule_table.findScheduleByLine(sch.xlBm)).filter(function(item) {
  85 + return item.clZbh == sch.clZbh;
  86 + }).sort(gb_schedule_table.schedule_sort);
  87 +
  88 + var formHtml = template('schedule-jhlb-form-temp', {
  89 + sch: sch,
  90 + list: schArr,
  91 + adjustExps:adjustExps
  92 + });
  93 + $('form', modal).html(formHtml);
  94 +
  95 + if(!sch.destroy){
  96 + //选中班次
  97 + var ckbox=$('input[type=checkbox][value='+sch.id+']', f).attr('checked', 'checked');
  98 + //滚动到可视区域
  99 + var cont=$('.sch-time-checkbox-list', f);
  100 + cont.animate({
  101 + scrollTop: ckbox.offset().top - cont.offset().top + cont.scrollTop() - 10
  102 + }, 500);
  103 + }
  104 +
  105 + //submit
  106 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  107 + f.on('success.form.fv', function(e) {
  108 + e.preventDefault();
  109 + var data = $(this).serializeJSON();
  110 + if(!data.ids || data.ids.length==0){
  111 + UIkit.modal(modal).hide();
  112 + return;
  113 + }
  114 + var idsStr='';
  115 + $.each(data.ids, function(){idsStr+=(','+this)});
  116 + data.idsStr=idsStr.substr(1);
  117 + //提交
  118 + gb_common.$post('/realSchedule/destroy', data, function(rs){
  119 + gb_schedule_table.updateSchedule(rs.ts);
  120 + UIkit.modal(modal).hide();
  121 + notify_succ('烂班操作成功!');
  122 + });
  123 + });
  124 +
  125 + $('[name=adjustExps]', f).on('change', function(){
  126 + var rem=$('[name=remarks]', f);
  127 + rem.val(rem.val() + $(this).val() + ',').trigger('input');
  128 + });
  129 + });
  130 + })();
  131 + </script>
  132 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html 0 → 100644
  1 +<div class="uk-modal ct-form-modal" id="schedule-lj_zrw-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 + <div class="uk-panel uk-panel-box uk-panel-box-primary">
  7 + <form class="uk-form uk-form-horizontal search-form">
  8 + <div class="uk-grid">
  9 + <div class="uk-width-1-3">
  10 + <div class="uk-form-row">
  11 + <label class="uk-form-label" style="width: 50px;">线路</label>
  12 + <div class="uk-form-controls" style="margin-left: 51px;">
  13 + <select name="lineSelect"></select>
  14 + </div>
  15 + </div>
  16 + </div>
  17 + <div class="uk-width-1-3">
  18 + <div class="uk-form-row">
  19 + <label class="uk-form-label" style="width: 50px;">路牌</label>
  20 + <div class="uk-form-controls" style="margin-left: 51px;">
  21 + <select name="lpName"></select>
  22 + </div>
  23 + </div>
  24 + </div>
  25 + <div class="uk-width-1-3">
  26 + <div class="uk-form-row">
  27 + <i class="uk-icon-plus add-temp-sch-icon" title="新增临加班次" data-uk-tooltip></i>
  28 + </div>
  29 + </div>
  30 + </div>
  31 + </form>
  32 + </div>
  33 +
  34 + <div class="ct_table_wrap ct_table_no_border main-schedule-wrap" style="height: 350px;">
  35 + <div class="ct_table main-schedule-table">
  36 + <div class="ct_table_head">
  37 + <dl>
  38 + <dt>序号</dt>
  39 + <dt>开始时间
  40 + <i class="uk-icon-question-circle" data-uk-tooltip title="蓝色字为实发时间"></i></dt>
  41 + <dt>结束时间</dt>
  42 + <dt>起点</dt>
  43 + <dt>终点</dt>
  44 + <dt>里程</dt>
  45 + <dt>车辆</dt>
  46 + <dt>驾驶员</dt>
  47 + </dl>
  48 + </div>
  49 + <div class="ct_table_body"></div>
  50 + </div>
  51 + </div>
  52 +
  53 + <div class="uk-panel uk-panel-box uk-panel-box-secondary" style="padding-bottom: 0;">
  54 + <h3 class="uk-panel-title">子任务列表</h3>
  55 + <div class="ct_table_wrap ct_table_no_border" style="height: 142px;">
  56 + <div class="ct_table sub-task-table">
  57 + <div class="ct_table_head">
  58 + <dl>
  59 + <dt>序号</dt>
  60 + <dt>类型</dt>
  61 + <dt>起点</dt>
  62 + <dt>终点</dt>
  63 + <dt>开始时间</dt>
  64 + <dt>结束时间</dt>
  65 + <dt>里程</dt>
  66 + <dt>备注</dt>
  67 + </dl>
  68 + </div>
  69 + <div class="ct_table_body">
  70 + </div>
  71 + </div>
  72 + </div>
  73 + </div>
  74 + </div>
  75 +
  76 + <script id="schedule-main-table-temp" type="text/html">
  77 + {{each list as sch i}}
  78 + <dl data-id={{sch.id}}>
  79 + <dd>{{i+1}}</dd>
  80 + <dd>
  81 + {{if sch.fcsjActual==null}}
  82 + {{sch.dfsj}}
  83 + {{else}}
  84 + <span class="sjfc-time">{{sch.fcsjActual}}</span>
  85 + {{/if}}
  86 + {{if sch.bcType == "out"}}
  87 + <span class="uk-badge uk-badge-success">出场</span>
  88 + {{else if sch.bcType == "in"}}
  89 + <span class="uk-badge uk-badge-warning">进场</span>
  90 + {{/if}}
  91 + {{if sch.sflj}}
  92 + <span class="uk-badge uk-badge-danger">临加</span>
  93 + {{/if}}
  94 + {{if sch.cTasks.length > 0}}
  95 + <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span>
  96 + {{/if}}
  97 + </dd>
  98 + <dd>{{sch.zdsj}}</dd>
  99 + <dd>{{sch.qdzName}}</dd>
  100 + <dd>{{sch.zdzName}}</dd>
  101 + <dd>{{sch.jhlc}}</dd>
  102 + <dd>{{sch.clZbh}}</dd>
  103 + <dd>{{sch.jName}}</dd>
  104 + </dl>
  105 + {{/each}}
  106 + </script>
  107 + <script id="sub_task-table-temp" type="text/html">
  108 + {{each list as task i}}
  109 + <dl data-id="{{task.id}}">
  110 + <dd>{{i+1}}</dd>
  111 + <dd><span class="nt-dictionary" data-group="ChildTaskType">{{task.type2}}</span></dd>
  112 + <dd>{{task.startStationName}}</dd>
  113 + <dd>{{task.endStationName}}</dd>
  114 + <dd>{{task.startDate}}</dd>
  115 + <dd>{{task.endDate}}</dd>
  116 + <dd>
  117 + {{task.mileage}}
  118 + (<span class="nt-dictionary" data-group="MileageType">{{task.mileageType}}</span>
  119 + {{if task.destroy}}
  120 + <small style="color:red;">烂班</small>
  121 + {{/if}}
  122 + )
  123 + </dd>
  124 + <dd title="{{task.remarks}}">{{task.remarks}}</dd>
  125 + </dl>
  126 + {{/each}}
  127 + </script>
  128 + <script>
  129 + (function() {
  130 + var modal_opts = { center: false, bgclose: false, modal:false }
  131 + var modal = '#schedule-lj_zrw-modal',
  132 + f,
  133 + m_t_body = '.main-schedule-table .ct_table_body',
  134 + s_t_body = '.sub-task-table .ct_table_body',
  135 + folder = '/real_control_v2/fragments/line_schedule/context_menu',
  136 + sch, schList, lp2SchMap;
  137 + $(modal).on('init', function(e, data) {
  138 + sch = data.sch;
  139 +
  140 + f = $('.search-form', modal);
  141 + //线路下拉框
  142 + var opts = '';
  143 + $.each(gb_data_basic.activeLines, function() {
  144 + opts += '<option value="' + this.lineCode + '">' + this.name + '</option>';
  145 + });
  146 + $('[name=lineSelect]', f).html(opts)
  147 + .on('change', function() {
  148 + var lineCode = $(this).val();
  149 + schList = gb_schedule_table.findScheduleByLine(lineCode);
  150 + lp2SchMap = gb_common.groupBy(schList, 'lpName');
  151 +
  152 + var opts = '';
  153 + for (var lpName in lp2SchMap)
  154 + opts += '<option value="' + lpName + '">' + lpName + '</option>';
  155 + $('[name=lpName]', f).html(opts).trigger('change');
  156 + });
  157 +
  158 + //路牌下拉框
  159 + $('[name=lpName]', f).on('change', function() {
  160 + var list = lp2SchMap[$(this).val()].sort(gb_schedule_table.schedule_sort),
  161 + htmlBody = template('schedule-main-table-temp', {
  162 + list: list
  163 + });
  164 + $(m_t_body, modal).html(htmlBody);
  165 + $(s_t_body, modal).empty();
  166 + });
  167 + //班次点击
  168 + $(modal).on('click contextmenu', m_t_body + ' dl', function() {
  169 + $(this).parent().find('.active').removeClass('active');
  170 + $(this).addClass('active');
  171 + //show 子任务
  172 + $('.sub-task-table', modal).trigger('refresh');
  173 + });
  174 + //班次table刷新事件
  175 + $('.main-schedule-table', modal).on('refresh', m_s_table_update);
  176 + //子任务table刷新事件
  177 + $('.sub-task-table', modal).on('refresh', sub_task_update);
  178 +
  179 + //选中默认班次
  180 + selectedDl(sch);
  181 + });
  182 +
  183 + function selectedDl(sch){
  184 + //默认选中项
  185 + $('[name=lineSelect]', f).val(sch.xlBm).trigger('change');
  186 + $('[name=lpName]', f).val(sch.lpName).trigger('change');
  187 + var dl = $('.main-schedule-table', modal).find('dl[data-id=' + sch.id + ']').trigger('click');
  188 + //滚动到可视区域
  189 + var cont = $('.main-schedule-wrap', modal);
  190 + cont.animate({
  191 + scrollTop: dl.offset().top - cont.offset().top + cont.scrollTop() - 38
  192 + }, 500);
  193 + }
  194 +
  195 + function getActiveSch(){
  196 + var dl=$('.main-schedule-table dl.active', modal)
  197 + ,sch, lineCode=$('[name=lineSelect]', f).val();
  198 + if(dl.length > 0)
  199 + sch=gb_schedule_table.findScheduleByLine(lineCode)[dl.data('id')];
  200 +
  201 + return sch;
  202 + }
  203 +
  204 + //刷新主任务表格
  205 + var m_s_table_update=function(e, opts){
  206 + var lineCode=$('[name=lineSelect]', f).val();
  207 + //重新获取班次数据
  208 + schList = gb_schedule_table.findScheduleByLine(lineCode);
  209 + lp2SchMap = gb_common.groupBy(schList, 'lpName');
  210 + $('[name=lpName]', f).trigger('change');
  211 +
  212 + if(opts && opts.sch){
  213 + selectedDl(opts.sch);
  214 + }
  215 + }
  216 +
  217 + //刷新子任务表格
  218 + var sub_task_update=function(){
  219 + var sch=getActiveSch()
  220 + ,htmlStr=''
  221 + ,tbody=$(s_t_body, modal);
  222 + sch.cTasks.sort(sub_task_sort);
  223 + htmlStr = template('sub_task-table-temp', {list: sch.cTasks});
  224 + tbody.html(htmlStr);
  225 + //字典转换
  226 + dictionaryUtils.transformDom($('.nt-dictionary', tbody));
  227 + }
  228 +
  229 + //新增临加
  230 + var add_temp_sch=function(){
  231 + var sch=getActiveSch();
  232 + if(!sch)
  233 + sch={xlBm: $('[name=lineSelect]', f).val(), lpName: $('[name=lpName]', f).val()};
  234 +
  235 + open_modal(folder + '/add_temp_sch.html', {
  236 + sch:sch
  237 + }, modal_opts);
  238 + }
  239 +
  240 + //删除临加班次
  241 + var remove_sch=function(){
  242 + var sch = getActiveSch();
  243 + if(!sch || !sch.sflj)
  244 + return notify_err('只能删除临加班次!');
  245 + var str='<h3>确定要删除临加班次<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>?</h3>';
  246 + alt_confirm(str, function(){
  247 + gb_common.$del('/realSchedule/' + sch.id, function(rs){
  248 + //前端数据更新
  249 + gb_schedule_table.updateSchedule(rs.ts);
  250 + gb_schedule_table.deheteSchedule(rs.delete);
  251 + //m_s_table_update();
  252 + $('.main-schedule-table', modal).trigger('refresh');
  253 + });
  254 + }, '确定删除');
  255 + }
  256 + //添加自定义子任务
  257 + var add_sub_task_other=function(){
  258 + var sch=getActiveSch();
  259 + if(!sch)
  260 + return notify_err('无法获取到主任务信息!');
  261 + open_modal(folder + '/sub_task/add_sub_task_other.html', {
  262 + sch:sch
  263 + }, modal_opts);
  264 + }
  265 +
  266 + //删除子任务
  267 + var remove_sub_task=function(){
  268 + var activeDl=$(s_t_body, modal).find('dl.context-menu-active');
  269 + if(activeDl.length==0)
  270 + return;
  271 + var dds=activeDl.find('dd');
  272 + console.log(dds);
  273 + var id=activeDl.data('id')
  274 + ,str='<h3>确定要删除子任务<span style="color:red;margin: 0 5px;">'+ $(dds[4]).text()+','+ $(dds[6]).text() +' </span>?</h3>';
  275 + alt_confirm(str, function(){
  276 + gb_common.$del('/childTask/' + id, function(rs){
  277 + gb_schedule_table.updateSchedule(rs.t);
  278 + notify_succ('删除子任务成功!');
  279 + //刷新班次列表
  280 + m_s_table_update();
  281 + //选中班次
  282 + selectedDl(rs.t);
  283 + });
  284 + }, '确定删除');
  285 + }
  286 +
  287 + var callbackHandler={
  288 + add_temp_sch:add_temp_sch,
  289 + remove_sch: remove_sch,
  290 + add_sub_task_other:add_sub_task_other,
  291 + remove_sub_task: remove_sub_task
  292 + }
  293 +
  294 + //右键菜单
  295 + $.contextMenu({
  296 + selector: modal+ ' '+m_t_body+' dl',
  297 + className: 'schedule-ct-menu',
  298 + callback: function(key, options) {
  299 + callbackHandler[key] && callbackHandler[key]();
  300 + },
  301 + items: {
  302 + "add_temp_sch": {
  303 + name: "临加班次"
  304 + },
  305 + "add_sub_task": {
  306 + name: "添加子任务",
  307 + items: {
  308 + 'add_sub_task_in': {
  309 + name: '回场',
  310 + disabled:true
  311 + },
  312 + 'add_sub_task_out': {
  313 + name: '出场',
  314 + disabled:true
  315 + },
  316 + 'add_sub_task_other': {
  317 + name: '自定义'
  318 + }
  319 + }
  320 + },
  321 + 'remove_sch': {
  322 + name: '删除'
  323 + }
  324 + }
  325 + });
  326 +
  327 + //右键菜单
  328 + $.contextMenu({
  329 + selector: modal+' '+s_t_body+' dl',
  330 + className: 'schedule-ct-menu',
  331 + callback: function(key, options) {
  332 + callbackHandler[key] && callbackHandler[key]();
  333 + },
  334 + items: {
  335 + "remove_sub_task": {
  336 + name: "删除子任务"
  337 + , icon: "delete"
  338 + }
  339 + }
  340 + });
  341 +
  342 + gb_ct_table.fixedHead($('.ct_table_wrap', modal));
  343 +
  344 + $('.add-temp-sch-icon', modal).on('click', add_temp_sch);
  345 +
  346 + function sub_task_sort(a, b){
  347 + return a.id - b.id;
  348 + }
  349 + })();
  350 + </script>
  351 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/multi_dftz.html 0 → 100644
  1 +<div class="uk-modal" id="schedule-multi-dftz-modal">
  2 + <div class="uk-modal-dialog" style="width: 710px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>批量待发调整</h2></div>
  6 +
  7 + <div class="ct_table_wrap" style="overflow: hidden;">
  8 + <div class="ct_table multi-dftz-table">
  9 + <div class="ct_table_head">
  10 + <dl>
  11 + <dt>路牌</dt>
  12 + <dt>车辆</dt>
  13 + <dt>驾驶员</dt>
  14 + <dt>计发时间</dt>
  15 + <dt>待发时间</dt>
  16 + <dt>待发调整</dt>
  17 + </dl>
  18 + </div>
  19 + <div class="ct_table_body"></div>
  20 + </div>
  21 + </div>
  22 +
  23 + <div class="uk-modal-footer uk-text-right">
  24 + <button type="button" class="uk-button uk-modal-close">取消</button>
  25 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  26 + </div>
  27 + </div>
  28 +
  29 + <script id="schedule-multi-dftz-table-temp" type="text/html">
  30 + {{each list as sch i}}
  31 + <dl data-id="{{sch.id}}">
  32 + <dd><a>{{sch.lpName}}</a></dd>
  33 + <dd data-nbbm="{{sch.clZbh}}">{{sch.clZbh}}</dd>
  34 + <dd>{{sch.jName}}</dd>
  35 + <dd>{{sch.fcsj}} {{if sch.bcType == "out"}}
  36 + <span class="uk-badge uk-badge-success">出场</span> {{else if sch.bcType == "in"}}
  37 + <span class="uk-badge uk-badge-warning">进场</span> {{/if}}
  38 + </dd>
  39 + <dd>{{sch.dfsj}}</dd>
  40 + <dd>
  41 + <input type="time" value="{{sch.dfsj}}" data-old="{{sch.dfsj}}" />
  42 + <span class="modify-num" draggable="true"></span>
  43 + </dd>
  44 + </dl>
  45 + {{/each}}
  46 + </script>
  47 +
  48 + <script>
  49 + (function() {
  50 + var modal = '#schedule-multi-dftz-modal';
  51 + $(modal).on('init', function(e, data) {
  52 + var bodyHtml = template('schedule-multi-dftz-table-temp', data);
  53 + $('.multi-dftz-table .ct_table_body', modal).html(bodyHtml);
  54 +
  55 + $('.multi-dftz-table input', modal).on('input propertychange', valChange);
  56 + });
  57 +
  58 + $('button[type=submit]', modal).on('click', function() {
  59 + var data = [], text='';
  60 + var dls = $('.multi-dftz-table .ct_table_body dl', modal);
  61 + $.each(dls, function() {
  62 + var input = $($('dd', this)[5]).find('input'),
  63 + v = $.trim(input.val()),
  64 + old = input.data('old');
  65 + if (!v || v == old)
  66 + return true;
  67 + data.push({
  68 + schId: $(this).data('id'),
  69 + old_dfsj: old,
  70 + new_dfsj: v
  71 + });
  72 + text+=('<span style="color:red;">'+old + '——>' + v + '</span>,');
  73 + });
  74 +
  75 + alt_confirm('确定要进行调整?' + text, function(){
  76 + gb_common.$post('/realSchedule/multi_dftz', {
  77 + dcsJson: JSON.stringify(data)
  78 + }, function(rs) {
  79 + if(rs.ts && rs.ts.length > 0){
  80 + gb_schedule_table.updateSchedule(rs.ts);
  81 + UIkit.modal(modal).hide();
  82 + notify_succ('待发调整成功');
  83 + }
  84 + });
  85 + }, '确定调整');
  86 + });
  87 +
  88 + var valChange = function() {
  89 + var old = moment($(this).data('old'), "HH:mm"),
  90 + now = moment($(this).val(), "HH:mm"),
  91 + diff = now.diff(old) / 1000 / 60,
  92 + span = $(this).next('.modify-num');
  93 +
  94 + if (diff > 0)
  95 + span.removeClass('negative').text('+' + diff);
  96 + else if (diff == 0) {
  97 + span.text('');
  98 + } else
  99 + span.addClass('negative').text('-' + Math.abs(diff));
  100 + }
  101 +
  102 + //drag....
  103 + var mdf_nos = modal + ' span.modify-num',
  104 + eleDrag = null;
  105 + $(document).on('dragstart', mdf_nos, function(ev) {
  106 + eleDrag = this;
  107 + $(mdf_nos).css('border', '1px dotted grey');
  108 + })
  109 + .on('dragend', mdf_nos, function(ev) {
  110 + $(mdf_nos).css('border', '0');
  111 + eleDrag = null;
  112 + $('.multi-dftz-table input', modal).each(function() {
  113 + var old = $(this).data('old'),
  114 + diff = $(this).next('.modify-num').text(),
  115 + symbol = diff.substr(0, 1),
  116 + num = parseInt(diff.substr(1)),
  117 + now;
  118 +
  119 + if (symbol == '+')
  120 + now = moment(old, "HH:mm").add(num, 'minutes');
  121 + else
  122 + now = moment(old, "HH:mm").subtract(num, 'minutes');
  123 +
  124 + $(this).val(now.format('HH:mm'));
  125 + });
  126 + })
  127 + .on('dragenter', mdf_nos, function(e) {
  128 + e.preventDefault();
  129 + if (eleDrag) {
  130 + var t = $(eleDrag).text(),
  131 + symbol = t.substr(0, 1);
  132 +
  133 + if (symbol == '+')
  134 + $(this).removeClass('negative');
  135 + else
  136 + $(this).addClass('negative');
  137 + $(this).text(t);
  138 + }
  139 + })
  140 + .on('dragover', mdf_nos, function(e) {
  141 + e.preventDefault();
  142 + });
  143 + })();
  144 + </script>
  145 +</div>
... ...