Showing
1 changed file
with
24 additions
and
0 deletions
... | @@ -191,6 +191,30 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi | ... | @@ -191,6 +191,30 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi |
191 | } | 191 | } |
192 | } | 192 | } |
193 | }) | 193 | }) |
194 | + }, | ||
195 | + download:function(filename,path,url){ | ||
196 | + if(!url){ | ||
197 | + url='./download'; | ||
198 | + } | ||
199 | + if(filename){ | ||
200 | + var form=$('<form action="'+ url +'" method="post"></form>').appendTo(document.body); | ||
201 | + form.append('<input type="hidden" name="fileName" value="'+filename+'" />'); | ||
202 | + if(path){ | ||
203 | + form.append('<input type="hidden" name="filePath" value="'+filePath+'" />'); | ||
204 | + } | ||
205 | + form.submit(); | ||
206 | + setTimeout(function(){ | ||
207 | + form.remove(); | ||
208 | + }, 60*10000); | ||
209 | + } | ||
210 | + }, | ||
211 | + downloadErrorExcel:function(fileName,path){ | ||
212 | + var url = "./excelImport/downloadError"; | ||
213 | + this.download(fileName,path,url); | ||
214 | + }, | ||
215 | + downloadExcelTemplate:function(){ | ||
216 | + var url = "./excelImport/downloadExcelTemplate"; | ||
217 | + this.download(filename,null,url); | ||
194 | } | 218 | } |
195 | /** | 219 | /** |
196 | * 只读但可以删除 | 220 | * 只读但可以删除 | ... | ... |
-
Please register or login to post a comment