Confilct dev date 12 22 (#131)

* fix(home): 🐛 解决多次切换路由后页面卡顿的问题 #96

卸载路由时清除requestAnimationFrame

* feat:  文件存储使用Blob格式

* style: 💄 修改部分类型any为具体类型

* feat:  界面设置中模块使用瀑布流布局 #96

* fix: 🐛 md文档更换文件夹解决控制台警告

* style: 💄 switch按钮改回使用daisyui组件

* refactor: ♻️ 所有人员列表提取tableColumn

* style: 💄 奖项列表中的图片类型修复

* fix(globalConfig): 修复当前音乐项类型缺失问题

* feat:  single person not done

* feat:  可添加单人 #96

* build(.gitignore): 添加 auto-imports.d.ts 到忽略文件

* fix: 🐛 上传、下载excel文件时修复路径错误

打包成应用和网页端的baseUrl不一样,使用环境变量来表示

* fix: 🐛 导入人员列表时处理有值为空的情况

* style: 💄 改变toaster的组件

* fix: 🐛 上传文件、解析数据与存储/读取数据的处理

、
This commit is contained in:
LOG1997
2025-12-22 17:28:10 +08:00
committed by GitHub
parent 5b8682bb7c
commit f8098a9737
18 changed files with 254 additions and 179 deletions

View File

@@ -18,7 +18,7 @@ class IndexDb {
// 获取存在的key
const stores: Record<string, string> = {}
for (const tableName of tableNames) {
stores[tableName] = 'id,dateTime,type,uid' // 根据需要调整字段
stores[tableName] = `id,dateTime,type,uid,${dbKeys.join(',')}` // 根据需要调整字段
}
this.dbStore.version(this.version).stores(stores)
}
@@ -72,6 +72,12 @@ class IndexDb {
return isAsc ? allData : allData.reverse()
}
// 按 dateTime 排序获取所有数据
async getDataSortedByDateTime(tableName: string, orderTimeName: string = 'dataTime') {
const allData = await this.dbStore[tableName].orderBy(orderTimeName).toArray()
return allData
}
// 分页获取数据
async getPageData(tableName: string, pageNum: number, pageSize: number, isAsc: boolean = true) {
const allData = await this.dbStore[tableName].toArray()

View File

@@ -25,9 +25,9 @@ export function filterData(tableData: any[], localRowCount: number) {
export function addOtherInfo(personList: any[]) {
const len = personList.length
for (let i = 0; i < len; i++) {
personList[i].id = i
personList[i].createTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
personList[i].updateTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
personList[i].id = uuidv4()
personList[i].createTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss:ms')
personList[i].updateTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss:ms')
personList[i].prizeName = [] as string[]
personList[i].prizeTime = [] as string[]
personList[i].prizeId = []