Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王琮
platform
Commits
ea9a1e83
Commit
ea9a1e83
authored
Nov 11, 2022
by
王飞龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
4cbf2625
461b3bc0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
2 deletions
+82
-2
team_library.jsp
src/main/webapp/WEB-INF/page/education/team_library.jsp
+7
-0
team_library.jsp
src/main/webapp/WEB-INF/page/space/team_library.jsp
+7
-0
loading.gif
src/main/webapp/res/image/loading.gif
+0
-0
team_library.js
src/main/webapp/res/js/education/team_library.js
+31
-1
team_library.js
src/main/webapp/res/js/space/team_library.js
+37
-1
No files found.
src/main/webapp/WEB-INF/page/education/team_library.jsp
View file @
ea9a1e83
...
...
@@ -52,6 +52,13 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"loadingModal"
backdrop=
"static"
keyboard=
"false"
>
<div
style=
"width: 200px;height:20px; z-index: 20000; position: absolute; text-align: center; left: 50%; top: 50%;margin-left:-100px;margin-top:-10px"
>
<div
class=
"progress progress-striped active"
style=
"margin-bottom: 0;background-color:rgba(0,0,0,0)"
>
<img
src=
"
<%=
request
.
getContextPath
()
%>
/res/image/loading.gif"
><span
style=
"color: white"
>
数据加载中,请稍候...
</span>
</div>
</div>
</div>
<!-- 全局js -->
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/bootstrap.min.js?v=3.3.6"
></script>
...
...
src/main/webapp/WEB-INF/page/space/team_library.jsp
View file @
ea9a1e83
...
...
@@ -49,6 +49,13 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"loadingModal"
backdrop=
"static"
keyboard=
"false"
>
<div
style=
"width: 200px;height:20px; z-index: 20000; position: absolute; text-align: center; left: 50%; top: 50%;margin-left:-100px;margin-top:-10px"
>
<div
class=
"progress progress-striped active"
style=
"margin-bottom: 0;background-color:rgba(0,0,0,0)"
>
<img
src=
"
<%=
request
.
getContextPath
()
%>
/res/image/loading.gif"
><span
style=
"color: white"
>
数据加载中,请稍候...
</span>
</div>
</div>
</div>
<!-- 全局js -->
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/res/js/bootstrap.min.js?v=3.3.6"
></script>
...
...
src/main/webapp/res/image/loading.gif
0 → 100644
View file @
ea9a1e83
5.89 KB
src/main/webapp/res/js/education/team_library.js
View file @
ea9a1e83
...
...
@@ -118,7 +118,37 @@ function getAllTeam_show(teamid){
* @returns
*/
function
project_DIV_Derive
(){
downloadFile
(
webroot
+
"teamMessage/deriveTeamONLINE"
);
showLoading
()
//downloadFile(webroot+"teamMessage/deriveTeamONLINE");
var
url
=
webroot
+
"teamMessage/deriveTeamONLINE"
;
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'GET'
,
url
,
true
);
// 也可以使用POST方式,根据接口
xhr
.
responseType
=
"blob"
;
// 返回类型blob
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
xhr
.
onload
=
function
()
{
// 请求完成
if
(
this
.
status
===
200
)
{
// 返回200
var
blob
=
this
.
response
;
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
blob
);
// 转换为base64,可以直接放入a表情href
reader
.
onload
=
function
(
e
)
{
// 转换完成,创建一个a标签用于下载
var
a
=
document
.
createElement
(
'a'
);
a
.
download
=
'团队详细.xls'
;
a
.
href
=
e
.
target
.
result
;
$
(
"body"
).
append
(
a
);
// 修复firefox中无法触发click
a
.
click
();
$
(
a
).
remove
();
hideLoading
()
}
}
else
{
hideLoading
()
swal
(
"失败!"
,
'网络错误,稍后再试'
,
"error"
);
}
};
// 发送ajax请求
xhr
.
send
()
}
/**
* 下载文件
...
...
src/main/webapp/res/js/space/team_library.js
View file @
ea9a1e83
...
...
@@ -110,7 +110,37 @@ function getAllTeam_STATE(teamMessageID)
* @returns
*/
function
project_DIV_Derive
(){
downloadFile
(
webroot
+
"teamMessage/deriveTeamONLINE"
);
showLoading
()
//downloadFile(webroot+"teamMessage/deriveTeamONLINE");
var
url
=
webroot
+
"teamMessage/deriveTeamONLINE"
;
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'GET'
,
url
,
true
);
// 也可以使用POST方式,根据接口
xhr
.
responseType
=
"blob"
;
// 返回类型blob
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
xhr
.
onload
=
function
()
{
// 请求完成
if
(
this
.
status
===
200
)
{
// 返回200
var
blob
=
this
.
response
;
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
blob
);
// 转换为base64,可以直接放入a表情href
reader
.
onload
=
function
(
e
)
{
// 转换完成,创建一个a标签用于下载
var
a
=
document
.
createElement
(
'a'
);
a
.
download
=
'团队详细.xls'
;
a
.
href
=
e
.
target
.
result
;
$
(
"body"
).
append
(
a
);
// 修复firefox中无法触发click
a
.
click
();
$
(
a
).
remove
();
hideLoading
()
}
}
else
{
hideLoading
()
swal
(
"失败!"
,
'网络错误,稍后再试'
,
"error"
);
}
};
// 发送ajax请求
xhr
.
send
()
}
/**
* 下载文件
...
...
@@ -126,6 +156,12 @@ function downloadFile(url){
downloadFrame
.
attr
(
'src'
,
url
);
}
showLoading
=
function
(){
$
(
'#loadingModal'
).
modal
({
backdrop
:
'static'
,
keyboard
:
false
});
}
hideLoading
=
function
(){
$
(
'#loadingModal'
).
modal
(
'hide'
);
}
//删除当前页最后一条记录,跳到上一页
function
changPage
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment