feat(字典管理): 新增字典管理功能及相关基础设施

- 新增字典管理页面,支持字典项的增删改查
- 添加 pinia-plugin-persistedstate 依赖,实现状态持久化
- 创建字典相关的 API 类型定义和服务接口
- 实现字典数据存储模块,支持字典数据的缓存和复用
- 添加 useDict 组合式函数,方便组件中使用字典数据
- 在题目分类和比赛创建模块中使用字典数据替代硬编码选项
- 优化分类树组件,添加拖拽手柄和题目类型选择
This commit is contained in:
2026-01-30 17:45:46 +08:00
parent b39761d58e
commit e1a19c48e0
21 changed files with 678 additions and 16 deletions

View File

@ -0,0 +1,37 @@
/**
* Namespace Api
*
* All backend api type
*/
declare namespace Api {
namespace Dictionary {
interface DictionaryItem {
Id: number
DicKey: string
DicValue: string
bakValue: string
}
interface DictionaryUIItem {
id: number
uI_Key: string
uI_Value: string
bakValue: string
dictionaryID: number
}
type AddOrUpdateParams = DictionaryItem
interface AddOrUpdateDictionaryUITypeParams {
id?: number
uI_Key: string
uI_Value: string
bakValue: string
dictionaryID: number
}
interface SearchParams {
RoomID: number
}
}
}