// web service proxy for orgwebservices.factory('dataInitService',['$http','apiConfig','httpCacheService','FileSaver',function($http,apiConfig,httpCacheService,FileSaver){'use strict';return{//tree: function (type) {// return $http.get('/area/tree?type=' + type, apiConfig.create()); //},downloadTemplate:function(){varthisConfig=apiConfig.create();thisConfig.responseType="arraybuffer";return$http.post('/init/downloadTemplate',{},thisConfig).then(function(response){vardata=newBlob([response.data],{type:response.headers('Content-Type')});// var filename1 = response.headers('Content-Disposition').split(';')[1].trim().substr('filename='.length);varfilename='基础数据模板.xlsx';FileSaver.saveAs(data,filename);});}};}]);