Commit ab589263 authored by liboyang's avatar liboyang

下载弹框确认

parent 5c4d6c40
...@@ -193,14 +193,29 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -193,14 +193,29 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
} }
return url + 't=' + Math.floor(Date.now()); return url + 't=' + Math.floor(Date.now());
} }
var getCount = function () {
HttpService.getRecordsCount(getCountJson(), function (data) {
$rootScope.count = data;
})
}
$scope.downloadExcel = function(){ $scope.downloadExcel = function(){
ngDialog.open({
template: 'dialogs/confirmToDownload.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope',function ($scope) {
getCount()
$scope.confirmDownload = function () {
var url = '../personPostApi/download?'; var url = '../personPostApi/download?';
var a = document.createElement("a"); var a = document.createElement("a");
document.body.appendChild(a); document.body.appendChild(a);
a.href = encodeURI(getCountAndDownloadUrl(url)); a.href = encodeURI(getCountAndDownloadUrl(url));
a.click(); a.click();
} }
}]
})
}
var postParam = { var postParam = {
idCard: '', idCard: '',
startDate: '', startDate: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment