Commit ab589263 authored by liboyang's avatar liboyang

下载弹框确认

parent 5c4d6c40
......@@ -193,14 +193,29 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
}
return url + 't=' + Math.floor(Date.now());
}
var getCount = function () {
HttpService.getRecordsCount(getCountJson(), function (data) {
$rootScope.count = data;
})
}
$scope.downloadExcel = function(){
var url = '../personPostApi/download?';
var a = document.createElement("a");
document.body.appendChild(a);
a.href = encodeURI(getCountAndDownloadUrl(url));
a.click();
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 a = document.createElement("a");
document.body.appendChild(a);
a.href = encodeURI(getCountAndDownloadUrl(url));
a.click();
}
}]
})
}
var postParam = {
idCard: '',
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