Commit 348fb90b8f22d917981984b99079eb7c4a2d3a79
1 parent
a7a4a2c3
修正时刻表导出,导出的名字为时刻表已有的名字
Showing
2 changed files
with
3 additions
and
3 deletions
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| @@ -195,7 +195,7 @@ | @@ -195,7 +195,7 @@ | ||
| 195 | <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a>--> | 195 | <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a>--> |
| 196 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" | 196 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" |
| 197 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> | 197 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> |
| 198 | - <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a> | 198 | + <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id, info.name)"> 导出 </a> |
| 199 | <a sweetalert | 199 | <a sweetalert |
| 200 | sweet-options="{title: '是否备份时刻表?',text: '时刻表名称:' + info.name + '</br>TODO:已备份信息!', html: true,type: 'warning',showCancelButton: true,confirmButtonColor: '#DD6B55',confirmButtonText: '是',cancelButtonText: '取消'}" | 200 | sweet-options="{title: '是否备份时刻表?',text: '时刻表名称:' + info.name + '</br>TODO:已备份信息!', html: true,type: 'warning',showCancelButton: true,confirmButtonColor: '#DD6B55',confirmButtonText: '是',cancelButtonText: '取消'}" |
| 201 | sweet-on-confirm="ctrl.backupinfo(info.id)" | 201 | sweet-on-confirm="ctrl.backupinfo(info.id)" |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/module.js
| @@ -184,10 +184,10 @@ angular.module('ScheduleApp').controller( | @@ -184,10 +184,10 @@ angular.module('ScheduleApp').controller( | ||
| 184 | }); | 184 | }); |
| 185 | }; | 185 | }; |
| 186 | // 导出excel | 186 | // 导出excel |
| 187 | - self.exportData = function(ttinfoid) { | 187 | + self.exportData = function(ttinfoid, ttinfoname) { |
| 188 | service.dataExport(ttinfoid).then( | 188 | service.dataExport(ttinfoid).then( |
| 189 | function(result) { | 189 | function(result) { |
| 190 | - fileDownload.downloadFile(result.data, "application/octet-stream", "时刻表.xls"); | 190 | + fileDownload.downloadFile(result.data, "application/octet-stream", ttinfoname + ".xls"); |
| 191 | }, | 191 | }, |
| 192 | function(result) { | 192 | function(result) { |
| 193 | console.log("exportData failed:" + result); | 193 | console.log("exportData failed:" + result); |