Commit af3890cb14b6b30799709caca38554f9530774ab
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
4 changed files
with
415 additions
and
388 deletions
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| ... | ... | @@ -37,6 +37,8 @@ import java.sql.ResultSet; |
| 37 | 37 | import java.text.DecimalFormat; |
| 38 | 38 | import java.text.SimpleDateFormat; |
| 39 | 39 | import java.util.*; |
| 40 | +import java.util.regex.Pattern; | |
| 41 | + | |
| 40 | 42 | /** |
| 41 | 43 | * |
| 42 | 44 | * @ClassName: TrafficManageServiceImpl(运管处接口service业务层实现类) |
| ... | ... | @@ -299,6 +301,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 299 | 301 | */ |
| 300 | 302 | public String setLD(){ |
| 301 | 303 | String result = "failure"; |
| 304 | + Line line; | |
| 302 | 305 | // 取昨天 的日期 |
| 303 | 306 | String date = sdfnyr.format(DateUtils.addDays(new Date(), -1)); |
| 304 | 307 | StringBuffer sf = new StringBuffer(); |
| ... | ... | @@ -312,6 +315,11 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 312 | 315 | //根据车辆自编号查询车牌号 |
| 313 | 316 | map.put("insideCode_eq", schRealInfo.getClZbh()); |
| 314 | 317 | Cars car = carsRepository.findOne(new CustomerSpecs<Cars>(map)); |
| 318 | + // 获取线路是否使用标识,如果未使用,则不查该线路数据 | |
| 319 | + line = lineRepository.findByLineCode(schRealInfo.getXlBm()); | |
| 320 | + if(line.getInUse() == null || line.getInUse() == 0){ | |
| 321 | + continue; | |
| 322 | + } | |
| 315 | 323 | sf.append("<DLD>"); |
| 316 | 324 | sf.append("<RQ>"+schRealInfo.getScheduleDateStr()+"</RQ>"); |
| 317 | 325 | sf.append("<XLBM>"+BasicData.lineCode2ShangHaiCodeMap.get(schRealInfo.getXlBm())+"</XLBM>"); |
| ... | ... | @@ -557,14 +565,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 557 | 565 | @Override |
| 558 | 566 | public String setJHBC() { |
| 559 | 567 | String result = "failure"; |
| 568 | + Line line; | |
| 560 | 569 | StringBuffer sBuffer =new StringBuffer(); |
| 561 | 570 | try { |
| 562 | 571 | sBuffer.append("<JHBCs>"); |
| 563 | 572 | // 声明变量 |
| 564 | - SchedulePlanInfo schedulePlanInfo = null; | |
| 565 | - String xlbm = "",zbh = ""; | |
| 573 | + SchedulePlanInfo schedulePlanInfo; | |
| 574 | + String xlbm,zbh = ""; | |
| 566 | 575 | Long lp = 0L; |
| 567 | - int startSerialNum = 0,endSerialNum = 0;; | |
| 568 | 576 | // 取明天的日期 |
| 569 | 577 | String tomorrow = sdfnyr.format(DateUtils.addDays(new Date(), +1)); |
| 570 | 578 | // 查询所有班次 |
| ... | ... | @@ -573,8 +581,13 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 573 | 581 | int size = schedulePlanList.size(); |
| 574 | 582 | for (int i = 0; i < size; i++) { |
| 575 | 583 | schedulePlanInfo = schedulePlanList.get(i); |
| 584 | + xlbm = schedulePlanInfo.getXlBm(); | |
| 585 | + // 获取线路是否使用标识,如果未使用,则不查该线路数据 | |
| 586 | + line = lineRepository.findByLineCode(xlbm); | |
| 587 | + if(line.getInUse() == null || line.getInUse() == 0){ | |
| 588 | + continue; | |
| 589 | + } | |
| 576 | 590 | if(i == 0){// 第一次,则初始化值 |
| 577 | - xlbm = schedulePlanInfo.getXlBm(); | |
| 578 | 591 | zbh = schedulePlanInfo.getClZbh(); |
| 579 | 592 | lp = schedulePlanInfo.getLp(); |
| 580 | 593 | // 拼装XML |
| ... | ... | @@ -605,18 +618,28 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 605 | 618 | sBuffer.append("</JHBC>"); |
| 606 | 619 | } |
| 607 | 620 | }else{ |
| 608 | - xlbm = schedulePlanInfo.getXlBm(); | |
| 609 | 621 | zbh = schedulePlanInfo.getClZbh(); |
| 610 | 622 | lp = schedulePlanInfo.getLp(); |
| 611 | 623 | sBuffer.append("</BCList>"); |
| 612 | 624 | sBuffer.append("</JHBC>"); |
| 613 | - startSerialNum = 0; | |
| 614 | - endSerialNum = 0; | |
| 615 | 625 | // 拼装XML |
| 616 | 626 | assembleJHBC(sBuffer, schedulePlanInfo, xlbm, zbh, lp); |
| 617 | 627 | } |
| 618 | 628 | } |
| 619 | 629 | } |
| 630 | + // 判断XML是否以</BCList>结尾,如果不是,则加上 | |
| 631 | + String regex = "^*</JHBC>$"; | |
| 632 | + Pattern p = Pattern.compile(regex); | |
| 633 | + java.util.regex.Matcher m = p.matcher(sBuffer); | |
| 634 | + boolean isEndWithTrueFlag = false; | |
| 635 | + while (m.find()) { | |
| 636 | + isEndWithTrueFlag = true; | |
| 637 | + } | |
| 638 | + // 加上缺失的标签 | |
| 639 | + if(!isEndWithTrueFlag){ | |
| 640 | + sBuffer.append("</BCList>"); | |
| 641 | + sBuffer.append("</JHBC>"); | |
| 642 | + } | |
| 620 | 643 | sBuffer.append("</JHBCs>"); |
| 621 | 644 | if(ssop.setJHBC(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 622 | 645 | result = "success"; |
| ... | ... | @@ -643,7 +666,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 643 | 666 | StringBuffer sBufferA; |
| 644 | 667 | StringBuffer sBufferB; |
| 645 | 668 | TTInfo ttInfo; |
| 646 | - TTInfoDetail ttInfoDetail = null; | |
| 669 | + TTInfoDetail ttInfoDetail; | |
| 647 | 670 | Iterator<TTInfoDetail> ttInfoDetailIterator; |
| 648 | 671 | HashMap<String,Object> param = new HashMap<String, Object>(); |
| 649 | 672 | String lineCode ; |
| ... | ... | @@ -1027,6 +1050,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1027 | 1050 | company = "浦东金高公交公司"; |
| 1028 | 1051 | }else if(company.equals("南汇公司")){ |
| 1029 | 1052 | company = "浦东南汇公交公司"; |
| 1053 | + }else if(company.equals("青浦公交")){ | |
| 1054 | + company = "浦东青浦公交公司"; | |
| 1030 | 1055 | } |
| 1031 | 1056 | } |
| 1032 | 1057 | /** | ... | ... |
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
| ... | ... | @@ -52,14 +52,14 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements |
| 52 | 52 | // TODO Auto-generated catch block |
| 53 | 53 | e.printStackTrace(); |
| 54 | 54 | } |
| 55 | - if(map.get("gsdm_in")!=null){ | |
| 55 | + /*if(map.get("gsdm_in")!=null){ | |
| 56 | 56 | map.put("ssgsdm_in", map.get("gsdm_in")); |
| 57 | 57 | map.remove("gsdm_in"); |
| 58 | 58 | |
| 59 | 59 | }else{ |
| 60 | 60 | map.put("ssgsdm_like", map.get("gsdm_like")); |
| 61 | 61 | map.remove("gsdm_like"); |
| 62 | - } | |
| 62 | + }*/ | |
| 63 | 63 | |
| 64 | 64 | //根具条件查询指定日期Ylb的数据 |
| 65 | 65 | List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); | ... | ... |
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
| ... | ... | @@ -46,7 +46,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 46 | 46 | if(company.length() != 0) |
| 47 | 47 | sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; |
| 48 | 48 | |
| 49 | - list =jdbcTemplate.query(sql, | |
| 49 | + list = jdbcTemplate.query(sql, | |
| 50 | 50 | new RowMapper<ScheduleRealInfo>(){ |
| 51 | 51 | @Override |
| 52 | 52 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -117,7 +117,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 117 | 117 | sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - list =jdbcTemplate.query(sql, | |
| 120 | + list = jdbcTemplate.query(sql, | |
| 121 | 121 | new RowMapper<SchedulePlanInfo>(){ |
| 122 | 122 | @Override |
| 123 | 123 | public SchedulePlanInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -362,13 +362,15 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 362 | 362 | } |
| 363 | 363 | ScheduleRealInfo shouban = tempList.get(0); |
| 364 | 364 | ScheduleRealInfo moban = tempList.get(tempList.size() - 1); |
| 365 | +// System.out.println(shouban.getFcsjActual() + "-首班-" + shouban.getFcsj()); | |
| 366 | +// System.out.println(moban.getFcsjActual() + "-末班-" + moban.getFcsj()); | |
| 367 | + jhsb++; | |
| 365 | 368 | if(shouban.getFcsjActual() != null){ |
| 366 | - jhsb++; | |
| 367 | 369 | if(shouban.getFcsjActualTime() - shouban.getFcsjT() >= -60000 && shouban.getFcsjActualTime() - shouban.getFcsjT() <= 180000) |
| 368 | 370 | sjsb++; |
| 369 | 371 | } |
| 372 | + jhmb++; | |
| 370 | 373 | if(moban.getFcsjActual() != null){ |
| 371 | - jhmb++; | |
| 372 | 374 | if(moban.getFcsjActualTime() - moban.getFcsjT() >= -60000 && moban.getFcsjActualTime() - moban.getFcsjT() <= 180000) |
| 373 | 375 | sjmb++; |
| 374 | 376 | } |
| ... | ... | @@ -452,7 +454,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 452 | 454 | } |
| 453 | 455 | sql += " and bc_type = 'normal'"; |
| 454 | 456 | |
| 455 | - list =jdbcTemplate.query(sql, | |
| 457 | + list = jdbcTemplate.query(sql, | |
| 456 | 458 | new RowMapper<ScheduleRealInfo>(){ |
| 457 | 459 | @Override |
| 458 | 460 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_inpark.html
| 1 | -<div class="uk-modal" id="add-sub-task-inpark-modal"> | |
| 2 | - <div class="uk-modal-dialog"> | |
| 3 | - <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | - <div class="uk-modal-header"> | |
| 5 | - <h2>回场子任务</h2></div> | |
| 6 | - | |
| 7 | - <div style="width: 100%;padding-left: 1%;"> | |
| 8 | - <div class="sub-task-card"> | |
| 9 | - <div class="uk-panel uk-panel-box uk-panel-box-primary"> | |
| 10 | - <div class="uk-panel-badge uk-badge">营运</div> | |
| 11 | - <h3 class="uk-panel-title">线路上站点间</h3> | |
| 12 | - <form class="uk-form uk-form-horizontal" service_form> | |
| 13 | - <div class="uk-grid"> | |
| 14 | - <div class="uk-width-3-10"> | |
| 15 | - <div class="uk-form-row"> | |
| 16 | - <label class="uk-form-label">起点 </label> | |
| 17 | - </div> | |
| 18 | - </div> | |
| 19 | - <div class="uk-width-7-10 pl5"> | |
| 20 | - <select name="startStation" disabled></select> | |
| 21 | - </div> | |
| 22 | - </div> | |
| 23 | - <div class="uk-grid"> | |
| 24 | - <div class="uk-width-3-10"> | |
| 25 | - <div class="uk-form-row"> | |
| 26 | - <label class="uk-form-label">终点 </label> | |
| 27 | - </div> | |
| 28 | - </div> | |
| 29 | - <div class="uk-width-7-10 pl5"> | |
| 30 | - <select name="endStation" class="ct_focus"></select> | |
| 31 | - </div> | |
| 32 | - </div> | |
| 33 | - <div class="uk-grid"> | |
| 34 | - <div class="uk-width-3-10"> | |
| 35 | - <div class="uk-form-row"> | |
| 36 | - <label class="uk-form-label">营运里程</label> | |
| 37 | - </div> | |
| 38 | - </div> | |
| 39 | - <div class="uk-width-7-10 pl5"> | |
| 40 | - <input type="text" name="mileageType" required> | |
| 41 | - </div> | |
| 42 | - </div> | |
| 43 | - <div class="uk-grid"> | |
| 44 | - <div class="uk-width-3-10"> | |
| 45 | - <div class="uk-form-row"> | |
| 46 | - <label class="uk-form-label">开始时间</label> | |
| 47 | - </div> | |
| 48 | - </div> | |
| 49 | - <div class="uk-width-7-10 pl5"> | |
| 50 | - <input type="time" name="startDate" required> | |
| 51 | - </div> | |
| 52 | - </div> | |
| 53 | - <div class="uk-grid"> | |
| 54 | - <div class="uk-width-3-10"> | |
| 55 | - <div class="uk-form-row"> | |
| 56 | - <label class="uk-form-label">结束时间</label> | |
| 57 | - </div> | |
| 58 | - </div> | |
| 59 | - <div class="uk-width-7-10 pl5"> | |
| 60 | - <input type="time" name="endDate" required> | |
| 61 | - </div> | |
| 62 | - </div> | |
| 63 | - </form> | |
| 64 | - </div> | |
| 65 | - </div> | |
| 66 | - <div class="sub-task-card"> | |
| 67 | - <div class="uk-panel uk-panel-box uk-panel-box-secondary"> | |
| 68 | - <div class="uk-panel-badge uk-badge uk-badge-default">空驶</div> | |
| 69 | - <h3 class="uk-panel-title">进场</h3> | |
| 70 | - <form class="uk-form uk-form-horizontal" empty_form> | |
| 71 | - <div class="uk-grid"> | |
| 72 | - <div class="uk-width-3-10"> | |
| 73 | - <div class="uk-form-row"> | |
| 74 | - <label class="uk-form-label">起点 </label> | |
| 75 | - </div> | |
| 76 | - </div> | |
| 77 | - <div class="uk-width-7-10 pl5"> | |
| 78 | - <select name="startStation" disabled></select> | |
| 79 | - </div> | |
| 80 | - </div> | |
| 81 | - <div class="uk-grid"> | |
| 82 | - <div class="uk-width-3-10"> | |
| 83 | - <div class="uk-form-row"> | |
| 84 | - <label class="uk-form-label">终点 </label> | |
| 85 | - </div> | |
| 86 | - </div> | |
| 87 | - <div class="uk-width-7-10 pl5"> | |
| 88 | - <select name="endStation" class="ct_focus"></select> | |
| 89 | - </div> | |
| 90 | - </div> | |
| 91 | - <div class="uk-grid"> | |
| 92 | - <div class="uk-width-3-10"> | |
| 93 | - <div class="uk-form-row"> | |
| 94 | - <label class="uk-form-label">空驶里程</label> | |
| 95 | - </div> | |
| 96 | - </div> | |
| 97 | - <div class="uk-width-7-10 pl5"> | |
| 98 | - <input type="text" name="mileageType" required style="width: calc(100% - 62px);"> | |
| 99 | - <a style="font-size: 12px;">路径(3)</a> | |
| 100 | - </div> | |
| 101 | - </div> | |
| 102 | - <div class="uk-grid"> | |
| 103 | - <div class="uk-width-3-10"> | |
| 104 | - <div class="uk-form-row"> | |
| 105 | - <label class="uk-form-label">开始时间</label> | |
| 106 | - </div> | |
| 107 | - </div> | |
| 108 | - <div class="uk-width-7-10 pl5"> | |
| 109 | - <input type="time" name="startDate" required> | |
| 110 | - </div> | |
| 111 | - </div> | |
| 112 | - <div class="uk-grid"> | |
| 113 | - <div class="uk-width-3-10"> | |
| 114 | - <div class="uk-form-row"> | |
| 115 | - <label class="uk-form-label">结束时间</label> | |
| 116 | - </div> | |
| 117 | - </div> | |
| 118 | - <div class="uk-width-7-10 pl5"> | |
| 119 | - <input type="time" name="endDate" required> | |
| 120 | - </div> | |
| 121 | - </div> | |
| 122 | - </form> | |
| 123 | - </div> | |
| 124 | - </div> | |
| 125 | - <div class="sub-task-card destroy-card uk-animation-scale"> | |
| 126 | - <div class="uk-panel uk-panel-box uk-panel-box-danger"> | |
| 127 | - <div class="uk-panel-badge uk-badge uk-badge-danger">烂班</div> | |
| 128 | - <h3 class="uk-panel-title">线路上站点间</h3> | |
| 129 | - <form class="uk-form uk-form-horizontal" destroy_form> | |
| 130 | - <div class="uk-grid"> | |
| 131 | - <div class="uk-width-3-10"> | |
| 132 | - <div class="uk-form-row"> | |
| 133 | - <label class="uk-form-label">起点 </label> | |
| 134 | - </div> | |
| 135 | - </div> | |
| 136 | - <div class="uk-width-7-10 pl5"> | |
| 137 | - <select name="startStation" disabled></select> | |
| 138 | - </div> | |
| 139 | - </div> | |
| 140 | - <div class="uk-grid"> | |
| 141 | - <div class="uk-width-3-10"> | |
| 142 | - <div class="uk-form-row"> | |
| 143 | - <label class="uk-form-label">终点 </label> | |
| 144 | - </div> | |
| 145 | - </div> | |
| 146 | - <div class="uk-width-7-10 pl5"> | |
| 147 | - <select name="endStation" class="ct_focus" disabled></select> | |
| 148 | - </div> | |
| 149 | - </div> | |
| 150 | - <div class="uk-grid"> | |
| 151 | - <div class="uk-width-3-10"> | |
| 152 | - <div class="uk-form-row"> | |
| 153 | - <label class="uk-form-label">烂班里程</label> | |
| 154 | - </div> | |
| 155 | - </div> | |
| 156 | - <div class="uk-width-7-10 pl5"> | |
| 157 | - <input type="text" name="mileageType" required> | |
| 158 | - </div> | |
| 159 | - </div> | |
| 160 | - <div class="uk-grid"> | |
| 161 | - <div class="uk-width-3-10"> | |
| 162 | - <div class="uk-form-row"> | |
| 163 | - <label class="uk-form-label">开始时间</label> | |
| 164 | - </div> | |
| 165 | - </div> | |
| 166 | - <div class="uk-width-7-10 pl5"> | |
| 167 | - <input type="time" name="startDate" required> | |
| 168 | - </div> | |
| 169 | - </div> | |
| 170 | - <div class="uk-grid"> | |
| 171 | - <div class="uk-width-3-10"> | |
| 172 | - <div class="uk-form-row"> | |
| 173 | - <label class="uk-form-label">烂班原因</label> | |
| 174 | - </div> | |
| 175 | - </div> | |
| 176 | - <div class="uk-width-7-10 pl5"> | |
| 177 | - <select name="destroyReason" required></select> | |
| 178 | - </div> | |
| 179 | - </div> | |
| 180 | - </form> | |
| 181 | - </div> | |
| 182 | - </div> | |
| 183 | - | |
| 184 | - <form class="uk-form" style="margin-top: 15px; padding: 0 10px 0 0;"> | |
| 185 | - <textarea placeholder="备注" style="width: 100%;height: 70px;"></textarea> | |
| 186 | - </form> | |
| 187 | - </div> | |
| 188 | - | |
| 189 | - <div class="uk-modal-footer uk-text-right"> | |
| 190 | - <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 191 | - <button type="button" class="uk-button uk-button-primary">提交子任务</button> | |
| 192 | - | |
| 193 | - <div class="ct-footer-left"> | |
| 194 | - <a id="betweenStationRangeCalc" data-drawer-id="station_route_spacing_chart_drawer">站点间公里不准?</a> | |
| 195 | - </div> | |
| 196 | - </div> | |
| 197 | - </div> | |
| 198 | - | |
| 199 | - <div class="ct-bottom-drawer"> | |
| 200 | - <a class="ct-bottom-drawer-close"></a> | |
| 201 | - | |
| 202 | - <div class="ct-bottom-drawer-body"></div> | |
| 203 | - </div> | |
| 204 | - | |
| 205 | - <script id="sub-task-inpark-form-temp" type="text/html"> | |
| 206 | - </script> | |
| 207 | - | |
| 208 | - <script> | |
| 209 | - (function () { | |
| 210 | - var modal = '#add-sub-task-inpark-modal', | |
| 211 | - serviceForm = $('form[service_form]', modal), | |
| 212 | - emptyForm = $('form[empty_form]', modal), | |
| 213 | - destroyForm = $('form[destroy_form]', modal), | |
| 214 | - sch, stationRoutes, parks, information, esCode, timeLocStations; | |
| 215 | - var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他']; | |
| 216 | - $(modal).on('init', function (e, data) { | |
| 217 | - sch = data.sch; | |
| 218 | - //var formHtml = template('sub-task-inpark-form-temp', {sch:sch, adjustExps: adjustExps}); | |
| 219 | - //$('form', modal).html(formHtml); | |
| 220 | - //字典转换 | |
| 221 | - //dictionaryUtils.transformDom($('.nt-dictionary', modal)); | |
| 222 | - | |
| 223 | - //站点路由 | |
| 224 | - stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) { | |
| 225 | - return a.stationRouteCode - b.stationRouteCode; | |
| 226 | - }), 'directions')[sch.xlDir]; | |
| 227 | - //空驶终点(停车场) | |
| 228 | - $.get('/basic/parks', function (rs) { | |
| 229 | - parks = rs; | |
| 230 | - var opts = ''; | |
| 231 | - for (var code in parks) { | |
| 232 | - opts += '<option value="' + code + '">' + parks[code] + '</option>'; | |
| 233 | - } | |
| 234 | - $('select[name=endStation]', emptyForm).html(opts).val(information.carPark); | |
| 235 | - }); | |
| 236 | - //线路标准 | |
| 237 | - information = gb_data_basic.getLineInformation(sch.xlBm); | |
| 238 | - //本地存储的站点耗时 | |
| 239 | - try { | |
| 240 | - timeLocStations = window.localStorage.getItem('control_route_distance_' + sch.xlBm); | |
| 241 | - if (timeLocStations) | |
| 242 | - timeLocStations = JSON.parse(timeLocStations).stations[sch.xlDir == 0 ? 'up' : 'down']; | |
| 243 | - } catch (e) { | |
| 244 | - console.log(e); | |
| 245 | - } | |
| 246 | - | |
| 247 | - //设置默认值 | |
| 248 | - setDefaultVal(); | |
| 249 | - | |
| 250 | - //切换营运终点 | |
| 251 | - $('select[name=endStation]', serviceForm).val(esCode).on('change', function () { | |
| 252 | - var val = $(this).val(); | |
| 253 | - if (val == esCode) { | |
| 254 | - $('.uk-modal-dialog', modal).removeClass('three-children'); | |
| 255 | - $('.sub-task-card.destroy-card').css("display", "none"); | |
| 256 | - } | |
| 257 | - else { | |
| 258 | - $('.uk-modal-dialog', modal).addClass('three-children'); | |
| 259 | - $('.sub-task-card.destroy-card').css("display", "inline-block"); | |
| 260 | - } | |
| 261 | - | |
| 262 | - reClac(); | |
| 263 | - }).trigger('change'); | |
| 264 | - | |
| 265 | - | |
| 266 | - //submit | |
| 267 | - /*var f = $('form', modal).formValidation({ | |
| 268 | - framework: 'uikit', | |
| 269 | - locale: 'zh_CN', | |
| 270 | - }); | |
| 271 | - f.on('success.form.fv', function(e) { | |
| 272 | - disabled_submit_btn(this); | |
| 273 | - e.preventDefault(); | |
| 274 | - var data = $(this).serializeJSON(); | |
| 275 | - | |
| 276 | - });*/ | |
| 277 | - }); | |
| 278 | - | |
| 279 | - function setDefaultVal() { | |
| 280 | - var routeOpts = ''; | |
| 281 | - $.each(stationRoutes, function () { | |
| 282 | - routeOpts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'; | |
| 283 | - }); | |
| 284 | - esCode = stationRoutes[stationRoutes.length - 1].stationCode; | |
| 285 | - | |
| 286 | - //营运起终点 | |
| 287 | - $('select[name=startStation],select[name=endStation]', serviceForm).html(routeOpts); | |
| 288 | - //空驶起点 | |
| 289 | - $('select[name=startStation]', emptyForm).html(routeOpts).val(esCode); | |
| 290 | - //烂班起终点 | |
| 291 | - $('select[name=startStation],select[name=endStation]', destroyForm).html(routeOpts).val(esCode); | |
| 292 | - | |
| 293 | - //烂班原因 | |
| 294 | - var adjustExpsOpts = '<option value="">请选择...</option>'; | |
| 295 | - $.each(adjustExps, function (i, str) { | |
| 296 | - adjustExpsOpts += '<option value="' + str + '">' + str + '</option>'; | |
| 297 | - }); | |
| 298 | - $('select[name=destroyReason]', destroyForm).html(adjustExpsOpts); | |
| 299 | - | |
| 300 | - //营运开始时间 | |
| 301 | - $('input[name=startDate]', serviceForm).val(sch.dfsj); | |
| 302 | - } | |
| 303 | - | |
| 304 | - function reClac() { | |
| 305 | - var serviceEnd = $('select[name=endStation]', serviceForm).val(); | |
| 306 | - //空驶起点 == 营运终点 | |
| 307 | - $('select[name=startStation]', emptyForm).val(serviceEnd); | |
| 308 | - | |
| 309 | - //计算营运里程 | |
| 310 | - var s = $('select[name=startStation]', serviceForm).val(), | |
| 311 | - e = $('select[name=endStation]', serviceForm).val(); | |
| 312 | - var sMileage = calcMileage(s, e); | |
| 313 | - if(sMileage >= 0) | |
| 314 | - $('input[name=mileageType]', serviceForm).val(sMileage); | |
| 315 | - | |
| 316 | - if (serviceEnd != esCode) { | |
| 317 | - //烂班起点 == 营运终点 | |
| 318 | - $('select[name=startStation]', destroyForm).val(serviceEnd); | |
| 319 | - } | |
| 320 | - } | |
| 321 | - | |
| 322 | - function calcMileage(s, e) { | |
| 323 | - var mileage = 0, flag, code; | |
| 324 | - if (timeLocStations) { | |
| 325 | - $.each(timeLocStations, function () { | |
| 326 | - code = this.station.STATION_CODE; | |
| 327 | - if (code == s) { | |
| 328 | - flag = true; | |
| 329 | - } | |
| 330 | - | |
| 331 | - if (flag) | |
| 332 | - mileage += this.toDistance; | |
| 333 | - | |
| 334 | - if (code == e) | |
| 335 | - return false; | |
| 336 | - }); | |
| 337 | - } | |
| 338 | - return mileage / 1000; | |
| 339 | - } | |
| 340 | - | |
| 341 | - | |
| 342 | - //------ 下抽屉 ------ | |
| 343 | - $('#betweenStationRangeCalc', modal).on('click', function () { | |
| 344 | - var id = $(this).data('drawer-id'); | |
| 345 | - switchBtmDrawer(id, '/real_control_v2/fragments/line_schedule/context_menu/sub_task/station_route_spacing_chart.html'); | |
| 346 | - }); | |
| 347 | - | |
| 348 | - var btmDrawer = $('.ct-bottom-drawer', modal); | |
| 349 | - //打开事件 | |
| 350 | - btmDrawer.on('drawer_show', function () { | |
| 351 | - var url = $(this).data('url'); | |
| 352 | - if (!url) { | |
| 353 | - alert('无效的地址'); | |
| 354 | - } | |
| 355 | - | |
| 356 | - var drawerPanel = $(this).data('name'); | |
| 357 | - $('.ct-bottom-drawer-body', btmDrawer).load(url, function () { | |
| 358 | - $('#' + drawerPanel).trigger('drawer-init', {sch: sch}); | |
| 359 | - }); | |
| 360 | - }); | |
| 361 | - | |
| 362 | - function switchBtmDrawer(id, url) { | |
| 363 | - if (btmDrawer.hasClass('open') && btmDrawer.data('name') == id) { | |
| 364 | - btmDrawer.removeClass('open'); | |
| 365 | - btmDrawer.removeData('name').removeData('url'); | |
| 366 | - } | |
| 367 | - else { | |
| 368 | - btmDrawer.addClass('open'); | |
| 369 | - btmDrawer.data('name', id).data('url', url).trigger('drawer_show'); | |
| 370 | - } | |
| 371 | - } | |
| 372 | - })(); | |
| 373 | - </script> | |
| 1 | +<div class="uk-modal" id="add-sub-task-inpark-modal"> | |
| 2 | + <div class="uk-modal-dialog"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <div class="uk-modal-header"> | |
| 5 | + <h2>回场子任务</h2></div> | |
| 6 | + | |
| 7 | + <div style="width: 100%;padding-left: 1%;"> | |
| 8 | + <div class="sub-task-card"> | |
| 9 | + <div class="uk-panel uk-panel-box uk-panel-box-primary"> | |
| 10 | + <div class="uk-panel-badge uk-badge">营运</div> | |
| 11 | + <h3 class="uk-panel-title">线路上站点间</h3> | |
| 12 | + <form class="uk-form uk-form-horizontal" service_form> | |
| 13 | + <div class="uk-grid"> | |
| 14 | + <div class="uk-width-3-10"> | |
| 15 | + <div class="uk-form-row"> | |
| 16 | + <label class="uk-form-label">起点 </label> | |
| 17 | + </div> | |
| 18 | + </div> | |
| 19 | + <div class="uk-width-7-10 pl5"> | |
| 20 | + <select name="startStation" disabled></select> | |
| 21 | + </div> | |
| 22 | + </div> | |
| 23 | + <div class="uk-grid"> | |
| 24 | + <div class="uk-width-3-10"> | |
| 25 | + <div class="uk-form-row"> | |
| 26 | + <label class="uk-form-label">终点 </label> | |
| 27 | + </div> | |
| 28 | + </div> | |
| 29 | + <div class="uk-width-7-10 pl5"> | |
| 30 | + <select name="endStation" class="ct_focus"></select> | |
| 31 | + </div> | |
| 32 | + </div> | |
| 33 | + <div class="uk-grid"> | |
| 34 | + <div class="uk-width-3-10"> | |
| 35 | + <div class="uk-form-row"> | |
| 36 | + <label class="uk-form-label">营运里程</label> | |
| 37 | + </div> | |
| 38 | + </div> | |
| 39 | + <div class="uk-width-7-10 pl5"> | |
| 40 | + <input type="text" name="mileageType" required> | |
| 41 | + </div> | |
| 42 | + </div> | |
| 43 | + <div class="uk-grid"> | |
| 44 | + <div class="uk-width-3-10"> | |
| 45 | + <div class="uk-form-row"> | |
| 46 | + <label class="uk-form-label">开始时间</label> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + <div class="uk-width-7-10 pl5"> | |
| 50 | + <input type="time" name="startDate" required> | |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + <div class="uk-grid"> | |
| 54 | + <div class="uk-width-3-10"> | |
| 55 | + <div class="uk-form-row"> | |
| 56 | + <label class="uk-form-label">结束时间</label> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | + <div class="uk-width-7-10 pl5"> | |
| 60 | + <input type="time" name="endDate" required> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + </form> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + <div class="sub-task-card"> | |
| 67 | + <div class="uk-panel uk-panel-box uk-panel-box-secondary"> | |
| 68 | + <div class="uk-panel-badge uk-badge uk-badge-default">空驶</div> | |
| 69 | + <h3 class="uk-panel-title">进场</h3> | |
| 70 | + <form class="uk-form uk-form-horizontal" empty_form> | |
| 71 | + <div class="uk-grid"> | |
| 72 | + <div class="uk-width-3-10"> | |
| 73 | + <div class="uk-form-row"> | |
| 74 | + <label class="uk-form-label">起点 </label> | |
| 75 | + </div> | |
| 76 | + </div> | |
| 77 | + <div class="uk-width-7-10 pl5"> | |
| 78 | + <select name="startStation" disabled></select> | |
| 79 | + </div> | |
| 80 | + </div> | |
| 81 | + <div class="uk-grid"> | |
| 82 | + <div class="uk-width-3-10"> | |
| 83 | + <div class="uk-form-row"> | |
| 84 | + <label class="uk-form-label">终点 </label> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + <div class="uk-width-7-10 pl5"> | |
| 88 | + <select name="endStation" class="ct_focus"></select> | |
| 89 | + </div> | |
| 90 | + </div> | |
| 91 | + <div class="uk-grid"> | |
| 92 | + <div class="uk-width-3-10"> | |
| 93 | + <div class="uk-form-row"> | |
| 94 | + <label class="uk-form-label">空驶里程</label> | |
| 95 | + </div> | |
| 96 | + </div> | |
| 97 | + <div class="uk-width-7-10 pl5"> | |
| 98 | + <input type="text" name="mileageType" required style="width: calc(100% - 62px);"> | |
| 99 | + <a style="font-size: 12px;">路径(3)</a> | |
| 100 | + </div> | |
| 101 | + </div> | |
| 102 | + <div class="uk-grid"> | |
| 103 | + <div class="uk-width-3-10"> | |
| 104 | + <div class="uk-form-row"> | |
| 105 | + <label class="uk-form-label">开始时间</label> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + <div class="uk-width-7-10 pl5"> | |
| 109 | + <input type="time" name="startDate" required> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + <div class="uk-grid"> | |
| 113 | + <div class="uk-width-3-10"> | |
| 114 | + <div class="uk-form-row"> | |
| 115 | + <label class="uk-form-label">结束时间</label> | |
| 116 | + </div> | |
| 117 | + </div> | |
| 118 | + <div class="uk-width-7-10 pl5"> | |
| 119 | + <input type="time" name="endDate" required> | |
| 120 | + </div> | |
| 121 | + </div> | |
| 122 | + </form> | |
| 123 | + </div> | |
| 124 | + </div> | |
| 125 | + <div class="sub-task-card destroy-card uk-animation-scale"> | |
| 126 | + <div class="uk-panel uk-panel-box uk-panel-box-danger"> | |
| 127 | + <div class="uk-panel-badge uk-badge uk-badge-danger">烂班</div> | |
| 128 | + <h3 class="uk-panel-title">线路上站点间</h3> | |
| 129 | + <form class="uk-form uk-form-horizontal" destroy_form> | |
| 130 | + <div class="uk-grid"> | |
| 131 | + <div class="uk-width-3-10"> | |
| 132 | + <div class="uk-form-row"> | |
| 133 | + <label class="uk-form-label">起点 </label> | |
| 134 | + </div> | |
| 135 | + </div> | |
| 136 | + <div class="uk-width-7-10 pl5"> | |
| 137 | + <select name="startStation" disabled></select> | |
| 138 | + </div> | |
| 139 | + </div> | |
| 140 | + <div class="uk-grid"> | |
| 141 | + <div class="uk-width-3-10"> | |
| 142 | + <div class="uk-form-row"> | |
| 143 | + <label class="uk-form-label">终点 </label> | |
| 144 | + </div> | |
| 145 | + </div> | |
| 146 | + <div class="uk-width-7-10 pl5"> | |
| 147 | + <select name="endStation" class="ct_focus" disabled></select> | |
| 148 | + </div> | |
| 149 | + </div> | |
| 150 | + <div class="uk-grid"> | |
| 151 | + <div class="uk-width-3-10"> | |
| 152 | + <div class="uk-form-row"> | |
| 153 | + <label class="uk-form-label">烂班里程</label> | |
| 154 | + </div> | |
| 155 | + </div> | |
| 156 | + <div class="uk-width-7-10 pl5"> | |
| 157 | + <input type="text" name="mileageType" required> | |
| 158 | + </div> | |
| 159 | + </div> | |
| 160 | + <div class="uk-grid"> | |
| 161 | + <div class="uk-width-3-10"> | |
| 162 | + <div class="uk-form-row"> | |
| 163 | + <label class="uk-form-label">开始时间</label> | |
| 164 | + </div> | |
| 165 | + </div> | |
| 166 | + <div class="uk-width-7-10 pl5"> | |
| 167 | + <input type="time" name="startDate" required> | |
| 168 | + </div> | |
| 169 | + </div> | |
| 170 | + <div class="uk-grid"> | |
| 171 | + <div class="uk-width-3-10"> | |
| 172 | + <div class="uk-form-row"> | |
| 173 | + <label class="uk-form-label">烂班原因</label> | |
| 174 | + </div> | |
| 175 | + </div> | |
| 176 | + <div class="uk-width-7-10 pl5"> | |
| 177 | + <select name="destroyReason" required></select> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + </form> | |
| 181 | + </div> | |
| 182 | + </div> | |
| 183 | + | |
| 184 | + <form class="uk-form" style="margin-top: 15px; padding: 0 10px 0 0;"> | |
| 185 | + <textarea placeholder="备注" style="width: 100%;height: 70px;"></textarea> | |
| 186 | + </form> | |
| 187 | + </div> | |
| 188 | + | |
| 189 | + <div class="uk-modal-footer uk-text-right"> | |
| 190 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 191 | + <button type="button" class="uk-button uk-button-primary">提交子任务</button> | |
| 192 | + | |
| 193 | + <div class="ct-footer-left"> | |
| 194 | + <a id="betweenStationRangeCalc" data-drawer-id="station_route_spacing_chart_drawer">站点间公里不准?</a> | |
| 195 | + </div> | |
| 196 | + </div> | |
| 197 | + </div> | |
| 198 | + | |
| 199 | + <div class="ct-bottom-drawer"> | |
| 200 | + <a class="ct-bottom-drawer-close"></a> | |
| 201 | + | |
| 202 | + <div class="ct-bottom-drawer-body"></div> | |
| 203 | + </div> | |
| 204 | + | |
| 205 | + <script id="sub-task-inpark-form-temp" type="text/html"> | |
| 206 | + </script> | |
| 207 | + | |
| 208 | + <script> | |
| 209 | + (function () { | |
| 210 | + var modal = '#add-sub-task-inpark-modal', | |
| 211 | + serviceForm = $('form[service_form]', modal), | |
| 212 | + emptyForm = $('form[empty_form]', modal), | |
| 213 | + destroyForm = $('form[destroy_form]', modal), | |
| 214 | + sch, stationRoutes, parks, information, esCode, timeLocStations; | |
| 215 | + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他']; | |
| 216 | + $(modal).on('init', function (e, data) { | |
| 217 | + sch = data.sch; | |
| 218 | + //var formHtml = template('sub-task-inpark-form-temp', {sch:sch, adjustExps: adjustExps}); | |
| 219 | + //$('form', modal).html(formHtml); | |
| 220 | + //字典转换 | |
| 221 | + //dictionaryUtils.transformDom($('.nt-dictionary', modal)); | |
| 222 | + | |
| 223 | + //站点路由 | |
| 224 | + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) { | |
| 225 | + return a.stationRouteCode - b.stationRouteCode; | |
| 226 | + }), 'directions')[sch.xlDir]; | |
| 227 | + //空驶终点(停车场) | |
| 228 | + $.get('/basic/parks', function (rs) { | |
| 229 | + parks = rs; | |
| 230 | + var opts = ''; | |
| 231 | + for (var code in parks) { | |
| 232 | + opts += '<option value="' + code + '">' + parks[code] + '</option>'; | |
| 233 | + } | |
| 234 | + $('select[name=endStation]', emptyForm).html(opts).val(information.carPark); | |
| 235 | + }); | |
| 236 | + //线路标准 | |
| 237 | + information = gb_data_basic.getLineInformation(sch.xlBm); | |
| 238 | + //本地存储的站点耗时 | |
| 239 | + try { | |
| 240 | + timeLocStations = window.localStorage.getItem('control_route_distance_' + sch.xlBm); | |
| 241 | + if (timeLocStations) | |
| 242 | + timeLocStations = JSON.parse(timeLocStations).stations[sch.xlDir == 0 ? 'up' : 'down']; | |
| 243 | + } catch (e) { | |
| 244 | + console.log(e); | |
| 245 | + } | |
| 246 | + | |
| 247 | + //设置默认值 | |
| 248 | + setDefaultVal(); | |
| 249 | + | |
| 250 | + //切换营运终点 | |
| 251 | + $('select[name=endStation]', serviceForm).val(esCode).on('change', function () { | |
| 252 | + var val = $(this).val(); | |
| 253 | + if (val == esCode) { | |
| 254 | + $('.uk-modal-dialog', modal).removeClass('three-children'); | |
| 255 | + $('.sub-task-card.destroy-card').css("display", "none"); | |
| 256 | + } | |
| 257 | + else { | |
| 258 | + $('.uk-modal-dialog', modal).addClass('three-children'); | |
| 259 | + $('.sub-task-card.destroy-card').css("display", "inline-block"); | |
| 260 | + } | |
| 261 | + | |
| 262 | + reClac(); | |
| 263 | + }).trigger('change'); | |
| 264 | + | |
| 265 | + | |
| 266 | + //submit | |
| 267 | + /*var f = $('form', modal).formValidation({ | |
| 268 | + framework: 'uikit', | |
| 269 | + locale: 'zh_CN', | |
| 270 | + }); | |
| 271 | + f.on('success.form.fv', function(e) { | |
| 272 | + disabled_submit_btn(this); | |
| 273 | + e.preventDefault(); | |
| 274 | + var data = $(this).serializeJSON(); | |
| 275 | + | |
| 276 | + });*/ | |
| 277 | + }); | |
| 278 | + | |
| 279 | + function setDefaultVal() { | |
| 280 | + var routeOpts = ''; | |
| 281 | + $.each(stationRoutes, function () { | |
| 282 | + routeOpts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'; | |
| 283 | + }); | |
| 284 | + esCode = stationRoutes[stationRoutes.length - 1].stationCode; | |
| 285 | + | |
| 286 | + //营运起终点 | |
| 287 | + $('select[name=startStation],select[name=endStation]', serviceForm).html(routeOpts); | |
| 288 | + //空驶起点 | |
| 289 | + $('select[name=startStation]', emptyForm).html(routeOpts).val(esCode); | |
| 290 | + //烂班起终点 | |
| 291 | + $('select[name=startStation],select[name=endStation]', destroyForm).html(routeOpts).val(esCode); | |
| 292 | + | |
| 293 | + //烂班原因 | |
| 294 | + var adjustExpsOpts = '<option value="">请选择...</option>'; | |
| 295 | + $.each(adjustExps, function (i, str) { | |
| 296 | + adjustExpsOpts += '<option value="' + str + '">' + str + '</option>'; | |
| 297 | + }); | |
| 298 | + $('select[name=destroyReason]', destroyForm).html(adjustExpsOpts); | |
| 299 | + | |
| 300 | + //营运开始时间 | |
| 301 | + $('input[name=startDate]', serviceForm).val(sch.dfsj); | |
| 302 | + } | |
| 303 | + | |
| 304 | + function reClac() { | |
| 305 | + var serviceEnd = $('select[name=endStation]', serviceForm).val(); | |
| 306 | + //空驶起点 == 营运终点 | |
| 307 | + $('select[name=startStation]', emptyForm).val(serviceEnd); | |
| 308 | + | |
| 309 | + //计算营运里程 | |
| 310 | + var s = $('select[name=startStation]', serviceForm).val(), | |
| 311 | + e = $('select[name=endStation]', serviceForm).val(); | |
| 312 | + var sMileage = calcMileage(s, e); | |
| 313 | + if(sMileage >= 0) | |
| 314 | + $('input[name=mileageType]', serviceForm).val(sMileage); | |
| 315 | + | |
| 316 | + if (serviceEnd != esCode) { | |
| 317 | + //烂班起点 == 营运终点 | |
| 318 | + $('select[name=startStation]', destroyForm).val(serviceEnd); | |
| 319 | + } | |
| 320 | + } | |
| 321 | + | |
| 322 | + function calcMileage(s, e) { | |
| 323 | + var mileage = 0, flag, code; | |
| 324 | + if (timeLocStations) { | |
| 325 | + $.each(timeLocStations, function () { | |
| 326 | + code = this.station.STATION_CODE; | |
| 327 | + if (code == s) { | |
| 328 | + flag = true; | |
| 329 | + } | |
| 330 | + | |
| 331 | + if (flag) | |
| 332 | + mileage += this.toDistance; | |
| 333 | + | |
| 334 | + if (code == e) | |
| 335 | + return false; | |
| 336 | + }); | |
| 337 | + } | |
| 338 | + return mileage / 1000; | |
| 339 | + } | |
| 340 | + | |
| 341 | + | |
| 342 | + //------ 下抽屉 ------ | |
| 343 | + $('#betweenStationRangeCalc', modal).on('click', function () { | |
| 344 | + var id = $(this).data('drawer-id'); | |
| 345 | + switchBtmDrawer(id, '/real_control_v2/fragments/line_schedule/context_menu/sub_task/station_route_spacing_chart.html'); | |
| 346 | + }); | |
| 347 | + | |
| 348 | + var btmDrawer = $('.ct-bottom-drawer', modal); | |
| 349 | + //打开事件 | |
| 350 | + btmDrawer.on('drawer_show', function () { | |
| 351 | + var url = $(this).data('url'); | |
| 352 | + if (!url) { | |
| 353 | + alert('无效的地址'); | |
| 354 | + } | |
| 355 | + | |
| 356 | + var drawerPanel = $(this).data('name'); | |
| 357 | + $('.ct-bottom-drawer-body', btmDrawer).load(url, function () { | |
| 358 | + $('#' + drawerPanel).trigger('drawer-init', {sch: sch}); | |
| 359 | + }); | |
| 360 | + }); | |
| 361 | + | |
| 362 | + function switchBtmDrawer(id, url) { | |
| 363 | + if (btmDrawer.hasClass('open') && btmDrawer.data('name') == id) { | |
| 364 | + btmDrawer.removeClass('open'); | |
| 365 | + btmDrawer.removeData('name').removeData('url'); | |
| 366 | + } | |
| 367 | + else { | |
| 368 | + btmDrawer.addClass('open'); | |
| 369 | + btmDrawer.data('name', id).data('url', url).trigger('drawer_show'); | |
| 370 | + } | |
| 371 | + } | |
| 372 | + })(); | |
| 373 | + </script> | |
| 374 | 374 | </div> |
| 375 | 375 | \ No newline at end of file | ... | ... |