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(){
var url = '../personPostApi/download?'; ngDialog.open({
var a = document.createElement("a"); template: 'dialogs/confirmToDownload.html' + urlTimeStamp(),
document.body.appendChild(a); width: 800,
a.href = encodeURI(getCountAndDownloadUrl(url)); cache: false,
a.click(); closeByDocument:false,
controller: ['$scope',function ($scope) {
getCount()
$scope.confirmDownload = function () {
var url = '../personPostApi/download?';
var a = document.createElement("a");
document.body.appendChild(a);
a.href = encodeURI(getCountAndDownloadUrl(url));
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