Commit 5906cdb4f232ee3acb9d9f37729e36375e58967d
Merge branch 'minhang' into pudong
Showing
12 changed files
with
203 additions
and
22 deletions
src/main/java/com/bsth/data/pilot80/PilotReport.java
| @@ -117,6 +117,11 @@ public class PilotReport { | @@ -117,6 +117,11 @@ public class PilotReport { | ||
| 117 | 117 | ||
| 118 | //推送到页面 | 118 | //推送到页面 |
| 119 | sendUtils.send80ToPage(d80); | 119 | sendUtils.send80ToPage(d80); |
| 120 | + | ||
| 121 | + //反射搜索用 瞬时字段 | ||
| 122 | + d80.setLineId(d80.getData().getLineId()); | ||
| 123 | + d80.setNbbm(d80.getData().getNbbm()); | ||
| 124 | + d80.setRequestCode(d80.getData().getRequestCode()); | ||
| 120 | } catch (Exception e) { | 125 | } catch (Exception e) { |
| 121 | logger.error("", e); | 126 | logger.error("", e); |
| 122 | } | 127 | } |
src/main/java/com/bsth/data/utils/ListFilterUtils.java
0 → 100644
| 1 | +package com.bsth.data.utils; | ||
| 2 | + | ||
| 3 | +import org.apache.commons.lang3.StringUtils; | ||
| 4 | +import org.slf4j.Logger; | ||
| 5 | +import org.slf4j.LoggerFactory; | ||
| 6 | + | ||
| 7 | +import java.lang.reflect.Field; | ||
| 8 | +import java.util.ArrayList; | ||
| 9 | +import java.util.Collection; | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Map; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * 集合搜索过滤 | ||
| 15 | + * Created by panzhao on 2017/8/2. | ||
| 16 | + */ | ||
| 17 | +public class ListFilterUtils { | ||
| 18 | + | ||
| 19 | + static Logger logger = LoggerFactory.getLogger(ListFilterUtils.class); | ||
| 20 | + | ||
| 21 | + public static List filter(Collection all, Map<String, Object> map, Class clazz) { | ||
| 22 | + List rs = new ArrayList(); | ||
| 23 | + Field[] fields = clazz.getDeclaredFields(); | ||
| 24 | + | ||
| 25 | + //参与过滤的字段 | ||
| 26 | + List<Field> fs = new ArrayList<>(); | ||
| 27 | + for (Field f : fields) { | ||
| 28 | + f.setAccessible(true); | ||
| 29 | + if (map.containsKey(f.getName())) | ||
| 30 | + fs.add(f); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + //过滤数据 | ||
| 34 | + for (Object obj : all) { | ||
| 35 | + if (fieldEquals(fs, obj, map)) | ||
| 36 | + rs.add(obj); | ||
| 37 | + } | ||
| 38 | + return rs; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public static boolean fieldEquals(List<Field> fs, Object obj, Map<String, Object> map) { | ||
| 42 | + try { | ||
| 43 | + for (Field f : fs) { | ||
| 44 | + if (StringUtils.isEmpty(map.get(f.getName()).toString())) | ||
| 45 | + continue; | ||
| 46 | + | ||
| 47 | + if (f.get(obj) == null || f.get(obj).toString().indexOf(map.get(f.getName()).toString()) == -1) | ||
| 48 | + return false; | ||
| 49 | + } | ||
| 50 | + } catch (Exception e) { | ||
| 51 | + logger.error("", e); | ||
| 52 | + return false; | ||
| 53 | + } | ||
| 54 | + return true; | ||
| 55 | + } | ||
| 56 | +} |
src/main/java/com/bsth/data/utils/ListPageQueryUtils.java
0 → 100644
| 1 | +package com.bsth.data.utils; | ||
| 2 | + | ||
| 3 | +import java.util.ArrayList; | ||
| 4 | +import java.util.List; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 集合分页工具 | ||
| 8 | + * Created by panzhao on 2017/8/2. | ||
| 9 | + */ | ||
| 10 | +public class ListPageQueryUtils { | ||
| 11 | + | ||
| 12 | + public static List paging(List all, int page, int pageSize) { | ||
| 13 | + List rs = new ArrayList(pageSize); | ||
| 14 | + | ||
| 15 | + int s = page * pageSize; | ||
| 16 | + int e = (page + 1) * pageSize; | ||
| 17 | + | ||
| 18 | + int size = all.size(); | ||
| 19 | + | ||
| 20 | + if (e > size) | ||
| 21 | + e = size; | ||
| 22 | + | ||
| 23 | + if (s > size) | ||
| 24 | + return rs; | ||
| 25 | + | ||
| 26 | + for (; s < e; s++) { | ||
| 27 | + rs.add(all.get(s)); | ||
| 28 | + } | ||
| 29 | + return rs; | ||
| 30 | + } | ||
| 31 | +} |
src/main/java/com/bsth/entity/directive/D80.java
| 1 | package com.bsth.entity.directive; | 1 | package com.bsth.entity.directive; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.directive.DC0.DC0Data; | 3 | import com.bsth.entity.directive.DC0.DC0Data; |
| 4 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 4 | 5 | ||
| 5 | import javax.persistence.*; | 6 | import javax.persistence.*; |
| 6 | import java.util.Date; | 7 | import java.util.Date; |
| @@ -65,6 +66,18 @@ public class D80 { | @@ -65,6 +66,18 @@ public class D80 { | ||
| 65 | 66 | ||
| 66 | private Long schId; | 67 | private Long schId; |
| 67 | 68 | ||
| 69 | + @Transient | ||
| 70 | + @JsonIgnore | ||
| 71 | + private String lineId; | ||
| 72 | + | ||
| 73 | + @Transient | ||
| 74 | + @JsonIgnore | ||
| 75 | + private String nbbm; | ||
| 76 | + | ||
| 77 | + @Transient | ||
| 78 | + @JsonIgnore | ||
| 79 | + private Short requestCode; | ||
| 80 | + | ||
| 68 | public Long getSchId() { | 81 | public Long getSchId() { |
| 69 | return schId; | 82 | return schId; |
| 70 | } | 83 | } |
| @@ -73,6 +86,30 @@ public class D80 { | @@ -73,6 +86,30 @@ public class D80 { | ||
| 73 | this.schId = schId; | 86 | this.schId = schId; |
| 74 | } | 87 | } |
| 75 | 88 | ||
| 89 | + public String getLineId() { | ||
| 90 | + return data.lineId; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public String getNbbm() { | ||
| 94 | + return data.nbbm; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public void setLineId(String lineId) { | ||
| 98 | + this.lineId = lineId; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public void setNbbm(String nbbm) { | ||
| 102 | + this.nbbm = nbbm; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public Short getRequestCode() { | ||
| 106 | + return requestCode; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setRequestCode(Short requestCode) { | ||
| 110 | + this.requestCode = requestCode; | ||
| 111 | + } | ||
| 112 | + | ||
| 76 | @Embeddable | 113 | @Embeddable |
| 77 | public static class D80Data { | 114 | public static class D80Data { |
| 78 | 115 |
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
| @@ -11,6 +11,8 @@ import com.bsth.data.gpsdata.GpsEntity; | @@ -11,6 +11,8 @@ import com.bsth.data.gpsdata.GpsEntity; | ||
| 11 | import com.bsth.data.gpsdata.GpsRealData; | 11 | import com.bsth.data.gpsdata.GpsRealData; |
| 12 | import com.bsth.data.pilot80.PilotReport; | 12 | import com.bsth.data.pilot80.PilotReport; |
| 13 | import com.bsth.data.schedule.DayOfSchedule; | 13 | import com.bsth.data.schedule.DayOfSchedule; |
| 14 | +import com.bsth.data.utils.ListFilterUtils; | ||
| 15 | +import com.bsth.data.utils.ListPageQueryUtils; | ||
| 14 | import com.bsth.entity.directive.*; | 16 | import com.bsth.entity.directive.*; |
| 15 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 17 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 16 | import com.bsth.entity.sys.SysUser; | 18 | import com.bsth.entity.sys.SysUser; |
| @@ -110,8 +112,11 @@ public class DirectiveServiceImpl extends BaseServiceImpl<D60, Integer> implemen | @@ -110,8 +112,11 @@ public class DirectiveServiceImpl extends BaseServiceImpl<D60, Integer> implemen | ||
| 110 | logger.warn("烂班不允许发送调度指令...."); | 112 | logger.warn("烂班不允许发送调度指令...."); |
| 111 | return -1; | 113 | return -1; |
| 112 | } | 114 | } |
| 115 | + | ||
| 116 | + //待发应到时间 | ||
| 117 | + String dfsj = fmtHHmm.print(sch.getDfsjT() + (sch.getBcsj() * 60 * 1000)); | ||
| 113 | String text = "您已完成" + finish + "个班次,下一发车时间" + fmtHHmm_CN.print(sch.getDfsjT()) + ",由" | 118 | String text = "您已完成" + finish + "个班次,下一发车时间" + fmtHHmm_CN.print(sch.getDfsjT()) + ",由" |
| 114 | - + sch.getQdzName() + "发往" + sch.getZdzName() + ";应到 " + sch.getZdsj(); | 119 | + + sch.getQdzName() + "发往" + sch.getZdzName() + ";应到 " + dfsj; |
| 115 | 120 | ||
| 116 | if(sch.getBcType().equals("venting")){ | 121 | if(sch.getBcType().equals("venting")){ |
| 117 | text += " (直放)"; | 122 | text += " (直放)"; |
| @@ -445,7 +450,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl<D60, Integer> implemen | @@ -445,7 +450,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl<D60, Integer> implemen | ||
| 445 | 450 | ||
| 446 | @Override | 451 | @Override |
| 447 | public Map<String, Object> findAll80(Map<String, Object> map, int page, int size) { | 452 | public Map<String, Object> findAll80(Map<String, Object> map, int page, int size) { |
| 448 | - List<D80> d80s = new ArrayList<>(); | 453 | + /*List<D80> d80s = new ArrayList<>(); |
| 449 | 454 | ||
| 450 | Object nbbm = map.get("nbbm"); | 455 | Object nbbm = map.get("nbbm"); |
| 451 | if (null != nbbm && StringUtils.isNotEmpty(nbbm.toString())) { | 456 | if (null != nbbm && StringUtils.isNotEmpty(nbbm.toString())) { |
| @@ -489,8 +494,25 @@ public class DirectiveServiceImpl extends BaseServiceImpl<D60, Integer> implemen | @@ -489,8 +494,25 @@ public class DirectiveServiceImpl extends BaseServiceImpl<D60, Integer> implemen | ||
| 489 | Map<String, Object> rsMap = new HashMap<>(); | 494 | Map<String, Object> rsMap = new HashMap<>(); |
| 490 | rsMap.put("list", rs); | 495 | rsMap.put("list", rs); |
| 491 | rsMap.put("totalPages", count % size == 0 ? count / size - 1 : count / size); | 496 | rsMap.put("totalPages", count % size == 0 ? count / size - 1 : count / size); |
| 492 | - rsMap.put("page", page); | 497 | + rsMap.put("page", page);*/ |
| 493 | 498 | ||
| 499 | + List all = ListFilterUtils.filter(pilotReport.findAll(), map, D80.class); | ||
| 500 | + //排序 | ||
| 501 | + Collections.sort(all, new Comparator<D80>() { | ||
| 502 | + @Override | ||
| 503 | + public int compare(D80 o1, D80 o2) { | ||
| 504 | + return (int) (o2.getTimestamp() - o1.getTimestamp()); | ||
| 505 | + } | ||
| 506 | + }); | ||
| 507 | + List<D80> d80s = ListPageQueryUtils.paging(all, page, size); | ||
| 508 | + //时间格式化 | ||
| 509 | + for (D80 d80 : d80s) { | ||
| 510 | + d80.setTimeStr(fmtHHmm.print(d80.getTimestamp())); | ||
| 511 | + } | ||
| 512 | + Map<String, Object> rsMap = new HashMap<>(); | ||
| 513 | + rsMap.put("list", d80s); | ||
| 514 | + rsMap.put("totalPages", all.size() % size == 0 ? all.size() / size - 1: all.size() / size); | ||
| 515 | + rsMap.put("page", page); | ||
| 494 | return rsMap; | 516 | return rsMap; |
| 495 | } | 517 | } |
| 496 | 518 |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| @@ -593,7 +593,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -593,7 +593,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 593 | while (it.hasNext()) { | 593 | while (it.hasNext()) { |
| 594 | ChildTaskPlan childTaskPlan = it.next(); | 594 | ChildTaskPlan childTaskPlan = it.next(); |
| 595 | if (childTaskPlan.getMileageType().equals("service") | 595 | if (childTaskPlan.getMileageType().equals("service") |
| 596 | - && "正常".equals(childTaskPlan.getType1())) { | 596 | + && "正常".equals(childTaskPlan.getType1()) |
| 597 | + && childTaskPlan.getCcId()==null) { | ||
| 597 | if (!childTaskPlan.isDestroy()) { | 598 | if (!childTaskPlan.isDestroy()) { |
| 598 | Float jhgl = childTaskPlan.getMileage() == null ? 0 | 599 | Float jhgl = childTaskPlan.getMileage() == null ? 0 |
| 599 | : childTaskPlan.getMileage(); | 600 | : childTaskPlan.getMileage(); |
| @@ -769,7 +770,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -769,7 +770,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 769 | xxkzgf=0,xxkwgf=0,xxm=0,xxmzgf=0,xxmwgf=0; | 770 | xxkzgf=0,xxkwgf=0,xxm=0,xxmzgf=0,xxmwgf=0; |
| 770 | for (int i = 0; i < lists.size(); i++) { | 771 | for (int i = 0; i < lists.size(); i++) { |
| 771 | ScheduleRealInfo s=lists.get(i); | 772 | ScheduleRealInfo s=lists.get(i); |
| 772 | - if(s.getFcsjActual()!=null){ | 773 | + if(s.getFcsjActual()!=null && !s.isCcService() |
| 774 | + && !isInOut(s)){ | ||
| 773 | String xlDir=s.getXlDir(); | 775 | String xlDir=s.getXlDir(); |
| 774 | String fcsjs=s.getFcsj(); | 776 | String fcsjs=s.getFcsj(); |
| 775 | String[] fcsjStr = fcsjs.split(":"); | 777 | String[] fcsjStr = fcsjs.split(":"); |
| @@ -779,7 +781,6 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -779,7 +781,6 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 779 | long fcsjActual = Long.parseLong(fcsjActualsStr[0]) * 60 + Long.parseLong(fcsjActualsStr[1]); | 781 | long fcsjActual = Long.parseLong(fcsjActualsStr[0]) * 60 + Long.parseLong(fcsjActualsStr[1]); |
| 780 | 782 | ||
| 781 | if("0".equals(xlDir)){ | 783 | if("0".equals(xlDir)){ |
| 782 | - | ||
| 783 | if(fcsj-fcsjActual>1){ | 784 | if(fcsj-fcsjActual>1){ |
| 784 | sxk++; | 785 | sxk++; |
| 785 | if(fcsj>zgf1&&fcsj<zgf2) | 786 | if(fcsj>zgf1&&fcsj<zgf2) |
src/main/java/com/bsth/service/report/impl/SheetServiceImpl.java
| @@ -80,6 +80,9 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -80,6 +80,9 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 80 | if(s.getBcType().equals("ldks")){ | 80 | if(s.getBcType().equals("ldks")){ |
| 81 | fage=true; | 81 | fage=true; |
| 82 | } | 82 | } |
| 83 | + if(s.isCcService()){ | ||
| 84 | + fage=true; | ||
| 85 | + } | ||
| 83 | 86 | ||
| 84 | return fage; | 87 | return fage; |
| 85 | } | 88 | } |
src/main/resources/static/real_control_v2/alone_page/home/home_wrap.html
| @@ -44,6 +44,7 @@ | @@ -44,6 +44,7 @@ | ||
| 44 | 44 | ||
| 45 | #main-tab-content{ | 45 | #main-tab-content{ |
| 46 | padding: 0 !important; | 46 | padding: 0 !important; |
| 47 | + list-style: none; | ||
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | .home-panel{ | 50 | .home-panel{ |
| @@ -99,6 +100,8 @@ | @@ -99,6 +100,8 @@ | ||
| 99 | <script src="/assets/js/d3.min.js"></script> | 100 | <script src="/assets/js/d3.min.js"></script> |
| 100 | <!-- EventProxy --> | 101 | <!-- EventProxy --> |
| 101 | <script src="/assets/js/eventproxy.js"></script> | 102 | <script src="/assets/js/eventproxy.js"></script> |
| 103 | +<!-- Geolib --> | ||
| 104 | +<script src="/real_control_v2/geolib/geolib.js" merge="plugins"></script> | ||
| 102 | 105 | ||
| 103 | <script> | 106 | <script> |
| 104 | 107 |
src/main/resources/static/real_control_v2/css/home.css
| @@ -125,6 +125,7 @@ | @@ -125,6 +125,7 @@ | ||
| 125 | line-height: 25px; | 125 | line-height: 25px; |
| 126 | font-size: 13px; | 126 | font-size: 13px; |
| 127 | padding: 0 0 3px; | 127 | padding: 0 0 3px; |
| 128 | + position: relative; | ||
| 128 | } | 129 | } |
| 129 | 130 | ||
| 130 | .data-wrap .data-title span.data-title-text { | 131 | .data-wrap .data-title span.data-title-text { |
| @@ -326,4 +327,13 @@ span.signal-state-speed-limit{ | @@ -326,4 +327,13 @@ span.signal-state-speed-limit{ | ||
| 326 | #send-phrase-multi-modal .tools>span{ | 327 | #send-phrase-multi-modal .tools>span{ |
| 327 | cursor: pointer; | 328 | cursor: pointer; |
| 328 | margin-left: 12px; | 329 | margin-left: 12px; |
| 330 | +} | ||
| 331 | + | ||
| 332 | +.device_list_filter_icon{ | ||
| 333 | + position: absolute; | ||
| 334 | + right: 15px; | ||
| 335 | +} | ||
| 336 | + | ||
| 337 | +.device_list_filter_icon.online{ | ||
| 338 | + | ||
| 329 | } | 339 | } |
| 330 | \ No newline at end of file | 340 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
| @@ -42,9 +42,9 @@ | @@ -42,9 +42,9 @@ | ||
| 42 | <div class="uk-grid"> | 42 | <div class="uk-grid"> |
| 43 | <div class="uk-width-1-1"> | 43 | <div class="uk-width-1-1"> |
| 44 | <div class="uk-form-row ct-stacked"> | 44 | <div class="uk-form-row ct-stacked"> |
| 45 | - <label class="uk-form-label" for="form-s-t">备注<small class="font-danger">(不超过20个字符)</small></label> | 45 | + <label class="uk-form-label" for="form-s-t">备注<small class="font-danger">(不超过50个字符)</small></label> |
| 46 | <div class="uk-form-controls"> | 46 | <div class="uk-form-controls"> |
| 47 | - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" >{{remarks}}</textarea> | 47 | + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="50" >{{remarks}}</textarea> |
| 48 | </div> | 48 | </div> |
| 49 | </div> | 49 | </div> |
| 50 | </div> | 50 | </div> |
| @@ -167,8 +167,7 @@ | @@ -167,8 +167,7 @@ | ||
| 167 | if(sch.bcType == 'in' || sch.bcType == 'out') | 167 | if(sch.bcType == 'in' || sch.bcType == 'out') |
| 168 | return; | 168 | return; |
| 169 | 169 | ||
| 170 | - //重置类型,等待调整界面触发刷新事件 | ||
| 171 | - $(this).val(sch.bcType); | 170 | + |
| 172 | var url, detailModal; | 171 | var url, detailModal; |
| 173 | if(type=='venting'){ | 172 | if(type=='venting'){ |
| 174 | url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; | 173 | url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; |
| @@ -181,6 +180,8 @@ | @@ -181,6 +180,8 @@ | ||
| 181 | else | 180 | else |
| 182 | return; | 181 | return; |
| 183 | 182 | ||
| 183 | + //重置类型,等待调整界面触发刷新事件 | ||
| 184 | + $(this).val(sch.bcType); | ||
| 184 | $.get(url, function(htmlStr){ | 185 | $.get(url, function(htmlStr){ |
| 185 | $(document.body).append(htmlStr); | 186 | $(document.body).append(htmlStr); |
| 186 | 187 | ||
| @@ -194,9 +195,9 @@ | @@ -194,9 +195,9 @@ | ||
| 194 | */ | 195 | */ |
| 195 | $('[name=bcType]', modal).mousedown(function () { | 196 | $('[name=bcType]', modal).mousedown(function () { |
| 196 | this.sindex = $(this)[0].selectedIndex; | 197 | this.sindex = $(this)[0].selectedIndex; |
| 197 | - $(this)[0].selectedIndex = 0; | 198 | + $(this)[0].selectedIndex = -1; |
| 198 | }).mouseout(function () { | 199 | }).mouseout(function () { |
| 199 | - if ($(this)[0].selectedIndex === 0) { | 200 | + if ($(this)[0].selectedIndex === -1) { |
| 200 | $(this)[0].selectedIndex = this.sindex; | 201 | $(this)[0].selectedIndex = this.sindex; |
| 201 | } | 202 | } |
| 202 | }); | 203 | }); |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
| @@ -270,17 +270,19 @@ | @@ -270,17 +270,19 @@ | ||
| 270 | if(sch.bcType == 'in' || sch.bcType == 'out') | 270 | if(sch.bcType == 'in' || sch.bcType == 'out') |
| 271 | return; | 271 | return; |
| 272 | 272 | ||
| 273 | - //重置类型,等待调整界面触发刷新事件 | ||
| 274 | - $(this).val(sch.bcType); | ||
| 275 | var url, detailModal; | 273 | var url, detailModal; |
| 276 | if(type=='venting'){ | 274 | if(type=='venting'){ |
| 277 | url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; | 275 | url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; |
| 278 | detailModal='#bctype-venting-modal'; | 276 | detailModal='#bctype-venting-modal'; |
| 279 | } | 277 | } |
| 280 | - else{ | 278 | + else if(type=='major'){ |
| 281 | detailModal='#bctype-major-modal'; | 279 | detailModal='#bctype-major-modal'; |
| 282 | url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html'; | 280 | url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html'; |
| 283 | } | 281 | } |
| 282 | + else return; | ||
| 283 | + | ||
| 284 | + //重置类型,等待调整界面触发刷新事件 | ||
| 285 | + $(this).val(sch.bcType); | ||
| 284 | 286 | ||
| 285 | $.get(url, function(htmlStr){ | 287 | $.get(url, function(htmlStr){ |
| 286 | $(document.body).append(htmlStr); | 288 | $(document.body).append(htmlStr); |
| @@ -295,9 +297,9 @@ | @@ -295,9 +297,9 @@ | ||
| 295 | */ | 297 | */ |
| 296 | $('select[name=bcType]', modal).mousedown(function () { | 298 | $('select[name=bcType]', modal).mousedown(function () { |
| 297 | this.sindex = $(this)[0].selectedIndex; | 299 | this.sindex = $(this)[0].selectedIndex; |
| 298 | - $(this)[0].selectedIndex = 0; | 300 | + $(this)[0].selectedIndex = -1; |
| 299 | }).mouseout(function () { | 301 | }).mouseout(function () { |
| 300 | - if ($(this)[0].selectedIndex === 0) { | 302 | + if ($(this)[0].selectedIndex === -1) { |
| 301 | $(this)[0].selectedIndex = this.sindex; | 303 | $(this)[0].selectedIndex = this.sindex; |
| 302 | } | 304 | } |
| 303 | }); | 305 | }); |
src/main/resources/static/real_control_v2/fragments/north/nav/report_80.html
| @@ -12,8 +12,12 @@ | @@ -12,8 +12,12 @@ | ||
| 12 | </legend> | 12 | </legend> |
| 13 | <span class="horizontal-field">请求代码</span> | 13 | <span class="horizontal-field">请求代码</span> |
| 14 | <select name="requestCode"> | 14 | <select name="requestCode"> |
| 15 | - <option value="-1">全部</option> | 15 | + <option value="">全部</option> |
| 16 | </select> | 16 | </select> |
| 17 | + <span class="horizontal-field">线路</span> | ||
| 18 | + <div class="uk-autocomplete uk-form autocomplete-line" > | ||
| 19 | + <input type="text" name="lineId" placeholder="线路"> | ||
| 20 | + </div> | ||
| 17 | <span class="horizontal-field">车辆</span> | 21 | <span class="horizontal-field">车辆</span> |
| 18 | <div class="uk-autocomplete uk-form autocomplete-cars" > | 22 | <div class="uk-autocomplete uk-form autocomplete-cars" > |
| 19 | <input type="text" name="nbbm" placeholder="车辆自编号"> | 23 | <input type="text" name="nbbm" placeholder="车辆自编号"> |
| @@ -84,9 +88,9 @@ | @@ -84,9 +88,9 @@ | ||
| 84 | } | 88 | } |
| 85 | $('[name=requestCode]', modal).append(opt); | 89 | $('[name=requestCode]', modal).append(opt); |
| 86 | //车辆 autocomplete | 90 | //车辆 autocomplete |
| 87 | - $.get('/basic/cars', function(rs) { | ||
| 88 | - gb_common.carAutocomplete($('.autocomplete-cars', modal), rs); | ||
| 89 | - }); | 91 | + gb_common.carAutocomplete($('.autocomplete-cars', modal), gb_data_basic.carsArray()); |
| 92 | + //线路 autocomplete | ||
| 93 | + gb_common.lineAutocomplete($('.autocomplete-line', modal)); | ||
| 90 | query(); | 94 | query(); |
| 91 | }); | 95 | }); |
| 92 | 96 | ||
| @@ -102,6 +106,12 @@ | @@ -102,6 +106,12 @@ | ||
| 102 | var data = form.serializeJSON(); | 106 | var data = form.serializeJSON(); |
| 103 | data.page = page; | 107 | data.page = page; |
| 104 | data.size = pageSize; | 108 | data.size = pageSize; |
| 109 | + //线路转换成编码 | ||
| 110 | + if(data.lineId){ | ||
| 111 | + var lineCode = gb_data_basic.findCodeByLinename(data.lineId); | ||
| 112 | + if(lineCode) | ||
| 113 | + data.lineId=lineCode; | ||
| 114 | + } | ||
| 105 | $.get('/directive/findAll80', data, function(rs) { | 115 | $.get('/directive/findAll80', data, function(rs) { |
| 106 | $.each(rs.list, function(){ | 116 | $.each(rs.list, function(){ |
| 107 | //命令字转中文 | 117 | //命令字转中文 |
| @@ -122,7 +132,7 @@ | @@ -122,7 +132,7 @@ | ||
| 122 | if (resetPagination) | 132 | if (resetPagination) |
| 123 | pagination(rs.totalPages + 1, rs.page); | 133 | pagination(rs.totalPages + 1, rs.page); |
| 124 | }) | 134 | }) |
| 125 | - } | 135 | + }; |
| 126 | 136 | ||
| 127 | var resetPagination = true; | 137 | var resetPagination = true; |
| 128 | var pagination = function(pages, currentPage) { | 138 | var pagination = function(pages, currentPage) { |