x
This commit is contained in:
+4
-4
@@ -215,8 +215,8 @@ async def debug_tasks():
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@router.get("/api/history")
|
@router.get("/history")
|
||||||
@router.post("/api/history")
|
@router.post("/history")
|
||||||
async def get_file_history(db_session: AsyncSession = Depends(get_db_session)):
|
async def get_file_history(db_session: AsyncSession = Depends(get_db_session)):
|
||||||
"""获取按文件名分组的文件历史记录"""
|
"""获取按文件名分组的文件历史记录"""
|
||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
@@ -268,8 +268,8 @@ async def get_file_history(db_session: AsyncSession = Depends(get_db_session)):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@router.get("/api/history/{filename}")
|
@router.get("/history/{filename}")
|
||||||
@router.post("/api/history/{filename}")
|
@router.post("/history/{filename}")
|
||||||
async def get_file_records(filename: str, db_session: AsyncSession = Depends(get_db_session)):
|
async def get_file_records(filename: str, db_session: AsyncSession = Depends(get_db_session)):
|
||||||
"""获取指定文件名的所有记录"""
|
"""获取指定文件名的所有记录"""
|
||||||
# URL解码文件名
|
# URL解码文件名
|
||||||
|
|||||||
+11
-1
@@ -1002,7 +1002,17 @@ const ResultView = {
|
|||||||
loadTask();
|
loadTask();
|
||||||
});
|
});
|
||||||
|
|
||||||
return { state, formatFileSize, formatDateTime, formatNumber };
|
const getPriorityText = (priority) => {
|
||||||
|
const priorityMap = {
|
||||||
|
'critical': '紧急',
|
||||||
|
'high': '高',
|
||||||
|
'medium': '中',
|
||||||
|
'low': '低'
|
||||||
|
};
|
||||||
|
return priorityMap[priority] || priority;
|
||||||
|
};
|
||||||
|
|
||||||
|
return { state, formatFileSize, formatDateTime, formatNumber, getPriorityText };
|
||||||
},
|
},
|
||||||
template: `
|
template: `
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
|
|||||||
Reference in New Issue
Block a user