feat(admin): 新增用户排行榜功能并优化活动流程
- 新增用户排行榜页面和待发布页面,支持查看和发布排行榜 - 新增排行榜相关API接口,包括获取活动排行列表、修改队伍分数、发布排名和获取用户排名列表 - 新增RankPublishStatus枚举,用于管理排行榜发布状态 - 在活动卡片中新增结束活动按钮,点击后调用结束活动接口并生成排行榜数据 - 优化用户活动首页,只显示已发布和处理中的活动 - 调整游戏页面定时刷新间隔从2秒改为3秒,优化性能 - 修复排行榜详情页分数输入最大值限制问题 - 清理未使用的代码文件,移除results-detail-copy相关组件和路由 - 更新路由配置和类型定义,支持新的排行榜页面
This commit is contained in:
51
apps/admin/src/typings/api/rank.d.ts
vendored
51
apps/admin/src/typings/api/rank.d.ts
vendored
@ -31,6 +31,57 @@ declare namespace Api {
|
||||
/** common search params of table */
|
||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'currentPage' | 'pageSize'>
|
||||
|
||||
interface ActivityRankResList extends Array<ActivityRankItem> {}
|
||||
|
||||
interface ActivityRankItem {
|
||||
TeamID: number
|
||||
Name: string
|
||||
TotalPoint: number
|
||||
Questions: QuestionScore[]
|
||||
}
|
||||
|
||||
interface QuestionScore {
|
||||
QuestionNO: number
|
||||
ResultPotin: number
|
||||
}
|
||||
|
||||
interface ActivityRankList {
|
||||
Items: ActivityRank[]
|
||||
TotalRecords: number
|
||||
PageNumber: number
|
||||
PageSize: number
|
||||
TotalPages: number
|
||||
}
|
||||
|
||||
interface UpdateTeamScoreParams {
|
||||
/** 主活动 ID */
|
||||
ActivityID: number
|
||||
|
||||
Id: number
|
||||
/** 结果得分 */
|
||||
ResultPotins: number
|
||||
}
|
||||
|
||||
/** activity rank */
|
||||
interface ActivityRank {
|
||||
/** activity id */
|
||||
Id: number
|
||||
/** activity id (MainID) */
|
||||
ActivityId: number
|
||||
/** activity name */
|
||||
ActivityName: string
|
||||
/** start time */
|
||||
StartTime: string
|
||||
/** team number */
|
||||
TeamNum: number
|
||||
/** max point */
|
||||
MaxPoint: number
|
||||
/** last update time */
|
||||
LastUpdatetime: string
|
||||
/** is publish */
|
||||
Status: number
|
||||
}
|
||||
|
||||
/**
|
||||
* enable status
|
||||
*
|
||||
|
||||
2
apps/admin/src/typings/components.d.ts
vendored
2
apps/admin/src/typings/components.d.ts
vendored
@ -28,6 +28,7 @@ declare module 'vue' {
|
||||
'IconIc:baselineArrowRightAlt': typeof import('~icons/ic/baseline-arrow-right-alt')['default']
|
||||
'IconIc:baselineDeleteForever': typeof import('~icons/ic/baseline-delete-forever')['default']
|
||||
'IconIc:roundPublish': typeof import('~icons/ic/round-publish')['default']
|
||||
'IconIc:roundStopCircle': typeof import('~icons/ic/round-stop-circle')['default']
|
||||
'IconIc:twotoneRule': typeof import('~icons/ic/twotone-rule')['default']
|
||||
IconIcBaselineAdd: typeof import('~icons/ic/baseline-add')['default']
|
||||
IconIcBaselineAddPlus: typeof import('~icons/ic/baseline-add-plus')['default']
|
||||
@ -201,6 +202,7 @@ declare global {
|
||||
const 'IconIc:baselineArrowRightAlt': typeof import('~icons/ic/baseline-arrow-right-alt')['default']
|
||||
const 'IconIc:baselineDeleteForever': typeof import('~icons/ic/baseline-delete-forever')['default']
|
||||
const 'IconIc:roundPublish': typeof import('~icons/ic/round-publish')['default']
|
||||
const 'IconIc:roundStopCircle': typeof import('~icons/ic/round-stop-circle')['default']
|
||||
const 'IconIc:twotoneRule': typeof import('~icons/ic/twotone-rule')['default']
|
||||
const IconIcBaselineAdd: typeof import('~icons/ic/baseline-add')['default']
|
||||
const IconIcBaselineAddPlus: typeof import('~icons/ic/baseline-add-plus')['default']
|
||||
|
||||
6
apps/admin/src/typings/elegant-router.d.ts
vendored
6
apps/admin/src/typings/elegant-router.d.ts
vendored
@ -34,7 +34,6 @@ declare module "@elegant-router/types" {
|
||||
"rank_rank-list": "/rank/rank-list";
|
||||
"results": "/results";
|
||||
"results_results-detail": "/results/results-detail";
|
||||
"results_results-detail-copy": "/results/results-detail-copy";
|
||||
"results_results-list": "/results/results-list";
|
||||
"template": "/template";
|
||||
"template_template-detail": "/template/template-detail";
|
||||
@ -47,6 +46,8 @@ declare module "@elegant-router/types" {
|
||||
"user_game": "/user/game";
|
||||
"user_groups": "/user/groups";
|
||||
"user_home": "/user/home";
|
||||
"user_rank-list": "/user/rank-list";
|
||||
"user_rank-pending": "/user/rank-pending";
|
||||
"user_rules": "/user/rules";
|
||||
"user_teams": "/user/teams";
|
||||
};
|
||||
@ -123,7 +124,6 @@ declare module "@elegant-router/types" {
|
||||
| "question-store"
|
||||
| "rank_rank-detail"
|
||||
| "rank_rank-list"
|
||||
| "results_results-detail-copy"
|
||||
| "results_results-detail"
|
||||
| "results_results-list"
|
||||
| "template_template-detail"
|
||||
@ -135,6 +135,8 @@ declare module "@elegant-router/types" {
|
||||
| "user_game"
|
||||
| "user_groups"
|
||||
| "user_home"
|
||||
| "user_rank-list"
|
||||
| "user_rank-pending"
|
||||
| "user_rules"
|
||||
| "user_teams"
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user