Commit 46c96c4cedca6597320c0664cdf645dd3f664e9a
1 parent
2bdbde5b
update...
Showing
30 changed files
with
1116 additions
and
191 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -2,12 +2,12 @@ package com.bsth.controller.realcontrol; | @@ -2,12 +2,12 @@ package com.bsth.controller.realcontrol; | ||
| 2 | 2 | ||
| 3 | import java.io.UnsupportedEncodingException; | 3 | import java.io.UnsupportedEncodingException; |
| 4 | import java.net.URLDecoder; | 4 | import java.net.URLDecoder; |
| 5 | -import java.util.Collection; | ||
| 6 | -import java.util.List; | ||
| 7 | -import java.util.Map; | 5 | +import java.util.*; |
| 8 | 6 | ||
| 9 | import org.apache.commons.lang3.StringEscapeUtils; | 7 | import org.apache.commons.lang3.StringEscapeUtils; |
| 10 | import org.drools.core.runtime.help.impl.XStreamJSon.JSonAbortWorkItemConverter; | 8 | import org.drools.core.runtime.help.impl.XStreamJSon.JSonAbortWorkItemConverter; |
| 9 | +import org.joda.time.format.DateTimeFormat; | ||
| 10 | +import org.joda.time.format.DateTimeFormatter; | ||
| 11 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 12 | import org.springframework.web.bind.annotation.PathVariable; | 12 | import org.springframework.web.bind.annotation.PathVariable; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| @@ -400,4 +400,33 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -400,4 +400,33 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 400 | List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class); | 400 | List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class); |
| 401 | return scheduleRealInfoService.multi_dftz(dfsjcs); | 401 | return scheduleRealInfoService.multi_dftz(dfsjcs); |
| 402 | } | 402 | } |
| 403 | + | ||
| 404 | + @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST) | ||
| 405 | + public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks){ | ||
| 406 | + return scheduleRealInfoService.changeBcType(id, bcType, remarks); | ||
| 407 | + } | ||
| 408 | + | ||
| 409 | + @RequestMapping(value="/history", method=RequestMethod.POST) | ||
| 410 | + public Map<String,Object> historySave(ScheduleRealInfo sch){ | ||
| 411 | + return scheduleRealInfoService.historySave(sch); | ||
| 412 | + } | ||
| 413 | + | ||
| 414 | + | ||
| 415 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | ||
| 416 | + private final static long ONE_DAY = 1000 * 60 * 60 * 24; | ||
| 417 | + /** | ||
| 418 | + * 获取可编辑的历史班次日期 | ||
| 419 | + * @return | ||
| 420 | + */ | ||
| 421 | + @RequestMapping("dateArray") | ||
| 422 | + public List<String> dateArray(){ | ||
| 423 | + List<String> rs = new ArrayList<>(); | ||
| 424 | + | ||
| 425 | + long t = new Date().getTime() - ONE_DAY; | ||
| 426 | + for(int i = 0; i < 5; i ++){ | ||
| 427 | + rs.add(fmtyyyyMMdd.print(t)); | ||
| 428 | + t -= ONE_DAY; | ||
| 429 | + } | ||
| 430 | + return rs; | ||
| 431 | + } | ||
| 403 | } | 432 | } |
src/main/java/com/bsth/data/arrival/ArrivalData_GPS.java
| @@ -50,8 +50,8 @@ public class ArrivalData_GPS implements CommandLineRunner{ | @@ -50,8 +50,8 @@ public class ArrivalData_GPS implements CommandLineRunner{ | ||
| 50 | 50 | ||
| 51 | @Override | 51 | @Override |
| 52 | public void run(String... arg0) throws Exception { | 52 | public void run(String... arg0) throws Exception { |
| 53 | - logger.info("ArrivalData_GPS,100,10 @11-11"); | ||
| 54 | - //Application.mainServices.scheduleWithFixedDelay(dataLoaderThread, 100, 10, TimeUnit.SECONDS); | 53 | + logger.info("ArrivalData_GPS,50,10 @11-11"); |
| 54 | + //Application.mainServices.scheduleWithFixedDelay(dataLoaderThread, 50, 10, TimeUnit.SECONDS); | ||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | @Component | 57 | @Component |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -343,6 +343,7 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -343,6 +343,7 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 343 | //发车时间仍然校验不过的,直接写成00:00 | 343 | //发车时间仍然校验不过的,直接写成00:00 |
| 344 | sch.setFcsj("00:00"); | 344 | sch.setFcsj("00:00"); |
| 345 | } | 345 | } |
| 346 | + sch.setDfsj(sch.getFcsj()); | ||
| 346 | 347 | ||
| 347 | // 计划终点时间 | 348 | // 计划终点时间 |
| 348 | if (sch.getBcsj() != null) { | 349 | if (sch.getBcsj() != null) { |
| @@ -494,6 +495,9 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -494,6 +495,9 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 494 | 495 | ||
| 495 | //主键索引 | 496 | //主键索引 |
| 496 | id2SchedulMap.put(sch.getId(), sch); | 497 | id2SchedulMap.put(sch.getId(), sch); |
| 498 | + //跨24点的,再save一次 | ||
| 499 | + if(!sch.getRealExecDate().equals(sch.getScheduleDateStr())) | ||
| 500 | + save(sch); | ||
| 497 | } | 501 | } |
| 498 | 502 | ||
| 499 | public void delete(ScheduleRealInfo sch) { | 503 | public void delete(ScheduleRealInfo sch) { |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -121,4 +121,8 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -121,4 +121,8 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 121 | Map<String, Object> multi_tzrc(List<ChangePersonCar> cpcs); | 121 | Map<String, Object> multi_tzrc(List<ChangePersonCar> cpcs); |
| 122 | 122 | ||
| 123 | Map<String, Object> multi_dftz(List<DfsjChange> dfsjcs); | 123 | Map<String, Object> multi_dftz(List<DfsjChange> dfsjcs); |
| 124 | + | ||
| 125 | + Map<String,Object> changeBcType(Long id, String bcType, String remarks); | ||
| 126 | + | ||
| 127 | + Map<String,Object> historySave(ScheduleRealInfo sch); | ||
| 124 | } | 128 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -14,9 +14,10 @@ import java.util.List; | @@ -14,9 +14,10 @@ import java.util.List; | ||
| 14 | import java.util.Map; | 14 | import java.util.Map; |
| 15 | import java.util.Set; | 15 | import java.util.Set; |
| 16 | 16 | ||
| 17 | -import javax.transaction.Transactional; | ||
| 18 | - | 17 | +import com.bsth.entity.realcontrol.LineConfig; |
| 19 | import org.apache.commons.lang3.StringUtils; | 18 | import org.apache.commons.lang3.StringUtils; |
| 19 | +import org.joda.time.format.DateTimeFormat; | ||
| 20 | +import org.joda.time.format.DateTimeFormatter; | ||
| 20 | import org.slf4j.Logger; | 21 | import org.slf4j.Logger; |
| 21 | import org.slf4j.LoggerFactory; | 22 | import org.slf4j.LoggerFactory; |
| 22 | import org.springframework.beans.factory.annotation.Autowired; | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -123,27 +124,27 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -123,27 +124,27 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 123 | return mMap.asMap(); | 124 | return mMap.asMap(); |
| 124 | } | 125 | } |
| 125 | 126 | ||
| 127 | + private final static long DAY_TIME = 1000 * 60 * 60 * 24L; | ||
| 128 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | ||
| 126 | @Override | 129 | @Override |
| 127 | public Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj/*, String nbbm,String jsy,String spy*/) { | 130 | public Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj/*, String nbbm,String jsy,String spy*/) { |
| 128 | Map<String, Object> map = new HashMap<>(); | 131 | Map<String, Object> map = new HashMap<>(); |
| 129 | try { | 132 | try { |
| 130 | 133 | ||
| 131 | ScheduleRealInfo schedule = dayOfSchedule.get(id); | 134 | ScheduleRealInfo schedule = dayOfSchedule.get(id); |
| 132 | - schedule.setDfsjT(sdfMinute.parse(schedule.getRealExecDate() + " " + dfsj).getTime()); | ||
| 133 | - schedule.setDfsj(dfsj); | 135 | + |
| 136 | + | ||
| 137 | + LineConfig config = lineConfigData.get(schedule.getXlBm()); | ||
| 138 | + //小于线路开始运营时间,则默认跨过24点 | ||
| 139 | + if(dfsj.compareTo(config.getStartOpt()) < 0){ | ||
| 140 | + schedule.setRealExecDate(fmtyyyyMMdd.print(schedule.getScheduleDate().getTime() + DAY_TIME)); | ||
| 141 | + } | ||
| 142 | + else { | ||
| 143 | + schedule.setRealExecDate(schedule.getScheduleDateStr()); | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + schedule.setDfsjAll(dfsj); | ||
| 134 | schedule.addRemarks(remarks); | 147 | schedule.addRemarks(remarks); |
| 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 | -// } | ||
| 147 | 148 | ||
| 148 | List<ScheduleRealInfo> ts = new ArrayList<>(); | 149 | List<ScheduleRealInfo> ts = new ArrayList<>(); |
| 149 | ts.add(schedule); | 150 | ts.add(schedule); |
| @@ -192,50 +193,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -192,50 +193,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 192 | rsList.add(schedule); | 193 | rsList.add(schedule); |
| 193 | } | 194 | } |
| 194 | 195 | ||
| 195 | - // 调整间隔 | ||
| 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 | -// } | ||
| 238 | - | ||
| 239 | map.put("status", ResponseCode.SUCCESS); | 196 | map.put("status", ResponseCode.SUCCESS); |
| 240 | } catch (Exception e) { | 197 | } catch (Exception e) { |
| 241 | logger.error("", e); | 198 | logger.error("", e); |
| @@ -695,27 +652,23 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -695,27 +652,23 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 695 | try { | 652 | try { |
| 696 | ScheduleRealInfo sch = dayOfSchedule.get(id); | 653 | ScheduleRealInfo sch = dayOfSchedule.get(id); |
| 697 | 654 | ||
| 698 | - Long t = sdfMinute.parse(sch.getRealExecDate() + " " + fcsjActual).getTime(); | ||
| 699 | - /*sch.setFcsjActualTime(sdfMinute.parse(sch.getRealExecDate() + " " + fcsjActual).getTime()); | ||
| 700 | - sch.setFcsjActual(fcsjActual);*/ | ||
| 701 | -// if(null != sch.getSjfcModel()) | ||
| 702 | -// sch.getSjfcModel().setPersonTime(t); | ||
| 703 | - | ||
| 704 | - sch.setFcsjActualAll(t); | 655 | + LineConfig config = lineConfigData.get(sch.getXlBm()); |
| 656 | + //小于线路开始运营时间,则默认跨过24点 | ||
| 657 | + if(fcsjActual.compareTo(config.getStartOpt()) < 0){ | ||
| 658 | + sch.setRealExecDate(fmtyyyyMMdd.print(sch.getScheduleDate().getTime() + DAY_TIME)); | ||
| 659 | + } | ||
| 660 | + else { | ||
| 661 | + sch.setRealExecDate(sch.getScheduleDateStr()); | ||
| 662 | + } | ||
| 663 | + | ||
| 664 | + sch.setFcsjActualAll(fcsjActual); | ||
| 705 | sch.addRemarks(remarks); | 665 | sch.addRemarks(remarks); |
| 706 | sch.calcStatus(); | 666 | sch.calcStatus(); |
| 707 | - /*//改变状态 | ||
| 708 | - if(sch.getZdsjActual() == null) | ||
| 709 | - sch.setStatus(1);*/ | ||
| 710 | - | 667 | + |
| 711 | scheduleRealInfoRepository.save(sch); | 668 | scheduleRealInfoRepository.save(sch); |
| 712 | - //ScheduleBuffer.persistentList.add(sch); | ||
| 713 | - | 669 | + |
| 714 | ts.add(sch); | 670 | ts.add(sch); |
| 715 | - /*//关联班次 | ||
| 716 | - if(sch.existDependent()) | ||
| 717 | - ts.add(sch.getTwins());*/ | ||
| 718 | - | 671 | + |
| 719 | rs.put("status", ResponseCode.SUCCESS); | 672 | rs.put("status", ResponseCode.SUCCESS); |
| 720 | rs.put("ts", ts); | 673 | rs.put("ts", ts); |
| 721 | 674 | ||
| @@ -790,10 +743,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -790,10 +743,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 790 | @Override | 743 | @Override |
| 791 | public Map<String, Object> spaceAdjust(Long[] ids, Integer space) { | 744 | public Map<String, Object> spaceAdjust(Long[] ids, Integer space) { |
| 792 | 745 | ||
| 793 | - List<ScheduleRealInfo> list = new ArrayList<>(); | 746 | + List<ScheduleRealInfo> list = new ArrayList<>() |
| 747 | + ,updateList = new ArrayList<>(); | ||
| 794 | Map<String, Object> rs = new HashMap<>(); | 748 | Map<String, Object> rs = new HashMap<>(); |
| 795 | try { | 749 | try { |
| 796 | - ScheduleRealInfo sch; | 750 | + ScheduleRealInfo sch, next; |
| 797 | for (Long id : ids) { | 751 | for (Long id : ids) { |
| 798 | sch = dayOfSchedule.get(id); | 752 | sch = dayOfSchedule.get(id); |
| 799 | if (null != sch) | 753 | if (null != sch) |
| @@ -817,12 +771,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -817,12 +771,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 817 | st += plus; | 771 | st += plus; |
| 818 | sch = list.get(i); | 772 | sch = list.get(i); |
| 819 | sch.setDfsjAll(st); | 773 | sch.setDfsjAll(st); |
| 820 | - | ||
| 821 | - scheduleRealInfoRepository.save(sch); | 774 | + //重新计算终点时间 |
| 775 | + sch.calcEndTime(); | ||
| 776 | + | ||
| 777 | + dayOfSchedule.save(sch); | ||
| 778 | + | ||
| 779 | + updateList.add(sch); | ||
| 780 | + next=dayOfSchedule.next(sch); | ||
| 781 | + if(next.getQdzName().equals(sch.getZdzName())){ | ||
| 782 | + next.setQdzArrDateJH(sch.getZdsj()); | ||
| 783 | + updateList.add(next); | ||
| 784 | + } | ||
| 822 | } | 785 | } |
| 823 | - | 786 | + |
| 787 | + | ||
| 824 | rs.put("status", ResponseCode.SUCCESS); | 788 | rs.put("status", ResponseCode.SUCCESS); |
| 825 | - rs.put("list", list); | 789 | + rs.put("ts", updateList); |
| 826 | } | 790 | } |
| 827 | 791 | ||
| 828 | } catch (Exception e) { | 792 | } catch (Exception e) { |
| @@ -832,6 +796,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -832,6 +796,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 832 | return rs; | 796 | return rs; |
| 833 | } | 797 | } |
| 834 | 798 | ||
| 799 | + private static DateTimeFormatter fmtyyyyMMddHHmm = DateTimeFormat.forPattern("yyyy-MM-ddHH:mm"); | ||
| 800 | + | ||
| 835 | @Override | 801 | @Override |
| 836 | public Map<String, Object> schInfoFineTune(Map<String, String> map) { | 802 | public Map<String, Object> schInfoFineTune(Map<String, String> map) { |
| 837 | Map<String, Object> rs = new HashMap<>(); | 803 | Map<String, Object> rs = new HashMap<>(); |
| @@ -871,11 +837,19 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -871,11 +837,19 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 871 | //sch.setBcType(bcType); | 837 | //sch.setBcType(bcType); |
| 872 | //sch.setClZbh(clZbh); | 838 | //sch.setClZbh(clZbh); |
| 873 | //sch.setFcsjAll(fcsj); | 839 | //sch.setFcsjAll(fcsj); |
| 874 | - | 840 | + |
| 875 | if(StringUtils.isNotBlank(fcsjActual)){ | 841 | if(StringUtils.isNotBlank(fcsjActual)){ |
| 842 | + LineConfig config = lineConfigData.get(sch.getXlBm()); | ||
| 843 | + long t=0L; | ||
| 844 | + //小于线路开始运营时间,则默认跨过24点 | ||
| 845 | + if(fcsjActual.compareTo(config.getStartOpt()) < 0) | ||
| 846 | + t=fmtyyyyMMddHHmm.parseMillis(fmtyyyyMMdd.print(sch.getScheduleDate().getTime() + DAY_TIME)+fcsjActual); | ||
| 847 | + else | ||
| 848 | + t=fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+fcsjActual); | ||
| 849 | + | ||
| 876 | //调整实发 | 850 | //调整实发 |
| 877 | if(!fcsjActual.equals(sch.getFcsjActual())) | 851 | if(!fcsjActual.equals(sch.getFcsjActual())) |
| 878 | - sch.setFcsjActualAll(fcsjActual); | 852 | + sch.setFcsjActualAll(t); |
| 879 | } | 853 | } |
| 880 | else{ | 854 | else{ |
| 881 | //撤销实发 | 855 | //撤销实发 |
| @@ -1593,7 +1567,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1593,7 +1567,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1593 | Map<String, Object> rs = new HashMap<>(); | 1567 | Map<String, Object> rs = new HashMap<>(); |
| 1594 | List<ScheduleRealInfo> list = new ArrayList<>(); | 1568 | List<ScheduleRealInfo> list = new ArrayList<>(); |
| 1595 | 1569 | ||
| 1596 | - ScheduleRealInfo sch; | 1570 | + ScheduleRealInfo sch,next; |
| 1597 | for(DfsjChange dc : dfsjcs){ | 1571 | for(DfsjChange dc : dfsjcs){ |
| 1598 | if(StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj())) | 1572 | if(StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj())) |
| 1599 | continue; | 1573 | continue; |
| @@ -1603,8 +1577,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1603,8 +1577,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1603 | continue; | 1577 | continue; |
| 1604 | 1578 | ||
| 1605 | sch.setDfsjAll(dc.getNew_dfsj()); | 1579 | sch.setDfsjAll(dc.getNew_dfsj()); |
| 1606 | - | 1580 | + //重新计算终点时间 |
| 1581 | + sch.calcEndTime(); | ||
| 1607 | list.add(sch); | 1582 | list.add(sch); |
| 1583 | + | ||
| 1584 | + next=dayOfSchedule.next(sch); | ||
| 1585 | + if(next.getQdzName().equals(sch.getZdzName())){ | ||
| 1586 | + next.setQdzArrDateJH(sch.getZdsj()); | ||
| 1587 | + list.add(next); | ||
| 1588 | + } | ||
| 1608 | } | 1589 | } |
| 1609 | 1590 | ||
| 1610 | rs.put("status", ResponseCode.SUCCESS); | 1591 | rs.put("status", ResponseCode.SUCCESS); |
| @@ -1612,6 +1593,92 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1612,6 +1593,92 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1612 | return rs; | 1593 | return rs; |
| 1613 | } | 1594 | } |
| 1614 | 1595 | ||
| 1596 | + /** | ||
| 1597 | + * 调整班次类型 | ||
| 1598 | + * @param id | ||
| 1599 | + * @param bcType | ||
| 1600 | + * @param remarks | ||
| 1601 | + * @return | ||
| 1602 | + */ | ||
| 1603 | + @Override | ||
| 1604 | + public Map<String, Object> changeBcType(Long id, String bcType, String remarks) { | ||
| 1605 | + Map<String, Object> rs = new HashMap<>(); | ||
| 1606 | + | ||
| 1607 | + try { | ||
| 1608 | + ScheduleRealInfo sch = dayOfSchedule.get(id); | ||
| 1609 | + if(sch != null){ | ||
| 1610 | + sch.setBcType(bcType); | ||
| 1611 | + sch.addRemarks(remarks); | ||
| 1612 | + //有时间记录一下相关变更数据 | ||
| 1613 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 1614 | + rs.put("t", sch); | ||
| 1615 | + } | ||
| 1616 | + } catch (Exception e) { | ||
| 1617 | + logger.error("", e); | ||
| 1618 | + rs.put("status", ResponseCode.ERROR); | ||
| 1619 | + } | ||
| 1620 | + | ||
| 1621 | + return rs; | ||
| 1622 | + } | ||
| 1623 | + | ||
| 1624 | + @Override | ||
| 1625 | + public Map<String, Object> historySave(ScheduleRealInfo sch) { | ||
| 1626 | + Map<String, Object> rs = new HashMap<>(); | ||
| 1627 | + rs.put("status", ResponseCode.ERROR); | ||
| 1628 | + | ||
| 1629 | + ScheduleRealInfo oldSch = super.findById(sch.getId()); | ||
| 1630 | + //修改车辆 | ||
| 1631 | + if(!oldSch.getClZbh().equals(sch.getClZbh())){ | ||
| 1632 | + Set<String> allCar=BasicData.deviceId2NbbmMap.values(); | ||
| 1633 | + if(!allCar.contains(sch.getClZbh())){ | ||
| 1634 | + rs.put("msg", "无效的车辆自编号"); | ||
| 1635 | + return rs; | ||
| 1636 | + } | ||
| 1637 | + else | ||
| 1638 | + oldSch.setClZbh(sch.getClZbh()); | ||
| 1639 | + } | ||
| 1640 | + | ||
| 1641 | + //修改驾驶员 | ||
| 1642 | + if(!oldSch.getjGh().equals(sch.getjGh())){ | ||
| 1643 | + Map<String, String> allPer = BasicData.allPerson; | ||
| 1644 | + if(!allPer.containsKey(sch.getjGh())){ | ||
| 1645 | + rs.put("msg", "无效的驾驶员"); | ||
| 1646 | + return rs; | ||
| 1647 | + } | ||
| 1648 | + else{ | ||
| 1649 | + oldSch.setjGh(sch.getjGh()); | ||
| 1650 | + oldSch.setjName(allPer.get(oldSch.getjGh())); | ||
| 1651 | + } | ||
| 1652 | + } | ||
| 1653 | + | ||
| 1654 | + //修改售票员 | ||
| 1655 | +/* if(!oldSch.getsGh().equals(sch.getsGh())){ | ||
| 1656 | + Map<String, String> allPer = BasicData.allPerson; | ||
| 1657 | + | ||
| 1658 | + if(StringUtils.isNotEmpty(sch.getsGh())){ | ||
| 1659 | + if(!allPer.containsKey(sch.getsGh())){ | ||
| 1660 | + rs.put("msg", "无效的售票员"); | ||
| 1661 | + return rs; | ||
| 1662 | + } | ||
| 1663 | + } | ||
| 1664 | + oldSch.setsGh(sch.getsGh()); | ||
| 1665 | + oldSch.setsName(allPer.get(oldSch.getsGh())); | ||
| 1666 | + }*/ | ||
| 1667 | + | ||
| 1668 | + //待发时间 | ||
| 1669 | + oldSch.setDfsj(sch.getDfsj()); | ||
| 1670 | + //实发时间 | ||
| 1671 | + oldSch.setFcsjActual(sch.getFcsjActual()); | ||
| 1672 | + //实际终点 | ||
| 1673 | + oldSch.setZdsjActual(sch.getZdsjActual()); | ||
| 1674 | + //备注 | ||
| 1675 | + oldSch.setRemarks(sch.getRemarks()); | ||
| 1676 | + | ||
| 1677 | + scheduleRealInfoRepository.save(oldSch); | ||
| 1678 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 1679 | + return rs; | ||
| 1680 | + } | ||
| 1681 | + | ||
| 1615 | @Override | 1682 | @Override |
| 1616 | public List<Map<String, Object>> yesterdayDataList(String line) { | 1683 | public List<Map<String, Object>> yesterdayDataList(String line) { |
| 1617 | // TODO Auto-generated method stub | 1684 | // TODO Auto-generated method stub |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/slider.gradient.min.css
0 → 100644
| 1 | +/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | ||
| 2 | +[data-uk-slider]{direction:ltr}html[dir=rtl] .uk-slider>*{direction:rtl}.uk-slider{position:relative;z-index:0;touch-action:pan-y}.uk-slider:not(.uk-grid){margin:0;padding:0;list-style:none}.uk-slider>*{position:absolute;top:0;left:0}.uk-slider-container{overflow:hidden}.uk-slider:not(.uk-drag){-webkit-transition:-webkit-transform .2s linear;transition:transform .2s linear}.uk-slider.uk-drag{cursor:col-resize;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-slider a,.uk-slider img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}.uk-slider img{pointer-events:none}.uk-slider-fullscreen,.uk-slider-fullscreen>li{height:100vh} | ||
| 0 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/slider.min.js
0 → 100644
| 1 | +/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | ||
| 2 | +!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-slider",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e,i,s,n,a={};return t.component("slider",{defaults:{center:!1,threshold:10,infinite:!0,autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0,activecls:"uk-active"},boot:function(){t.ready(function(e){setTimeout(function(){t.$("[data-uk-slider]",e).each(function(){var e=t.$(this);e.data("slider")||t.slider(e,t.Utils.options(e.attr("data-uk-slider")))})},0)})},init:function(){var o=this;this.container=this.element.find(".uk-slider"),this.focus=0,t.$win.on("resize load",t.Utils.debounce(function(){o.update(!0)},100)),this.on("click.uk.slider","[data-uk-slider-item]",function(e){e.preventDefault();var i=t.$(this).attr("data-uk-slider-item");if(o.focus!=i)switch(o.stop(),i){case"next":case"previous":o["next"==i?"next":"previous"]();break;default:o.updateFocus(parseInt(i,10))}}),this.container.on({"touchstart mousedown":function(h){h.originalEvent&&h.originalEvent.touches&&(h=h.originalEvent.touches[0]),h.button&&2==h.button||!o.active||(o.stop(),s=t.$(h.target).is("a")?t.$(h.target):t.$(h.target).parents("a:first"),n=!1,s.length&&s.one("click",function(t){n&&t.preventDefault()}),i=function(t){n=!0,e=o,a={touchx:parseInt(t.pageX,10),dir:1,focus:o.focus,base:o.options.center?"center":"area"},t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),e.element.data({"pointer-start":{x:parseInt(t.pageX,10),y:parseInt(t.pageY,10)},"pointer-pos-start":o.pos}),o.container.addClass("uk-drag"),i=!1},i.x=parseInt(h.pageX,10),i.threshold=o.options.threshold)},mouseenter:function(){o.options.pauseOnHover&&(o.hovering=!0)},mouseleave:function(){o.hovering=!1}}),this.update(!0),this.on("display.uk.check",function(){o.element.is(":visible")&&o.update(!0)}),this.element.find("a,img").attr("draggable","false"),this.options.autoplay&&this.start(),t.domObserve(this.element,function(){o.element.children(":not([data-slide])").length&&o.update(!0)})},update:function(e){var i,s,n,a,o=this,h=0,r=0;return this.items=this.container.children().filter(":visible"),this.vp=this.element[0].getBoundingClientRect().width,this.container.css({"min-width":"","min-height":""}),this.items.each(function(e){i=t.$(this).attr("data-slide",e),a=i.css({left:"",width:""})[0].getBoundingClientRect(),s=a.width,n=i.width(),r=Math.max(r,a.height),i.css({left:h,width:s}).data({idx:e,left:h,width:s,cwidth:n,area:h+s,center:h-(o.vp/2-n/2)}),h+=s}),this.container.css({"min-width":h,"min-height":r}),this.options.infinite&&(h<=2*this.vp||this.items.length<5)&&!this.itemsResized?(this.container.children().each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}).each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}),this.itemsResized=!0,this.update()):(this.cw=h,this.pos=0,this.active=h>=this.vp,this.container.css({"-ms-transform":"","-webkit-transform":"",transform:""}),e&&this.updateFocus(this.focus),void 0)},updatePos:function(t){this.pos=t,this.container.css({"-ms-transform":"translateX("+t+"px)","-webkit-transform":"translateX("+t+"px)",transform:"translateX("+t+"px)"})},updateFocus:function(e,i){if(this.active){i=i||(e>this.focus?1:-1);var s,n,a=this.items.eq(e);if(this.options.infinite&&this.infinite(e,i),this.options.center)this.updatePos(-1*a.data("center")),this.items.filter("."+this.options.activecls).removeClass(this.options.activecls),a.addClass(this.options.activecls);else if(this.options.infinite)this.updatePos(-1*a.data("left"));else{for(s=0,n=e;n<this.items.length;n++)s+=this.items.eq(n).data("width");if(s>this.vp)this.updatePos(-1*a.data("left"));else if(1==i){for(s=0,n=this.items.length-1;n>=0;n--){if(s+=this.items.eq(n).data("width"),s==this.vp){e=n;break}if(s>this.vp){e=n<this.items.length-1?n+1:n;break}}s>this.vp?this.updatePos(-1*(this.container.width()-this.vp)):this.updatePos(-1*this.items.eq(e).data("left"))}}var o=this.items.eq(e).data("left");this.items.removeClass("uk-slide-before uk-slide-after").each(function(i){i!==e&&t.$(this).addClass(t.$(this).data("left")<o?"uk-slide-before":"uk-slide-after")}),this.focus=e,this.trigger("focusitem.uk.slider",[e,this.items.eq(e),this])}},next:function(){var t=this.items[this.focus+1]?this.focus+1:this.options.infinite?0:this.focus;this.updateFocus(t,1)},previous:function(){var t=this.items[this.focus-1]?this.focus-1:this.options.infinite?this.items[this.focus-1]?this.items-1:this.items.length-1:this.focus;this.updateFocus(t,-1)},start:function(){this.stop();var t=this;this.interval=setInterval(function(){t.hovering||t.next()},this.options.autoplayInterval)},stop:function(){this.interval&&clearInterval(this.interval)},infinite:function(t,e){var i,s=this,n=this.items.eq(t),a=t,o=[],h=0;if(1==e){for(i=0;i<this.items.length&&(a!=t&&(h+=this.items.eq(a).data("width"),o.push(this.items.eq(a))),!(h>this.vp));i++)a=a+1==this.items.length?0:a+1;o.length&&o.forEach(function(t){var e=n.data("area");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(s.vp/2-t.data("cwidth")/2)}),n=t})}else{for(i=this.items.length-1;i>-1&&(h+=this.items.eq(a).data("width"),a!=t&&o.push(this.items.eq(a)),!(h>this.vp));i--)a=a-1==-1?this.items.length-1:a-1;o.length&&o.forEach(function(t){var e=n.data("left")-t.data("width");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(s.vp/2-t.data("cwidth")/2)}),n=t})}}}),t.$doc.on("mousemove.uk.slider touchmove.uk.slider",function(t){if(t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i&&Math.abs(t.pageX-i.x)>i.threshold&&(window.getSelection().toString()?e=i=!1:i(t)),e){var s,n,o,h,r,c,d,u,f,l;if(t.clientX||t.clientY?s=t.clientX:(t.pageX||t.pageY)&&(s=t.pageX-document.body.scrollLeft-document.documentElement.scrollLeft),r=a.focus,n=s-e.element.data("pointer-start").x,o=e.element.data("pointer-pos-start")+n,h=s>e.element.data("pointer-start").x?-1:1,c=e.items.eq(a.focus),1==h)for(d=c.data("left")+Math.abs(n),u=0,f=a.focus;u<e.items.length;u++){if(l=e.items.eq(f),f!=a.focus&&l.data("left")<d&&l.data("area")>d){r=f;break}f=f+1==e.items.length?0:f+1}else for(d=c.data("left")-Math.abs(n),u=0,f=a.focus;u<e.items.length;u++){if(l=e.items.eq(f),f!=a.focus&&l.data("area")<=c.data("left")&&l.data("center")<d){r=f;break}f=f-1==-1?e.items.length-1:f-1}e.options.infinite&&r!=a._focus&&e.infinite(r,h),e.updatePos(o),a.dir=h,a._focus=r,a.touchx=parseInt(t.pageX,10),a.diff=d}}),t.$doc.on("mouseup.uk.slider touchend.uk.slider",function(){if(e){e.container.removeClass("uk-drag"),e.items.eq(a.focus);var t,s,n,o=!1;if(1==a.dir){for(s=0,n=a.focus;s<e.items.length;s++){if(t=e.items.eq(n),n!=a.focus&&t.data("left")>a.diff){o=n;break}n=n+1==e.items.length?0:n+1}e.options.infinite||o||(o=e.items.length)}else{for(s=0,n=a.focus;s<e.items.length;s++){if(t=e.items.eq(n),n!=a.focus&&t.data("left")<a.diff){o=n;break}n=n-1==-1?e.items.length-1:n-1}e.options.infinite||o||(o=0)}e.updateFocus(o!==!1?o:a._focus)}e=i=!1}),t.slider}); | ||
| 0 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/css/line_schedule.css
| @@ -183,7 +183,7 @@ | @@ -183,7 +183,7 @@ | ||
| 183 | .schedule-body .ct_table dl.drag-active dd { | 183 | .schedule-body .ct_table dl.drag-active dd { |
| 184 | background: #cef9e3!important; | 184 | background: #cef9e3!important; |
| 185 | color: #484848; | 185 | color: #484848; |
| 186 | - border-top: 1px solid #e0d7d7; | 186 | + border-top: 1px solid #e0d7d7 !important; |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | .schedule-body .ct_table dl.drag-active dd a { | 189 | .schedule-body .ct_table dl.drag-active dd a { |
| @@ -527,6 +527,10 @@ dl.relevance-active.intimity dd:nth-child(n+2) { | @@ -527,6 +527,10 @@ dl.relevance-active.intimity dd:nth-child(n+2) { | ||
| 527 | color: white; | 527 | color: white; |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | +dl.relevance-active.intimity dd:nth-child(n+2) a { | ||
| 531 | + color: white !important; | ||
| 532 | +} | ||
| 533 | + | ||
| 530 | dl.relevance-active dd.tl-qrlb, | 534 | dl.relevance-active dd.tl-qrlb, |
| 531 | dl.relevance-active.intimity dd.tl-qrlb{ | 535 | dl.relevance-active.intimity dd.tl-qrlb{ |
| 532 | background: linear-gradient(to right, #7B6B24, #4992c3) !important; | 536 | background: linear-gradient(to right, #7B6B24, #4992c3) !important; |
| @@ -695,7 +699,14 @@ input.i-cbox[type=checkbox]{ | @@ -695,7 +699,14 @@ input.i-cbox[type=checkbox]{ | ||
| 695 | .sys-note-42{ | 699 | .sys-note-42{ |
| 696 | width: calc(100% - 10px) !important; | 700 | width: calc(100% - 10px) !important; |
| 697 | margin: 5px !important; | 701 | margin: 5px !important; |
| 702 | + cursor: default; | ||
| 698 | } | 703 | } |
| 704 | + | ||
| 705 | +.sys-note-80:hover, | ||
| 706 | +.sys-note-42:hover{ | ||
| 707 | + box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12); | ||
| 708 | +} | ||
| 709 | + | ||
| 699 | .sys-note-80 .uk-panel-box, | 710 | .sys-note-80 .uk-panel-box, |
| 700 | .sys-note-42 .uk-panel-box{ | 711 | .sys-note-42 .uk-panel-box{ |
| 701 | padding: 10px; | 712 | padding: 10px; |
src/main/resources/static/real_control_v2/css/north.css
| @@ -17,14 +17,14 @@ | @@ -17,14 +17,14 @@ | ||
| 17 | right: 10px; | 17 | right: 10px; |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | -.north-toolbar a.uk-navbar-brand>i { | 20 | +.north-toolbar a.uk-navbar-brand > i { |
| 21 | margin-top: 3px; | 21 | margin-top: 3px; |
| 22 | vertical-align: middle; | 22 | vertical-align: middle; |
| 23 | color: #bababa; | 23 | color: #bababa; |
| 24 | font-size: 16px; | 24 | font-size: 16px; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | -.north-toolbar a.uk-navbar-brand>span { | 27 | +.north-toolbar a.uk-navbar-brand > span { |
| 28 | margin-top: 3px; | 28 | margin-top: 3px; |
| 29 | vertical-align: middle; | 29 | vertical-align: middle; |
| 30 | display: inline-block; | 30 | display: inline-block; |
| @@ -40,38 +40,38 @@ | @@ -40,38 +40,38 @@ | ||
| 40 | margin-left: -14px; | 40 | margin-left: -14px; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | -.north .north-tabs .uk-tab{ | ||
| 44 | - border-bottom: none; | 43 | +.north .north-tabs .uk-tab { |
| 44 | + border-bottom: none; | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | -.north .north-tabs .uk-tab>li>a{ | ||
| 48 | - color: #bde1ff; | ||
| 49 | - text-shadow: none; | 47 | +.north .north-tabs .uk-tab > li > a { |
| 48 | + color: #bde1ff; | ||
| 49 | + text-shadow: none; | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | -.north .north-tabs .uk-tab>li.tab-line>a{ | ||
| 53 | - padding: 8px 0px 8px 12px; | 52 | +.north .north-tabs .uk-tab > li.tab-line > a { |
| 53 | + padding: 8px 0px 8px 12px; | ||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | -.north .north-tabs .uk-tab>li>a:hover, | ||
| 57 | -.north .north-tabs .uk-tab>li>a:focus{ | ||
| 58 | - border-color: #19537d; | ||
| 59 | - background: #19537d; | ||
| 60 | - color: white; | ||
| 61 | - margin-bottom: 0; | 56 | +.north .north-tabs .uk-tab > li > a:hover, |
| 57 | +.north .north-tabs .uk-tab > li > a:focus { | ||
| 58 | + border-color: #19537d; | ||
| 59 | + background: #19537d; | ||
| 60 | + color: white; | ||
| 61 | + margin-bottom: 0; | ||
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | -.north .north-tabs .uk-tab>li.uk-active>a{ | 64 | +.north .north-tabs .uk-tab > li.uk-active > a { |
| 65 | color: #444; | 65 | color: #444; |
| 66 | border-color: #fff; | 66 | border-color: #fff; |
| 67 | background: #fff; | 67 | background: #fff; |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | -#north_toolbar_panel li.disabled a{ | ||
| 71 | - cursor: no-drop !important; | 70 | +#north_toolbar_panel li.disabled a { |
| 71 | + cursor: no-drop !important; | ||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | -.load-panel{ | 74 | +.load-panel { |
| 75 | position: absolute; | 75 | position: absolute; |
| 76 | top: 50%; | 76 | top: 50%; |
| 77 | left: 50%; | 77 | left: 50%; |
| @@ -81,16 +81,118 @@ | @@ -81,16 +81,118 @@ | ||
| 81 | display: none; | 81 | display: none; |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | -.uk-dropdown.dropdown-column-2{ | 84 | +#history-sch-maintain-modal .load-panel{ |
| 85 | + background: #fff; | ||
| 86 | + color: #c92121; | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +.uk-dropdown.dropdown-column-2 { | ||
| 85 | width: 336px; | 90 | width: 336px; |
| 86 | } | 91 | } |
| 87 | 92 | ||
| 88 | -#north_toolbar_panel li.event a i{ | 93 | +#north_toolbar_panel li.event a i { |
| 89 | margin-right: 4px; | 94 | margin-right: 4px; |
| 90 | color: #b4b2b2; | 95 | color: #b4b2b2; |
| 91 | font-size: 12px; | 96 | font-size: 12px; |
| 92 | } | 97 | } |
| 93 | 98 | ||
| 94 | -#north_toolbar_panel li.event a:hover i{ | 99 | +#north_toolbar_panel li.event a:hover i { |
| 95 | color: #e9e4e4; | 100 | color: #e9e4e4; |
| 96 | -} | ||
| 97 | \ No newline at end of file | 101 | \ No newline at end of file |
| 102 | +} | ||
| 103 | + | ||
| 104 | +.history-sch-table dl dt:nth-of-type(1), .history-sch-table dl dd:nth-of-type(1) { | ||
| 105 | + width: 10%; | ||
| 106 | +} | ||
| 107 | + | ||
| 108 | +.history-sch-table dl dt:nth-of-type(2), .history-sch-table dl dd:nth-of-type(2) { | ||
| 109 | + width: 12%; | ||
| 110 | +} | ||
| 111 | + | ||
| 112 | +.history-sch-table dl dt:nth-of-type(3), .history-sch-table dl dd:nth-of-type(3) { | ||
| 113 | + width: 14%; | ||
| 114 | +} | ||
| 115 | + | ||
| 116 | +.history-sch-table dl dt:nth-of-type(4), .history-sch-table dl dd:nth-of-type(4) { | ||
| 117 | + width: 14%; | ||
| 118 | +} | ||
| 119 | + | ||
| 120 | +.history-sch-table dl dt:nth-of-type(5), .history-sch-table dl dd:nth-of-type(5) { | ||
| 121 | + width: 12%; | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +.history-sch-table dl dt:nth-of-type(6), .history-sch-table dl dd:nth-of-type(6) { | ||
| 125 | + width: 10%; | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +.history-sch-table dl dt:nth-of-type(7), .history-sch-table dl dd:nth-of-type(7) { | ||
| 129 | + width: 12%; | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | +.history-sch-table dl dt:nth-of-type(8), .history-sch-table dl dd:nth-of-type(8) { | ||
| 133 | + width: 10%; | ||
| 134 | +} | ||
| 135 | + | ||
| 136 | +.history-sch-table dl dt:nth-of-type(9), .history-sch-table dl dd:nth-of-type(9) { | ||
| 137 | + width: 6%; | ||
| 138 | +} | ||
| 139 | + | ||
| 140 | +#history-sch-maintain-modal ul.h-s-time, | ||
| 141 | +#history-sch-maintain-modal ul.h-s-line{ | ||
| 142 | + border: 1px solid #f0f0f0; | ||
| 143 | + padding: 9px 0 10px 0; | ||
| 144 | + border-radius: 3px; | ||
| 145 | + position: relative; | ||
| 146 | +} | ||
| 147 | + | ||
| 148 | +#history-sch-maintain-modal ul.h-s-time:before, | ||
| 149 | +#history-sch-maintain-modal ul.h-s-line:before{ | ||
| 150 | + content: "日期"; | ||
| 151 | + position: absolute; | ||
| 152 | + top: -9px; | ||
| 153 | + font-size: 12px; | ||
| 154 | + background: white; | ||
| 155 | + padding: 0 4px; | ||
| 156 | + color: #7d7b7b; | ||
| 157 | + left: 10px; | ||
| 158 | +} | ||
| 159 | + | ||
| 160 | +#history-sch-maintain-modal ul.h-s-line:before{ | ||
| 161 | + content: "线路"; | ||
| 162 | +} | ||
| 163 | + | ||
| 164 | +/*#history-sch-maintain-modal ul.h-s-line li.active{ | ||
| 165 | + | ||
| 166 | +}*/ | ||
| 167 | + | ||
| 168 | +/* | ||
| 169 | +#history-sch-maintain-modal ul.h-s-line li.active a{ | ||
| 170 | + color: white; | ||
| 171 | + background: #009dd8; | ||
| 172 | +} | ||
| 173 | +*/ | ||
| 174 | + | ||
| 175 | +#history-sch-maintain-modal .uk-icon-question-circle{ | ||
| 176 | + color: darkgrey; | ||
| 177 | + font-size: 12px; | ||
| 178 | + margin: 3px; | ||
| 179 | +} | ||
| 180 | + | ||
| 181 | +.history-sch-table.ct_table dl.active, | ||
| 182 | +.history-sch-table.ct_table>.ct_table_body dl.active:hover, | ||
| 183 | +.history-sch-table.ct_table>.ct_table_body dl.context-menu-active { | ||
| 184 | + background: #8baebc; | ||
| 185 | + box-shadow: 0 0 4px #656c71; | ||
| 186 | + color: white; | ||
| 187 | +} | ||
| 188 | + | ||
| 189 | +#history-sch-edit-modal.ct-form-modal form.uk-form-horizontal .uk-form-label{ | ||
| 190 | + width: 60px; | ||
| 191 | +} | ||
| 192 | + | ||
| 193 | +#history-sch-edit-modal.ct-form-modal form.uk-form-horizontal .uk-form-controls { | ||
| 194 | + margin-left: 64px; | ||
| 195 | +} | ||
| 196 | + | ||
| 197 | + | ||
| 198 | + | ||
| 199 | + |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html
0 → 100644
| 1 | +<div class="uk-modal ct-form-modal" id="bctype-major-modal"> | ||
| 2 | + <div class="uk-modal-dialog"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <h2>班次放站</h2> | ||
| 5 | + <form class="uk-form uk-form-horizontal"> | ||
| 6 | + <div class="uk-grid"> | ||
| 7 | + <div class="uk-width-1-2"> | ||
| 8 | + <div class="uk-form-row"> | ||
| 9 | + <label class="uk-form-label" style="width: 75px;">从</label> | ||
| 10 | + <div class="uk-form-controls" style="margin-left: 75px;"> | ||
| 11 | + <select name="startStation"> | ||
| 12 | + </select> | ||
| 13 | + </div> | ||
| 14 | + </div> | ||
| 15 | + </div> | ||
| 16 | + <div class="uk-width-1-2"> | ||
| 17 | + <div class="uk-form-row"> | ||
| 18 | + <label class="uk-form-label" style="width: 75px;">放大站至</label> | ||
| 19 | + <div class="uk-form-controls" style="margin-left: 75px;"> | ||
| 20 | + <select name="endStation"> | ||
| 21 | + </select> | ||
| 22 | + </div> | ||
| 23 | + </div> | ||
| 24 | + </div> | ||
| 25 | + </div> | ||
| 26 | + <div class="uk-grid"> | ||
| 27 | + <div class="uk-width-1-1"> | ||
| 28 | + <div class="uk-form-row ct-stacked"> | ||
| 29 | + <label class="uk-form-label" for="form-s-t"><i class="uk-icon-bullhorn"></i> 指令内容</label> | ||
| 30 | + <div class="uk-form-controls"> | ||
| 31 | + <textarea style="color: #e53636;" id="form-s-t" cols="30" placeholder="指令内容" rows="5" | ||
| 32 | + name="directiveStr" data-fv-stringlength="true" | ||
| 33 | + data-fv-stringlength-max="50"></textarea> | ||
| 34 | + </div> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + </div> | ||
| 38 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | ||
| 39 | + <button type="button" class="uk-button uk-modal-close">取消</button> | ||
| 40 | + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-send"></i> 确认调整并下发指令 | ||
| 41 | + </button> | ||
| 42 | + </div> | ||
| 43 | + </form> | ||
| 44 | + </div> | ||
| 45 | + | ||
| 46 | + <script> | ||
| 47 | + (function () { | ||
| 48 | + var modal = '#bctype-major-modal' | ||
| 49 | + , sch, stationRoutes, parentModal; | ||
| 50 | + | ||
| 51 | + $('[name=startStation],[name=endStation]', modal).on('change', refreshDirectiveStr); | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + var remarks; | ||
| 55 | + function refreshDirectiveStr() { | ||
| 56 | + //指令内容 | ||
| 57 | + var qdzName = $('[name=startStation]').find("option:selected").text() | ||
| 58 | + , zdzName = $('[name=endStation]').find("option:selected").text(); | ||
| 59 | + remarks=' 由 ' + qdzName + ' 放站至 ' + zdzName; | ||
| 60 | + $('[name=directiveStr]', modal).text('班次:'+sch.dfsj+remarks).trigger('input'); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + $('[name=startStation]', modal).on('change', function () { | ||
| 64 | + var ops = $('[name=endStation]', modal).find('option'); | ||
| 65 | + | ||
| 66 | + var flag, code = $(this).val(); | ||
| 67 | + $.each(ops, function () { | ||
| 68 | + if (!flag) | ||
| 69 | + $(this).attr('disabled', 'disabled'); | ||
| 70 | + else | ||
| 71 | + $(this).removeAttr('disabled'); | ||
| 72 | + if (this.value == code) | ||
| 73 | + flag = true; | ||
| 74 | + }); | ||
| 75 | + }); | ||
| 76 | + | ||
| 77 | + $('[name=endStation]', modal).on('change', function () { | ||
| 78 | + var ops = $('[name=startStation]', modal).find('option'); | ||
| 79 | + | ||
| 80 | + var flag, code = $(this).val(); | ||
| 81 | + $.each(ops, function () { | ||
| 82 | + if (this.value == code) | ||
| 83 | + flag = true; | ||
| 84 | + | ||
| 85 | + if (flag) | ||
| 86 | + $(this).attr('disabled', 'disabled'); | ||
| 87 | + else | ||
| 88 | + $(this).removeAttr('disabled'); | ||
| 89 | + }); | ||
| 90 | + }); | ||
| 91 | + $(modal).on('init', function (e, data) { | ||
| 92 | + sch = data.sch; | ||
| 93 | + parentModal = data.parentModal; | ||
| 94 | + | ||
| 95 | + //submit | ||
| 96 | + var f = $('form', modal).formValidation(gb_form_validation_opts); | ||
| 97 | + f.on('success.form.fv', function (e) { | ||
| 98 | + e.preventDefault(); | ||
| 99 | + var data = $(this).serializeJSON(); | ||
| 100 | + // notify_wait('准备下发指令') | ||
| 101 | + //下发指令 | ||
| 102 | + $.post('/directive/phrase', {nbbm: sch.clZbh, text: data.directiveStr}, function (rs) { | ||
| 103 | + if (rs == 0) { | ||
| 104 | + notify_succ('指令下发成功'); | ||
| 105 | + changeBcType(); | ||
| 106 | + } | ||
| 107 | + else | ||
| 108 | + notify_err('指令下发失败'); | ||
| 109 | + }); | ||
| 110 | + }); | ||
| 111 | + | ||
| 112 | + //站点路由 | ||
| 113 | + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) { | ||
| 114 | + return a.stationRouteCode - b.stationRouteCode; | ||
| 115 | + }), 'directions'); | ||
| 116 | + | ||
| 117 | + var opts = ''; | ||
| 118 | + $.each(stationRoutes[sch.xlDir], function () { | ||
| 119 | + opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'; | ||
| 120 | + }); | ||
| 121 | + $('[name=startStation]', modal).html(opts).val(sch.qdzCode); | ||
| 122 | + $('[name=endStation]', modal).html(opts).val(sch.zdzCode); | ||
| 123 | + $('[name=startStation]', modal).trigger('change'); | ||
| 124 | + $('[name=endStation]', modal).trigger('change'); | ||
| 125 | + }); | ||
| 126 | + | ||
| 127 | + function changeBcType() { | ||
| 128 | + //将班次类型调整为放站 | ||
| 129 | + gb_common.$post('/realSchedule/changeBcType/'+sch.id, {bcType: 'major', remarks: remarks}, function(rs){ | ||
| 130 | + UIkit.modal(modal).hide(); | ||
| 131 | + gb_schedule_table.updateSchedule(rs.t); | ||
| 132 | + //触发父容器刷新事件 | ||
| 133 | + $(parentModal).trigger('init', {sch: rs.t}); | ||
| 134 | + notify_succ('调整放站成功'); | ||
| 135 | + }); | ||
| 136 | + } | ||
| 137 | + })(); | ||
| 138 | + </script> | ||
| 139 | +</div> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html
| @@ -46,16 +46,19 @@ | @@ -46,16 +46,19 @@ | ||
| 46 | <script> | 46 | <script> |
| 47 | (function () { | 47 | (function () { |
| 48 | var modal = '#bctype-venting-modal' | 48 | var modal = '#bctype-venting-modal' |
| 49 | - , sch, stationRoutes; | 49 | + , sch, stationRoutes, parentModal; |
| 50 | 50 | ||
| 51 | $('[name=startStation],[name=endStation]', modal).on('change', refreshDirectiveStr); | 51 | $('[name=startStation],[name=endStation]', modal).on('change', refreshDirectiveStr); |
| 52 | 52 | ||
| 53 | 53 | ||
| 54 | + var remarks; | ||
| 54 | function refreshDirectiveStr() { | 55 | function refreshDirectiveStr() { |
| 55 | //指令内容 | 56 | //指令内容 |
| 56 | var qdzName = $('[name=startStation]').find("option:selected").text() | 57 | var qdzName = $('[name=startStation]').find("option:selected").text() |
| 57 | , zdzName = $('[name=endStation]').find("option:selected").text(); | 58 | , zdzName = $('[name=endStation]').find("option:selected").text(); |
| 58 | - $('[name=directiveStr]', modal).text('班次:'+sch.dfsj+' 由 ' + qdzName + ' 直放至 ' + zdzName); | 59 | + |
| 60 | + remarks=' 由 ' + qdzName + ' 直放至 ' + zdzName; | ||
| 61 | + $('[name=directiveStr]', modal).text('班次:'+sch.dfsj+ remarks).trigger('input'); | ||
| 59 | } | 62 | } |
| 60 | 63 | ||
| 61 | $('[name=startStation]', modal).on('change', function () { | 64 | $('[name=startStation]', modal).on('change', function () { |
| @@ -88,47 +91,51 @@ | @@ -88,47 +91,51 @@ | ||
| 88 | }); | 91 | }); |
| 89 | $(modal).on('init', function (e, data) { | 92 | $(modal).on('init', function (e, data) { |
| 90 | sch = data.sch; | 93 | sch = data.sch; |
| 91 | - | ||
| 92 | - //站点路由 | ||
| 93 | - stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) { | ||
| 94 | - return a.stationRouteCode - b.stationRouteCode; | ||
| 95 | - }), 'directions'); | ||
| 96 | - | ||
| 97 | - var opts = ''; | ||
| 98 | - $.each(stationRoutes[sch.xlDir], function () { | ||
| 99 | - opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'; | ||
| 100 | - }); | ||
| 101 | - $('[name=startStation]', modal).html(opts).val(sch.qdzCode); | ||
| 102 | - $('[name=endStation]', modal).html(opts).val(sch.zdzCode); | ||
| 103 | - $('[name=startStation]', modal).trigger('change'); | ||
| 104 | - $('[name=endStation]', modal).trigger('change'); | 94 | + parentModal = data.parentModal; |
| 105 | 95 | ||
| 106 | //submit | 96 | //submit |
| 107 | var f = $('form', modal).formValidation(gb_form_validation_opts); | 97 | var f = $('form', modal).formValidation(gb_form_validation_opts); |
| 108 | f.on('success.form.fv', function (e) { | 98 | f.on('success.form.fv', function (e) { |
| 109 | e.preventDefault(); | 99 | e.preventDefault(); |
| 110 | var data = $(this).serializeJSON(); | 100 | var data = $(this).serializeJSON(); |
| 111 | - notify_wait('准备下发指令') | 101 | + // notify_wait('准备下发指令') |
| 112 | //下发指令 | 102 | //下发指令 |
| 113 | $.post('/directive/phrase', {nbbm: sch.clZbh, text: data.directiveStr}, function (rs) { | 103 | $.post('/directive/phrase', {nbbm: sch.clZbh, text: data.directiveStr}, function (rs) { |
| 114 | if (rs == 0) { | 104 | if (rs == 0) { |
| 115 | notify_succ('指令下发成功'); | 105 | notify_succ('指令下发成功'); |
| 116 | - | ||
| 117 | - | 106 | + changeBcType(); |
| 118 | } | 107 | } |
| 119 | else | 108 | else |
| 120 | notify_err('指令下发失败'); | 109 | notify_err('指令下发失败'); |
| 121 | }); | 110 | }); |
| 122 | }); | 111 | }); |
| 123 | - | ||
| 124 | - function changeBcType() { | ||
| 125 | - //将班次类型调整为直放 | ||
| 126 | - gb_common.$post('/realSchedule/changeBcType', {bcType: 'venting'}, function(rs){ | ||
| 127 | - gb_schedule_table.updateSchedule(rs.t); | ||
| 128 | - //触发父容器刷新事件 | ||
| 129 | - }); | ||
| 130 | - } | 112 | + |
| 113 | + | ||
| 114 | + //站点路由 | ||
| 115 | + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) { | ||
| 116 | + return a.stationRouteCode - b.stationRouteCode; | ||
| 117 | + }), 'directions'); | ||
| 118 | + | ||
| 119 | + var opts = ''; | ||
| 120 | + $.each(stationRoutes[sch.xlDir], function () { | ||
| 121 | + opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'; | ||
| 122 | + }); | ||
| 123 | + $('[name=startStation]', modal).html(opts).val(sch.qdzCode); | ||
| 124 | + $('[name=endStation]', modal).html(opts).val(sch.zdzCode); | ||
| 125 | + $('[name=startStation]', modal).trigger('change'); | ||
| 126 | + $('[name=endStation]', modal).trigger('change'); | ||
| 131 | }); | 127 | }); |
| 128 | + | ||
| 129 | + function changeBcType() { | ||
| 130 | + //将班次类型调整为直放 | ||
| 131 | + gb_common.$post('/realSchedule/changeBcType/'+sch.id, {bcType: 'venting', remarks: remarks}, function(rs){ | ||
| 132 | + UIkit.modal(modal).hide(); | ||
| 133 | + gb_schedule_table.updateSchedule(rs.t); | ||
| 134 | + //触发父容器刷新事件 | ||
| 135 | + $(parentModal).trigger('init', {sch: rs.t}); | ||
| 136 | + notify_succ('调整直发成功'); | ||
| 137 | + }); | ||
| 138 | + } | ||
| 132 | })(); | 139 | })(); |
| 133 | </script> | 140 | </script> |
| 134 | </div> | 141 | </div> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
| @@ -155,16 +155,25 @@ | @@ -155,16 +155,25 @@ | ||
| 155 | var type = $(this).val(); | 155 | var type = $(this).val(); |
| 156 | if(sch.bcType != 'normal') | 156 | if(sch.bcType != 'normal') |
| 157 | return; | 157 | return; |
| 158 | - //if($(this)) | 158 | + |
| 159 | + //重置类型,等待调整界面触发刷新事件 | ||
| 160 | + $(this).val(sch.bcType); | ||
| 161 | + var url, detailModal; | ||
| 159 | if(type=='venting'){ | 162 | if(type=='venting'){ |
| 160 | - //直放 | ||
| 161 | - $.get('/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html', function(htmlStr){ | ||
| 162 | - $(document.body).append(htmlStr); | ||
| 163 | - var detailModal='#bctype-venting-modal'; | ||
| 164 | - UIkit.modal(detailModal, {bgclose: true,modal:false}).show(); | ||
| 165 | - $(detailModal).trigger('init', {sch: sch}); | ||
| 166 | - }) | 163 | + url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; |
| 164 | + detailModal='#bctype-venting-modal'; | ||
| 165 | + } | ||
| 166 | + else{ | ||
| 167 | + detailModal='#bctype-major-modal'; | ||
| 168 | + url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html'; | ||
| 167 | } | 169 | } |
| 170 | + | ||
| 171 | + $.get(url, function(htmlStr){ | ||
| 172 | + $(document.body).append(htmlStr); | ||
| 173 | + | ||
| 174 | + UIkit.modal(detailModal, {bgclose: true,modal:false}).show(); | ||
| 175 | + $(detailModal).trigger('init', {sch: sch, parentModal: modal}); | ||
| 176 | + }) | ||
| 168 | }); | 177 | }); |
| 169 | }); | 178 | }); |
| 170 | })(); | 179 | })(); |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
| @@ -163,7 +163,7 @@ | @@ -163,7 +163,7 @@ | ||
| 163 | }); | 163 | }); |
| 164 | 164 | ||
| 165 | //班次类型 | 165 | //班次类型 |
| 166 | - if(sch.bcType=='out'||sch.bcType=='in') | 166 | + if(sch.bcType!='normal') |
| 167 | $('select[name=bcType]', f).attr('disabled','disabled'); | 167 | $('select[name=bcType]', f).attr('disabled','disabled'); |
| 168 | else { | 168 | else { |
| 169 | //正常班次只能改为直放 和 放大站 | 169 | //正常班次只能改为直放 和 放大站 |
| @@ -178,6 +178,32 @@ | @@ -178,6 +178,32 @@ | ||
| 178 | var rem=$('[name=remarks]', f); | 178 | var rem=$('[name=remarks]', f); |
| 179 | rem.val(rem.val() + $(this).val() + ',').trigger('input'); | 179 | rem.val(rem.val() + $(this).val() + ',').trigger('input'); |
| 180 | }); | 180 | }); |
| 181 | + | ||
| 182 | + | ||
| 183 | + $('select[name=bcType]', modal).on('change', function(){ | ||
| 184 | + var type = $(this).val(); | ||
| 185 | + if(sch.bcType != 'normal') | ||
| 186 | + return; | ||
| 187 | + | ||
| 188 | + //重置类型,等待调整界面触发刷新事件 | ||
| 189 | + $(this).val(sch.bcType); | ||
| 190 | + var url, detailModal; | ||
| 191 | + if(type=='venting'){ | ||
| 192 | + url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; | ||
| 193 | + detailModal='#bctype-venting-modal'; | ||
| 194 | + } | ||
| 195 | + else{ | ||
| 196 | + detailModal='#bctype-major-modal'; | ||
| 197 | + url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html'; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + $.get(url, function(htmlStr){ | ||
| 201 | + $(document.body).append(htmlStr); | ||
| 202 | + | ||
| 203 | + UIkit.modal(detailModal, {bgclose: true,modal:false}).show(); | ||
| 204 | + $(detailModal).trigger('init', {sch: sch, parentModal: modal}); | ||
| 205 | + }) | ||
| 206 | + }); | ||
| 181 | }); | 207 | }); |
| 182 | })(); | 208 | })(); |
| 183 | </script> | 209 | </script> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/jhlb.html
| @@ -28,11 +28,19 @@ | @@ -28,11 +28,19 @@ | ||
| 28 | <label {{if sch.destroy}}class="destroy-sch"{{/if}}> | 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}}> | 29 | <input class="i-cbox" name="ids[]" value="{{sch.id}}" type="checkbox" {{if sch.destroy}}disabled{{/if}}> |
| 30 | {{sch.dfsj}} | 30 | {{sch.dfsj}} |
| 31 | + | ||
| 31 | {{if sch.bcType == "out"}} | 32 | {{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}} | 33 | + <span class="uk-badge uk-badge-success">出场</span> |
| 34 | + {{else if sch.bcType == "in"}} | ||
| 35 | + <span class="uk-badge uk-badge-warning">进场</span> | ||
| 36 | + {{else if sch.bcType == "venting"}} | ||
| 37 | + <span class="uk-badge uk-badge-danger">直放</span> | ||
| 38 | + {{else if sch.bcType == "major"}} | ||
| 39 | + <span class="uk-badge uk-badge-danger">放站</span> | ||
| 40 | + {{/if}} | ||
| 41 | + {{if sch.sflj}} | ||
| 42 | + <span class="uk-badge uk-badge-danger">临加</span> | ||
| 43 | + {{/if}} | ||
| 36 | {{if sch.destroy}} | 44 | {{if sch.destroy}} |
| 37 | <small>已烂班</small> | 45 | <small>已烂班</small> |
| 38 | {{/if}} | 46 | {{/if}} |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
| @@ -83,14 +83,20 @@ | @@ -83,14 +83,20 @@ | ||
| 83 | {{else}} | 83 | {{else}} |
| 84 | <span class="sjfc-time">{{sch.fcsjActual}}</span> | 84 | <span class="sjfc-time">{{sch.fcsjActual}}</span> |
| 85 | {{/if}} | 85 | {{/if}} |
| 86 | + | ||
| 86 | {{if sch.bcType == "out"}} | 87 | {{if sch.bcType == "out"}} |
| 87 | - <span class="uk-badge uk-badge-success">出场</span> | 88 | + <span class="uk-badge uk-badge-success">出场</span> |
| 88 | {{else if sch.bcType == "in"}} | 89 | {{else if sch.bcType == "in"}} |
| 89 | - <span class="uk-badge uk-badge-warning">进场</span> | 90 | + <span class="uk-badge uk-badge-warning">进场</span> |
| 91 | + {{else if sch.bcType == "venting"}} | ||
| 92 | + <span class="uk-badge uk-badge-danger">直放</span> | ||
| 93 | + {{else if sch.bcType == "major"}} | ||
| 94 | + <span class="uk-badge uk-badge-danger">放站</span> | ||
| 90 | {{/if}} | 95 | {{/if}} |
| 91 | {{if sch.sflj}} | 96 | {{if sch.sflj}} |
| 92 | - <span class="uk-badge uk-badge-danger">临加</span> | 97 | + <span class="uk-badge uk-badge-danger">临加</span> |
| 93 | {{/if}} | 98 | {{/if}} |
| 99 | + | ||
| 94 | {{if sch.cTasks.length > 0}} | 100 | {{if sch.cTasks.length > 0}} |
| 95 | <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> | 101 | <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> |
| 96 | {{/if}} | 102 | {{/if}} |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/multi_dftz.html
| @@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
| 56 | }); | 56 | }); |
| 57 | 57 | ||
| 58 | $('button[type=submit]', modal).on('click', function() { | 58 | $('button[type=submit]', modal).on('click', function() { |
| 59 | - var data = [], text=''; | 59 | + var data = []/*, text=''*/; |
| 60 | var dls = $('.multi-dftz-table .ct_table_body dl', modal); | 60 | var dls = $('.multi-dftz-table .ct_table_body dl', modal); |
| 61 | $.each(dls, function() { | 61 | $.each(dls, function() { |
| 62 | var input = $($('dd', this)[5]).find('input'), | 62 | var input = $($('dd', this)[5]).find('input'), |
| @@ -69,20 +69,27 @@ | @@ -69,20 +69,27 @@ | ||
| 69 | old_dfsj: old, | 69 | old_dfsj: old, |
| 70 | new_dfsj: v | 70 | new_dfsj: v |
| 71 | }); | 71 | }); |
| 72 | - text+=('<span style="color:red;">'+old + '——>' + v + '</span>,'); | 72 | + //text+=('<span style="color:red;">'+old + '——>' + v + '</span>,'); |
| 73 | }); | 73 | }); |
| 74 | 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 | - }, '确定调整'); | 75 | + if(data && data.length > 0){ |
| 76 | + UIkit.modal.confirm('确定要进行调整?', function() { | ||
| 77 | + gb_common.$post('/realSchedule/multi_dftz', { | ||
| 78 | + dcsJson: JSON.stringify(data) | ||
| 79 | + }, function(rs) { | ||
| 80 | + if(rs.ts && rs.ts.length > 0){ | ||
| 81 | + gb_schedule_table.updateSchedule(rs.ts); | ||
| 82 | + UIkit.modal(modal).hide(); | ||
| 83 | + notify_succ('待发调整成功'); | ||
| 84 | + } | ||
| 85 | + }); | ||
| 86 | + }, { | ||
| 87 | + labels: { | ||
| 88 | + Ok: '确定调整', | ||
| 89 | + Cancel: '取消' | ||
| 90 | + } | ||
| 91 | + }); | ||
| 92 | + } | ||
| 86 | }); | 93 | }); |
| 87 | 94 | ||
| 88 | var valChange = function() { | 95 | var valChange = function() { |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sftz.html
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | <div class="uk-form-row"> | 44 | <div class="uk-form-row"> |
| 45 | <label class="uk-form-label" >实发时刻</label> | 45 | <label class="uk-form-label" >实发时刻</label> |
| 46 | <div class="uk-form-controls"> | 46 | <div class="uk-form-controls"> |
| 47 | - <input type="time" name="fcsjActual" value="{{fcsjActual}}" autofocus> | 47 | + <input type="time" name="fcsjActual" value="{{fcsjActual}}" required autofocus> |
| 48 | </div> | 48 | </div> |
| 49 | </div> | 49 | </div> |
| 50 | </div> | 50 | </div> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/tzrc.html
| @@ -89,14 +89,18 @@ | @@ -89,14 +89,18 @@ | ||
| 89 | <label> | 89 | <label> |
| 90 | <input {{if sch.fcsjActual!=null}}disabled{{/if}} type="checkbox" value=1 name="schCBox" class="i-cbox" style="margin-top: 0px;"> | 90 | <input {{if sch.fcsjActual!=null}}disabled{{/if}} type="checkbox" value=1 name="schCBox" class="i-cbox" style="margin-top: 0px;"> |
| 91 | {{sch.dfsj}} | 91 | {{sch.dfsj}} |
| 92 | - {{if sch.bcType == "out"}} | 92 | + {{if sch.bcType == "out"}} |
| 93 | <span class="uk-badge uk-badge-success">出场</span> | 93 | <span class="uk-badge uk-badge-success">出场</span> |
| 94 | - {{else if sch.bcType == "in"}} | 94 | + {{else if sch.bcType == "in"}} |
| 95 | <span class="uk-badge uk-badge-warning">进场</span> | 95 | <span class="uk-badge uk-badge-warning">进场</span> |
| 96 | - {{/if}} | ||
| 97 | - {{if sch.sflj}} | 96 | + {{else if sch.bcType == "venting"}} |
| 97 | + <span class="uk-badge uk-badge-danger">直放</span> | ||
| 98 | + {{else if sch.bcType == "major"}} | ||
| 99 | + <span class="uk-badge uk-badge-danger">放站</span> | ||
| 100 | + {{/if}} | ||
| 101 | + {{if sch.sflj}} | ||
| 98 | <span class="uk-badge uk-badge-danger">临加</span> | 102 | <span class="uk-badge uk-badge-danger">临加</span> |
| 99 | - {{/if}} | 103 | + {{/if}} |
| 100 | {{if sch.cTasks.length > 0}} | 104 | {{if sch.cTasks.length > 0}} |
| 101 | <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> | 105 | <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> |
| 102 | {{/if}} | 106 | {{/if}} |
src/main/resources/static/real_control_v2/fragments/line_schedule/layout.html
| @@ -13,7 +13,6 @@ | @@ -13,7 +13,6 @@ | ||
| 13 | </div> | 13 | </div> |
| 14 | <div class="uk-width-1-6" style="height: calc(100% - 1px);"> | 14 | <div class="uk-width-1-6" style="height: calc(100% - 1px);"> |
| 15 | <div class="card-panel sys-mailbox" style="overflow: auto;"> | 15 | <div class="card-panel sys-mailbox" style="overflow: auto;"> |
| 16 | - | ||
| 17 | </div> | 16 | </div> |
| 18 | </div> | 17 | </div> |
| 19 | </div> | 18 | </div> |
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
| @@ -53,6 +53,10 @@ | @@ -53,6 +53,10 @@ | ||
| 53 | <span class="uk-badge uk-badge-success">出场</span> | 53 | <span class="uk-badge uk-badge-success">出场</span> |
| 54 | {{else if sch.bcType == "in"}} | 54 | {{else if sch.bcType == "in"}} |
| 55 | <span class="uk-badge uk-badge-warning">进场</span> | 55 | <span class="uk-badge uk-badge-warning">进场</span> |
| 56 | + {{else if sch.bcType == "venting"}} | ||
| 57 | + <span class="uk-badge uk-badge-danger">直放</span> | ||
| 58 | + {{else if sch.bcType == "major"}} | ||
| 59 | + <span class="uk-badge uk-badge-danger">放站</span> | ||
| 56 | {{/if}} | 60 | {{/if}} |
| 57 | {{if sch.sflj}} | 61 | {{if sch.sflj}} |
| 58 | <span class="uk-badge uk-badge-danger">临加</span> | 62 | <span class="uk-badge uk-badge-danger">临加</span> |
| @@ -93,6 +97,10 @@ | @@ -93,6 +97,10 @@ | ||
| 93 | <span class="uk-badge uk-badge-success">出场</span> | 97 | <span class="uk-badge uk-badge-success">出场</span> |
| 94 | {{else if bcType == "in"}} | 98 | {{else if bcType == "in"}} |
| 95 | <span class="uk-badge uk-badge-warning">进场</span> | 99 | <span class="uk-badge uk-badge-warning">进场</span> |
| 100 | + {{else if bcType == "venting"}} | ||
| 101 | + <span class="uk-badge uk-badge-danger">直放</span> | ||
| 102 | + {{else if bcType == "major"}} | ||
| 103 | + <span class="uk-badge uk-badge-danger">放站</span> | ||
| 96 | {{/if}} | 104 | {{/if}} |
| 97 | {{if sflj}} | 105 | {{if sflj}} |
| 98 | <span class="uk-badge uk-badge-danger">临加</span> | 106 | <span class="uk-badge uk-badge-danger">临加</span> |
src/main/resources/static/real_control_v2/fragments/line_schedule/sys_mailbox.html
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | </script> | 13 | </script> |
| 14 | 14 | ||
| 15 | <script id="sys-note-42-temp" type="text/html"> | 15 | <script id="sys-note-42-temp" type="text/html"> |
| 16 | - <div class="uk-width-medium-1-1 sys-note-42 sys-mail-item" id="{{domId}}" > | 16 | + <div class="uk-width-medium-1-1 sys-note-42 sys-mail-item" id="{{domId}}" data-id="{{t.id}}"> |
| 17 | <div class="uk-panel uk-panel-box uk-panel-box-secondary"> | 17 | <div class="uk-panel uk-panel-box uk-panel-box-secondary"> |
| 18 | <h5 class="title"> | 18 | <h5 class="title"> |
| 19 | {{t.fcsjActual}} {{t.clZbh}} 已由 {{t.qdzName}} 发出,执行班次 {{t.dfsj}} | 19 | {{t.fcsjActual}} {{t.clZbh}} 已由 {{t.qdzName}} 发出,执行班次 {{t.dfsj}} |
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | </script> | 26 | </script> |
| 27 | 27 | ||
| 28 | <script id="sys-note-42_1-temp" type="text/html"> | 28 | <script id="sys-note-42_1-temp" type="text/html"> |
| 29 | - <div class="uk-width-medium-1-1 sys-note-42 sys-mail-item" id="{{domId}}"> | 29 | + <div class="uk-width-medium-1-1 sys-note-42 sys-mail-item" id="{{domId}}" data-id="{{t.id}}"> |
| 30 | <div class="uk-panel uk-panel-box uk-panel-box-secondary"> | 30 | <div class="uk-panel uk-panel-box uk-panel-box-secondary"> |
| 31 | <h5 class="title"> | 31 | <h5 class="title"> |
| 32 | {{t.zdsjActual}} {{t.clZbh}} 到达 {{t.zdzName}};已完成 {{finish}} 个班次; | 32 | {{t.zdsjActual}} {{t.clZbh}} 到达 {{t.zdzName}};已完成 {{finish}} 个班次; |
src/main/resources/static/real_control_v2/fragments/north/nav/all_devices.html
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch/edit.html
0 → 100644
| 1 | +<div class="uk-modal ct-form-modal" id="history-sch-edit-modal"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 900px;"> | ||
| 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="history-sch-edit-form-temp" type="text/html"> | ||
| 11 | + <input type="hidden" name="id" value="{{id}}"/> | ||
| 12 | + | ||
| 13 | + <div class="uk-grid"> | ||
| 14 | + <div class="uk-width-1-3"> | ||
| 15 | + <div class="uk-form-row"> | ||
| 16 | + <label class="uk-form-label" >班次类型</label> | ||
| 17 | + <div class="uk-form-controls"> | ||
| 18 | + <select class="form-control nt-dictionary" disabled data-code="{{bcType}}" name="bcType" data-group=ScheduleType></select> | ||
| 19 | + </div> | ||
| 20 | + </div> | ||
| 21 | + </div> | ||
| 22 | + <div class="uk-width-1-3"> | ||
| 23 | + <div class="uk-form-row"> | ||
| 24 | + <label class="uk-form-label" >起点</label> | ||
| 25 | + <div class="uk-form-controls"> | ||
| 26 | + <input type="text" value="{{qdzName}}" disabled> | ||
| 27 | + </div> | ||
| 28 | + </div> | ||
| 29 | + </div> | ||
| 30 | + <div class="uk-width-1-3"> | ||
| 31 | + <div class="uk-form-row"> | ||
| 32 | + <label class="uk-form-label" >终点</label> | ||
| 33 | + <div class="uk-form-controls"> | ||
| 34 | + <input type="text" value="{{zdzName}}" disabled> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + </div> | ||
| 38 | + </div> | ||
| 39 | + | ||
| 40 | + <div class="uk-grid"> | ||
| 41 | + <div class="uk-width-1-3"> | ||
| 42 | + <div class="uk-form-row"> | ||
| 43 | + <label class="uk-form-label" >车辆</label> | ||
| 44 | + <div class="uk-form-controls"> | ||
| 45 | + <div class="uk-autocomplete uk-form car-autocom"> | ||
| 46 | + <input type="text" value="{{clZbh}}" name="clZbh" required> | ||
| 47 | + </div> | ||
| 48 | + </div> | ||
| 49 | + </div> | ||
| 50 | + </div> | ||
| 51 | + <div class="uk-width-1-3"> | ||
| 52 | + <div class="uk-form-row"> | ||
| 53 | + <label class="uk-form-label" >驾驶员</label> | ||
| 54 | + <div class="uk-form-controls"> | ||
| 55 | + <div class="uk-autocomplete uk-form jsy-autocom"> | ||
| 56 | + <input type="text" value="{{jGh}}/{{jName}}" name="jsy" required> | ||
| 57 | + </div> | ||
| 58 | + </div> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + | ||
| 63 | + <div class="uk-grid"> | ||
| 64 | + <div class="uk-width-1-3"> | ||
| 65 | + <div class="uk-form-row"> | ||
| 66 | + <label class="uk-form-label" >计发</label> | ||
| 67 | + <div class="uk-form-controls"> | ||
| 68 | + <input type="text" value="{{fcsj}}" disabled> | ||
| 69 | + </div> | ||
| 70 | + </div> | ||
| 71 | + </div> | ||
| 72 | + <div class="uk-width-1-3"> | ||
| 73 | + <div class="uk-form-row"> | ||
| 74 | + <label class="uk-form-label" >待发</label> | ||
| 75 | + <div class="uk-form-controls"> | ||
| 76 | + <input type="text" name="dfsj" value="{{dfsj}}" required> | ||
| 77 | + </div> | ||
| 78 | + </div> | ||
| 79 | + </div> | ||
| 80 | + <div class="uk-width-1-3"> | ||
| 81 | + <div class="uk-form-row"> | ||
| 82 | + <label class="uk-form-label" >实发</label> | ||
| 83 | + <div class="uk-form-controls"> | ||
| 84 | + <input type="text" name="fcsjActual" value="{{fcsjActual}}" > | ||
| 85 | + </div> | ||
| 86 | + </div> | ||
| 87 | + </div> | ||
| 88 | + </div> | ||
| 89 | + | ||
| 90 | + <div class="uk-grid"> | ||
| 91 | + <div class="uk-width-1-3"> | ||
| 92 | + <div class="uk-form-row"> | ||
| 93 | + <label class="uk-form-label" >计划里程</label> | ||
| 94 | + <div class="uk-form-controls"> | ||
| 95 | + <input type="text" value="{{jhlc}}" disabled> | ||
| 96 | + </div> | ||
| 97 | + </div> | ||
| 98 | + </div> | ||
| 99 | + <div class="uk-width-1-3"> | ||
| 100 | + <div class="uk-form-row"> | ||
| 101 | + <label class="uk-form-label" >计划终点</label> | ||
| 102 | + <div class="uk-form-controls"> | ||
| 103 | + <input type="text" value="{{zdsj}}" disabled> | ||
| 104 | + </div> | ||
| 105 | + </div> | ||
| 106 | + </div> | ||
| 107 | + <div class="uk-width-1-3"> | ||
| 108 | + <div class="uk-form-row"> | ||
| 109 | + <label class="uk-form-label" >实际终点</label> | ||
| 110 | + <div class="uk-form-controls"> | ||
| 111 | + <input type="text" name="zdsjActual" value="{{zdsjActual}}" > | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 115 | + </div> | ||
| 116 | + | ||
| 117 | + <div class="uk-grid"> | ||
| 118 | + <div class="uk-width-1-1"> | ||
| 119 | + <div class="uk-form-row ct-stacked"> | ||
| 120 | + <label class="uk-form-label" >备注</label> | ||
| 121 | + <div class="uk-form-controls" style="margin-top: 5px;"> | ||
| 122 | + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="100" placeholder="备注">{{remarks}}</textarea> | ||
| 123 | + </div> | ||
| 124 | + </div> | ||
| 125 | + </div> | ||
| 126 | + </div> | ||
| 127 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | ||
| 128 | + <button type="button" class="uk-button uk-modal-close">取消</button> | ||
| 129 | + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> 保存</button> | ||
| 130 | + </div> | ||
| 131 | + </script> | ||
| 132 | + | ||
| 133 | + <script> | ||
| 134 | + (function() { | ||
| 135 | + var modal = '#history-sch-edit-modal' | ||
| 136 | + ,sch,parentModal; | ||
| 137 | + $(modal).on('init', function(e, data) { | ||
| 138 | + var id = data.id; | ||
| 139 | + parentModal=data.parentModal; | ||
| 140 | + | ||
| 141 | + $.get('/realSchedule/'+id, function (sch) { | ||
| 142 | + var htmlStr = template('history-sch-edit-form-temp', sch); | ||
| 143 | + $('form', modal).html(htmlStr); | ||
| 144 | + | ||
| 145 | + //字典转换 | ||
| 146 | + dictionaryUtils.transformDom($('.nt-dictionary', modal)); | ||
| 147 | + | ||
| 148 | + //----------- Autocomplete -------------- | ||
| 149 | + $.get('/basic/cars', function(rs) { | ||
| 150 | + //车辆 | ||
| 151 | + gb_common.carAutocomplete($('.car-autocom', modal), rs); | ||
| 152 | + }); | ||
| 153 | + $.get('/basic/all_personnel', function(rs) { | ||
| 154 | + //驾驶员 | ||
| 155 | + gb_common.personAutocomplete($('.jsy-autocom', modal), rs); | ||
| 156 | + //售票员 | ||
| 157 | + gb_common.personAutocomplete($('.spy-autocom', modal), rs); | ||
| 158 | + }); | ||
| 159 | + | ||
| 160 | + | ||
| 161 | + //submit | ||
| 162 | + var f = $('form', modal).formValidation(gb_form_validation_opts); | ||
| 163 | + f.on('success.form.fv', function(e) { | ||
| 164 | + e.preventDefault(); | ||
| 165 | + var data = $(this).serializeJSON(); | ||
| 166 | + | ||
| 167 | + //拆分驾驶员工号和姓名 | ||
| 168 | + data.jGh = data.jsy.split('/')[0]; | ||
| 169 | + data.jName = data.jsy.split('/')[1]; | ||
| 170 | + delete data.jsy; | ||
| 171 | + //拆分售票员工号和姓名 | ||
| 172 | + if(data.sGh != null){ | ||
| 173 | + data.sGh = data.spy.split('/')[0]; | ||
| 174 | + data.sName = data.spy.split('/')[1]; | ||
| 175 | + delete data.spy; | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + gb_common.$post('/realSchedule/history', data, function (rs) { | ||
| 179 | + //console.log(rs); | ||
| 180 | + UIkit.modal(modal).hide(); | ||
| 181 | + $(parentModal).trigger('refresh'); | ||
| 182 | + }); | ||
| 183 | + }); | ||
| 184 | + }); | ||
| 185 | + }); | ||
| 186 | + })(); | ||
| 187 | + </script> | ||
| 188 | +</div> |
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
0 → 100644
| 1 | +<div class="uk-modal" id="history-sch-maintain-modal"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 1180px;"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <h2>历史班次维护</h2> | ||
| 5 | + | ||
| 6 | + <div style="padding-left: 12px;margin: 20px 0"> | ||
| 7 | + <ul class="uk-subnav uk-subnav-pill h-s-time"> | ||
| 8 | + </ul> | ||
| 9 | + </div> | ||
| 10 | + | ||
| 11 | + <div style="padding-left: 12px;"> | ||
| 12 | + <ul class="uk-subnav uk-subnav-pill h-s-line"> | ||
| 13 | + </ul> | ||
| 14 | + </div> | ||
| 15 | + | ||
| 16 | + <div class="uk-panel uk-panel-box uk-panel-box-primary"> | ||
| 17 | + <form class="uk-form search-form"> | ||
| 18 | + <fieldset data-uk-margin> | ||
| 19 | + <span class="horizontal-field">上下行</span> | ||
| 20 | + <select name="xlDir_eq"> | ||
| 21 | + <option value="">全部</option> | ||
| 22 | + <option value="0">上行</option> | ||
| 23 | + <option value="1">下行</option> | ||
| 24 | + </select> | ||
| 25 | + | ||
| 26 | + <span class="horizontal-field">车辆</span> | ||
| 27 | + <div class="uk-autocomplete uk-form autocomplete-cars"> | ||
| 28 | + <input type="text" name="clZbh_like" placeholder="车辆自编号"> | ||
| 29 | + </div> | ||
| 30 | + <span class="horizontal-field">驾驶员</span> | ||
| 31 | + <div class="uk-autocomplete uk-form autocomplete-jsy"> | ||
| 32 | + <input type="text" name="jGh_like" placeholder="驾驶员"> | ||
| 33 | + </div> | ||
| 34 | + <button class="uk-button">检索</button> | ||
| 35 | + </fieldset> | ||
| 36 | + </form> | ||
| 37 | + </div> | ||
| 38 | + | ||
| 39 | + <div class="ct_table_wrap ct_table_no_border history-sch-wrap" style="height: 510px;"> | ||
| 40 | + <div class="ct_table history-sch-table"> | ||
| 41 | + <div class="ct_table_head"> | ||
| 42 | + <dl> | ||
| 43 | + <dt>车辆</dt> | ||
| 44 | + <dt>驾驶员</dt> | ||
| 45 | + <dt>起点</dt> | ||
| 46 | + <dt>终点</dt> | ||
| 47 | + <dt>计发</dt> | ||
| 48 | + <dt>待发</dt> | ||
| 49 | + <dt>实发</dt> | ||
| 50 | + <dt>终点时间</dt> | ||
| 51 | + <dt>备注</dt> | ||
| 52 | + </dl> | ||
| 53 | + </div> | ||
| 54 | + <div class="ct_table_body"> | ||
| 55 | + </div> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + <div class="uk-modal-footer uk-text-right pagination-wrap"> | ||
| 59 | + </div> | ||
| 60 | + | ||
| 61 | + <div class="load-panel"> | ||
| 62 | + <i class="uk-icon-spinner uk-icon-spin"></i> | ||
| 63 | + 正在加载数据 | ||
| 64 | + </div> | ||
| 65 | + </div> | ||
| 66 | + | ||
| 67 | + <script id="history-sch-maintain-table-temp" type="text/html"> | ||
| 68 | + {{each list as sch i}} | ||
| 69 | + <dl data-id="{{sch.id}}"> | ||
| 70 | + <dd>{{sch.clZbh}}</dd> | ||
| 71 | + <dd>{{sch.jGh}}/{{sch.jName}}</dd> | ||
| 72 | + <dd title="{{sch.qdzName}}">{{sch.qdzName}}</dd> | ||
| 73 | + <dd title="{{sch.zdzName}}">{{sch.zdzName}}</dd> | ||
| 74 | + <dd>{{sch.fcsj}} | ||
| 75 | + {{if sch.bcType == "out"}} | ||
| 76 | + <span class="uk-badge uk-badge-success">出场</span> | ||
| 77 | + {{else if sch.bcType == "in"}} | ||
| 78 | + <span class="uk-badge uk-badge-warning">进场</span> | ||
| 79 | + {{else if sch.bcType == "venting"}} | ||
| 80 | + <span class="uk-badge uk-badge-danger">直放</span> | ||
| 81 | + {{else if sch.bcType == "major"}} | ||
| 82 | + <span class="uk-badge uk-badge-danger">放站</span> | ||
| 83 | + {{/if}} | ||
| 84 | + {{if sch.sflj}} | ||
| 85 | + <span class="uk-badge uk-badge-danger">临加</span> | ||
| 86 | + {{/if}} | ||
| 87 | + {{if sch.cTasks.length > 0}} | ||
| 88 | + <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> | ||
| 89 | + {{/if}}</dd> | ||
| 90 | + <dd>{{sch.dfsj}}</dd> | ||
| 91 | + <dd>{{sch.fcsjActual}}</dd> | ||
| 92 | + <dd>{{sch.zdsjActual}}</dd> | ||
| 93 | + <dd title="{{sch.remarks}}">{{sch.remarks}}</dd> | ||
| 94 | + </dl> | ||
| 95 | + {{/each}} | ||
| 96 | + </script> | ||
| 97 | + | ||
| 98 | + <script> | ||
| 99 | + (function () { | ||
| 100 | + var modal = '#history-sch-maintain-modal'; | ||
| 101 | + $(modal).on('init', function (e, data) { | ||
| 102 | + $.get('/realSchedule/dateArray', function (rs) { | ||
| 103 | + //日期tab | ||
| 104 | + var tsStr = ''; | ||
| 105 | + $.each(rs, function (i) { | ||
| 106 | + tsStr += '<li ' + (i == 0 ? 'class="uk-active"' : '') + '><a>' + this + '</a></li>'; | ||
| 107 | + }); | ||
| 108 | + $('.h-s-time', modal).html(tsStr); | ||
| 109 | + | ||
| 110 | + //线路tab | ||
| 111 | + var xlStr = ''; | ||
| 112 | + $.each(gb_data_basic.activeLines, function (i) { | ||
| 113 | + xlStr += '<li ' + (i == 0 ? 'class="uk-active"' : '') + ' data-id="' + this.lineCode + '"><a>' + this.name + '</a></li>'; | ||
| 114 | + }); | ||
| 115 | + $('.h-s-line', modal).html(xlStr); | ||
| 116 | + | ||
| 117 | + | ||
| 118 | + jsQuery(); | ||
| 119 | + }); | ||
| 120 | + }); | ||
| 121 | + | ||
| 122 | + $(modal).on('refresh', jsQuery); | ||
| 123 | + | ||
| 124 | + $(modal).on('click', '.h-s-time li,.h-s-line li', function () { | ||
| 125 | + if(loading) | ||
| 126 | + return; | ||
| 127 | + $(this).parent().find('li.uk-active').removeClass('uk-active'); | ||
| 128 | + $(this).addClass('uk-active'); | ||
| 129 | + jsQuery(); | ||
| 130 | + }); | ||
| 131 | + | ||
| 132 | + $('.search-form', modal).on('submit', function (e) { | ||
| 133 | + try { | ||
| 134 | + jsQuery(); | ||
| 135 | + }catch(e){ | ||
| 136 | + console.log(e); | ||
| 137 | + } | ||
| 138 | + return false; | ||
| 139 | + }); | ||
| 140 | + | ||
| 141 | + var nbbmArray=[],jsyArray=[],loading; | ||
| 142 | + function jsQuery() { | ||
| 143 | + var data = $('.search-form', modal).serializeJSON(); | ||
| 144 | + var rq = $('.h-s-time li.uk-active', modal).text(), | ||
| 145 | + lineCode = $('.h-s-line li.uk-active', modal).data('id'); | ||
| 146 | + data.scheduleDateStr_eq = rq; | ||
| 147 | + data.xlBm_eq = lineCode; | ||
| 148 | + if(data.jGh_like.indexOf('/')!=-1){ | ||
| 149 | + var jsy=data.jGh_like.split('/'); | ||
| 150 | + data.jGh_like=jsy[0]; | ||
| 151 | + data.jName_like=jsy[1]; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + $('.load-panel', modal).show(); | ||
| 155 | + loading=true; | ||
| 156 | + $.get('/realSchedule/all', data, function (rs) { | ||
| 157 | + rs.sort(schedule_sort); | ||
| 158 | + var tbodyStr = template('history-sch-maintain-table-temp', {list: rs}); | ||
| 159 | + $('.history-sch-table .ct_table_body', modal).html(tbodyStr); | ||
| 160 | + | ||
| 161 | + //可搜索的车辆自编号和驾驶员 | ||
| 162 | + nbbmArray=[]; | ||
| 163 | + jsyArray=[]; | ||
| 164 | + $.each(rs, function () { | ||
| 165 | + nbbmArray.push({value: this.clZbh}); | ||
| 166 | + jsyArray.push({value: this.jGh+'/'+this.jName, | ||
| 167 | + fullChars: pinyin.getFullChars(this.jName).toUpperCase(), | ||
| 168 | + camelChars: pinyin.getCamelChars(this.jName)}); | ||
| 169 | + }); | ||
| 170 | + //value | ||
| 171 | + nbbmArray=distinctByField(nbbmArray); | ||
| 172 | + jsyArray=distinctByField(jsyArray); | ||
| 173 | + $('.load-panel', modal).hide(); | ||
| 174 | + loading=false; | ||
| 175 | + | ||
| 176 | + }); | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + //nbbm autocomplete | ||
| 180 | + var carAutoCom=$('.autocomplete-cars', modal); | ||
| 181 | + UIkit.autocomplete(carAutoCom, { | ||
| 182 | + minLength: 1, | ||
| 183 | + delay: 50, | ||
| 184 | + source: function(release) { | ||
| 185 | + var q = $('input', carAutoCom).val().toUpperCase() | ||
| 186 | + ,rs = [], | ||
| 187 | + count = 0; | ||
| 188 | + $.each(nbbmArray, function () { | ||
| 189 | + if(this.value.indexOf(q) != -1){ | ||
| 190 | + rs.push(this); | ||
| 191 | + count++; | ||
| 192 | + } | ||
| 193 | + }); | ||
| 194 | + release && release(rs); | ||
| 195 | + } | ||
| 196 | + }); | ||
| 197 | + | ||
| 198 | + //jsy autocomplete | ||
| 199 | + var jsyAutoCom=$('.autocomplete-jsy', modal); | ||
| 200 | + UIkit.autocomplete(jsyAutoCom, { | ||
| 201 | + minLength: 1, | ||
| 202 | + delay: 50, | ||
| 203 | + source: function(release) { | ||
| 204 | + var q = $('input', jsyAutoCom).val().toUpperCase() | ||
| 205 | + ,rs = [], | ||
| 206 | + count = 0; | ||
| 207 | + | ||
| 208 | + $.each(jsyArray, function() { | ||
| 209 | + if (this.value.indexOf(q) != -1 || this.fullChars.indexOf(q) != -1 || this.camelChars.indexOf(q) != -1){ | ||
| 210 | + rs.push(this); | ||
| 211 | + count++; | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + if (count >= 10) | ||
| 215 | + return false; | ||
| 216 | + }); | ||
| 217 | + release && release(rs); | ||
| 218 | + } | ||
| 219 | + }); | ||
| 220 | + | ||
| 221 | + function schedule_sort(s1, s2) { | ||
| 222 | + return (s1.realExecDate+s1.dfsj).localeCompare(s2.realExecDate+s2.dfsj); | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + function distinctByField(arr, f){ | ||
| 226 | + if(!f) | ||
| 227 | + f = 'value'; | ||
| 228 | + var rs = {}; | ||
| 229 | + $.each(arr, function () { | ||
| 230 | + rs[this[f]]=this; | ||
| 231 | + }); | ||
| 232 | + return gb_common.get_vals(rs); | ||
| 233 | + } | ||
| 234 | + | ||
| 235 | + gb_ct_table.fixedHead($('.ct_table_wrap', modal)); | ||
| 236 | + | ||
| 237 | + //班次点击 | ||
| 238 | + $(modal).on('click contextmenu', '.history-sch-table .ct_table_body dl', function() { | ||
| 239 | + $(this).parent().find('.active').removeClass('active'); | ||
| 240 | + $(this).addClass('active'); | ||
| 241 | + }); | ||
| 242 | + | ||
| 243 | + var callbackHandler={ | ||
| 244 | + edit: function(id){ | ||
| 245 | + open_modal('/real_control_v2/fragments/north/nav/history_sch/edit.html', {id: id, parentModal: modal}, {center: false,bgclose: false, modal: false}); | ||
| 246 | + } | ||
| 247 | + } | ||
| 248 | + | ||
| 249 | + //右键菜单 | ||
| 250 | + $.contextMenu({ | ||
| 251 | + selector: modal+' .history-sch-table .ct_table_body dl', | ||
| 252 | + className: 'schedule-ct-menu', | ||
| 253 | + callback: function(key, options) { | ||
| 254 | + var id = $('.context-menu-active', modal).data('id'); | ||
| 255 | + callbackHandler[key] && callbackHandler[key](id); | ||
| 256 | + }, | ||
| 257 | + items: { | ||
| 258 | + 'edit': { | ||
| 259 | + name: '编辑' | ||
| 260 | + }, | ||
| 261 | + 'child_task':{ | ||
| 262 | + name: '子任务', | ||
| 263 | + disabled: true | ||
| 264 | + }, | ||
| 265 | + 'add': { | ||
| 266 | + name: '新增', | ||
| 267 | + disabled: true | ||
| 268 | + }, | ||
| 269 | + 'delete':{ | ||
| 270 | + name: '删除', | ||
| 271 | + disabled: true | ||
| 272 | + } | ||
| 273 | + } | ||
| 274 | + }); | ||
| 275 | + })(); | ||
| 276 | + </script> | ||
| 277 | +</div> |
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
| @@ -47,12 +47,6 @@ | @@ -47,12 +47,6 @@ | ||
| 47 | "icon": "uk-icon-pie-chart" | 47 | "icon": "uk-icon-pie-chart" |
| 48 | }, | 48 | }, |
| 49 | { | 49 | { |
| 50 | - "id": 1.7, | ||
| 51 | - "text": "车辆首末班准点率", | ||
| 52 | - "event": "s_e_punctuality_rate", | ||
| 53 | - "icon": "uk-icon-pie-chart" | ||
| 54 | - }, | ||
| 55 | - { | ||
| 56 | "id": 1.8, | 50 | "id": 1.8, |
| 57 | "divider": true | 51 | "divider": true |
| 58 | }, | 52 | }, |
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
| @@ -93,6 +93,27 @@ var gb_schedule_context_menu = (function() { | @@ -93,6 +93,27 @@ var gb_schedule_context_menu = (function() { | ||
| 93 | notify_err('发送指令失败'); | 93 | notify_err('发送指令失败'); |
| 94 | }); | 94 | }); |
| 95 | }, '确定下发指令'); | 95 | }, '确定下发指令'); |
| 96 | + }, | ||
| 97 | + jgtz: function (schArray) { | ||
| 98 | + var idArr=[]; | ||
| 99 | + $.each(schArray, function(){ | ||
| 100 | + idArr.push(this.id); | ||
| 101 | + }); | ||
| 102 | + var elem = UIkit.modal.prompt('请输入间隔(分钟)',0, function(newValue) { | ||
| 103 | + if (!isNaN(newValue) && newValue>0) { | ||
| 104 | + gb_common.$post_arr('/realSchedule/spaceAdjust', {ids: idArr, space: newValue}, function (rs) { | ||
| 105 | + //刷新数据 | ||
| 106 | + gb_schedule_table.updateSchedule(rs.ts); | ||
| 107 | + notify_succ('调整间隔成功!'); | ||
| 108 | + }); | ||
| 109 | + } else | ||
| 110 | + notify_err('不合理的间隔时间!'); | ||
| 111 | + }, { | ||
| 112 | + labels: { | ||
| 113 | + Ok: '确定调整', | ||
| 114 | + Cancel: '取消' | ||
| 115 | + } | ||
| 116 | + }); | ||
| 96 | } | 117 | } |
| 97 | }; | 118 | }; |
| 98 | 119 | ||
| @@ -162,8 +183,7 @@ var gb_schedule_context_menu = (function() { | @@ -162,8 +183,7 @@ var gb_schedule_context_menu = (function() { | ||
| 162 | name: '待发调整' | 183 | name: '待发调整' |
| 163 | }, | 184 | }, |
| 164 | 'jgtz': { | 185 | 'jgtz': { |
| 165 | - name: '间隔调整', | ||
| 166 | - disabled:true | 186 | + name: '间隔调整' |
| 167 | }, | 187 | }, |
| 168 | 'multi_tzrc': { | 188 | 'multi_tzrc': { |
| 169 | name: '调整人车' | 189 | name: '调整人车' |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| @@ -168,7 +168,7 @@ var gb_schedule_table = (function() { | @@ -168,7 +168,7 @@ var gb_schedule_table = (function() { | ||
| 168 | 168 | ||
| 169 | //计发时间 | 169 | //计发时间 |
| 170 | $(dds[5]).replaceWith(temps['line-schedule-fcsj-temp'](sch)); | 170 | $(dds[5]).replaceWith(temps['line-schedule-fcsj-temp'](sch)); |
| 171 | - $(dds[6]).data('sort-val', sch.dfsjT).attr('dbclick-val', sch.dfsj).html(sch.dfsj); | 171 | + $(dds[6]).attr('data-sort-val', sch.dfsjT).attr('dbclick-val', sch.dfsj).html(sch.dfsj); |
| 172 | 172 | ||
| 173 | //实发时间 | 173 | //实发时间 |
| 174 | calc_sch_real_shift(sch); | 174 | calc_sch_real_shift(sch); |
src/main/resources/static/real_control_v2/js/north/toolbar.js
| @@ -62,6 +62,9 @@ var gb_northToolbar = (function() { | @@ -62,6 +62,9 @@ var gb_northToolbar = (function() { | ||
| 62 | }, | 62 | }, |
| 63 | s_e_punctuality_rate_line: function () { | 63 | s_e_punctuality_rate_line: function () { |
| 64 | open_modal('/real_control_v2/fragments/north/nav/charts/s_e_punctuality_rate_line.html', {}, modal_opts); | 64 | open_modal('/real_control_v2/fragments/north/nav/charts/s_e_punctuality_rate_line.html', {}, modal_opts); |
| 65 | + }, | ||
| 66 | + history_sch_maintain: function () { | ||
| 67 | + open_modal('/real_control_v2/fragments/north/nav/history_sch_maintain.html', {}, {center: false,bgclose: false}); | ||
| 65 | } | 68 | } |
| 66 | } | 69 | } |
| 67 | })(); | 70 | })(); |
src/main/resources/static/real_control_v2/js/websocket/sch_websocket.js
| @@ -163,7 +163,8 @@ var gb_sch_websocket = (function () { | @@ -163,7 +163,8 @@ var gb_sch_websocket = (function () { | ||
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | //42确定 | 165 | //42确定 |
| 166 | - $(document).on('click', '.sys-mailbox .sys-note-42 .uk-button-primary', function () { | 166 | + $(document).on('click', '.sys-mailbox .sys-note-42 .uk-button-primary', function (e) { |
| 167 | + e.stopPropagation(); | ||
| 167 | $(this).parents('.sys-note-42').remove(); | 168 | $(this).parents('.sys-note-42').remove(); |
| 168 | 169 | ||
| 169 | var size = $(this).parents('.sys-mailbox').find('.sys-mail-item').length | 170 | var size = $(this).parents('.sys-mailbox').find('.sys-mail-item').length |
| @@ -172,6 +173,11 @@ var gb_sch_websocket = (function () { | @@ -172,6 +173,11 @@ var gb_sch_websocket = (function () { | ||
| 172 | $('#badge_untreated_num_' + lineCode).text(size); | 173 | $('#badge_untreated_num_' + lineCode).text(size); |
| 173 | }); | 174 | }); |
| 174 | 175 | ||
| 176 | + //42消息点击 | ||
| 177 | + $(document).on('click', '.sys-mailbox .sys-note-42', function () { | ||
| 178 | + alert($(this).data('id')); | ||
| 179 | + }); | ||
| 180 | + | ||
| 175 | //80同意 | 181 | //80同意 |
| 176 | $(document).on('click', '.sys-mailbox .sys-note-80 .uk-button-primary', function () { | 182 | $(document).on('click', '.sys-mailbox .sys-note-80 .uk-button-primary', function () { |
| 177 | var panel = $(this).parents('.sys-note-80') | 183 | var panel = $(this).parents('.sys-note-80') |
src/main/resources/static/real_control_v2/main.html
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" /> | 9 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" /> |
| 10 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" /> | 10 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" /> |
| 11 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" /> | 11 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" /> |
| 12 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slider.gradient.min.css" /> | ||
| 12 | 13 | ||
| 13 | <!-- main style --> | 14 | <!-- main style --> |
| 14 | <link rel="stylesheet" href="/real_control_v2/css/main.css" /> | 15 | <link rel="stylesheet" href="/real_control_v2/css/main.css" /> |
| @@ -80,6 +81,7 @@ | @@ -80,6 +81,7 @@ | ||
| 80 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/pagination.min.js"></script> | 81 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/pagination.min.js"></script> |
| 81 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js"></script> | 82 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js"></script> |
| 82 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.min.js"></script> | 83 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.min.js"></script> |
| 84 | + <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/slider.min.js"></script> | ||
| 83 | <!-- jquery contextMenu --> | 85 | <!-- jquery contextMenu --> |
| 84 | <script src="/real_control_v2/assets/js/jquery.contextMenu.min.js"></script> | 86 | <script src="/real_control_v2/assets/js/jquery.contextMenu.min.js"></script> |
| 85 | <script src="/real_control_v2/assets/js/jquery.ui.position.min.js"></script> | 87 | <script src="/real_control_v2/assets/js/jquery.ui.position.min.js"></script> |