Commit f5fa95667c005d65890ce663f410abb44030e8c8
1 parent
8bcd7dea
时刻表v2.7.1
1、导出的报表,报到,出场和路牌第一个班次写在一起,路牌最后一个班次和进场,离场班次一起写 2、导出按钮样式丰富一点,按下后不能再点击,显示导出中...
Showing
6 changed files
with
185 additions
and
28 deletions
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
| @@ -419,8 +419,8 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | @@ -419,8 +419,8 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 419 | XSSFRow lpRow = sheet.createRow((short) (i + 1)); | 419 | XSSFRow lpRow = sheet.createRow((short) (i + 1)); |
| 420 | PoiUtils.createStringXSSFCell(wb, lpRow, (short) 0, lpObj.getLpname()); | 420 | PoiUtils.createStringXSSFCell(wb, lpRow, (short) 0, lpObj.getLpname()); |
| 421 | for (int j = 0; j < groupCount; j++) { | 421 | for (int j = 0; j < groupCount; j++) { |
| 422 | - PoiUtils.createStringXSSFCell(wb, lpRow, (short) (j * 2 + 1), ""); | ||
| 423 | - PoiUtils.createStringXSSFCell(wb, lpRow, (short) (j * 2 + 2), ""); | 422 | + PoiUtils.createBlankXSSFCell(wb, lpRow, (short) (j * 2 + 1)); |
| 423 | + PoiUtils.createBlankXSSFCell(wb, lpRow, (short) (j * 2 + 2)); | ||
| 424 | } | 424 | } |
| 425 | for (BcObj bcObj : lpObj.getBcObjList()) { | 425 | for (BcObj bcObj : lpObj.getBcObjList()) { |
| 426 | Cell cell = lpRow.getCell((short) (bcObj.getGroupNo() * 2 + bcObj.getGroupBcNo() + 1)); | 426 | Cell cell = lpRow.getCell((short) (bcObj.getGroupNo() * 2 + bcObj.getGroupBcNo() + 1)); |
| @@ -459,6 +459,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | @@ -459,6 +459,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 459 | XSSFRow xssfRow = sheet.createRow(i); | 459 | XSSFRow xssfRow = sheet.createRow(i); |
| 460 | for (int j = 0; j < 10; j++) { | 460 | for (int j = 0; j < 10; j++) { |
| 461 | PoiUtils.createStringXSSFCell(wb, xssfRow, (short) j, ""); | 461 | PoiUtils.createStringXSSFCell(wb, xssfRow, (short) j, ""); |
| 462 | + | ||
| 462 | } | 463 | } |
| 463 | } | 464 | } |
| 464 | // 合并第一行 | 465 | // 合并第一行 |
src/main/java/com/bsth/service/schedule/utils/PoiUtils.java
| @@ -104,6 +104,18 @@ public class PoiUtils { | @@ -104,6 +104,18 @@ public class PoiUtils { | ||
| 104 | ); | 104 | ); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | + public static XSSFCell createBlankXSSFCell( | ||
| 108 | + XSSFWorkbook xssfWorkbook, XSSFRow xssfRow, short column) { | ||
| 109 | + return createXSSFCell( | ||
| 110 | + xssfWorkbook, xssfRow, column, | ||
| 111 | + null, XSSFCell.CELL_TYPE_BLANK, | ||
| 112 | + HorizontalAlignment.CENTER, VerticalAlignment.CENTER, | ||
| 113 | + BorderStyle.MEDIUM, new Color(0xdedede), | ||
| 114 | + (short) 13, new Color(0x2765A7), "宋体", | ||
| 115 | + new Color(0xffffff), FillPatternType.SOLID_FOREGROUND | ||
| 116 | + ); | ||
| 117 | + } | ||
| 118 | + | ||
| 107 | public static XSSFCell setIntegerStyleXSSFCellStyle(XSSFWorkbook xssfWorkbook, XSSFCell xssfCell) { | 119 | public static XSSFCell setIntegerStyleXSSFCellStyle(XSSFWorkbook xssfWorkbook, XSSFCell xssfCell) { |
| 108 | CreationHelper creationHelper = xssfWorkbook.getCreationHelper(); | 120 | CreationHelper creationHelper = xssfWorkbook.getCreationHelper(); |
| 109 | XSSFCellStyle xssfCellStyle = xssfCell.getCellStyle(); | 121 | XSSFCellStyle xssfCellStyle = xssfCell.getCellStyle(); |
| @@ -149,7 +161,11 @@ public class PoiUtils { | @@ -149,7 +161,11 @@ public class PoiUtils { | ||
| 149 | } else { | 161 | } else { |
| 150 | throw new RuntimeException("只支持 Date Double Integer 单元格类型"); | 162 | throw new RuntimeException("只支持 Date Double Integer 单元格类型"); |
| 151 | } | 163 | } |
| 152 | - } else { | 164 | + } else if (valueType == XSSFCell.CELL_TYPE_BLANK) { |
| 165 | + cell.setCellType(Cell.CELL_TYPE_BLANK); | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + else { | ||
| 153 | throw new RuntimeException("暂时不支持字符串、日期、数字以为的类型"); | 169 | throw new RuntimeException("暂时不支持字符串、日期、数字以为的类型"); |
| 154 | } | 170 | } |
| 155 | 171 |
src/main/resources/static/index.html
| @@ -61,9 +61,9 @@ | @@ -61,9 +61,9 @@ | ||
| 61 | href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css" | 61 | href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css" |
| 62 | rel="stylesheet" type="text/css" /> | 62 | rel="stylesheet" type="text/css" /> |
| 63 | <!-- table 表格控件 --> | 63 | <!-- table 表格控件 --> |
| 64 | - <!--<link rel="stylesheet"--> | ||
| 65 | - <!--href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css"--> | ||
| 66 | - <!--type="text/css" />--> | 64 | + <link rel="stylesheet" |
| 65 | + href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css" | ||
| 66 | + type="text/css" /> | ||
| 67 | <link href="/metronic_v4.5.4/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"/> | 67 | <link href="/metronic_v4.5.4/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"/> |
| 68 | <!-- handsontable样式 --> | 68 | <!-- handsontable样式 --> |
| 69 | <link rel="stylesheet" | 69 | <link rel="stylesheet" |
| @@ -612,24 +612,24 @@ | @@ -612,24 +612,24 @@ | ||
| 612 | 612 | ||
| 613 | <!-- 地图相关 --> | 613 | <!-- 地图相关 --> |
| 614 | <!-- 百度 --> | 614 | <!-- 百度 --> |
| 615 | -<!--<script--> | ||
| 616 | - <!--src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"--> | ||
| 617 | - <!--data-exclude=1></script>--> | ||
| 618 | -<!--<script--> | ||
| 619 | - <!--src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"--> | ||
| 620 | - <!--data-exclude=1></script>--> | ||
| 621 | -<!--<script type="text/javascript"--> | ||
| 622 | - <!--src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"--> | ||
| 623 | - <!--data-exclude=1></script>--> | ||
| 624 | -<!--<script type="text/javascript"--> | ||
| 625 | - <!--src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "--> | ||
| 626 | - <!--data-exclude=1></script>--> | 615 | +<script |
| 616 | + src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT" | ||
| 617 | + data-exclude=1></script> | ||
| 618 | +<script | ||
| 619 | + src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js" | ||
| 620 | + data-exclude=1></script> | ||
| 621 | +<script type="text/javascript" | ||
| 622 | + src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js" | ||
| 623 | + data-exclude=1></script> | ||
| 624 | +<script type="text/javascript" | ||
| 625 | + src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js " | ||
| 626 | + data-exclude=1></script> | ||
| 627 | <script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script> | 627 | <script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script> |
| 628 | <script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script> | 628 | <script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script> |
| 629 | <!-- 高德 --> | 629 | <!-- 高德 --> |
| 630 | -<!--<script--> | ||
| 631 | - <!--src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"--> | ||
| 632 | - <!--data-exclude=1></script>--> | 630 | +<script |
| 631 | + src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda" | ||
| 632 | + data-exclude=1></script> | ||
| 633 | 633 | ||
| 634 | <script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> | 634 | <script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> |
| 635 | 635 |
src/main/resources/static/pages/base/timesmodel/gantt.html
| @@ -44,11 +44,11 @@ | @@ -44,11 +44,11 @@ | ||
| 44 | <div class="btn-group btn-group-devided countbtn" data-toggle="buttons"> | 44 | <div class="btn-group btn-group-devided countbtn" data-toggle="buttons"> |
| 45 | <a class="btn btn-circle blue countAdd" href="javascript:;" data-pjax><i class="fa fa-database"></i> 统计数据</a> | 45 | <a class="btn btn-circle blue countAdd" href="javascript:;" data-pjax><i class="fa fa-database"></i> 统计数据</a> |
| 46 | </div> | 46 | </div> |
| 47 | - <div class="btn-group btn-group-devided checkbtn" data-toggle="buttons"> | ||
| 48 | - <a class="btn btn-circle blue checkAdd" href="javascript:;" data-pjax><i class="fa fa-check"></i> 保存数据</a> | ||
| 49 | - </div> | 47 | + <!--<div class="btn-group btn-group-devided checkbtn" data-toggle="buttons">--> |
| 48 | + <!--<a class="btn btn-circle blue checkAdd" href="javascript:;" data-pjax><i class="fa fa-check"></i> 保存数据</a>--> | ||
| 49 | + <!--</div>--> | ||
| 50 | <div class="btn-group btn-group-devided exportbtn" data-toggle="buttons"> | 50 | <div class="btn-group btn-group-devided exportbtn" data-toggle="buttons"> |
| 51 | - <a class="btn btn-circle blue exportAdd" href="javascript:;" data-pjax><i class="fa fa-file-excel-o"></i> 导出数据</a> | 51 | + <!--<a class="btn btn-circle blue exportAdd" href="javascript:;" data-pjax><i class="fa fa-file-excel-o"></i> 导出数据</a>--> |
| 52 | </div> | 52 | </div> |
| 53 | <div class="btn-group checkbtn"> | 53 | <div class="btn-group checkbtn"> |
| 54 | <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown" aria-expanded="false"> | 54 | <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown" aria-expanded="false"> |
src/main/resources/static/pages/base/timesmodel/js/gantt.js
| @@ -83,6 +83,7 @@ | @@ -83,6 +83,7 @@ | ||
| 83 | // TODO:绘制gantt图表 | 83 | // TODO:绘制gantt图表 |
| 84 | // TODO:var seDate = getksjssj(null,seMap.s); 关联参数必须设置 | 84 | // TODO:var seDate = getksjssj(null,seMap.s); 关联参数必须设置 |
| 85 | // TODO:CSMap.maxCar 之后要设定一下的 | 85 | // TODO:CSMap.maxCar 之后要设定一下的 |
| 86 | + $(".exportbtn").html("<a class=\"btn btn-circle blue exportAdd\" href=\"javascript:;\" data-pjax><i class=\"fa fa-file-excel-o\"></i> 导出数据</a>"); | ||
| 86 | data = Main_v2.BXPplaceClassesTime03(_paramObj, CSMap.maxCar); | 87 | data = Main_v2.BXPplaceClassesTime03(_paramObj, CSMap.maxCar); |
| 87 | Main_v2.exportDataConfig(data.aInternalLpObj); | 88 | Main_v2.exportDataConfig(data.aInternalLpObj); |
| 88 | } | 89 | } |
src/main/resources/static/pages/base/timesmodel/js/v2/main_v2.js
| @@ -156,10 +156,142 @@ var Main_v2 = function() { | @@ -156,10 +156,142 @@ var Main_v2 = function() { | ||
| 156 | "stationRouteId1": 0, // 第一个班次起点站路由id | 156 | "stationRouteId1": 0, // 第一个班次起点站路由id |
| 157 | "stationRouteId2": 0 // 第二个班次起点站路由id | 157 | "stationRouteId2": 0 // 第二个班次起点站路由id |
| 158 | }; | 158 | }; |
| 159 | + | ||
| 160 | + // 将报到班次,进出场班次加到班次的时间上 | ||
| 161 | + var iBcChainCount; | ||
| 162 | + var oStartBc; | ||
| 163 | + var oEndBc; | ||
| 164 | + var oTempBc; | ||
| 165 | + var aFcsj = []; | ||
| 166 | + | ||
| 167 | + iBcChainCount = oInternalLp.fnGetBcChainCount(); | ||
| 168 | + if (iBcChainCount == 1) { // 单一车次链,连班班型 | ||
| 169 | + oStartBc = oInternalLp.getBc( | ||
| 170 | + oInternalLp.fnGetBcChainInfo(0)["s_q"], | ||
| 171 | + oInternalLp.fnGetBcChainInfo(0)["s_b"] | ||
| 172 | + ); | ||
| 173 | + oTempBc = _factory.createBcObj( | ||
| 174 | + oLp, "bd", true, 1, | ||
| 175 | + oStartBc.getFcTimeObj(), | ||
| 176 | + _paramObj | ||
| 177 | + ); | ||
| 178 | + aFcsj.push("(到" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 179 | + oTempBc = _factory.createBcObj( | ||
| 180 | + oLp, "out", true, 1, | ||
| 181 | + oStartBc.getFcTimeObj(), | ||
| 182 | + _paramObj | ||
| 183 | + ); | ||
| 184 | + aFcsj.push("(出" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 185 | + aFcsj.push("(" + oStartBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 186 | + oStartBc._$_fcsj_desc = aFcsj.join(""); | ||
| 187 | + | ||
| 188 | + aFcsj = []; | ||
| 189 | + | ||
| 190 | + oEndBc = oInternalLp.getBc( | ||
| 191 | + oInternalLp.fnGetBcChainInfo(0)["e_q"], | ||
| 192 | + oInternalLp.fnGetBcChainInfo(0)["e_b"] | ||
| 193 | + ); | ||
| 194 | + aFcsj.push("(" + oStartBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 195 | + oTempBc = _factory.createBcObj( | ||
| 196 | + oLp, "in", true, 1, | ||
| 197 | + oEndBc.getArrTimeObj(), | ||
| 198 | + _paramObj | ||
| 199 | + ); | ||
| 200 | + aFcsj.push("(进" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 201 | + oTempBc = _factory.createBcObj( | ||
| 202 | + oLp, "lc", true, 1, | ||
| 203 | + oEndBc.getArrTimeObj(), | ||
| 204 | + _paramObj | ||
| 205 | + ); | ||
| 206 | + aFcsj.push("(离" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 207 | + oEndBc._$_fcsj_desc = aFcsj.join(""); | ||
| 208 | + | ||
| 209 | + } else if (iBcChainCount == 2) { // 两个车次链,分班班型 | ||
| 210 | + oStartBc = oInternalLp.getBc( | ||
| 211 | + oInternalLp.fnGetBcChainInfo(0)["s_q"], | ||
| 212 | + oInternalLp.fnGetBcChainInfo(0)["s_b"] | ||
| 213 | + ); | ||
| 214 | + oTempBc = _factory.createBcObj( | ||
| 215 | + oLp, "bd", true, 1, | ||
| 216 | + oStartBc.getFcTimeObj(), | ||
| 217 | + _paramObj | ||
| 218 | + ); | ||
| 219 | + aFcsj.push("(到" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 220 | + oTempBc = _factory.createBcObj( | ||
| 221 | + oLp, "out", true, 1, | ||
| 222 | + oStartBc.getFcTimeObj(), | ||
| 223 | + _paramObj | ||
| 224 | + ); | ||
| 225 | + aFcsj.push("(出" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 226 | + aFcsj.push("(" + oStartBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 227 | + oStartBc._$_fcsj_desc = aFcsj.join(""); | ||
| 228 | + | ||
| 229 | + aFcsj = []; | ||
| 230 | + | ||
| 231 | + oEndBc = oInternalLp.getBc( | ||
| 232 | + oInternalLp.fnGetBcChainInfo(0)["e_q"], | ||
| 233 | + oInternalLp.fnGetBcChainInfo(0)["e_b"] | ||
| 234 | + ); | ||
| 235 | + aFcsj.push("(" + oStartBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 236 | + oTempBc = _factory.createBcObj( | ||
| 237 | + oLp, "in", true, 1, | ||
| 238 | + oEndBc.getArrTimeObj(), | ||
| 239 | + _paramObj | ||
| 240 | + ); | ||
| 241 | + aFcsj.push("(进" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 242 | + oTempBc = _factory.createBcObj( | ||
| 243 | + oLp, "lc", true, 1, | ||
| 244 | + oEndBc.getArrTimeObj(), | ||
| 245 | + _paramObj | ||
| 246 | + ); | ||
| 247 | + oEndBc._$_fcsj_desc = aFcsj.join(""); | ||
| 248 | + | ||
| 249 | + aFcsj = []; | ||
| 250 | + | ||
| 251 | + oStartBc = oInternalLp.getBc( | ||
| 252 | + oInternalLp.fnGetBcChainInfo(1)["s_q"], | ||
| 253 | + oInternalLp.fnGetBcChainInfo(1)["s_b"] | ||
| 254 | + ); | ||
| 255 | + oTempBc = _factory.createBcObj( | ||
| 256 | + oLp, "out", true, 1, | ||
| 257 | + oStartBc.getFcTimeObj(), | ||
| 258 | + _paramObj | ||
| 259 | + ); | ||
| 260 | + aFcsj.push("(出" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 261 | + aFcsj.push("(" + oStartBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 262 | + oStartBc._$_fcsj_desc = aFcsj.join(""); | ||
| 263 | + | ||
| 264 | + aFcsj = []; | ||
| 265 | + | ||
| 266 | + oEndBc = oInternalLp.getBc( | ||
| 267 | + oInternalLp.fnGetBcChainInfo(1)["e_q"], | ||
| 268 | + oInternalLp.fnGetBcChainInfo(1)["e_b"] | ||
| 269 | + ); | ||
| 270 | + aFcsj.push("(" + oStartBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 271 | + oTempBc = _factory.createBcObj( | ||
| 272 | + oLp, "in", true, 1, | ||
| 273 | + oEndBc.getArrTimeObj(), | ||
| 274 | + _paramObj | ||
| 275 | + ); | ||
| 276 | + aFcsj.push("(进" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 277 | + oTempBc = _factory.createBcObj( | ||
| 278 | + oLp, "lc", true, 1, | ||
| 279 | + oEndBc.getArrTimeObj(), | ||
| 280 | + _paramObj | ||
| 281 | + ); | ||
| 282 | + aFcsj.push("(离" + oTempBc.getFcTimeObj().format("HH:mm") + ")"); | ||
| 283 | + oEndBc._$_fcsj_desc = aFcsj.join(""); | ||
| 284 | + | ||
| 285 | + } | ||
| 286 | + | ||
| 159 | for (j = 0; j < oInternalLp.fnGetGroupCount(); j++) { | 287 | for (j = 0; j < oInternalLp.fnGetGroupCount(); j++) { |
| 160 | for (z = 0; z < 2; z++) { | 288 | for (z = 0; z < 2; z++) { |
| 161 | oInternalBc = oInternalLp.getBc(j, z); | 289 | oInternalBc = oInternalLp.getBc(j, z); |
| 162 | if (oInternalBc) { | 290 | if (oInternalBc) { |
| 291 | + if (oInternalBc.fnGetEatTime() > 0) { | ||
| 292 | + oInternalBc._$_fcsj_desc = "(吃" + oInternalBc.getFcTimeObj().format("HH:mm") + ")"; | ||
| 293 | + } | ||
| 294 | + | ||
| 163 | oLp.bcObjList.push({ | 295 | oLp.bcObjList.push({ |
| 164 | "bcsj": oInternalBc.getBcTime(), // 班次时间 | 296 | "bcsj": oInternalBc.getBcTime(), // 班次时间 |
| 165 | "ssj": oInternalBc.getStopTime(), // 停站时间 | 297 | "ssj": oInternalBc.getStopTime(), // 停站时间 |
| @@ -172,7 +304,7 @@ var Main_v2 = function() { | @@ -172,7 +304,7 @@ var Main_v2 = function() { | ||
| 172 | "isUp": oInternalBc._$_isUp, // 是否上行 | 304 | "isUp": oInternalBc._$_isUp, // 是否上行 |
| 173 | 305 | ||
| 174 | "bcType": oInternalBc._$_bcType, // 班次类型 | 306 | "bcType": oInternalBc._$_bcType, // 班次类型 |
| 175 | - "fcsj": oInternalBc._$_fcsjObj.format("HH:mm"), // 发车时间 | 307 | + "fcsj": oInternalBc._$_fcsj_desc || oInternalBc._$_fcsjObj.format("HH:mm"), // 发车时间描述 |
| 176 | 308 | ||
| 177 | "groupNo": j, // 第几圈 | 309 | "groupNo": j, // 第几圈 |
| 178 | "groupBcNo": z // 圈里第几个班次 | 310 | "groupBcNo": z // 圈里第几个班次 |
| @@ -213,8 +345,6 @@ var Main_v2 = function() { | @@ -213,8 +345,6 @@ var Main_v2 = function() { | ||
| 213 | } | 345 | } |
| 214 | } | 346 | } |
| 215 | 347 | ||
| 216 | - | ||
| 217 | - | ||
| 218 | oLp.zgs = iZgs; | 348 | oLp.zgs = iZgs; |
| 219 | oLp.zbc = iZbc; | 349 | oLp.zbc = iZbc; |
| 220 | aLpObj.push(oLp); | 350 | aLpObj.push(oLp); |
| @@ -420,6 +550,9 @@ var Main_v2 = function() { | @@ -420,6 +550,9 @@ var Main_v2 = function() { | ||
| 420 | 550 | ||
| 421 | console.log(aInfos); | 551 | console.log(aInfos); |
| 422 | 552 | ||
| 553 | + $(".exportAdd").addClass("disabled"); | ||
| 554 | + $(".exportAdd").html("<i class=\"fa fa-spinner\" aria-hidden=\"true\"></i>" + " 正在导出..."); | ||
| 555 | + | ||
| 423 | // 提交 | 556 | // 提交 |
| 424 | $.ajax({ | 557 | $.ajax({ |
| 425 | type: 'POST', | 558 | type: 'POST', |
| @@ -429,9 +562,15 @@ var Main_v2 = function() { | @@ -429,9 +562,15 @@ var Main_v2 = function() { | ||
| 429 | data: JSON.stringify(aInfos), | 562 | data: JSON.stringify(aInfos), |
| 430 | success: function(data){ | 563 | success: function(data){ |
| 431 | Main_v2.downloadFile(data, "application/octet-stream", "时刻表信息.xls"); | 564 | Main_v2.downloadFile(data, "application/octet-stream", "时刻表信息.xls"); |
| 565 | + | ||
| 566 | + $(".exportAdd").removeClass("disabled"); | ||
| 567 | + $(".exportAdd").html("<i class=\"fa fa-file-excel-o\"></i>" + " 导出数据"); | ||
| 432 | }, | 568 | }, |
| 433 | error: function(xhr, type){ | 569 | error: function(xhr, type){ |
| 434 | alert('错误:TODO'); | 570 | alert('错误:TODO'); |
| 571 | + | ||
| 572 | + $(".exportAdd").removeClass("disabled"); | ||
| 573 | + $(".exportAdd").html("<i class=\"fa fa-file-excel-o\"></i>" + " 导出数据"); | ||
| 435 | } | 574 | } |
| 436 | }); | 575 | }); |
| 437 | 576 |