- 新增用户端答题流程主页面,包含封面、介绍、答题、答题图解四个状态 - 新增用户端组件:封面、介绍页、答题页、答题图解页、题目渲染器及通用布局组件 - 新增用户端类型定义、模拟数据及业务常量 - 新增用户路由及类型声明,包含组别和队伍选择页面 - 新增管理端首页模块:数据卡片、头部横幅、折线图、饼图、创意横幅和项目新闻 - 新增富文本编辑器组件,支持图片和视频上传至OSS - 优化题库分类树,改为扁平化列表结构 - 完善比赛创建功能,增加轮次类型、题目分数类型及关联AP字段 - 修复模板删除函数调用参数错误 - 添加 pinyin-pro 依赖以支持拼音处理功能
99 lines
2.4 KiB
TypeScript
99 lines
2.4 KiB
TypeScript
/**
|
|
* Namespace Api
|
|
*
|
|
* All backend api type
|
|
*/
|
|
declare namespace Api {
|
|
namespace Question {
|
|
/** common params of paginating */
|
|
interface PaginatingCommonParams {
|
|
/** pageIndex page number */
|
|
pageIndex: number
|
|
/** page size */
|
|
pageSizes: number
|
|
/** total count */
|
|
total: number
|
|
}
|
|
|
|
/** common params of paginating query list data */
|
|
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
|
|
data: T[]
|
|
}
|
|
|
|
/** get question library list all params */
|
|
interface GetQuestionLibraryListAllParams {
|
|
/** question id */
|
|
questionId: number
|
|
/** pageIndex page number */
|
|
pageIndex: number
|
|
/** page size */
|
|
pageSizes: number
|
|
/** search keyword */
|
|
keyWords?: string
|
|
}
|
|
|
|
/** add params */
|
|
interface AddParams {
|
|
/** question id */
|
|
id: number
|
|
/** question name */
|
|
name: string
|
|
/** question content */
|
|
questionContent: string
|
|
/** question type */
|
|
questionType: QuestionType
|
|
}
|
|
|
|
/** add question library params */
|
|
interface AddQuestionLibraryParams {
|
|
/** question library id */
|
|
id: number
|
|
/** question library name */
|
|
name: string
|
|
/** question library content */
|
|
answer: string
|
|
/** question id */
|
|
questionId: number
|
|
/** question library image url */
|
|
imageUrl: string
|
|
/** question library type */
|
|
type: QuestionScoreType
|
|
/** is priority 0: no 1: yes */
|
|
IsGood: number
|
|
}
|
|
|
|
/** common search params of table */
|
|
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>
|
|
|
|
/**
|
|
* enable status
|
|
*
|
|
* - "1": enabled
|
|
* - "2": disabled
|
|
*/
|
|
type EnableStatus = '1' | '2'
|
|
|
|
/** question score type */
|
|
type QuestionScoreType = '1' | '2' /** 固定分数 | 答题个数 */
|
|
|
|
/** competition round type */
|
|
type CompetitionRoundType = '1' | '2' /** 题包环节 | 加时环节 */
|
|
|
|
/** common record */
|
|
type CommonRecord<T = any> = {
|
|
/** record id */
|
|
id: number
|
|
/** record creator */
|
|
createBy: string
|
|
/** record create time */
|
|
createTime: string
|
|
/** record updater */
|
|
updateBy: string
|
|
/** record update time */
|
|
updateTime: string
|
|
/** record status */
|
|
status: EnableStatus | null
|
|
} & T
|
|
}
|
|
}
|