Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sass-admin
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj_app
sass-admin
Commits
bdba67bb
You need to sign in or sign up before continuing.
Commit
bdba67bb
authored
Jan 23, 2026
by
chengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加报名导出按钮
parent
c9aef493
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
14 deletions
+62
-14
src/common/Layout/Header/index.js
+16
-4
src/pages/TrainingPrograms/ProgeamsManage/index.jsx
+44
-10
src/pages/TrainingPrograms/ProgeamsManage/redux/api.js
+2
-0
No files found.
src/common/Layout/Header/index.js
View file @
bdba67bb
...
...
@@ -25,20 +25,32 @@ class Header extends PureComponent {
dataLoaded
:
false
,
carouselKey
:
0
// 新增:用于强制重新渲染Carousel
};
this
.
timer
=
null
;
// 新增:定时器引用
}
componentDidMount
()
{
//
修复:直接调用数据获取,不依赖初始状态检查
//
初始加载数据
this
.
fetchScrollData
();
// 设置定时器,每隔5秒更新一次数据
this
.
timer
=
setInterval
(()
=>
{
this
.
fetchScrollData
();
},
60000
);
}
componentWillUnmount
()
{
// 组件卸载时清除定时器
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
}
}
fetchScrollData
=
()
=>
{
const
{
getPromptScrollData
}
=
this
.
props
;
this
.
setState
({
isLoading
:
true
});
getPromptScrollData
({},
(
res
)
=>
{
if
(
res
&&
res
.
data
)
{
console
.
log
(
'跑马灯数据
加载
成功:'
,
res
.
data
);
console
.
log
(
'跑马灯数据
更新
成功:'
,
res
.
data
);
// 检查是否有数据
const
hasData
=
Object
.
values
(
res
.
data
).
some
(
array
=>
array
.
length
>
0
);
...
...
@@ -50,7 +62,7 @@ class Header extends PureComponent {
carouselKey
:
this
.
state
.
carouselKey
+
1
// 更新key强制重新渲染
});
}
else
{
console
.
log
(
'跑马灯数据
加载
失败或为空'
);
console
.
log
(
'跑马灯数据
更新
失败或为空'
);
this
.
setState
({
isLoading
:
false
,
hasData
:
false
,
...
...
src/pages/TrainingPrograms/ProgeamsManage/index.jsx
View file @
bdba67bb
...
...
@@ -53,7 +53,7 @@ import {
}
from
"antd"
;
import
api
from
"./redux/api"
;
const
{
train
}
=
api
;
const
{
exportSignRecord
,
activitiesExport
}
=
train
;
const
{
exportSignRecord
,
exportEnrollRecord
,
activitiesExport
}
=
train
;
import
request
from
"@/util/request"
;
import
MessageRemind
from
"../../../common/MessageRemind"
;
...
...
@@ -614,6 +614,10 @@ class NewTP extends Component {
this
.
hideenrollManag
=
this
.
hideenrollManag
.
bind
(
this
);
// 可见范围回调
this
.
visibleRangeVoFun
=
this
.
visibleRangeVoFun
.
bind
(
this
);
// 导出签到记录
this
.
downTxt
=
this
.
downTxt
.
bind
(
this
);
// 导出报名记录
this
.
downEnrollTxt
=
this
.
downEnrollTxt
.
bind
(
this
);
}
//
...
...
@@ -783,25 +787,38 @@ class NewTP extends Component {
}
});
}
//导出报名记录
async
downEnrollTxt
(
record
)
{
let
data
=
{
trainningProjectId
:
record
,
};
const
res
=
await
request
({
url
:
exportEnrollRecord
,
data
,
});
if
(
res
.
code
===
"1000"
)
{
message
.
loading
(
"数据导出中.."
,
3
).
then
(()
=>
window
.
open
(
res
.
data
));
}
else
{
message
.
error
(
res
.
subMsg
);
}
}
// 导出签到记录
downTxt
=
record
=>
{
async
downTxt
(
record
)
{
let
data
=
{
trainingProjectId
:
record
,
};
return
request
({
const
res
=
await
request
({
url
:
exportSignRecord
,
data
,
})
.
then
(
res
=>
{
})
;
if
(
res
.
code
===
"1000"
)
{
message
.
loading
(
"数据导出中.."
,
3
).
then
(()
=>
window
.
open
(
res
.
data
));
}
else
{
message
.
error
(
res
.
subMsg
);
}
});
};
}
// 二维码导出
qdcode
(
record
)
{
console
.
log
(
record
,
"111111111"
);
const
param
=
{
// 项目id
id
:
record
.
id
,
...
...
@@ -3154,13 +3171,30 @@ class NewTP extends Component {
""
)
}
{
record
.
enroll
===
1
?
(
<
div
>
<
div
style=
{
{
display
:
"flex"
}
}
>
<
a
style=
{
{
marginLeft
:
"10px"
,
color
:
"rgb(24, 144, 255)"
}
}
onClick=
{
()
=>
this
.
onEnrollManag
(
record
)
}
>
报名管理
</
a
>
<
div
>
<
Popconfirm
title=
"确认导出?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
this
.
downEnrollTxt
(
record
.
id
)
}
>
<
a
style=
{
{
marginLeft
:
"10px"
,
color
:
"rgb(24, 144, 255)"
,
}
}
>
导出报名记录
</
a
>
</
Popconfirm
>
</
div
>
</
div
>
)
:
(
""
...
...
@@ -3289,7 +3323,7 @@ class NewTP extends Component {
<
div
className=
{
styles
.
qclist
}
>
{
qclist
}
</
div
>
<
Row
>
<
Col
span=
{
5
}
span=
{
4
}
style=
{
{
backgroundColor
:
"white"
,
}
}
...
...
@@ -3304,7 +3338,7 @@ class NewTP extends Component {
</
Tree
>
</
div
>
</
Col
>
<
Col
span=
{
19
}
style=
{
{
paddingLeft
:
"16
px"
}
}
>
<
Col
span=
{
20
}
style=
{
{
paddingLeft
:
"8
px"
}
}
>
<
div
className=
{
styles
.
filterDiv
}
>
活动状态:
<
Select
...
...
src/pages/TrainingPrograms/ProgeamsManage/redux/api.js
View file @
bdba67bb
...
...
@@ -34,6 +34,8 @@ export default {
exportSign
:
`POST
${
services
.
webManage
}
/sign/qrcode/get`
,
// 导出签到记录
exportSignRecord
:
`GET
${
services
.
webManage
}
/trainingProject/exportSignRecord`
,
// 导出报名记录
exportEnrollRecord
:
`GET
${
services
.
webManage
}
/enroll/list/export`
,
// 导出活动清单
activitiesExport
:
`GET
${
services
.
webManage
}
/tpPlanActivity/activitiesExport`
,
},
...
...
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