Toggle navigation
Toggle navigation
This project
Loading...
Sign in
runsa
/
crm
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jun
2016-09-08 10:23:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4573a335f03c15c03f5ecdcef42b60994072280e
4573a335
1 parent
99b3146a
添加base的下载方法
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
portal/portal.web/src/main/webapp/js/views/base/index.js
portal/portal.web/src/main/webapp/js/views/base/index.js
View file @
4573a33
...
...
@@ -191,6 +191,30 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi
}
}
})
},
download
:
function
(
filename
,
path
,
url
){
if
(
!
url
){
url
=
'./download'
;
}
if
(
filename
){
var
form
=
$
(
'<form action="'
+
url
+
'" method="post"></form>'
).
appendTo
(
document
.
body
);
form
.
append
(
'<input type="hidden" name="fileName" value="'
+
filename
+
'" />'
);
if
(
path
){
form
.
append
(
'<input type="hidden" name="filePath" value="'
+
filePath
+
'" />'
);
}
form
.
submit
();
setTimeout
(
function
(){
form
.
remove
();
},
60
*
10000
);
}
},
downloadErrorExcel
:
function
(
fileName
,
path
){
var
url
=
"./excelImport/downloadError"
;
this
.
download
(
fileName
,
path
,
url
);
},
downloadExcelTemplate
:
function
(){
var
url
=
"./excelImport/downloadExcelTemplate"
;
this
.
download
(
filename
,
null
,
url
);
}
/**
* 只读但可以删除
...
...
Please
register
or
login
to post a comment