Commit 27f7547c23e7ce5f550e9d1cd2d5ceb8acbf995d
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control
into pudong
Showing
24 changed files
with
1950 additions
and
107 deletions
src/main/java/com/bsth/data/gpsdata_v2/handlers/InStationProcess.java
| ... | ... | @@ -81,6 +81,7 @@ public class InStationProcess { |
| 81 | 81 | * @param prev |
| 82 | 82 | */ |
| 83 | 83 | private void inStation(GpsEntity gps, GpsEntity prev) { |
| 84 | + logger.info("进站记录(到达时间:" + gps.getArrTime() + " 进出站状态:" + gps.getInstation() + " 站点编号:" + gps.getStopNo() + " deviceId:" + gps.getDeviceId() + " nbbm:" + gps.getNbbm() + ")"); | |
| 84 | 85 | ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm()); |
| 85 | 86 | boolean flow = true; |
| 86 | 87 | //要经过2个中途站才能进 | ... | ... |
src/main/java/com/bsth/data/gpsdata_v2/handlers/OutStationProcess.java
| ... | ... | @@ -74,6 +74,7 @@ public class OutStationProcess { |
| 74 | 74 | * @param gps |
| 75 | 75 | */ |
| 76 | 76 | private void outStation(GpsEntity gps, GpsEntity prev) { |
| 77 | + logger.info("进站记录(到达时间:" + gps.getArrTime() + " 进出站状态:" + gps.getInstation() + " 站点编号:" + gps.getStopNo() + " deviceId:" + gps.getDeviceId() + " nbbm:" + gps.getNbbm() + ")"); | |
| 77 | 78 | ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm()); |
| 78 | 79 | |
| 79 | 80 | //起点发车 | ... | ... |
src/main/java/com/bsth/service/schedule/impl/CarDeviceServiceImpl.java
| ... | ... | @@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Propagation; |
| 12 | 12 | import org.springframework.transaction.annotation.Transactional; |
| 13 | 13 | import org.springframework.util.CollectionUtils; |
| 14 | 14 | |
| 15 | +import java.util.Date; | |
| 15 | 16 | import java.util.HashMap; |
| 16 | 17 | import java.util.Map; |
| 17 | 18 | |
| ... | ... | @@ -29,6 +30,8 @@ public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implemen |
| 29 | 30 | // 查找对应的车辆基础信息,更新设备编号数据 |
| 30 | 31 | Cars cars = carsService.findById(carDevice.getCl()); |
| 31 | 32 | cars.setEquipmentCode(carDevice.getNewDeviceNo()); |
| 33 | + // 设备启用日期使用后台日期 | |
| 34 | + carDevice.setQyrq(new Date()); | |
| 32 | 35 | return super.save(carDevice); |
| 33 | 36 | } |
| 34 | 37 | ... | ... |
src/main/resources/application-prod.properties
| ... | ... | @@ -26,6 +26,6 @@ spring.datasource.validation-query=select 1 |
| 26 | 26 | ## gps client data |
| 27 | 27 | http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all |
| 28 | 28 | ## gateway real data |
| 29 | -http.gps.real.url= http://10.10.150.21:8080/transport_server/rtgps/ | |
| 29 | +http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ | |
| 30 | 30 | ## gateway send directive |
| 31 | -http.send.directive = http://10.10.150.21:8080/transport_server/message/ | |
| 32 | 31 | \ No newline at end of file |
| 32 | +http.send.directive = http://10.10.200.79:8080/transport_server/message/ | |
| 33 | 33 | \ No newline at end of file | ... | ... |
src/main/resources/static/index.html
| ... | ... | @@ -630,9 +630,6 @@ |
| 630 | 630 | <script |
| 631 | 631 | src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda" |
| 632 | 632 | data-exclude=1></script> |
| 633 | -<!-- echarts4 误删 --> | |
| 634 | -<script src="/metronic_v4.5.4/plugins/echarts4/echarts.min.js"></script> | |
| 635 | -<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> | |
| 636 | 633 | |
| 637 | 634 | </body> |
| 638 | 635 | </html> |
| 639 | 636 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/add.html
| ... | ... | @@ -21,10 +21,10 @@ |
| 21 | 21 | <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> |
| 22 | 22 | <li><span class="active">运营计划管理</span> <i class="fa fa-circle"></i></li> |
| 23 | 23 | <li> |
| 24 | - <a href="/#/ttInfoManage">时刻表管理</a> | |
| 24 | + <a href="/#/ttInfoManage2">智能时刻表管理</a> | |
| 25 | 25 | <i class="fa fa-circle"></i> |
| 26 | 26 | </li> |
| 27 | - <li><span class="active">时刻表明细制作建模</span></li> | |
| 27 | + <li><span class="active">智能时刻表明细制作建模</span></li> | |
| 28 | 28 | </ul> |
| 29 | 29 | <!-- 线路信息导航栏组件 END --> |
| 30 | 30 | <div class="portlet light bordered" id="form-wizard-info"> |
| ... | ... | @@ -152,7 +152,7 @@ |
| 152 | 152 | <input type="radio" class="icheck" name="baseRes" value=2 > 发车间隔分析(旧:一步调整) |
| 153 | 153 | </label> |
| 154 | 154 | <label> |
| 155 | - <input type="radio" class="icheck" name="baseRes" value=3 checked> 发车间隔分析(新:增量调整-单向进出场) | |
| 155 | + <input type="radio" class="icheck" name="baseRes" value=3 checked> 发车间隔分析(新:增量调整-单向进场) | |
| 156 | 156 | </label> |
| 157 | 157 | <label> |
| 158 | 158 | <input type="radio" class="icheck" name="baseRes" value=0> 客流大数据分析 | ... | ... |
src/main/resources/static/pages/base/timesmodel/gantt.html
| ... | ... | @@ -14,10 +14,10 @@ |
| 14 | 14 | <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> |
| 15 | 15 | <li><span class="active">运营计划管理</span> <i class="fa fa-circle"></i></li> |
| 16 | 16 | <li> |
| 17 | - <a href="/#/ttInfoManage">时刻表管理</a> | |
| 17 | + <a href="/#/ttInfoManage2">智能时刻表管理</a> | |
| 18 | 18 | <i class="fa fa-circle"></i> |
| 19 | 19 | </li> |
| 20 | - <li><span class="active">时刻表明细模型</span></li> | |
| 20 | + <li><span class="active">智能时刻表明细模型</span></li> | |
| 21 | 21 | </ul> |
| 22 | 22 | <!-- 线路信息导航栏组件 END --> |
| 23 | 23 | |
| ... | ... | @@ -160,6 +160,11 @@ |
| 160 | 160 | </div> |
| 161 | 161 | <!-- col-md-12 组件END --> |
| 162 | 162 | </div> |
| 163 | + | |
| 164 | + | |
| 165 | +<!-- echarts4 误删 --> | |
| 166 | +<script src="/metronic_v4.5.4/plugins/echarts4/echarts.min.js"></script> | |
| 167 | + | |
| 163 | 168 | <!-- row 组件END --> |
| 164 | 169 | <script src="/pages/base/timesmodel/js/raty/lib/jquery.raty.js"></script> |
| 165 | 170 | <script src="/pages/base/timesmodel/js/ContextJS/js/context.js"></script> |
| ... | ... | @@ -186,8 +191,8 @@ |
| 186 | 191 | --> |
| 187 | 192 | |
| 188 | 193 | <script src="/pages/base/timesmodel/js/v2_2/InternalScheduleObj.js"></script> |
| 189 | -<script src="/pages/base/timesmodel/js/v2_2/main_v2_2_excel.js"></script> | |
| 190 | 194 | <script src="/pages/base/timesmodel/js/v2_2/main_v2_2.js"></script> |
| 195 | +<script src="/pages/base/timesmodel/js/v2_2/Main_v2_2_ExcelObj.js"></script> | |
| 191 | 196 | <script src="/pages/base/timesmodel/js/v2_2/strategy/workhours/ModifyBcTripWHS1.js"></script> |
| 192 | 197 | <script src="/pages/base/timesmodel/js/v2_2/strategy/headway/CalcuHeadwayS1.js"></script> |
| 193 | 198 | <script src="/pages/base/timesmodel/js/v2_2/strategy/headway/CalcuHeadwayS2.js"></script> | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/gantt.js
| ... | ... | @@ -99,7 +99,6 @@ |
| 99 | 99 | Main_v2.exportDataConfig(data.aInternalLpObj); |
| 100 | 100 | } else if (map.baseRes == '3') { // 主站停站使用v2_2版本 |
| 101 | 101 | data = Main_v2_2.BXPplaceClassesTime03(_paramObj, CSMap.maxCar); |
| 102 | - Main_v2_2.exportDataConfig(data.aInternalLpObj); | |
| 103 | 102 | } |
| 104 | 103 | |
| 105 | 104 | }else { |
| ... | ... | @@ -124,7 +123,7 @@ |
| 124 | 123 | } |
| 125 | 124 | // 按照发车序号顺序排序. |
| 126 | 125 | lpbc_.sort(function(a,b){return a.fcno-b.fcno}); |
| 127 | - resultJA = resultJA.concat(BaseFun.addjclbbc01(lpbc_,dataMap,stopAraay[0].lbsj,map)); | |
| 126 | + resultJA = resultJA.concat(BaseFun.addjclbbc01(lpbc_,dataMap,stopArray[0].lbsj,map)); | |
| 128 | 127 | } |
| 129 | 128 | data = {'json':rsjar,'bxrcgs':null}; |
| 130 | 129 | } |
| ... | ... | @@ -140,6 +139,11 @@ |
| 140 | 139 | // graph.addHistory(); |
| 141 | 140 | // // 初始化右键菜单. |
| 142 | 141 | // contextInit(graph); |
| 142 | + | |
| 143 | + if (map.baseRes == '3') { | |
| 144 | + // 导入导出设置 | |
| 145 | + Main_v2_2.exportExcelConfig($_GlobalGraph.getDataArray); | |
| 146 | + } | |
| 143 | 147 | },500); |
| 144 | 148 | |
| 145 | 149 | /** | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v2_2/Main_v2_2_ExcelObj.js
0 → 100644
| 1 | +/** | |
| 2 | + * v2_2版本时刻表excel对象。 | |
| 3 | + */ | |
| 4 | +var Main_v2_2_ExcelObj = (function() { | |
| 5 | + // html5导出下载文件方法 | |
| 6 | + var _fnDownloadFile = function(data, mimeType, fileName) { | |
| 7 | + var success = false; | |
| 8 | + var blob = new Blob([data], { type: mimeType }); | |
| 9 | + try { | |
| 10 | + if (navigator.msSaveBlob) | |
| 11 | + navigator.msSaveBlob(blob, fileName); | |
| 12 | + else { | |
| 13 | + // Try using other saveBlob implementations, if available | |
| 14 | + var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob; | |
| 15 | + if (saveBlob === undefined) throw "Not supported"; | |
| 16 | + saveBlob(blob, fileName); | |
| 17 | + } | |
| 18 | + success = true; | |
| 19 | + } catch (ex) { | |
| 20 | + console.log("saveBlob method failed with the following exception:"); | |
| 21 | + console.log(ex); | |
| 22 | + } | |
| 23 | + | |
| 24 | + if (!success) { | |
| 25 | + // Get the blob url creator | |
| 26 | + var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL; | |
| 27 | + if (urlCreator) { | |
| 28 | + // Try to use a download link | |
| 29 | + var link = document.createElement('a'); | |
| 30 | + if ('download' in link) { | |
| 31 | + // Try to simulate a click | |
| 32 | + try { | |
| 33 | + // Prepare a blob URL | |
| 34 | + var url = urlCreator.createObjectURL(blob); | |
| 35 | + link.setAttribute('href', url); | |
| 36 | + | |
| 37 | + // Set the download attribute (Supported in Chrome 14+ / Firefox 20+) | |
| 38 | + link.setAttribute("download", fileName); | |
| 39 | + | |
| 40 | + // Simulate clicking the download link | |
| 41 | + var event = document.createEvent('MouseEvents'); | |
| 42 | + event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); | |
| 43 | + link.dispatchEvent(event); | |
| 44 | + success = true; | |
| 45 | + | |
| 46 | + } catch (ex) { | |
| 47 | + console.log("Download link method with simulated click failed with the following exception:"); | |
| 48 | + console.log(ex); | |
| 49 | + } | |
| 50 | + } | |
| 51 | + | |
| 52 | + if (!success) { | |
| 53 | + // Fallback to window.location method | |
| 54 | + try { | |
| 55 | + // Prepare a blob URL | |
| 56 | + // Use application/octet-stream when using window.location to force download | |
| 57 | + var url = urlCreator.createObjectURL(blob); | |
| 58 | + window.location = url; | |
| 59 | + console.log("Download link method with window.location succeeded"); | |
| 60 | + success = true; | |
| 61 | + } catch (ex) { | |
| 62 | + console.log("Download link method with window.location failed with the following exception:"); | |
| 63 | + console.log(ex); | |
| 64 | + } | |
| 65 | + } | |
| 66 | + } | |
| 67 | + } | |
| 68 | + | |
| 69 | + if (!success) { | |
| 70 | + // Fallback to window.open method | |
| 71 | + console.log("No methods worked for saving the arraybuffer, using last resort window.open"); | |
| 72 | + window.open("", '_blank', ''); | |
| 73 | + } | |
| 74 | + }; | |
| 75 | + | |
| 76 | + // 计算导出参数sheet数据。 | |
| 77 | + var _fnCalcuExportParam_sheet = function(_paramObj) { | |
| 78 | + return [ | |
| 79 | + {'paramItem' : '上行首班时间', 'paramValue' : _paramObj.getUpFirstDTimeObj().format("HH:mm")}, | |
| 80 | + {'paramItem' : '上行末班时间', 'paramValue' : _paramObj.getUpLastDtimeObj().format("HH:mm")}, | |
| 81 | + {'paramItem' : '下行首班时间', 'paramValue' : _paramObj.getDownFirstDTimeObj().format("HH:mm")}, | |
| 82 | + {'paramItem' : '下行末班时间', 'paramValue' : _paramObj.getDownLastDTimeObj().format("HH:mm")}, | |
| 83 | + {'paramItem' : '早高峰开始时间', 'paramValue' : _paramObj.getMPeakStartTimeObj().format("HH:mm")}, | |
| 84 | + {'paramItem' : '早高峰结束时间', 'paramValue' : _paramObj.getMPeakEndTimeObj().format("HH:mm")}, | |
| 85 | + {'paramItem' : '晚高峰开始时间', 'paramValue' : _paramObj.getEPeakStartTimeObj().format("HH:mm")}, | |
| 86 | + {'paramItem' : '晚高峰结束时间', 'paramValue' : _paramObj.getEPeakEndTimeObj().format("HH:mm")}, | |
| 87 | + {'paramItem' : '上行进场时间', 'paramValue' : _paramObj.getUpInTime()}, | |
| 88 | + {'paramItem' : '上行出场时间', 'paramValue' : _paramObj.getUpOutTime()}, | |
| 89 | + {'paramItem' : '下行进场时间', 'paramValue' : _paramObj.getDownInTime()}, | |
| 90 | + {'paramItem' : '下行出场时间', 'paramValue' : _paramObj.getDownOutTime()}, | |
| 91 | + {'paramItem' : '早高峰上行时间', 'paramValue' : _paramObj.getUpMPeakTime()}, | |
| 92 | + {'paramItem' : '早高峰下行时间', 'paramValue' : _paramObj.getDownMPeakTime()}, | |
| 93 | + {'paramItem' : '晚高峰上行时间', 'paramValue' : _paramObj.getUpEPeakTime()}, | |
| 94 | + {'paramItem' : '晚高峰下行时间', 'paramValue' : _paramObj.getDownEPeakTime()}, | |
| 95 | + {'paramItem' : '低谷上行时间', 'paramValue' : _paramObj.getUpTroughTime()}, | |
| 96 | + {'paramItem' : '低谷下行时间', 'paramValue' : _paramObj.getDownTroughTime()}, | |
| 97 | + {'paramItem' : '线路规划类型', 'paramValue' : "双向"}, | |
| 98 | + {'paramItem' : '吃饭地点', 'paramValue' : _paramObj.fnIsEat() ? (_paramObj.fnIsBothEat() ? "上下行" : (_paramObj.fnIsUpEat() ? "上行" : "下行")) : "不吃饭"}, | |
| 99 | + {'paramItem' : '早晚例行保养', 'paramValue' : _paramObj.getLbTime()}, | |
| 100 | + {'paramItem' : '停车场', 'paramValue' : _paramObj.getTccId()}, | |
| 101 | + {'paramItem' : '工作餐午餐时间', 'paramValue' : _paramObj.fnGetLunchTime()}, | |
| 102 | + {'paramItem' : '工作餐晚餐时间', 'paramValue' : _paramObj.fnGetDinnerTime()}, | |
| 103 | + {'paramItem' : '早高峰发车间隔', 'paramValue' : "[" + _paramObj.getMPeakMinFcjx() + "," + _paramObj.getMPeakMaxFcjx() + "]"}, | |
| 104 | + {'paramItem' : '晚高峰发车间隔', 'paramValue' : "[" + _paramObj.getEPeakMinFcjx() + "," + _paramObj.getEPeakMaxFcjx() + "]"}, | |
| 105 | + {'paramItem' : '低谷发车间隔', 'paramValue' : "[" + _paramObj.getTroughMinFcjx() + "," + _paramObj.getTroughMaxFcjx() + "]"}, | |
| 106 | + {'paramItem' : '建议加班路牌数', 'paramValue' : _paramObj.getJBLpes()}, | |
| 107 | + {'paramItem' : '停站类型', 'paramValue' : _paramObj.isTwoWayStop() ? "双向停站" : (_paramObj.isUpOneWayStop() ? "上行主站" : "下行主站") }, | |
| 108 | + {'paramItem' : '建议高峰配车数', 'paramValue' : _paramObj.getAdvicePeakClzs()} | |
| 109 | + ] | |
| 110 | + }; | |
| 111 | + | |
| 112 | + // 计算班次统计数据sheet数据。 | |
| 113 | + var _fnCalcuExportStatInfo_sheet = function(aBc, oParam) { | |
| 114 | + var countBc = 0, // 总班次 | |
| 115 | + serviceBc = 0, // 营运班次 | |
| 116 | + jcbc = 0, // 进场总班次. | |
| 117 | + ccbc = 0, // 出场总班次. | |
| 118 | + cfbc = 0, // 吃饭总班次. | |
| 119 | + zwlbbc = 0, // 早晚例保总班次. | |
| 120 | + countGs = 0.0, // 总工时 | |
| 121 | + servicesj = 0, // 营运班次总时间 | |
| 122 | + jcsj = 0.0, // 进场总时间. | |
| 123 | + ccsj = 0.0, // 出场总时间. | |
| 124 | + cfsj = 0.0, // 吃饭总时间. | |
| 125 | + zwlbsj = 0.0, // 早晚例保总时间. | |
| 126 | + ksBc = 0, // 空驶班次 | |
| 127 | + serviceLc = 0.0, // 营运里程 | |
| 128 | + ksLc = 0.0, // 空驶里程 | |
| 129 | + avgTzjx = 0.0, // 平均停站间隙 | |
| 130 | + gfServiceBc = 0, // 高峰营运班次 | |
| 131 | + dgServiceBc = 0, // 低谷营运班次 | |
| 132 | + gfAvgTzjx = 0.0, // 高峰平均停站间隙 | |
| 133 | + dgAvgTzjx = 0.0; // 低谷平均停站间隙 | |
| 134 | + | |
| 135 | + var i; | |
| 136 | + var oBc; | |
| 137 | + for (i = 0; i < aBc.length; i++) { | |
| 138 | + oBc = aBc[i]; | |
| 139 | + | |
| 140 | + if (oBc.bcsj > 0) { | |
| 141 | + countBc = countBc + 1; | |
| 142 | + countGs = countGs + oBc.STOPTIME + oBc.bcsj; | |
| 143 | + if (oParam.isTroughBc(oParam.toTimeObj(oBc.fcsj))) { | |
| 144 | + if (oBc.bcType == "normal") { | |
| 145 | + dgServiceBc = dgServiceBc + 1; | |
| 146 | + dgAvgTzjx = dgAvgTzjx + oBc.STOPTIME; | |
| 147 | + } | |
| 148 | + } else { | |
| 149 | + if (oBc.bcType == "normal") { | |
| 150 | + gfServiceBc = gfServiceBc + 1; | |
| 151 | + gfAvgTzjx = gfAvgTzjx + oBc.STOPTIME; | |
| 152 | + } | |
| 153 | + } | |
| 154 | + | |
| 155 | + if (oBc.bcType == "normal" || oBc.bcType == "cf") { | |
| 156 | + serviceBc = serviceBc + 1; | |
| 157 | + serviceLc = serviceLc + oBc.jhlc; | |
| 158 | + servicesj = servicesj + oBc.bcsj; | |
| 159 | + avgTzjx = avgTzjx + oBc.STOPTIME; | |
| 160 | + | |
| 161 | + if (oBc.bcType == "cf") { | |
| 162 | + cfbc = cfbc + 1; | |
| 163 | + cfsj = cfsj + oBc.bcsj; | |
| 164 | + } | |
| 165 | + } else if (oBc.bcType == "in") { | |
| 166 | + jcbc = jcbc + 1; | |
| 167 | + jcsj = jcsj + oBc.bcsj; | |
| 168 | + } else if (oBc.bcType == "out") { | |
| 169 | + ccbc = ccbc + 1; | |
| 170 | + ccsj = ccsj + oBc.bcsj; | |
| 171 | + } else if (oBc.bcType == "bd") { | |
| 172 | + zwlbbc = zwlbbc + 1; | |
| 173 | + zwlbsj = zwlbsj + oBc.bcsj; | |
| 174 | + } else if (oBc.bcType == "lc") { | |
| 175 | + zwlbbc = zwlbbc + 1; | |
| 176 | + zwlbsj = zwlbsj + oBc.bcsj; | |
| 177 | + } | |
| 178 | + } | |
| 179 | + } | |
| 180 | + | |
| 181 | + dgAvgTzjx = dgAvgTzjx / dgServiceBc; | |
| 182 | + gfAvgTzjx = gfAvgTzjx / gfServiceBc; | |
| 183 | + avgTzjx = avgTzjx / dgServiceBc; | |
| 184 | + | |
| 185 | + return [ | |
| 186 | + {'statItem': '总班次(包括进出场、吃饭时间、早晚例保、营运且班次时间大于零的班次)', 'statValue': countBc}, | |
| 187 | + {'statItem': '进场总班次(包括进场且班次时间大于零的班次)', 'statValue': jcbc}, | |
| 188 | + {'statItem': '出场总班次(包括进场且班次时间大于零的班次)', 'statValue': ccbc}, | |
| 189 | + {'statItem': '吃饭总班次(包括吃饭且班次时间大于零的班次)', 'statValue': cfbc}, | |
| 190 | + {'statItem': '早晚例保总班次(包括早晚例保且时间大于零的班次)', 'statValue': zwlbbc}, | |
| 191 | + {'statItem': '营运总班次(包括正常、区间、放大站且班次时间大于零班次)','statValue': serviceBc}, | |
| 192 | + {'statItem': '进场总时间(包括进场班次且班次时间大于零)', 'statValue': jcsj/60}, | |
| 193 | + {'statItem': '出场总时间(包括进场班次且班次时间大于零)', 'statValue': ccsj/60}, | |
| 194 | + {'statItem': '吃饭总时间(包括吃饭班次且班次时间大于零)', 'statValue': cfsj/60}, | |
| 195 | + {'statItem': '早晚例保总时间(包括早晚例保班次且时间大于零的)', 'statValue': zwlbsj/60}, | |
| 196 | + {'statItem': '营运班次总时间(包括正常、区间、放大站且班次时间大于零)', 'statValue': servicesj/60}, | |
| 197 | + {'statItem': '总工时(包括进出场、吃饭时间、早晚例保、营运班次时间)', 'statValue': countGs/60}, | |
| 198 | + {'statItem': '空驶班次(包括直放班次)', 'statValue': ksBc}, | |
| 199 | + {'statItem': '营运里程(包括正常、区间、放大站里程)', 'statValue': serviceLc}, | |
| 200 | + {'statItem': '空驶里程(包括直放里程)', 'statValue': ksLc}, | |
| 201 | + {'statItem': '平均停站时间(营运班次停站时间总和/营运总班次)', 'statValue': avgTzjx}, | |
| 202 | + {'statItem': '高峰营运班次(包括早晚高峰时段的正常、区间、放大站班次)', 'statValue': gfServiceBc}, | |
| 203 | + {'statItem': '低谷营运班次(包括低谷时段的正常、区间、放大站班次)', 'statValue': dgServiceBc}, | |
| 204 | + {'statItem': '高峰平均停站间隙(高峰营运班次停站时间总和/高峰营运班次总和)', 'statValue': gfAvgTzjx}, | |
| 205 | + {'statItem': '低谷平均停站间隙(低谷营运班次停站时间总和/低谷营运班次总和)', 'statValue': dgAvgTzjx}, | |
| 206 | + {'statItem': '综合评估', 'statValue': 3} | |
| 207 | + ]; | |
| 208 | + | |
| 209 | + }; | |
| 210 | + | |
| 211 | + /** | |
| 212 | + * 内部计算Excel班次方法1, | |
| 213 | + * 这里是假设班次按照从早到晚排序,并且路牌也是从小到大排序。 | |
| 214 | + * @param aExcelLp excel显示用路牌 | |
| 215 | + * @param aGanttBc 甘特图班次列表 | |
| 216 | + * @param oParam 参数对象 | |
| 217 | + * @param bQIsUp 每一圈是上行开始还是下行开始 | |
| 218 | + * @private | |
| 219 | + */ | |
| 220 | + function InternalCalcuExcelBc1(aExcelLp, aGanttBc, oParam, bQIsUp) { | |
| 221 | + this._aExcelLp = aExcelLp; | |
| 222 | + this._oParam = oParam; | |
| 223 | + this._bQIsUp = bQIsUp; | |
| 224 | + | |
| 225 | + this._iUpGroupIndex = 0; | |
| 226 | + this._iDownGroupIndex = 0; | |
| 227 | + | |
| 228 | + // {"路牌名字":{"isFlag": 是否为标记班次(表示扫描过但是没有班次对象),"normal":正常班次}} | |
| 229 | + this._oLpGroupNormalGanttBc = {}; | |
| 230 | + // {"路牌名字":{"cf":吃饭班次}} | |
| 231 | + this._oLpGroupCfGanttBc = {}; | |
| 232 | + | |
| 233 | + // TODO:其他类型的班次再议 | |
| 234 | + | |
| 235 | + // 计算上行gantt班次列表,下行gantt班次列表,并排序 | |
| 236 | + var i; | |
| 237 | + var oGanttBc; | |
| 238 | + this._aUpGanttBc = []; | |
| 239 | + this._aDownGanttBc = []; | |
| 240 | + for (i = 0; i < aGanttBc.length; i++) { | |
| 241 | + oGanttBc = aGanttBc[i]; | |
| 242 | + if (oGanttBc.xlDir == "relationshipGraph-up") { | |
| 243 | + this._aUpGanttBc.push(oGanttBc); | |
| 244 | + } else { | |
| 245 | + this._aDownGanttBc.push(oGanttBc); | |
| 246 | + } | |
| 247 | + } | |
| 248 | + this._aUpGanttBc.sort(function (o1, o2) { // 时间从早到晚排序 | |
| 249 | + if (oParam.toTimeObj(o1.fcsj).isBefore(oParam.toTimeObj(o2.fcsj))) { | |
| 250 | + return -1; | |
| 251 | + } else { | |
| 252 | + return 1; | |
| 253 | + } | |
| 254 | + }); | |
| 255 | + this._aDownGanttBc.sort(function (o1, o2) { // 时间从早到晚排序 | |
| 256 | + if (oParam.toTimeObj(o1.fcsj).isBefore(oParam.toTimeObj(o2.fcsj))) { | |
| 257 | + return -1; | |
| 258 | + } else { | |
| 259 | + return 1; | |
| 260 | + } | |
| 261 | + }); | |
| 262 | + | |
| 263 | + } | |
| 264 | + | |
| 265 | + //----------------------- 外部方法 -----------------------// | |
| 266 | + InternalCalcuExcelBc1.prototype.fnCalcuExcelLpBcList = function() { | |
| 267 | + // 计算Excel班次 | |
| 268 | + this._calcuExcelBc(true); // 上行 | |
| 269 | + // this._calcuExcelBc(false); // 下行 | |
| 270 | + | |
| 271 | + // 设置路牌圈数,路由id | |
| 272 | + var iGroupCount = this._iUpGroupIndex > this._iDownGroupIndex ? | |
| 273 | + (this._iUpGroupIndex + 1) : (this._iDownGroupIndex + 1); | |
| 274 | + | |
| 275 | + var i; | |
| 276 | + var stationRouteId1; | |
| 277 | + var stationRouteId2; | |
| 278 | + var oGanttBc; | |
| 279 | + for (i = 0; i < this._aUpGanttBc.length; i++) { | |
| 280 | + oGanttBc = this._aUpGanttBc[i]; | |
| 281 | + if (oGanttBc.bcType == "normal") { | |
| 282 | + if (this._bQIsUp) { | |
| 283 | + stationRouteId1 = oGanttBc.qdz; | |
| 284 | + break; | |
| 285 | + } else { | |
| 286 | + stationRouteId2 = oGanttBc.qdz; | |
| 287 | + break; | |
| 288 | + } | |
| 289 | + } | |
| 290 | + } | |
| 291 | + for (i = 0; i < this._aDownGanttBc.length; i++) { | |
| 292 | + oGanttBc = this._aUpGanttBc[i]; | |
| 293 | + if (oGanttBc.bcType == "normal") { | |
| 294 | + if (!this._bQIsUp) { | |
| 295 | + stationRouteId1 = oGanttBc.qdz; | |
| 296 | + break; | |
| 297 | + } else { | |
| 298 | + stationRouteId2 = oGanttBc.qdz; | |
| 299 | + break; | |
| 300 | + } | |
| 301 | + } | |
| 302 | + } | |
| 303 | + | |
| 304 | + var oExcelLp; | |
| 305 | + for (i = 0; i < this._aExcelLp.length; i++) { | |
| 306 | + oExcelLp = this._aExcelLp[i]; | |
| 307 | + oExcelLp.groupCount = iGroupCount; | |
| 308 | + oExcelLp.stationRouteId1 = stationRouteId1; | |
| 309 | + oExcelLp.stationRouteId2 = stationRouteId2; | |
| 310 | + } | |
| 311 | + | |
| 312 | + return this._aExcelLp; | |
| 313 | + }; | |
| 314 | + | |
| 315 | + //----------------------- 内部方法 ------------------------// | |
| 316 | + /** | |
| 317 | + * 重新计算Excel显示班次。 | |
| 318 | + * @param bIsUp 是否上行 | |
| 319 | + */ | |
| 320 | + InternalCalcuExcelBc1.prototype._calcuExcelBc = function(bIsUp) { | |
| 321 | + this._oLpGroupNormalGanttBc = {}; | |
| 322 | + this._oLpGroupCfGanttBc = {}; | |
| 323 | + | |
| 324 | + var i; | |
| 325 | + var j = 0; | |
| 326 | + var oExcelLp; | |
| 327 | + var oGanttBc; | |
| 328 | + var aGBc = bIsUp ? this._aUpGanttBc : this._aDownGanttBc; | |
| 329 | + for (i = 0; i < aGBc.length; i++) { | |
| 330 | + oGanttBc = aGBc[i]; | |
| 331 | + while (j < this._aExcelLp.length) { | |
| 332 | + oExcelLp = this._aExcelLp[j]; | |
| 333 | + if (this._isResetCalcuGroup(oGanttBc)) { | |
| 334 | + this._resetCalcuGroup(bIsUp); | |
| 335 | + j = 0; | |
| 336 | + i--; | |
| 337 | + break; | |
| 338 | + } else { | |
| 339 | + // TODO:其他类型班次再议 | |
| 340 | + | |
| 341 | + if (oGanttBc.bcType == "cf") { | |
| 342 | + this._oLpGroupCfGanttBc[oGanttBc.lpName] = { | |
| 343 | + "cf": oGanttBc | |
| 344 | + }; | |
| 345 | + break; | |
| 346 | + } | |
| 347 | + | |
| 348 | + if (oExcelLp.lpname == oGanttBc.lpName) { | |
| 349 | + if (oGanttBc.bcType == "normal") { | |
| 350 | + this._oLpGroupNormalGanttBc[oGanttBc.lpName] = { | |
| 351 | + "isFlag": false, "normal": oGanttBc | |
| 352 | + }; | |
| 353 | + } | |
| 354 | + j = (j + 1) % this._aExcelLp.length; | |
| 355 | + break; | |
| 356 | + } else { // 当前路牌无对应班次,标记找过班次 | |
| 357 | + this._oLpGroupNormalGanttBc[oExcelLp.lpname] = { | |
| 358 | + "isFlag": true, "normal": null | |
| 359 | + }; | |
| 360 | + j = (j + 1) % this._aExcelLp.length; | |
| 361 | + } | |
| 362 | + } | |
| 363 | + } | |
| 364 | + | |
| 365 | + } | |
| 366 | + | |
| 367 | + }; | |
| 368 | + InternalCalcuExcelBc1.prototype._resetCalcuGroup = function(bIsUp) { | |
| 369 | + // 重置计算圈及班次 | |
| 370 | + var oExcelLp; | |
| 371 | + var oGroupGanttNormalBc; | |
| 372 | + var oGroupGanttEatBc; | |
| 373 | + for (var i = 0; i < this._aExcelLp.length; i++) { | |
| 374 | + oExcelLp = this._aExcelLp[i]; | |
| 375 | + if (this._oLpGroupNormalGanttBc[oExcelLp.lpname]) { | |
| 376 | + if (!this._oLpGroupNormalGanttBc[oExcelLp.lpname].isFlag) { // 非标记班次 | |
| 377 | + oGroupGanttNormalBc = this._oLpGroupNormalGanttBc[oExcelLp.lpname].normal; | |
| 378 | + } | |
| 379 | + } | |
| 380 | + if (this._oLpGroupCfGanttBc[oExcelLp.lpname]) { | |
| 381 | + oGroupGanttEatBc = this._oLpGroupCfGanttBc[oExcelLp.lpname].cf; | |
| 382 | + } | |
| 383 | + if (oGroupGanttNormalBc) { | |
| 384 | + oExcelLp.bcObjList.push({ | |
| 385 | + "bcsj": oGroupGanttNormalBc.bcsj, // 班次时间 | |
| 386 | + "ssj": oGroupGanttNormalBc.STOPTIME, // 停站时间 | |
| 387 | + "eatsj": oGroupGanttEatBc ? oGroupGanttEatBc.bcsj : 0, // 吃饭时间 | |
| 388 | + | |
| 389 | + "tccid": oGroupGanttNormalBc.tcc, // 停车场id | |
| 390 | + "qdzid": oGroupGanttNormalBc.qdz, // 起点站id | |
| 391 | + "zdzid": oGroupGanttNormalBc.zdz, // 终点站id | |
| 392 | + | |
| 393 | + "isUp": bIsUp, // 是否上行 | |
| 394 | + | |
| 395 | + "bcType": oGroupGanttNormalBc.bcType, // 班次类型 | |
| 396 | + "fcsj": oGroupGanttEatBc ? | |
| 397 | + ("*" + oGroupGanttNormalBc.fcsj) : | |
| 398 | + oGroupGanttNormalBc.fcsj, // 发车时间描述 | |
| 399 | + "fcsjDesc": oGroupGanttEatBc ? | |
| 400 | + ("(吃" + oGroupGanttNormalBc.fcsj + ")") : | |
| 401 | + oGroupGanttNormalBc.fcsj, // 发车时间描述2 | |
| 402 | + | |
| 403 | + "groupNo": bIsUp ? this._iUpGroupIndex : this._iDownGroupIndex, // 第几圈 | |
| 404 | + "groupBcNo": bIsUp == this._bQIsUp ? 0 : 1 // 圈里第几个班次 | |
| 405 | + | |
| 406 | + }); | |
| 407 | + } | |
| 408 | + } | |
| 409 | + | |
| 410 | + if (bIsUp) { | |
| 411 | + this._iUpGroupIndex ++; | |
| 412 | + } else { | |
| 413 | + this._iDownGroupIndex ++; | |
| 414 | + } | |
| 415 | + this._oLpGroupNormalGanttBc = {}; | |
| 416 | + this._oLpGroupCfGanttBc = {}; | |
| 417 | + }; | |
| 418 | + InternalCalcuExcelBc1.prototype._isResetCalcuGroup = function(oGanttBc) { | |
| 419 | + // 是否重置计算圈,当oGanttBc存在相同路牌的班次或者标记班次,算下一个圈 | |
| 420 | + if (oGanttBc.bcType == "cf") { | |
| 421 | + return false; | |
| 422 | + } | |
| 423 | + if (this._oLpGroupNormalGanttBc[oGanttBc.lpName]) { | |
| 424 | + return true; | |
| 425 | + } else { | |
| 426 | + return false; | |
| 427 | + } | |
| 428 | + | |
| 429 | + }; | |
| 430 | + | |
| 431 | + /** | |
| 432 | + * 内部Excel对象。 | |
| 433 | + * @param oParam 参数对象 | |
| 434 | + * @param fnGetGanttBcArray 返回gantt用的班次列表 | |
| 435 | + * @constructor | |
| 436 | + */ | |
| 437 | + function InternalExcelObj(oParam, fnGetGanttBcArray) { | |
| 438 | + this._oParam = oParam; | |
| 439 | + this.aGanttBc = fnGetGanttBcArray(); | |
| 440 | + | |
| 441 | + // 每一圈是上行开始还是下行开始 | |
| 442 | + this._qIsUp = oParam.getUpFirstDTimeObj().diff(oParam.getDownFirstDTimeObj()) <= 0 ? false : true; | |
| 443 | + | |
| 444 | + // 构造显示用lp对象 | |
| 445 | + var oTempLpFlag = {}; | |
| 446 | + var oGanttBc; | |
| 447 | + var aLp = []; | |
| 448 | + var oLp; | |
| 449 | + var i; | |
| 450 | + for (i = 0; i < this.aGanttBc.length; i++) { | |
| 451 | + oGanttBc = this.aGanttBc[i]; | |
| 452 | + if (oTempLpFlag[oGanttBc.lpName]) { | |
| 453 | + // 已经存在路牌,不处理 | |
| 454 | + continue; | |
| 455 | + } | |
| 456 | + | |
| 457 | + oLp = { | |
| 458 | + "lpname": oGanttBc.lpName, // 路牌名字 | |
| 459 | + "isUp": this._qIsUp, // 每圈的第一个班次是否上行 | |
| 460 | + "bcObjList": [], // 内部班次列表(后面计算班次列表) | |
| 461 | + "groupCount": 0, // 总圈数(后面计算总圈数) | |
| 462 | + "zlc": 0, // 总里程 | |
| 463 | + "yylc": 0, // 营运里程 | |
| 464 | + "kslc": 0, // 空驶里程 | |
| 465 | + "zgs": 0, // 总工时 | |
| 466 | + "zbc": 0, // 总班次 | |
| 467 | + "yygs": 0, // 营运工时 | |
| 468 | + "yybc": 0, // 营运班次 | |
| 469 | + "stationRouteId1": 0, // 第一个班次起点站路由id | |
| 470 | + "stationRouteId2": 0 // 第二个班次起点站路由id | |
| 471 | + }; | |
| 472 | + oTempLpFlag[oGanttBc.lpName] = {"flag" : true}; // 标记一下 | |
| 473 | + aLp.push(oLp); | |
| 474 | + } | |
| 475 | + | |
| 476 | + // 计算Excel班次 | |
| 477 | + this._celb = new InternalCalcuExcelBc1(aLp, this.aGanttBc, oParam, this._qIsUp); | |
| 478 | + | |
| 479 | + } | |
| 480 | + | |
| 481 | + // html5导出excel方法 | |
| 482 | + InternalExcelObj.prototype.downloadFile = function(data, mimeType, fileName) { | |
| 483 | + _fnDownloadFile(data, mimeType, fileName); | |
| 484 | + }; | |
| 485 | + /** | |
| 486 | + * 获取班次统计数据。 | |
| 487 | + */ | |
| 488 | + InternalExcelObj.prototype.fnGetStatInfoList = function() { | |
| 489 | + return _fnCalcuExportStatInfo_sheet(this.aGanttBc, this._oParam); | |
| 490 | + }; | |
| 491 | + /** | |
| 492 | + * 获取参数数据。 | |
| 493 | + */ | |
| 494 | + InternalExcelObj.prototype.fnGetParamInfoList = function() { | |
| 495 | + return _fnCalcuExportParam_sheet(this._oParam); | |
| 496 | + }; | |
| 497 | + /** | |
| 498 | + * 获取路牌班次数据。 | |
| 499 | + * @return {*} | |
| 500 | + */ | |
| 501 | + InternalExcelObj.prototype.fnGetLpBcInfoList = function() { | |
| 502 | + return this._celb.fnCalcuExcelLpBcList(); | |
| 503 | + }; | |
| 504 | + | |
| 505 | + return InternalExcelObj; | |
| 506 | + | |
| 507 | +} ()); | |
| 0 | 508 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v2_2/main_v2_2.js
| ... | ... | @@ -58,21 +58,26 @@ var Main_v2_2 = function() { |
| 58 | 58 | }; |
| 59 | 59 | }, |
| 60 | 60 | |
| 61 | - //----------------------------------- 导入导出方法 -----------------------------------// | |
| 61 | + //----------------------------------- 导入导出配置 -----------------------------------// | |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * 导出时刻表配置。 |
| 65 | - * @param aInternalLpObj 内部路牌对象列表 | |
| 65 | + * @param fnGetGanttBc 获取gantt班次方法 | |
| 66 | 66 | */ |
| 67 | - exportDataConfig: function(aInternalLpObj) { | |
| 67 | + exportExcelConfig: function(fnGetGanttBc) { | |
| 68 | + var oExcel = new Main_v2_2_ExcelObj(_paramObj, fnGetGanttBc); | |
| 69 | + | |
| 68 | 70 | $('.exportAddXls').off('click'); |
| 69 | 71 | $('.exportAddXlsx').off('click'); |
| 70 | 72 | |
| 71 | 73 | $('.exportAddXls').on('click', function() { |
| 74 | + alert("dddd"); | |
| 75 | + | |
| 76 | + | |
| 72 | 77 | var aInfos = { |
| 73 | - "lpObjList": Main_v2_2_excel[0](aInternalLpObj, _paramObj), // 路牌班次信息列表 | |
| 74 | - "statInfoList": Main_v2_2_excel[1](aInternalLpObj, _paramObj), // 统计项目列表 | |
| 75 | - "parameterInfoList" : Main_v2_2_excel[2](_paramObj) // 参数对象 | |
| 78 | + "lpObjList": oExcel.fnGetLpBcInfoList(), // 路牌班次信息列表 | |
| 79 | + "statInfoList": oExcel.fnGetStatInfoList(), // 统计项目列表 | |
| 80 | + "parameterInfoList" : oExcel.fnGetParamInfoList() // 参数对象 | |
| 76 | 81 | }; |
| 77 | 82 | |
| 78 | 83 | console.log(aInfos); |
| ... | ... | @@ -88,7 +93,7 @@ var Main_v2_2 = function() { |
| 88 | 93 | contentType: "application/json", |
| 89 | 94 | data: JSON.stringify(aInfos), |
| 90 | 95 | success: function(data){ |
| 91 | - Main_v2.downloadFile(data, "application/octet-stream", "时刻表信息.xls"); | |
| 96 | + oExcel.downloadFile(data, "application/octet-stream", "时刻表信息.xls"); | |
| 92 | 97 | |
| 93 | 98 | $(".exportAdd").removeClass("disabled"); |
| 94 | 99 | $(".exportAddSpan").html(" 导出数据"); |
| ... | ... | @@ -104,9 +109,9 @@ var Main_v2_2 = function() { |
| 104 | 109 | |
| 105 | 110 | $('.exportAddXlsx').on('click', function() { |
| 106 | 111 | var aInfos = { |
| 107 | - "lpObjList": _funCalcuExportData_lpObjList(aInternalLpObj), // 路牌班次信息列表 | |
| 108 | - "statInfoList": _funCalcuExportData_statInfoList(aInternalLpObj), // 统计项目列表 | |
| 109 | - "parameterInfoList" : __funCalcuExportData_paramInfoList() // 参数对象 | |
| 112 | + "lpObjList": oExcel.fnGetLpBcInfoList(), // 路牌班次信息列表 | |
| 113 | + "statInfoList": oExcel.fnGetStatInfoList(), // 统计项目列表 | |
| 114 | + "parameterInfoList" : oExcel.fnGetParamInfoList() // 参数对象 | |
| 110 | 115 | }; |
| 111 | 116 | |
| 112 | 117 | console.log(aInfos); |
| ... | ... | @@ -122,7 +127,7 @@ var Main_v2_2 = function() { |
| 122 | 127 | contentType: "application/json", |
| 123 | 128 | data: JSON.stringify(aInfos), |
| 124 | 129 | success: function(data){ |
| 125 | - Main_v2.downloadFile(data, "application/octet-stream", "时刻表信息.xlsx"); | |
| 130 | + oExcel.downloadFile(data, "application/octet-stream", "时刻表信息.xlsx"); | |
| 126 | 131 | |
| 127 | 132 | $(".exportAdd").removeClass("disabled"); |
| 128 | 133 | $(".exportAddSpan").html(" 导出数据"); |
| ... | ... | @@ -135,76 +140,8 @@ var Main_v2_2 = function() { |
| 135 | 140 | } |
| 136 | 141 | }); |
| 137 | 142 | }); |
| 138 | - }, | |
| 143 | + } | |
| 139 | 144 | |
| 140 | - downloadFile: function (data, mimeType, fileName) { | |
| 141 | - var success = false; | |
| 142 | - var blob = new Blob([data], { type: mimeType }); | |
| 143 | - try { | |
| 144 | - if (navigator.msSaveBlob) | |
| 145 | - navigator.msSaveBlob(blob, fileName); | |
| 146 | - else { | |
| 147 | - // Try using other saveBlob implementations, if available | |
| 148 | - var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob; | |
| 149 | - if (saveBlob === undefined) throw "Not supported"; | |
| 150 | - saveBlob(blob, fileName); | |
| 151 | - } | |
| 152 | - success = true; | |
| 153 | - } catch (ex) { | |
| 154 | - console.log("saveBlob method failed with the following exception:"); | |
| 155 | - console.log(ex); | |
| 156 | - } | |
| 157 | - | |
| 158 | - if (!success) { | |
| 159 | - // Get the blob url creator | |
| 160 | - var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL; | |
| 161 | - if (urlCreator) { | |
| 162 | - // Try to use a download link | |
| 163 | - var link = document.createElement('a'); | |
| 164 | - if ('download' in link) { | |
| 165 | - // Try to simulate a click | |
| 166 | - try { | |
| 167 | - // Prepare a blob URL | |
| 168 | - var url = urlCreator.createObjectURL(blob); | |
| 169 | - link.setAttribute('href', url); | |
| 170 | - | |
| 171 | - // Set the download attribute (Supported in Chrome 14+ / Firefox 20+) | |
| 172 | - link.setAttribute("download", fileName); | |
| 173 | - | |
| 174 | - // Simulate clicking the download link | |
| 175 | - var event = document.createEvent('MouseEvents'); | |
| 176 | - event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); | |
| 177 | - link.dispatchEvent(event); | |
| 178 | - success = true; | |
| 179 | - | |
| 180 | - } catch (ex) { | |
| 181 | - console.log("Download link method with simulated click failed with the following exception:"); | |
| 182 | - console.log(ex); | |
| 183 | - } | |
| 184 | - } | |
| 185 | 145 | |
| 186 | - if (!success) { | |
| 187 | - // Fallback to window.location method | |
| 188 | - try { | |
| 189 | - // Prepare a blob URL | |
| 190 | - // Use application/octet-stream when using window.location to force download | |
| 191 | - var url = urlCreator.createObjectURL(blob); | |
| 192 | - window.location = url; | |
| 193 | - console.log("Download link method with window.location succeeded"); | |
| 194 | - success = true; | |
| 195 | - } catch (ex) { | |
| 196 | - console.log("Download link method with window.location failed with the following exception:"); | |
| 197 | - console.log(ex); | |
| 198 | - } | |
| 199 | - } | |
| 200 | - } | |
| 201 | - } | |
| 202 | - | |
| 203 | - if (!success) { | |
| 204 | - // Fallback to window.open method | |
| 205 | - console.log("No methods worked for saving the arraybuffer, using last resort window.open"); | |
| 206 | - window.open("", '_blank', ''); | |
| 207 | - } | |
| 208 | - } | |
| 209 | 146 | } |
| 210 | 147 | }(); |
| 211 | 148 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/paramadd.html
| ... | ... | @@ -549,11 +549,15 @@ |
| 549 | 549 | } else if (ganttMap.baseRes == "3") { // v2_2版本 |
| 550 | 550 | csMap = getCSMap_v2(paramObj); |
| 551 | 551 | data = _mainFun_v2_2.BXPplaceClassesTime03(paramObj, csMap.maxCar); |
| 552 | - _mainFun_v2_2.exportDataConfig(data.aInternalLpObj); | |
| 553 | 552 | } |
| 554 | 553 | |
| 555 | 554 | echartsDrawGTT.init(data.json,true,true); |
| 556 | 555 | |
| 556 | + if (ganttMap.baseRes == "3") { | |
| 557 | + // 导入导出设置 | |
| 558 | + _mainFun_v2_2.exportExcelConfig($_GlobalGraph.getDataArray); | |
| 559 | + } | |
| 560 | + | |
| 557 | 561 | // var data = obj.getDataArray(); |
| 558 | 562 | // // 2、 调整路牌对应的班次总数 |
| 559 | 563 | // updFormParams(params,data); | ... | ... |
src/main/resources/static/pages/home.html
| ... | ... | @@ -59,16 +59,26 @@ |
| 59 | 59 | } |
| 60 | 60 | </style> |
| 61 | 61 | <div class="system_change_log"> |
| 62 | - <h2 style="text-indent: 35px;margin: 10px 0 5px;">2018-04-12 更新说明 Changelog</h2> | |
| 62 | + <h2 style="text-indent: 35px;margin: 10px 0 5px;">2018-08-23 更新说明 Changelog</h2> | |
| 63 | 63 | <br><br> |
| 64 | 64 | <ul > |
| 65 | 65 | <li class="sub_title"><h6>计划调度</h6></li> |
| 66 | - <li><span class="label s_c_change">修复</span>1、控制相同线路并发生成计划可能重复班次的问题。</li> | |
| 66 | + <li><span class="label s_c_change">修复</span>1、添加新的排班验证规则,如果当天的时刻表有的路牌在排班数据中没有,提示错误。</li> | |
| 67 | + <li><span class="label s_c_change">修复</span>2、修改车辆(或人员)时,判定是否属于当前用户所属分公司中,不属于提示错误,允许继续保存。</li> | |
| 68 | + <li><span class="label s_c_change">修复</span>3、修改车辆时(或人员)时,判定是否属于当前用户所属公司中,不属于显示警告信息,不能保存。</li> | |
| 69 | + <li class="sub_title"><h6>运管处平台</h6></li> | |
| 70 | + <li><span class="label s_c_change">修复</span>1、上传时刻表时,记录时刻表对应的版本号以及该版本对应的历史站点路由信息。</li> | |
| 71 | + <li><span class="label s_c_change">修复</span>2、上传时刻表时,针对线路编码、时刻表执行时间、首末站点名称,首末站点序号这几个要素做出判断,不符合要求的要素做出相应的提示。</li> | |
| 72 | + <li class="sub_title"><h6>统计报表</h6></li> | |
| 73 | + <li><span class="label s_c_change">修复</span>1、对集群调度系统“报表管理”中各类统计报表(只提供单线汇总统计的报表除外),增设线路性质区分统计功能选项,按“全部线路”、“营运线路”、“非营运线路”进行区分,且默认选项为“营运线路”)。</li> | |
| 74 | + <li><span class="label s_c_change">修复</span>2、对集群调度系统“报表管理”中各类统计报表(只提供单线汇总统计的报表除外),增设四家直属公司统计选项。</li> | |
| 75 | + <li><span class="label s_c_change">修复</span>3、在“营运线路出车率统计表”中,增加早高峰出车率统计项,计算公式:早高峰实际出车数/线路计划配车数。</li> | |
| 76 | + <li><span class="label s_c_change">修复</span>4、发车准点率中加入到站准点率,统计班次为首站发车为起点站的班次。</li> | |
| 77 | + <li><span class="label s_c_change">修复</span>5、统计日报调度日报烂班详细统计标准以“调度日报”为准。</li> | |
| 67 | 78 | <li class="sub_title"><h6>线调</h6></li> |
| 68 | - <li><span class="label s_c_change">修复</span>2、修正“误点自动待发调整功能”在某些特定场景下失效的问题。</li> | |
| 69 | - <li><span class="label s_c_change">修复</span>3、修正“轨迹回放”页面,车辆“选择”展开的“线路配车”数据列表里,没有排除已报废配车数据的问题。</li> | |
| 70 | - <li><span class="label s_c_add">新增</span>4、线路配置里的“场既是站”设置,现在可以设置多个停车场。</li> | |
| 71 | - <li><span class="label s_c_add">新增</span>5、换人换车时,如果跨分公司换人换车,系统会弹出提示,需确认后才能调换。</li> | |
| 72 | - <li><span class="label s_c_add">新增</span>6、如果“班次站点编码”和当前线路版本的“实际站点编码”不符,班次表格上会出现提示。</li> | |
| 79 | + <li><span class="label s_c_change">修复</span>1、修正一个线调bug,这个bug导致部分套跑班车的车辆,一定几率会出现车载线路无法正常切换问题。</li> | |
| 80 | + <li class="sub_title"><h6>基础信息</h6></li> | |
| 81 | + <li><span class="label s_c_change">修复</span>1、车辆设备管理,只有新增,没有修改、作废,启用日期使用保存的时间。</li> | |
| 82 | + <li><span class="label s_c_change">修复</span>2、线路相关问题优化(站点缓冲区修改多边形中心点可拖动,可以修改为圆形、修改后定位、线路文件上传可填写版本)。</li> | |
| 73 | 83 | </ul> |
| 74 | 84 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/Gruntfile.js
| ... | ... | @@ -114,7 +114,8 @@ module.exports = function (grunt) { |
| 114 | 114 | 'module/core/schedulePlanManage/report/ext/route.js', // 排班计划明日运营模块Ext |
| 115 | 115 | 'module/core/scheduleRuleManage/route.js', // 排班规则管理模块 |
| 116 | 116 | 'module/core/ttInfoManage/route.js', // 时刻表管理模块 |
| 117 | - 'module/core/ttInfoManage/detailedit/route.js' // 时刻表明细管理模块 | |
| 117 | + 'module/core/ttInfoManage/detailedit/route.js', // 时刻表明细管理模块 | |
| 118 | + 'module/core/ttInfoManage2/route.js' // 智能时刻表管理模块 | |
| 118 | 119 | ], |
| 119 | 120 | dest: 'module/common/prj-common-ui-route-state.js' |
| 120 | 121 | }, | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
| ... | ... | @@ -164,7 +164,8 @@ angular.module('ScheduleApp').controller( |
| 164 | 164 | self.submit = function() { |
| 165 | 165 | console.log(self.deviceInfoForSave); |
| 166 | 166 | // 修改逻辑,只有新增,没有修改,作废,启用日期就是保存的日期 |
| 167 | - self.deviceInfoForSave.qyrq = new Date().getTime(); | |
| 167 | + // 使用后台日期,不用前台日期 | |
| 168 | + // self.deviceInfoForSave.qyrq = new Date().getTime(); | |
| 168 | 169 | |
| 169 | 170 | // 保存或者更新 |
| 170 | 171 | self.deviceInfoForSave.$save(function() { | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
| ... | ... | @@ -1287,4 +1287,99 @@ ScheduleApp.config([ |
| 1287 | 1287 | ; |
| 1288 | 1288 | |
| 1289 | 1289 | } |
| 1290 | +]); | |
| 1291 | +// ui route 配置 | |
| 1292 | + | |
| 1293 | +/** 时刻表管理配置route */ | |
| 1294 | +ScheduleApp.config([ | |
| 1295 | + '$stateProvider', | |
| 1296 | + '$urlRouterProvider', | |
| 1297 | + function($stateProvider, $urlRouterProvider) { | |
| 1298 | + // 默认路由 | |
| 1299 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 1300 | + | |
| 1301 | + $stateProvider | |
| 1302 | + .state("ttInfoManage2", { // index页面 | |
| 1303 | + url: '/ttInfoManage2', | |
| 1304 | + views: { | |
| 1305 | + "": { | |
| 1306 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/index.html' | |
| 1307 | + }, | |
| 1308 | + "ttInfoManage2_list@ttInfoManage2": { | |
| 1309 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/list.html' | |
| 1310 | + } | |
| 1311 | + }, | |
| 1312 | + | |
| 1313 | + resolve: { | |
| 1314 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1315 | + return $ocLazyLoad.load({ | |
| 1316 | + name: 'ttInfoManage2_module', | |
| 1317 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1318 | + files: [ | |
| 1319 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1320 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1321 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 1322 | + ] | |
| 1323 | + }); | |
| 1324 | + }] | |
| 1325 | + } | |
| 1326 | + }) | |
| 1327 | + .state("ttInfoManage2_form", { // 添加时刻表信息form | |
| 1328 | + url: '/ttInfoManage2_form', | |
| 1329 | + views: { | |
| 1330 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/form.html'} | |
| 1331 | + }, | |
| 1332 | + resolve: { | |
| 1333 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1334 | + return $ocLazyLoad.load({ | |
| 1335 | + name: 'ttInfoManage2_form_module', | |
| 1336 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1337 | + files: [ | |
| 1338 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1339 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1340 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 1341 | + ] | |
| 1342 | + }); | |
| 1343 | + }] | |
| 1344 | + } | |
| 1345 | + }) | |
| 1346 | + .state("ttInfoManage2_edit", { // 修改时刻表信息form | |
| 1347 | + url: '/ttInfoManage2_edit/:id', | |
| 1348 | + views: { | |
| 1349 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/edit.html'} | |
| 1350 | + }, | |
| 1351 | + resolve: { | |
| 1352 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1353 | + return $ocLazyLoad.load({ | |
| 1354 | + name: 'ttInfoManage2_edit_module', | |
| 1355 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1356 | + files: [ | |
| 1357 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1358 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1359 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 1360 | + ] | |
| 1361 | + }); | |
| 1362 | + }] | |
| 1363 | + } | |
| 1364 | + }) | |
| 1365 | + .state("ttInfoManage2_detail", { // 时刻表详细信息 | |
| 1366 | + url: '/ttInfoManage2_detail/:id', | |
| 1367 | + views: { | |
| 1368 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/detail.html'} | |
| 1369 | + }, | |
| 1370 | + resolve: { | |
| 1371 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1372 | + return $ocLazyLoad.load({ | |
| 1373 | + name: 'ttInfoManage2_detail_module', | |
| 1374 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1375 | + files: [ | |
| 1376 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 1377 | + ] | |
| 1378 | + }); | |
| 1379 | + }] | |
| 1380 | + } | |
| 1381 | + }) | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + } | |
| 1290 | 1385 | ]); |
| 1291 | 1386 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| ... | ... | @@ -176,8 +176,8 @@ |
| 176 | 176 | <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑2 </a>--> |
| 177 | 177 | <a ui-sref="ttInfoDetailManage_edit3({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name, rflag : true, lineversion : info.lineVersion})" |
| 178 | 178 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> |
| 179 | - <a ng-click="ctrl.toTtInfoDetailAuto(info.id)" | |
| 180 | - class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a> | |
| 179 | + <!--<a ng-click="ctrl.toTtInfoDetailAuto(info.id)"--> | |
| 180 | + <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a>--> | |
| 181 | 181 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" |
| 182 | 182 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> |
| 183 | 183 | <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/detail.html
0 → 100644
| 1 | +<div class="page-head"> | |
| 2 | + <div class="page-title"> | |
| 3 | + <h1>智能时刻表管理</h1> | |
| 4 | + </div> | |
| 5 | +</div> | |
| 6 | + | |
| 7 | +<ul class="page-breadcrumb breadcrumb"> | |
| 8 | + <li> | |
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | + <i class="fa fa-circle"></i> | |
| 11 | + </li> | |
| 12 | + <li> | |
| 13 | + <span class="active">运营计划管理</span> | |
| 14 | + <i class="fa fa-circle"></i> | |
| 15 | + </li> | |
| 16 | + <li> | |
| 17 | + <a ui-sref="ttInfoManage2">智能时刻表管理</a> | |
| 18 | + <i class="fa fa-circle"></i> | |
| 19 | + </li> | |
| 20 | + <li> | |
| 21 | + <span class="active">时刻表基础信息</span> | |
| 22 | + </li> | |
| 23 | +</ul> | |
| 24 | + | |
| 25 | +<div class="portlet light bordered" ng-controller="TtInfoManage2DetailCtrl as ctrl"> | |
| 26 | + <div class="portlet-title"> | |
| 27 | + <div class="caption"> | |
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 29 | + class="caption-subject font-red-sunglo bold uppercase" | |
| 30 | + ng-bind="ctrl.title"></span> | |
| 31 | + </div> | |
| 32 | + </div> | |
| 33 | + | |
| 34 | + <div class="portlet-body form"> | |
| 35 | + <form class="form-horizontal" novalidate name="myForm"> | |
| 36 | + <!--<div class="alert alert-danger display-hide">--> | |
| 37 | + <!--<button class="close" data-close="alert"></button>--> | |
| 38 | + <!--您的输入有误,请检查下面的输入项--> | |
| 39 | + <!--</div>--> | |
| 40 | + | |
| 41 | + | |
| 42 | + <!-- 其他信息放置在这里 --> | |
| 43 | + <div class="form-body"> | |
| 44 | + <div class="form-group has-success has-feedback"> | |
| 45 | + <label class="col-md-2 control-label">线路*:</label> | |
| 46 | + <div class="col-md-4"> | |
| 47 | + <input type="text" class="form-control" | |
| 48 | + name="xl" ng-model="ctrl.ttInfoManageForDetail.xl.name" readonly/> | |
| 49 | + </div> | |
| 50 | + </div> | |
| 51 | + | |
| 52 | + <div class="form-group has-success has-feedback"> | |
| 53 | + <label class="col-md-2 control-label">线路走向*:</label> | |
| 54 | + <div class="col-md-4"> | |
| 55 | + <sa-Radiogroup model="ctrl.ttInfoManageForDetail.xlDir" dicgroup="LineTrend2" name="xlDir" disabled="true"></sa-Radiogroup> | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + | |
| 59 | + <div class="form-group has-success has-feedback"> | |
| 60 | + <label class="col-md-2 control-label">时刻表名字*:</label> | |
| 61 | + <div class="col-md-4"> | |
| 62 | + <input type="text" class="form-control" | |
| 63 | + name="name" ng-model="ctrl.ttInfoManageForDetail.name" readonly/> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + | |
| 67 | + <div class="form-group has-success has-feedback"> | |
| 68 | + <label class="col-md-2 control-label">启用日期*:</label> | |
| 69 | + <div class="col-md-4"> | |
| 70 | + <input type="text" class="form-control" | |
| 71 | + name="qyrq" uib-datepicker-popup="yyyy年MM月dd日" | |
| 72 | + ng-model="ctrl.ttInfoManageForDetail.qyrq" readonly/> | |
| 73 | + </div> | |
| 74 | + </div> | |
| 75 | + | |
| 76 | + <div class="form-group has-success has-feedback"> | |
| 77 | + <label class="col-md-2 control-label">是否启用*:</label> | |
| 78 | + <div class="col-md-4"> | |
| 79 | + <sa-Radiogroup model="ctrl.ttInfoManageForDetail.isEnableDisTemplate" dicgroup="truefalseType" name="isEnableDisTemplate" disabled="true"></sa-Radiogroup> | |
| 80 | + </div> | |
| 81 | + | |
| 82 | + </div> | |
| 83 | + | |
| 84 | + <!--<div class="form-group">--> | |
| 85 | + <!--<label class="col-md-2 control-label">路牌数量:</label>--> | |
| 86 | + <!--<div class="col-md-4">--> | |
| 87 | + <!--<input type="number" class="form-control" ng-value="ctrl.ttInfoManageForDetail.lpCount"--> | |
| 88 | + <!--name="lpCount" placeholder="请输入路牌数" min="1" readonly/>--> | |
| 89 | + <!--</div>--> | |
| 90 | + <!--</div>--> | |
| 91 | + | |
| 92 | + <!--<div class="form-group">--> | |
| 93 | + <!--<label class="col-md-2 control-label">营运圈数:</label>--> | |
| 94 | + <!--<div class="col-md-4">--> | |
| 95 | + <!--<input type="number" class="form-control" ng-value="ctrl.ttInfoManageForDetail.loopCount"--> | |
| 96 | + <!--name="loopCount" placeholder="请输入圈数" min="1" readonly/>--> | |
| 97 | + <!--</div>--> | |
| 98 | + <!--</div>--> | |
| 99 | + | |
| 100 | + <!--<div class="form-group">--> | |
| 101 | + <!--<label class="col-md-2 control-label">停车场:</label>--> | |
| 102 | + <!--<div class="col-md-4">--> | |
| 103 | + <!--<input type="text" class="form-control" ng-value="ctrl.ttInfoManageForDetail.xl.carParkCode | dict:'CarPark':'未知' "--> | |
| 104 | + <!--name="carParkCode" readonly/>--> | |
| 105 | + <!--</div>--> | |
| 106 | + <!--</div>--> | |
| 107 | + | |
| 108 | + <div class="form-group"> | |
| 109 | + <label class="col-md-2 control-label">常规有效日:</label> | |
| 110 | + <div class="col-md-6"> | |
| 111 | + <sa-Checkboxgroup model="ctrl.timeTableManageForForm" | |
| 112 | + name="rule_days" | |
| 113 | + dcvalue="{{ctrl.ttInfoManageForDetail.rule_days}}" | |
| 114 | + disabled > | |
| 115 | + </sa-Checkboxgroup> | |
| 116 | + </div> | |
| 117 | + </div> | |
| 118 | + | |
| 119 | + <div class="form-group"> | |
| 120 | + <label class="col-md-2 control-label">特殊有效日:</label> | |
| 121 | + <div class="col-md-6"> | |
| 122 | + <sa-Dategroup model="ctrl.ttInfoManageForDetail" | |
| 123 | + name="special_days" | |
| 124 | + dcvalue="{{ctrl.timeTableManageForDetail.special_days}}" | |
| 125 | + disabled | |
| 126 | + > | |
| 127 | + </sa-Dategroup> | |
| 128 | + </div> | |
| 129 | + </div> | |
| 130 | + | |
| 131 | + <!--<div class="form-group">--> | |
| 132 | + <!--<label class="col-md-2 control-label">备注:</label>--> | |
| 133 | + <!--</div>--> | |
| 134 | + | |
| 135 | + <div class="form-group"> | |
| 136 | + <label class="col-md-2 control-label">创建人:</label> | |
| 137 | + <div class="col-md-4"> | |
| 138 | + <input type="text" class="form-control" ng-value="ctrl.ttInfoManageForDetail.createBy.name" | |
| 139 | + name="createBy" readonly/> | |
| 140 | + </div> | |
| 141 | + </div> | |
| 142 | + | |
| 143 | + <div class="form-group"> | |
| 144 | + <label class="col-md-2 control-label">创建时间:</label> | |
| 145 | + <div class="col-md-4"> | |
| 146 | + <input type="text" class="form-control" ng-model="ctrl.ttInfoManageForDetail.createDate" | |
| 147 | + name="createDate" uib-datepicker-popup="yyyy年MM月dd日 hh:mm:ss" | |
| 148 | + readonly/> | |
| 149 | + </div> | |
| 150 | + </div> | |
| 151 | + | |
| 152 | + <div class="form-group"> | |
| 153 | + <label class="col-md-2 control-label">更新人:</label> | |
| 154 | + <div class="col-md-4"> | |
| 155 | + <input type="text" class="form-control" ng-value="ctrl.ttInfoManageForDetail.updateBy.name" | |
| 156 | + name="updateBy" readonly/> | |
| 157 | + </div> | |
| 158 | + </div> | |
| 159 | + | |
| 160 | + <div class="form-group"> | |
| 161 | + <label class="col-md-2 control-label">更新时间:</label> | |
| 162 | + <div class="col-md-4"> | |
| 163 | + <input type="text" class="form-control" ng-model="ctrl.ttInfoManageForDetail.updateDate" | |
| 164 | + name="updateDate" uib-datepicker-popup="yyyy年MM月dd日 hh:mm:ss" | |
| 165 | + readonly/> | |
| 166 | + </div> | |
| 167 | + </div> | |
| 168 | + | |
| 169 | + <!-- 其他form-group --> | |
| 170 | + | |
| 171 | + </div> | |
| 172 | + | |
| 173 | + </form> | |
| 174 | + | |
| 175 | + </div> | |
| 176 | + | |
| 177 | +</div> | |
| 0 | 178 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/edit.html
0 → 100644
| 1 | +<div class="page-head"> | |
| 2 | + <div class="page-title"> | |
| 3 | + <h1>智能时刻表管理</h1> | |
| 4 | + </div> | |
| 5 | +</div> | |
| 6 | + | |
| 7 | +<ul class="page-breadcrumb breadcrumb"> | |
| 8 | + <li> | |
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | + <i class="fa fa-circle"></i> | |
| 11 | + </li> | |
| 12 | + <li> | |
| 13 | + <span class="active">运营计划管理</span> | |
| 14 | + <i class="fa fa-circle"></i> | |
| 15 | + </li> | |
| 16 | + <li> | |
| 17 | + <a ui-sref="ttInfoManage2">智能时刻表管理</a> | |
| 18 | + <i class="fa fa-circle"></i> | |
| 19 | + </li> | |
| 20 | + <li> | |
| 21 | + <span class="active">修改时刻表基础信息</span> | |
| 22 | + </li> | |
| 23 | +</ul> | |
| 24 | + | |
| 25 | +<div class="portlet light bordered" ng-controller="TtInfoManage2FormCtrl as ctrl"> | |
| 26 | + <div class="portlet-title"> | |
| 27 | + <div class="caption"> | |
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 29 | + class="caption-subject font-red-sunglo bold uppercase">表单</span> | |
| 30 | + </div> | |
| 31 | + </div> | |
| 32 | + | |
| 33 | + <div class="portlet-body form"> | |
| 34 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | |
| 35 | + <!--<div class="alert alert-danger display-hide">--> | |
| 36 | + <!--<button class="close" data-close="alert"></button>--> | |
| 37 | + <!--您的输入有误,请检查下面的输入项--> | |
| 38 | + <!--</div>--> | |
| 39 | + | |
| 40 | + | |
| 41 | + <!-- 其他信息放置在这里 --> | |
| 42 | + <div class="form-body"> | |
| 43 | + <div class="form-group has-success has-feedback"> | |
| 44 | + <label class="col-md-2 control-label">线路*:</label> | |
| 45 | + <div class="col-md-3"> | |
| 46 | + <sa-Select5 name="xl" | |
| 47 | + model="ctrl.ttInfoManageForForm" | |
| 48 | + cmaps="{'xl.id' : 'id'}" | |
| 49 | + dcname="xl.id" | |
| 50 | + icname="id" | |
| 51 | + dsparams="{{ {type: 'ajax', param:{type: 'all', 'destroy_eq': 0}, atype:'xl' } | json }}" | |
| 52 | + iterobjname="item" | |
| 53 | + iterobjexp="item.name" | |
| 54 | + searchph="请输拼音..." | |
| 55 | + searchexp="this.name" | |
| 56 | + required > | |
| 57 | + </sa-Select5> | |
| 58 | + </div> | |
| 59 | + <!-- 隐藏块,显示验证信息 --> | |
| 60 | + <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> | |
| 61 | + 线路必须选择 | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + | |
| 65 | + <div class="form-group has-success has-feedback"> | |
| 66 | + <label class="col-md-2 control-label">线路走向*:</label> | |
| 67 | + <div class="col-md-3"> | |
| 68 | + <sa-Radiogroup model="ctrl.ttInfoManageForForm.xlDir" dicgroup="LineTrend2" name="xlDir" required></sa-Radiogroup> | |
| 69 | + </div> | |
| 70 | + <!-- 隐藏块,显示验证信息 --> | |
| 71 | + <div class="alert alert-danger well-sm" ng-show="myForm.xlDir.$error.required"> | |
| 72 | + 线路走向必须填写 | |
| 73 | + </div> | |
| 74 | + </div> | |
| 75 | + | |
| 76 | + <div class="form-group has-success has-feedback"> | |
| 77 | + <label class="col-md-2 control-label">时刻表名字*:</label> | |
| 78 | + <div class="col-md-3"> | |
| 79 | + <input type="text" class="form-control" ng-model="ctrl.ttInfoManageForForm.name" | |
| 80 | + name="name" placeholder="请输入时刻表名字..." required | |
| 81 | + remote-Validation | |
| 82 | + remotevtype="tic_name" | |
| 83 | + remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'name_eq': ctrl.ttInfoManageForForm.name} | json}}" | |
| 84 | + /> | |
| 85 | + </div> | |
| 86 | + | |
| 87 | + <!-- 隐藏块,显示验证信息 --> | |
| 88 | + <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.required"> | |
| 89 | + 时刻表名字必须填写 | |
| 90 | + </div> | |
| 91 | + <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.remote"> | |
| 92 | + 相同线路下的时刻表不能同名 | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + | |
| 96 | + <div class="form-group has-success has-feedback"> | |
| 97 | + <label class="col-md-2 control-label">启用日期*:</label> | |
| 98 | + <div class="col-md-3"> | |
| 99 | + <div class="input-group"> | |
| 100 | + <input type="text" class="form-control" | |
| 101 | + name="qyrq" placeholder="请选择启用日期..." | |
| 102 | + uib-datepicker-popup="yyyy年MM月dd日" | |
| 103 | + is-open="ctrl.qyrqOpen" | |
| 104 | + ng-model="ctrl.ttInfoManageForForm.qyrq" readonly required/> | |
| 105 | + <span class="input-group-btn"> | |
| 106 | + <button type="button" class="btn btn-default" ng-click="ctrl.qyrq_open()"> | |
| 107 | + <i class="glyphicon glyphicon-calendar"></i> | |
| 108 | + </button> | |
| 109 | + </span> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + | |
| 113 | + <!-- 隐藏块,显示验证信息 --> | |
| 114 | + <div class="alert alert-danger well-sm" ng-show="myForm.qyrq.$error.required"> | |
| 115 | + 启用日期必须填写 | |
| 116 | + </div> | |
| 117 | + </div> | |
| 118 | + | |
| 119 | + <div class="form-group has-success has-feedback"> | |
| 120 | + <label class="col-md-2 control-label">是否启用*:</label> | |
| 121 | + <div class="col-md-3"> | |
| 122 | + <sa-Radiogroup model="ctrl.ttInfoManageForForm.isEnableDisTemplate" dicgroup="truefalseType" name="isEnableDisTemplate" required></sa-Radiogroup> | |
| 123 | + </div> | |
| 124 | + | |
| 125 | + <!-- 隐藏块,显示验证信息 --> | |
| 126 | + <div class="alert alert-danger well-sm" ng-show="myForm.isEnableDisTemplate.$error.required"> | |
| 127 | + 是否启用必须选择 | |
| 128 | + </div> | |
| 129 | + | |
| 130 | + </div> | |
| 131 | + | |
| 132 | + <!--<div class="form-group">--> | |
| 133 | + <!--<label class="col-md-2 control-label">路牌数量:</label>--> | |
| 134 | + <!--<div class="col-md-3">--> | |
| 135 | + <!--<input type="number" class="form-control" ng-model="ctrl.ttInfoManageForForm.lpCount"--> | |
| 136 | + <!--name="lpCount" placeholder="请输入路牌数..." min="1"/>--> | |
| 137 | + <!--</div>--> | |
| 138 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.number">--> | |
| 139 | + <!--必须输入数字--> | |
| 140 | + <!--</div>--> | |
| 141 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.min">--> | |
| 142 | + <!--路爬数量必须大于1--> | |
| 143 | + <!--</div>--> | |
| 144 | + <!--</div>--> | |
| 145 | + | |
| 146 | + <!--<div class="form-group">--> | |
| 147 | + <!--<label class="col-md-2 control-label">营运圈数:</label>--> | |
| 148 | + <!--<div class="col-md-3">--> | |
| 149 | + <!--<input type="number" class="form-control" ng-model="ctrl.ttInfoManageForForm.loopCount"--> | |
| 150 | + <!--name="loopCount" placeholder="请输入圈数..." min="1"/>--> | |
| 151 | + <!--</div>--> | |
| 152 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.number">--> | |
| 153 | + <!--必须输入数字--> | |
| 154 | + <!--</div>--> | |
| 155 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.min">--> | |
| 156 | + <!--营运圈数必须大于1--> | |
| 157 | + <!--</div>--> | |
| 158 | + <!--</div>--> | |
| 159 | + | |
| 160 | + <div class="form-group"> | |
| 161 | + <label class="col-md-2 control-label">常规有效日:</label> | |
| 162 | + <div class="col-md-6"> | |
| 163 | + <sa-Checkboxgroup model="ctrl.ttInfoManageForForm" | |
| 164 | + name="rule_days" | |
| 165 | + dcvalue="{{ctrl.ttInfoManageForForm.rule_days}}" | |
| 166 | + dcname="rule_days" | |
| 167 | + required > | |
| 168 | + </sa-Checkboxgroup> | |
| 169 | + | |
| 170 | + <input type="hidden" name="rule_days_h" ng-model="ctrl.ttInfoManageForForm.rule_days" | |
| 171 | + remote-Warn | |
| 172 | + remotewtype="tic_n_d" | |
| 173 | + remotewparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'rule_days_eq': ctrl.ttInfoManageForForm.rule_days} | json}}" | |
| 174 | + remotewmsgprop="rule_days_warn" | |
| 175 | + /> | |
| 176 | + | |
| 177 | + </div> | |
| 178 | + <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required"> | |
| 179 | + 请操作一下1 | |
| 180 | + </div> | |
| 181 | + <div class="alert alert-warning well-sm" ng-show="ctrl.rule_days_warn"> | |
| 182 | + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> | |
| 183 | + {{ctrl.rule_days_warn}} | |
| 184 | + </div> | |
| 185 | + </div> | |
| 186 | + | |
| 187 | + <div class="form-group"> | |
| 188 | + <label class="col-md-2 control-label">特殊有效日:</label> | |
| 189 | + <div class="col-md-6"> | |
| 190 | + <sa-Dategroup model="ctrl.ttInfoManageForForm" | |
| 191 | + name="special_days" | |
| 192 | + dcvalue="{{ctrl.ttInfoManageForForm.special_days}}" | |
| 193 | + dcname="special_days" | |
| 194 | + > | |
| 195 | + </sa-Dategroup> | |
| 196 | + | |
| 197 | + <input type="hidden" name="special_days_h" ng-model="ctrl.ttInfoManageForForm.special_days" | |
| 198 | + remote-Warn | |
| 199 | + remotewtype="tic_s_d" | |
| 200 | + remotewparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'special_days_eq': ctrl.ttInfoManageForForm.special_days} | json}}" | |
| 201 | + remotewmsgprop="rule_special_days_warn" | |
| 202 | + /> | |
| 203 | + </div> | |
| 204 | + <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required"> | |
| 205 | + 请操作一下2 | |
| 206 | + </div> | |
| 207 | + | |
| 208 | + <div class="alert alert-warning well-sm" ng-show="ctrl.rule_special_days_warn"> | |
| 209 | + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> | |
| 210 | + {{ctrl.rule_special_days_warn}} | |
| 211 | + </div> | |
| 212 | + </div> | |
| 213 | + | |
| 214 | + <!--<div class="form-group">--> | |
| 215 | + <!--<label class="col-md-2 control-label">备注:</label>--> | |
| 216 | + <!--</div>--> | |
| 217 | + | |
| 218 | + <!-- 其他form-group --> | |
| 219 | + | |
| 220 | + </div> | |
| 221 | + | |
| 222 | + <!-- TODO:!myForm.$valid 在这里有点问题,改用以下方法验证 --> | |
| 223 | + <div class="form-actions"> | |
| 224 | + <div class="row"> | |
| 225 | + <div class="col-md-offset-3 col-md-4"> | |
| 226 | + <button type="submit" class="btn green" | |
| 227 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 228 | + <a type="button" class="btn default" ui-sref="ttInfoManage2" ><i class="fa fa-times"></i> 取消</a> | |
| 229 | + </div> | |
| 230 | + </div> | |
| 231 | + </div> | |
| 232 | + | |
| 233 | + </form> | |
| 234 | + | |
| 235 | + </div> | |
| 236 | + | |
| 237 | + | |
| 238 | +</div> | |
| 0 | 239 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/form.html
0 → 100644
| 1 | +<div class="page-head"> | |
| 2 | + <div class="page-title"> | |
| 3 | + <h1>智能时刻表管理</h1> | |
| 4 | + </div> | |
| 5 | +</div> | |
| 6 | + | |
| 7 | +<ul class="page-breadcrumb breadcrumb"> | |
| 8 | + <li> | |
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | + <i class="fa fa-circle"></i> | |
| 11 | + </li> | |
| 12 | + <li> | |
| 13 | + <span class="active">运营计划管理</span> | |
| 14 | + <i class="fa fa-circle"></i> | |
| 15 | + </li> | |
| 16 | + <li> | |
| 17 | + <a ui-sref="ttInfoManage2">智能时刻表管理</a> | |
| 18 | + <i class="fa fa-circle"></i> | |
| 19 | + </li> | |
| 20 | + <li> | |
| 21 | + <span class="active">添加时刻表基础信息</span> | |
| 22 | + </li> | |
| 23 | +</ul> | |
| 24 | + | |
| 25 | +<div class="portlet light bordered" ng-controller="TtInfoManage2FormCtrl as ctrl"> | |
| 26 | + <div class="portlet-title"> | |
| 27 | + <div class="caption"> | |
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 29 | + class="caption-subject font-red-sunglo bold uppercase">表单</span> | |
| 30 | + </div> | |
| 31 | + </div> | |
| 32 | + | |
| 33 | + <div class="portlet-body form"> | |
| 34 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | |
| 35 | + <!--<div class="alert alert-danger display-hide">--> | |
| 36 | + <!--<button class="close" data-close="alert"></button>--> | |
| 37 | + <!--您的输入有误,请检查下面的输入项--> | |
| 38 | + <!--</div>--> | |
| 39 | + | |
| 40 | + | |
| 41 | + <!-- 其他信息放置在这里 --> | |
| 42 | + <div class="form-body"> | |
| 43 | + <div class="form-group has-success has-feedback"> | |
| 44 | + <label class="col-md-2 control-label">线路*:</label> | |
| 45 | + <div class="col-md-3"> | |
| 46 | + <sa-Select5 name="xl" | |
| 47 | + model="ctrl.ttInfoManageForForm" | |
| 48 | + cmaps="{'xl.id' : 'id'}" | |
| 49 | + dcname="xl.id" | |
| 50 | + icname="id" | |
| 51 | + dsparams="{{ {type: 'ajax', param:{type: 'all', 'destroy_eq': 0}, atype:'xl' } | json }}" | |
| 52 | + iterobjname="item" | |
| 53 | + iterobjexp="item.name" | |
| 54 | + searchph="请输拼音..." | |
| 55 | + searchexp="this.name" | |
| 56 | + required > | |
| 57 | + </sa-Select5> | |
| 58 | + </div> | |
| 59 | + <!-- 隐藏块,显示验证信息 --> | |
| 60 | + <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> | |
| 61 | + 线路必须选择 | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + | |
| 65 | + <div class="form-group has-success has-feedback"> | |
| 66 | + <label class="col-md-2 control-label">线路走向*:</label> | |
| 67 | + <div class="col-md-3"> | |
| 68 | + <sa-Radiogroup model="ctrl.ttInfoManageForForm.xlDir" dicgroup="LineTrend2" name="xlDir" required></sa-Radiogroup> | |
| 69 | + </div> | |
| 70 | + <!-- 隐藏块,显示验证信息 --> | |
| 71 | + <div class="alert alert-danger well-sm" ng-show="myForm.xlDir.$error.required"> | |
| 72 | + 线路走向必须填写 | |
| 73 | + </div> | |
| 74 | + </div> | |
| 75 | + | |
| 76 | + <div class="form-group has-success has-feedback"> | |
| 77 | + <label class="col-md-2 control-label">时刻表名字*:</label> | |
| 78 | + <div class="col-md-3"> | |
| 79 | + <input type="text" class="form-control" ng-model="ctrl.ttInfoManageForForm.name" | |
| 80 | + name="name" placeholder="请输入时刻表名字..." required | |
| 81 | + remote-Validation | |
| 82 | + remotevtype="tic_name" | |
| 83 | + remotevparam="{{ {'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'name_eq': ctrl.ttInfoManageForForm.name} | json}}" | |
| 84 | + /> | |
| 85 | + </div> | |
| 86 | + | |
| 87 | + <!-- 隐藏块,显示验证信息 --> | |
| 88 | + <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.required"> | |
| 89 | + 时刻表名字必须填写 | |
| 90 | + </div> | |
| 91 | + <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.remote"> | |
| 92 | + 相同线路下的时刻表不能同名 | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + | |
| 96 | + <div class="form-group has-success has-feedback"> | |
| 97 | + <label class="col-md-2 control-label">启用日期*:</label> | |
| 98 | + <div class="col-md-3"> | |
| 99 | + <div class="input-group"> | |
| 100 | + <input type="text" class="form-control" | |
| 101 | + name="qyrq" placeholder="请选择启用日期..." | |
| 102 | + uib-datepicker-popup="yyyy年MM月dd日" | |
| 103 | + is-open="ctrl.qyrqOpen" | |
| 104 | + ng-model="ctrl.ttInfoManageForForm.qyrq" readonly required/> | |
| 105 | + <span class="input-group-btn"> | |
| 106 | + <button type="button" class="btn btn-default" ng-click="ctrl.qyrq_open()"> | |
| 107 | + <i class="glyphicon glyphicon-calendar"></i> | |
| 108 | + </button> | |
| 109 | + </span> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + | |
| 113 | + <!-- 隐藏块,显示验证信息 --> | |
| 114 | + <div class="alert alert-danger well-sm" ng-show="myForm.qyrq.$error.required"> | |
| 115 | + 启用日期必须填写 | |
| 116 | + </div> | |
| 117 | + </div> | |
| 118 | + | |
| 119 | + <div class="form-group has-success has-feedback"> | |
| 120 | + <label class="col-md-2 control-label">是否启用*:</label> | |
| 121 | + <div class="col-md-3"> | |
| 122 | + <sa-Radiogroup model="ctrl.ttInfoManageForForm.isEnableDisTemplate" dicgroup="truefalseType" name="isEnableDisTemplate" required></sa-Radiogroup> | |
| 123 | + </div> | |
| 124 | + | |
| 125 | + <!-- 隐藏块,显示验证信息 --> | |
| 126 | + <div class="alert alert-danger well-sm" ng-show="myForm.isEnableDisTemplate.$error.required"> | |
| 127 | + 是否启用必须选择 | |
| 128 | + </div> | |
| 129 | + | |
| 130 | + </div> | |
| 131 | + | |
| 132 | + <!--<div class="form-group">--> | |
| 133 | + <!--<label class="col-md-2 control-label">路牌数量:</label>--> | |
| 134 | + <!--<div class="col-md-3">--> | |
| 135 | + <!--<input type="number" class="form-control" ng-model="ctrl.ttInfoManageForForm.lpCount"--> | |
| 136 | + <!--name="lpCount" placeholder="请输入路牌数..." min="1"/>--> | |
| 137 | + <!--</div>--> | |
| 138 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.number">--> | |
| 139 | + <!--必须输入数字--> | |
| 140 | + <!--</div>--> | |
| 141 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.min">--> | |
| 142 | + <!--路爬数量必须大于1--> | |
| 143 | + <!--</div>--> | |
| 144 | + <!--</div>--> | |
| 145 | + | |
| 146 | + <!--<div class="form-group">--> | |
| 147 | + <!--<label class="col-md-2 control-label">营运圈数:</label>--> | |
| 148 | + <!--<div class="col-md-3">--> | |
| 149 | + <!--<input type="number" class="form-control" ng-model="ctrl.ttInfoManageForForm.loopCount"--> | |
| 150 | + <!--name="loopCount" placeholder="请输入圈数..." min="1"/>--> | |
| 151 | + <!--</div>--> | |
| 152 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.number">--> | |
| 153 | + <!--必须输入数字--> | |
| 154 | + <!--</div>--> | |
| 155 | + <!--<div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.min">--> | |
| 156 | + <!--营运圈数必须大于1--> | |
| 157 | + <!--</div>--> | |
| 158 | + <!--</div>--> | |
| 159 | + | |
| 160 | + <div class="form-group"> | |
| 161 | + <label class="col-md-2 control-label">常规有效日:</label> | |
| 162 | + <div class="col-md-6"> | |
| 163 | + <sa-Checkboxgroup model="ctrl.ttInfoManageForForm" | |
| 164 | + name="rule_days" | |
| 165 | + dcvalue="{{ctrl.ttInfoManageForForm.rule_days}}" | |
| 166 | + dcname="rule_days" | |
| 167 | + required > | |
| 168 | + </sa-Checkboxgroup> | |
| 169 | + | |
| 170 | + <input type="hidden" name="rule_days_h" ng-model="ctrl.ttInfoManageForForm.rule_days" | |
| 171 | + remote-Warn | |
| 172 | + remotewtype="tic_n_d" | |
| 173 | + remotewparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'rule_days_eq': ctrl.ttInfoManageForForm.rule_days} | json}}" | |
| 174 | + remotewmsgprop="rule_days_warn" | |
| 175 | + /> | |
| 176 | + </div> | |
| 177 | + <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required"> | |
| 178 | + 请操作一下1 | |
| 179 | + </div> | |
| 180 | + <div class="alert alert-warning well-sm" ng-show="ctrl.rule_days_warn"> | |
| 181 | + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> | |
| 182 | + {{ctrl.rule_days_warn}} | |
| 183 | + </div> | |
| 184 | + </div> | |
| 185 | + | |
| 186 | + <div class="form-group"> | |
| 187 | + <label class="col-md-2 control-label">特殊有效日:</label> | |
| 188 | + <div class="col-md-6"> | |
| 189 | + <sa-Dategroup model="ctrl.ttInfoManageForForm" | |
| 190 | + name="special_days" | |
| 191 | + dcvalue="{{ctrl.ttInfoManageForForm.special_days}}" | |
| 192 | + dcname="special_days" | |
| 193 | + > | |
| 194 | + </sa-Dategroup> | |
| 195 | + | |
| 196 | + <input type="hidden" name="special_days_h" ng-model="ctrl.ttInfoManageForForm.special_days" | |
| 197 | + remote-Warn | |
| 198 | + remotewtype="tic_s_d" | |
| 199 | + remotewparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'special_days_eq': ctrl.ttInfoManageForForm.special_days} | json}}" | |
| 200 | + remotewmsgprop="rule_special_days_warn" | |
| 201 | + /> | |
| 202 | + </div> | |
| 203 | + <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required"> | |
| 204 | + 请操作一下2 | |
| 205 | + </div> | |
| 206 | + | |
| 207 | + <div class="alert alert-warning well-sm" ng-show="ctrl.rule_special_days_warn"> | |
| 208 | + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> | |
| 209 | + {{ctrl.rule_special_days_warn}} | |
| 210 | + </div> | |
| 211 | + </div> | |
| 212 | + | |
| 213 | + <!--<div class="form-group">--> | |
| 214 | + <!--<label class="col-md-2 control-label">备注:</label>--> | |
| 215 | + <!--</div>--> | |
| 216 | + | |
| 217 | + <!-- 其他form-group --> | |
| 218 | + | |
| 219 | + </div> | |
| 220 | + | |
| 221 | + <!-- TODO:!myForm.$valid 在这里有点问题,改用以下方法验证 --> | |
| 222 | + <div class="form-actions"> | |
| 223 | + <div class="row"> | |
| 224 | + <div class="col-md-offset-3 col-md-4"> | |
| 225 | + <button type="submit" class="btn green" | |
| 226 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 227 | + <a type="button" class="btn default" ui-sref="ttInfoManage2" ><i class="fa fa-times"></i> 取消</a> | |
| 228 | + </div> | |
| 229 | + </div> | |
| 230 | + </div> | |
| 231 | + | |
| 232 | + </form> | |
| 233 | + | |
| 234 | + </div> | |
| 235 | + | |
| 236 | + | |
| 237 | +</div> | |
| 0 | 238 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/index.html
0 → 100644
| 1 | +<div class="page-head"> | |
| 2 | + <div class="page-title"> | |
| 3 | + <h1>智能时刻表管理</h1> | |
| 4 | + </div> | |
| 5 | +</div> | |
| 6 | + | |
| 7 | +<ul class="page-breadcrumb breadcrumb"> | |
| 8 | + <li> | |
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | + <i class="fa fa-circle"></i> | |
| 11 | + </li> | |
| 12 | + <li> | |
| 13 | + <span class="active">运营计划管理</span> | |
| 14 | + <i class="fa fa-circle"></i> | |
| 15 | + </li> | |
| 16 | + <li> | |
| 17 | + <span class="active">智能时刻表管理</span> | |
| 18 | + </li> | |
| 19 | +</ul> | |
| 20 | + | |
| 21 | +<div class="row"> | |
| 22 | + <div class="col-md-12" ng-controller="TtInfoManage2IndexCtrl as ctrl"> | |
| 23 | + <div class="portlet light bordered"> | |
| 24 | + <div class="portlet-title"> | |
| 25 | + <div class="caption font-dark"> | |
| 26 | + <i class="fa fa-database font-dark"></i> | |
| 27 | + <span class="caption-subject bold uppercase">时刻表</span> | |
| 28 | + </div> | |
| 29 | + <div class="actions"> | |
| 30 | + <!--<a ui-sref="ttInfoManage_test" class="btn btn-circle blue">--> | |
| 31 | + <!--<i class="fa fa-plus"></i>--> | |
| 32 | + <!--测试--> | |
| 33 | + <!--</a>--> | |
| 34 | + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.toTtInfoManageForm()"> | |
| 35 | + <i class="fa fa-plus"></i> | |
| 36 | + 添加时刻表 | |
| 37 | + </a> | |
| 38 | + | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + | |
| 42 | + <div class="portlet-body"> | |
| 43 | + <div ui-view="ttInfoManage2_list"></div> | |
| 44 | + </div> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | +</div> | |
| 0 | 48 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/list.html
0 → 100644
| 1 | +<!-- ui-route employeeInfoManage.list --> | |
| 2 | +<div ng-controller="TtInfoManage2ListCtrl as ctrl"> | |
| 3 | + <div class="fixDiv"> | |
| 4 | + <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> | |
| 5 | + <thead> | |
| 6 | + <tr role="row" class="heading"> | |
| 7 | + <th style="width: 70px;">序号</th> | |
| 8 | + <th style="width: 150px;">线路</th> | |
| 9 | + <th style="width: 180px;">时刻表名称</th> | |
| 10 | + <th style="width: 80px">上下行</th> | |
| 11 | + <th style="width: 50px;">启用</th> | |
| 12 | + <th style="width: 130px">操作日期</th> | |
| 13 | + <th style="width: 80px">状态</th> | |
| 14 | + <th style="width: 60%">时刻表明细</th> | |
| 15 | + <th style="width: 40%">操作</th> | |
| 16 | + </tr> | |
| 17 | + <tr role="row" class="filter"> | |
| 18 | + <td></td> | |
| 19 | + <td> | |
| 20 | + <sa-Select5 name="xl" | |
| 21 | + model="ctrl.searchCondition()" | |
| 22 | + cmaps="{'xl.id_eq' : 'id'}" | |
| 23 | + dcname="xl.id_eq" | |
| 24 | + icname="id" | |
| 25 | + dsparams="{{ {type: 'ajax', param:{type: 'all', 'destroy_eq': 0}, atype:'xl' } | json }}" | |
| 26 | + iterobjname="item" | |
| 27 | + iterobjexp="item.name" | |
| 28 | + searchph="请输拼音..." | |
| 29 | + searchexp="this.name" | |
| 30 | + required > | |
| 31 | + </sa-Select5> | |
| 32 | + </td> | |
| 33 | + <td> | |
| 34 | + <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition().name_like" placeholder="输入时刻表名称..."/> | |
| 35 | + </td> | |
| 36 | + <td></td> | |
| 37 | + <td> | |
| 38 | + <label class="checkbox-inline"> | |
| 39 | + <input type="checkbox" ng-model="ctrl.searchCondition()['isEnableDisTemplate_eq']"/>是 | |
| 40 | + </label> | |
| 41 | + </td> | |
| 42 | + <td></td> | |
| 43 | + <td> | |
| 44 | + <label class="checkbox-inline"> | |
| 45 | + <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']"/>已作废 | |
| 46 | + </label> | |
| 47 | + </td> | |
| 48 | + <td></td> | |
| 49 | + <td> | |
| 50 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 51 | + ng-click="ctrl.doPage()"> | |
| 52 | + <i class="fa fa-search"></i> 搜索</button> | |
| 53 | + | |
| 54 | + <button class="btn btn-sm red btn-outline filter-cancel" | |
| 55 | + ng-click="ctrl.reset()"> | |
| 56 | + <i class="fa fa-times"></i> 重置</button> | |
| 57 | + </td> | |
| 58 | + </tr> | |
| 59 | + | |
| 60 | + </thead> | |
| 61 | + <tbody> | |
| 62 | + <tr ng-repeat="info in ctrl.page()['content']" ng-class="{odd: true, gradeX: true, danger: info.isCancel}"> | |
| 63 | + <td> | |
| 64 | + <div> | |
| 65 | + <a href="#"> | |
| 66 | + <i class="fa fa-list-ol" aria-hidden="true"></i> | |
| 67 | + {{$index + ctrl.page().number * 10 + 1}} | |
| 68 | + </a> | |
| 69 | + </div> | |
| 70 | + </td> | |
| 71 | + <td> | |
| 72 | + <div> | |
| 73 | + <a href="#"> | |
| 74 | + <span ng-bind="info.xl.name"></span> | |
| 75 | + </a> | |
| 76 | + </div> | |
| 77 | + <div> | |
| 78 | + <a href="#" | |
| 79 | + ng-mouseenter="ctrl.getLineVersionTip(info)" | |
| 80 | + tooltip-animation="false" | |
| 81 | + tooltip-placement="top" | |
| 82 | + uib-tooltip="{{ctrl.lineVersionTip}}" | |
| 83 | + tooltip-class="headClass"> | |
| 84 | + | |
| 85 | + <span ng-bind="'线路版本:' + info.lineVersion"></span> | |
| 86 | + </a> | |
| 87 | + | |
| 88 | + </div> | |
| 89 | + | |
| 90 | + | |
| 91 | + </td> | |
| 92 | + <td> | |
| 93 | + <div> | |
| 94 | + <a href="#" | |
| 95 | + tooltip-animation="false" | |
| 96 | + tooltip-placement="top" | |
| 97 | + uib-tooltip="{{info.name}}" | |
| 98 | + tooltip-class="headClass"> | |
| 99 | + {{info.name}} | |
| 100 | + </a> | |
| 101 | + </div> | |
| 102 | + </td> | |
| 103 | + <td> | |
| 104 | + <span ng-bind="info.xlDir | dict:'LineTrend2':'未知' "></span> | |
| 105 | + </td> | |
| 106 | + <td> | |
| 107 | + <span ng-bind="info.isEnableDisTemplate | dict:'truefalseType':'未知' "></span> | |
| 108 | + </td> | |
| 109 | + <td> | |
| 110 | + <div> | |
| 111 | + <a href="#" | |
| 112 | + tooltip-animation="false" | |
| 113 | + tooltip-placement="top" | |
| 114 | + uib-tooltip="启用时间:{{info.qyrq | date: 'yyyy-MM-dd HH:mm:ss' }}" | |
| 115 | + tooltip-class="headClass"> | |
| 116 | + 启用 | |
| 117 | + <span ng-bind="(info.qyrq | date: 'yyyy-MM-dd')"></span> | |
| 118 | + </a> | |
| 119 | + </div> | |
| 120 | + | |
| 121 | + <div> | |
| 122 | + <a href="#" | |
| 123 | + tooltip-animation="false" | |
| 124 | + tooltip-placement="top" | |
| 125 | + uib-tooltip="备份时间:{{info.lastBackUpDate | date: 'yyyy-MM-dd HH:mm:ss' }}" | |
| 126 | + tooltip-class="headClass"> | |
| 127 | + 备份 | |
| 128 | + <span ng-bind="(info.lastBackUpDate | date: 'yyyy-MM-dd')"></span> | |
| 129 | + </a> | |
| 130 | + </div> | |
| 131 | + | |
| 132 | + <div> | |
| 133 | + <a href="#" | |
| 134 | + tooltip-animation="false" | |
| 135 | + tooltip-placement="top" | |
| 136 | + uib-tooltip="创建时间:{{info.createDate | date: 'yyyy-MM-dd HH:mm:ss' }}" | |
| 137 | + tooltip-class="headClass"> | |
| 138 | + 创建 | |
| 139 | + <span ng-bind="(info.createDate | date: 'yyyy-MM-dd')"></span> | |
| 140 | + </a> | |
| 141 | + </div> | |
| 142 | + | |
| 143 | + <div> | |
| 144 | + <a href="#" | |
| 145 | + tooltip-animation="false" | |
| 146 | + tooltip-placement="top" | |
| 147 | + uib-tooltip="更新时间:{{info.updateDate | date: 'yyyy-MM-dd HH:mm:ss' }}" | |
| 148 | + tooltip-class="headClass"> | |
| 149 | + 更新 | |
| 150 | + <span ng-bind="(info.updateDate | date: 'yyyy-MM-dd')"></span> | |
| 151 | + </a> | |
| 152 | + </div> | |
| 153 | + | |
| 154 | + <!--<div>--> | |
| 155 | + <!--<a href="#"--> | |
| 156 | + <!--tooltip-animation="false"--> | |
| 157 | + <!--tooltip-placement="top"--> | |
| 158 | + <!--uib-tooltip="备份时间:{{info.lastBackUpDate | date: 'yyyy-MM-dd HH:mm:ss' }}"--> | |
| 159 | + <!--tooltip-class="headClass">--> | |
| 160 | + | |
| 161 | + <!--<i class="fa fa-hdd-o" aria-hidden="true"></i>--> | |
| 162 | + <!--<span ng-bind="info.lastBackUpDate | date: 'yyyy-MM-dd'"></span>--> | |
| 163 | + <!--</a>--> | |
| 164 | + | |
| 165 | + <!--</div>--> | |
| 166 | + | |
| 167 | + </td> | |
| 168 | + <td> | |
| 169 | + <span class="glyphicon glyphicon-ok" ng-if="info.isCancel == '0'"></span> | |
| 170 | + <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> | |
| 171 | + </td> | |
| 172 | + <td> | |
| 173 | + <a ng-click="ctrl.toTtInfoDetailAuto(info.id)" | |
| 174 | + class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 动态生成 </a> | |
| 175 | + </td> | |
| 176 | + <td> | |
| 177 | + <a ui-sref="ttInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> | |
| 178 | + <a ui-sref="ttInfoManage_edit({id: info.id})" class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 修改 </a> | |
| 179 | + </td> | |
| 180 | + </tr> | |
| 181 | + </tbody> | |
| 182 | + </table> | |
| 183 | + </div> | |
| 184 | + | |
| 185 | + <div class="pageBar"> | |
| 186 | + <div class="pageBarLeft"> | |
| 187 | + {{'显示从' + ctrl.page()['uiFromRecord'] + '到' + ctrl.page()['uiToRecord'] + ' 共' + ctrl.page()['totalElements'] + '条' + ' 每页显示10条'}} | |
| 188 | + </div> | |
| 189 | + | |
| 190 | + <div class="pageBarRight"> | |
| 191 | + <uib-pagination total-items="ctrl.page()['totalElements']" | |
| 192 | + ng-model="ctrl.page()['uiNumber']" | |
| 193 | + ng-change="ctrl.doPage()" | |
| 194 | + rotate="false" | |
| 195 | + max-size="10" | |
| 196 | + boundary-links="true" | |
| 197 | + first-text="首页" | |
| 198 | + previous-text="上一页" | |
| 199 | + next-text="下一页" | |
| 200 | + last-text="尾页"> | |
| 201 | + </uib-pagination> | |
| 202 | + </div> | |
| 203 | + </div> | |
| 204 | + | |
| 205 | +</div> | |
| 0 | 206 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/module.js
0 → 100644
| 1 | +// 时刻表管理service,包装外部定义的globalservice,并保存一定的操作状态 | |
| 2 | +angular.module('ScheduleApp').factory( | |
| 3 | + 'TtInfoManage2Service', | |
| 4 | + [ | |
| 5 | + 'TTInfoManageService_g', | |
| 6 | + 'TimeTableDetailManageService_g', | |
| 7 | + 'UserPrincipal', | |
| 8 | + function(service, dservice, UserPrincipal) { | |
| 9 | + // 当前查询的内容条件搜索对象 | |
| 10 | + var currentSearchCondition = {page: 0, 'isCancel_eq': false, 'isEnableDisTemplate_eq': true}; | |
| 11 | + // 当前查询返回的信息 | |
| 12 | + var currentPage = { // 后台spring data返回的格式 | |
| 13 | + totalElements: 0, | |
| 14 | + number: 0, // 后台返回的页码,spring返回从0开始 | |
| 15 | + content: [], | |
| 16 | + | |
| 17 | + uiNumber: 1, // 页面绑定的页码 | |
| 18 | + uiFromRecord: 0, // 页面绑定,当前页第几条记录 | |
| 19 | + uiToRecord: 0 // 页面绑定,当前页到第几条记录 | |
| 20 | + }; | |
| 21 | + | |
| 22 | + // 查询对象类 | |
| 23 | + var queryClass = service.rest; | |
| 24 | + | |
| 25 | + return { | |
| 26 | + getTtInfoQueryClass: function() { | |
| 27 | + return queryClass; | |
| 28 | + }, | |
| 29 | + getSearchCondition: function() { | |
| 30 | + currentSearchCondition.page = currentPage.uiNumber - 1; | |
| 31 | + | |
| 32 | + // 加公司判定 | |
| 33 | + if (UserPrincipal.getGsStrs().length > 0) { | |
| 34 | + currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); | |
| 35 | + } | |
| 36 | + | |
| 37 | + return currentSearchCondition; | |
| 38 | + }, | |
| 39 | + getPage: function(page) { | |
| 40 | + if (page) { | |
| 41 | + currentPage.totalElements = page.totalElements; | |
| 42 | + currentPage.number = page.number; | |
| 43 | + currentPage.content = page.content; | |
| 44 | + | |
| 45 | + // 计算当前页开始记录,结束记录 | |
| 46 | + if (page.numberOfElements && page.numberOfElements > 0) { | |
| 47 | + currentPage.uiFromRecord = page.number * 10 + 1; | |
| 48 | + currentPage.uiToRecord = page.number * 10 + page.numberOfElements; | |
| 49 | + } | |
| 50 | + } | |
| 51 | + return currentPage; | |
| 52 | + }, | |
| 53 | + resetStatus: function() { | |
| 54 | + currentSearchCondition = {page: 0, 'isCancel_eq': false}; | |
| 55 | + currentPage = { | |
| 56 | + totalElements: 0, | |
| 57 | + number: 0, | |
| 58 | + content: [], | |
| 59 | + uiNumber: 1, | |
| 60 | + uiFromRecord: 0, | |
| 61 | + uiToRecord: 0 | |
| 62 | + }; | |
| 63 | + }, | |
| 64 | + /** | |
| 65 | + * 数据导出。 | |
| 66 | + * @returns {*|Function|promise|n} | |
| 67 | + */ | |
| 68 | + dataExport: function(ttinfoid) { | |
| 69 | + var param = {}; | |
| 70 | + param.type = 'exportFile'; | |
| 71 | + param.ttinfoid = ttinfoid; | |
| 72 | + return dservice.dataTools.dataExport(param).$promise; | |
| 73 | + }, | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 备份。 | |
| 77 | + * @returns {*|Function|promise|n} | |
| 78 | + */ | |
| 79 | + backupinfo: function(ttinfoid) { | |
| 80 | + var param = {}; | |
| 81 | + param.ttinfoid = ttinfoid; | |
| 82 | + return service.backup.do(param).$promise; | |
| 83 | + }, | |
| 84 | + | |
| 85 | + /** | |
| 86 | + * 获取线路版本描述。 | |
| 87 | + * @param lineId | |
| 88 | + * @param version | |
| 89 | + * @returns {*|Function|promise|n} | |
| 90 | + */ | |
| 91 | + versiondesc: function(lineId, version) { | |
| 92 | + var param = {}; | |
| 93 | + param.lineId = lineId; | |
| 94 | + param.version = version; | |
| 95 | + return service.versiondesc.do(param).$promise; | |
| 96 | + } | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + // TODO: | |
| 101 | + } | |
| 102 | + } | |
| 103 | + ] | |
| 104 | +); | |
| 105 | + | |
| 106 | +// index.html控制器 | |
| 107 | +angular.module('ScheduleApp').controller( | |
| 108 | + 'TtInfoManage2IndexCtrl', | |
| 109 | + [ | |
| 110 | + '$state', | |
| 111 | + function($state) { | |
| 112 | + var self = this; | |
| 113 | + | |
| 114 | + // 切换到时刻表form界面 | |
| 115 | + self.toTtInfoManageForm = function() { | |
| 116 | + $state.go('ttInfoManage2_form'); | |
| 117 | + } | |
| 118 | + } | |
| 119 | + ] | |
| 120 | +); | |
| 121 | + | |
| 122 | +// list.html控制器 | |
| 123 | +angular.module('ScheduleApp').controller( | |
| 124 | + 'TtInfoManage2ListCtrl', | |
| 125 | + [ | |
| 126 | + 'TtInfoManage2Service', | |
| 127 | + 'FileDownload_g', | |
| 128 | + function(service, fileDownload) { | |
| 129 | + var self = this; | |
| 130 | + var TtInfo = service.getTtInfoQueryClass(); | |
| 131 | + | |
| 132 | + self.page = function() { | |
| 133 | + return service.getPage(); | |
| 134 | + }; | |
| 135 | + | |
| 136 | + self.searchCondition = function() { | |
| 137 | + return service.getSearchCondition(); | |
| 138 | + }; | |
| 139 | + | |
| 140 | + self.doPage = function() { | |
| 141 | + var page = TtInfo.list(self.searchCondition(), function() { | |
| 142 | + service.getPage(page); | |
| 143 | + }); | |
| 144 | + }; | |
| 145 | + self.reset = function() { | |
| 146 | + service.resetStatus(); | |
| 147 | + var page = TtInfo.list(self.searchCondition(), function() { | |
| 148 | + service.getPage(page); | |
| 149 | + }); | |
| 150 | + }; | |
| 151 | + self.toggleTtinfo = function(id) { | |
| 152 | + TtInfo.delete({id: id}, function(result) { | |
| 153 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 154 | + alert("失败:" + result.message); | |
| 155 | + } else { | |
| 156 | + self.doPage(); | |
| 157 | + } | |
| 158 | + }); | |
| 159 | + }; | |
| 160 | + // 导出excel | |
| 161 | + self.exportData = function(ttinfoid) { | |
| 162 | + service.dataExport(ttinfoid).then( | |
| 163 | + function(result) { | |
| 164 | + fileDownload.downloadFile(result.data, "application/octet-stream", "时刻表.xls"); | |
| 165 | + }, | |
| 166 | + function(result) { | |
| 167 | + console.log("exportData failed:" + result); | |
| 168 | + } | |
| 169 | + ); | |
| 170 | + }; | |
| 171 | + | |
| 172 | + // 备份信息 | |
| 173 | + self.backupinfo = function(ttinfoid) { | |
| 174 | + service.backupinfo(ttinfoid).then( | |
| 175 | + function(result) { | |
| 176 | + self.doPage(); | |
| 177 | + console.log("备份成功!"); | |
| 178 | + }, | |
| 179 | + function(result) { | |
| 180 | + console.log("备份失败:" + result); | |
| 181 | + } | |
| 182 | + ); | |
| 183 | + }; | |
| 184 | + | |
| 185 | + self.doPage(); | |
| 186 | + | |
| 187 | + // TODO:跳转到自动生成时刻表页面(jquery页面),之后会替换为Angularjs版本 | |
| 188 | + self.toTtInfoDetailAuto = function(ttinfoid) { | |
| 189 | + showPjax(); | |
| 190 | + $.pjax({url: 'pages/base/timesmodel/add.html?no=' + ttinfoid, container: pjaxContainer}); | |
| 191 | + }; | |
| 192 | + | |
| 193 | + self.lineVersionTip = "载入中..."; | |
| 194 | + var currentTTInfoForLineVersion; | |
| 195 | + self.getLineVersionTip = function(info) { | |
| 196 | + if (currentTTInfoForLineVersion != info) { | |
| 197 | + service.versiondesc(info.xl.id, info.lineVersion).then( | |
| 198 | + function(result) { | |
| 199 | + self.lineVersionTip = result.desc; | |
| 200 | + currentTTInfoForLineVersion = info; | |
| 201 | + } | |
| 202 | + ); | |
| 203 | + } | |
| 204 | + | |
| 205 | + }; | |
| 206 | + | |
| 207 | + // TODO: | |
| 208 | + } | |
| 209 | + ] | |
| 210 | +); | |
| 211 | + | |
| 212 | +// form.html控制器 | |
| 213 | +angular.module('ScheduleApp').controller( | |
| 214 | + 'TtInfoManage2FormCtrl', | |
| 215 | + [ | |
| 216 | + 'TtInfoManage2Service', | |
| 217 | + '$stateParams', | |
| 218 | + '$state', | |
| 219 | + function(service, $stateParams, $state) { | |
| 220 | + var self = this; | |
| 221 | + var TtInfo = service.getTtInfoQueryClass(); | |
| 222 | + | |
| 223 | + // 启用日期 日期控件开关 | |
| 224 | + self.qyrqOpen = false; | |
| 225 | + self.qyrq_open = function() { | |
| 226 | + self.qyrqOpen = true; | |
| 227 | + }; | |
| 228 | + | |
| 229 | + // 欲保存的表单信息,双向绑定 | |
| 230 | + self.ttInfoManageForForm = new TtInfo; | |
| 231 | + self.ttInfoManageForForm.xl = {}; | |
| 232 | + | |
| 233 | + // 如果是修改,获取传过来的id,从后台获取一份数据,用于绑定页面form值 | |
| 234 | + var id = $stateParams.id; | |
| 235 | + if (id) { | |
| 236 | + TtInfo.get({id: id}, function(value) { | |
| 237 | + self.ttInfoManageForForm = value; | |
| 238 | + }); | |
| 239 | + } else { | |
| 240 | + // 初始表单,使用查询条件获取线路id | |
| 241 | + self.ttInfoManageForForm.xl.id = service.getSearchCondition()['xl.id_eq']; | |
| 242 | + } | |
| 243 | + | |
| 244 | + // form提交方法 | |
| 245 | + self.submit = function() { | |
| 246 | + self.ttInfoManageForForm.$save(function() { | |
| 247 | + $state.go("ttInfoManage2"); | |
| 248 | + }); | |
| 249 | + }; | |
| 250 | + } | |
| 251 | + ] | |
| 252 | +); | |
| 253 | + | |
| 254 | +// detail.html控制器 | |
| 255 | +angular.module('ScheduleApp').controller( | |
| 256 | + 'TtInfoManage2DetailCtrl', | |
| 257 | + [ | |
| 258 | + 'TtInfoManage2Service', | |
| 259 | + '$stateParams', | |
| 260 | + function(service, $stateParams) { | |
| 261 | + var self = this; | |
| 262 | + var TtInfo = service.getTtInfoQueryClass(); | |
| 263 | + var id = $stateParams.id; | |
| 264 | + | |
| 265 | + self.title = ""; | |
| 266 | + self.ttInfoManageForDetail = {}; | |
| 267 | + | |
| 268 | + TtInfo.get({id: id}, function(value) { | |
| 269 | + self.ttInfoManageForDetail = value; | |
| 270 | + self.title = self.ttInfoManageForDetail.xl.name + | |
| 271 | + "(" + | |
| 272 | + self.ttInfoManageForDetail.name + | |
| 273 | + ")" + | |
| 274 | + "时刻表基础信息"; | |
| 275 | + }); | |
| 276 | + } | |
| 277 | + ] | |
| 278 | +); | |
| 0 | 279 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 时刻表管理配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("ttInfoManage2", { // index页面 | |
| 13 | + url: '/ttInfoManage2', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/index.html' | |
| 17 | + }, | |
| 18 | + "ttInfoManage2_list@ttInfoManage2": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'ttInfoManage2_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 32 | + ] | |
| 33 | + }); | |
| 34 | + }] | |
| 35 | + } | |
| 36 | + }) | |
| 37 | + .state("ttInfoManage2_form", { // 添加时刻表信息form | |
| 38 | + url: '/ttInfoManage2_form', | |
| 39 | + views: { | |
| 40 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/form.html'} | |
| 41 | + }, | |
| 42 | + resolve: { | |
| 43 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 44 | + return $ocLazyLoad.load({ | |
| 45 | + name: 'ttInfoManage2_form_module', | |
| 46 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 47 | + files: [ | |
| 48 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 50 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 51 | + ] | |
| 52 | + }); | |
| 53 | + }] | |
| 54 | + } | |
| 55 | + }) | |
| 56 | + .state("ttInfoManage2_edit", { // 修改时刻表信息form | |
| 57 | + url: '/ttInfoManage2_edit/:id', | |
| 58 | + views: { | |
| 59 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/edit.html'} | |
| 60 | + }, | |
| 61 | + resolve: { | |
| 62 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 63 | + return $ocLazyLoad.load({ | |
| 64 | + name: 'ttInfoManage2_edit_module', | |
| 65 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 66 | + files: [ | |
| 67 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 69 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 70 | + ] | |
| 71 | + }); | |
| 72 | + }] | |
| 73 | + } | |
| 74 | + }) | |
| 75 | + .state("ttInfoManage2_detail", { // 时刻表详细信息 | |
| 76 | + url: '/ttInfoManage2_detail/:id', | |
| 77 | + views: { | |
| 78 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage2/detail.html'} | |
| 79 | + }, | |
| 80 | + resolve: { | |
| 81 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 82 | + return $ocLazyLoad.load({ | |
| 83 | + name: 'ttInfoManage2_detail_module', | |
| 84 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 85 | + files: [ | |
| 86 | + "pages/scheduleApp/module/core/ttInfoManage2/module.js" | |
| 87 | + ] | |
| 88 | + }); | |
| 89 | + }] | |
| 90 | + } | |
| 91 | + }) | |
| 92 | + | |
| 93 | + | |
| 94 | + } | |
| 95 | +]); | |
| 0 | 96 | \ No newline at end of file | ... | ... |
src/main/resources/traffic-jdbc.properties
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | #ms.mysql.password= 123456 |
| 5 | 5 | |
| 6 | 6 | ms.mysql.driver= com.mysql.jdbc.Driver |
| 7 | -ms.mysql.url= jdbc:mysql://10.10.150.21:3306/ms?useUnicode=true&characterEncoding=utf-8 | |
| 7 | +ms.mysql.url= jdbc:mysql://10.10.150.226:3306/ms?useUnicode=true&characterEncoding=utf-8 | |
| 8 | 8 | ms.mysql.username= root |
| 9 | -ms.mysql.password= root2jsp@JSP | |
| 9 | +ms.mysql.password= root2jsp | |
| 10 | 10 | ... | ... |