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
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 {
...
@@ -25,20 +25,32 @@ class Header extends PureComponent {
dataLoaded
:
false
,
dataLoaded
:
false
,
carouselKey
:
0
// 新增:用于强制重新渲染Carousel
carouselKey
:
0
// 新增:用于强制重新渲染Carousel
};
};
this
.
timer
=
null
;
// 新增:定时器引用
}
}
componentDidMount
()
{
componentDidMount
()
{
//
修复:直接调用数据获取,不依赖初始状态检查
//
初始加载数据
this
.
fetchScrollData
();
this
.
fetchScrollData
();
// 设置定时器,每隔5秒更新一次数据
this
.
timer
=
setInterval
(()
=>
{
this
.
fetchScrollData
();
},
60000
);
}
componentWillUnmount
()
{
// 组件卸载时清除定时器
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
}
}
}
fetchScrollData
=
()
=>
{
fetchScrollData
=
()
=>
{
const
{
getPromptScrollData
}
=
this
.
props
;
const
{
getPromptScrollData
}
=
this
.
props
;
this
.
setState
({
isLoading
:
true
});
getPromptScrollData
({},
(
res
)
=>
{
getPromptScrollData
({},
(
res
)
=>
{
if
(
res
&&
res
.
data
)
{
if
(
res
&&
res
.
data
)
{
console
.
log
(
'跑马灯数据
加载
成功:'
,
res
.
data
);
console
.
log
(
'跑马灯数据
更新
成功:'
,
res
.
data
);
// 检查是否有数据
// 检查是否有数据
const
hasData
=
Object
.
values
(
res
.
data
).
some
(
array
=>
array
.
length
>
0
);
const
hasData
=
Object
.
values
(
res
.
data
).
some
(
array
=>
array
.
length
>
0
);
...
@@ -50,7 +62,7 @@ class Header extends PureComponent {
...
@@ -50,7 +62,7 @@ class Header extends PureComponent {
carouselKey
:
this
.
state
.
carouselKey
+
1
// 更新key强制重新渲染
carouselKey
:
this
.
state
.
carouselKey
+
1
// 更新key强制重新渲染
});
});
}
else
{
}
else
{
console
.
log
(
'跑马灯数据
加载
失败或为空'
);
console
.
log
(
'跑马灯数据
更新
失败或为空'
);
this
.
setState
({
this
.
setState
({
isLoading
:
false
,
isLoading
:
false
,
hasData
:
false
,
hasData
:
false
,
...
...
src/pages/TrainingPrograms/ProgeamsManage/index.jsx
View file @
bdba67bb
...
@@ -53,7 +53,7 @@ import {
...
@@ -53,7 +53,7 @@ import {
}
from
"antd"
;
}
from
"antd"
;
import
api
from
"./redux/api"
;
import
api
from
"./redux/api"
;
const
{
train
}
=
api
;
const
{
train
}
=
api
;
const
{
exportSignRecord
,
activitiesExport
}
=
train
;
const
{
exportSignRecord
,
exportEnrollRecord
,
activitiesExport
}
=
train
;
import
request
from
"@/util/request"
;
import
request
from
"@/util/request"
;
import
MessageRemind
from
"../../../common/MessageRemind"
;
import
MessageRemind
from
"../../../common/MessageRemind"
;
...
@@ -614,6 +614,10 @@ class NewTP extends Component {
...
@@ -614,6 +614,10 @@ class NewTP extends Component {
this
.
hideenrollManag
=
this
.
hideenrollManag
.
bind
(
this
);
this
.
hideenrollManag
=
this
.
hideenrollManag
.
bind
(
this
);
// 可见范围回调
// 可见范围回调
this
.
visibleRangeVoFun
=
this
.
visibleRangeVoFun
.
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 {
...
@@ -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
=
{
let
data
=
{
trainingProjectId
:
record
,
trainingProjectId
:
record
,
};
};
return
request
({
const
res
=
await
request
({
url
:
exportSignRecord
,
url
:
exportSignRecord
,
data
,
data
,
})
.
then
(
res
=>
{
})
;
if
(
res
.
code
===
"1000"
)
{
if
(
res
.
code
===
"1000"
)
{
message
.
loading
(
"数据导出中.."
,
3
).
then
(()
=>
window
.
open
(
res
.
data
));
message
.
loading
(
"数据导出中.."
,
3
).
then
(()
=>
window
.
open
(
res
.
data
));
}
else
{
}
else
{
message
.
error
(
res
.
subMsg
);
message
.
error
(
res
.
subMsg
);
}
}
});
}
};
// 二维码导出
// 二维码导出
qdcode
(
record
)
{
qdcode
(
record
)
{
console
.
log
(
record
,
"111111111"
);
const
param
=
{
const
param
=
{
// 项目id
// 项目id
id
:
record
.
id
,
id
:
record
.
id
,
...
@@ -3154,13 +3171,30 @@ class NewTP extends Component {
...
@@ -3154,13 +3171,30 @@ class NewTP extends Component {
""
""
)
}
)
}
{
record
.
enroll
===
1
?
(
{
record
.
enroll
===
1
?
(
<
div
>
<
div
style=
{
{
display
:
"flex"
}
}
>
<
a
<
a
style=
{
{
marginLeft
:
"10px"
,
color
:
"rgb(24, 144, 255)"
}
}
style=
{
{
marginLeft
:
"10px"
,
color
:
"rgb(24, 144, 255)"
}
}
onClick=
{
()
=>
this
.
onEnrollManag
(
record
)
}
onClick=
{
()
=>
this
.
onEnrollManag
(
record
)
}
>
>
报名管理
报名管理
</
a
>
</
a
>
<
div
>
<
Popconfirm
title=
"确认导出?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
this
.
downEnrollTxt
(
record
.
id
)
}
>
<
a
style=
{
{
marginLeft
:
"10px"
,
color
:
"rgb(24, 144, 255)"
,
}
}
>
导出报名记录
</
a
>
</
Popconfirm
>
</
div
>
</
div
>
</
div
>
)
:
(
)
:
(
""
""
...
@@ -3289,7 +3323,7 @@ class NewTP extends Component {
...
@@ -3289,7 +3323,7 @@ class NewTP extends Component {
<
div
className=
{
styles
.
qclist
}
>
{
qclist
}
</
div
>
<
div
className=
{
styles
.
qclist
}
>
{
qclist
}
</
div
>
<
Row
>
<
Row
>
<
Col
<
Col
span=
{
5
}
span=
{
4
}
style=
{
{
style=
{
{
backgroundColor
:
"white"
,
backgroundColor
:
"white"
,
}
}
}
}
...
@@ -3304,7 +3338,7 @@ class NewTP extends Component {
...
@@ -3304,7 +3338,7 @@ class NewTP extends Component {
</
Tree
>
</
Tree
>
</
div
>
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
19
}
style=
{
{
paddingLeft
:
"16
px"
}
}
>
<
Col
span=
{
20
}
style=
{
{
paddingLeft
:
"8
px"
}
}
>
<
div
className=
{
styles
.
filterDiv
}
>
<
div
className=
{
styles
.
filterDiv
}
>
活动状态:
活动状态:
<
Select
<
Select
...
...
src/pages/TrainingPrograms/ProgeamsManage/redux/api.js
View file @
bdba67bb
...
@@ -34,6 +34,8 @@ export default {
...
@@ -34,6 +34,8 @@ export default {
exportSign
:
`POST
${
services
.
webManage
}
/sign/qrcode/get`
,
exportSign
:
`POST
${
services
.
webManage
}
/sign/qrcode/get`
,
// 导出签到记录
// 导出签到记录
exportSignRecord
:
`GET
${
services
.
webManage
}
/trainingProject/exportSignRecord`
,
exportSignRecord
:
`GET
${
services
.
webManage
}
/trainingProject/exportSignRecord`
,
// 导出报名记录
exportEnrollRecord
:
`GET
${
services
.
webManage
}
/enroll/list/export`
,
// 导出活动清单
// 导出活动清单
activitiesExport
:
`GET
${
services
.
webManage
}
/tpPlanActivity/activitiesExport`
,
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