feat: 1. 添加axios全局路由拦截进行自动添加请求jwt。 2.重新整理路由表。 3. 文档列表新增版本差异对比。 4.菜单路由可访问列表通过对接接口返回,添加全局路由检测。

5. 修改统一认证登录和管理员登录是通过接口形式进行,存储返回的accessToken。    6. 修改交叉评查的部分样式
This commit is contained in:
2025-11-18 11:06:24 +08:00
parent 8a50671c39
commit bfe39e45a9
53 changed files with 9503 additions and 2796 deletions
+1 -66
View File
@@ -436,72 +436,7 @@ export async function getHomeData(reviewType?: string | null,userId?: string | n
lastMonthIssuesCount = lastMonthType2Count
}
// 暂时不会存在没有指定类型得情况,暂不实现。
// else {
// // 如果没有指定类型,则使用原来的查询方式获取所有类型的问题数量
// const thisMonthIssuesParams: PostgrestParams = {
// select: 'count',
// filter: {
// and: `(created_at.gte.${startOfThisMonth},created_at.lte.${endOfThisMonth})`,
// 'evaluated_results->result': 'eq.false',
// user_id: `eq.${userId}`
// }
// };
// // 添加类型过滤条件
// if (typeFilter) {
// if (typeFilter.startsWith('(')) {
// thisMonthIssuesParams.or = typeFilter;
// } else {
// const [field, op, value] = typeFilter.split('.');
// if (!thisMonthIssuesParams.filter) {
// thisMonthIssuesParams.filter = {};
// }
// thisMonthIssuesParams.filter[field] = `${op}.${value}`;
// }
// }
// const thisMonthIssuesResponse = await handleApiResponse<{ count: number }[]>(
// postgrestGet('evaluation_results', thisMonthIssuesParams),
// '获取本月问题数据失败',
// []
// );
// // 本月问题数量
// thisMonthIssuesCount = thisMonthIssuesResponse[0]?.count || 0;
// // 上月问题数量
// const lastMonthIssuesParams: PostgrestParams = {
// select: 'count',
// filter: {
// and: `(created_at.gte.${startOfLastMonth},created_at.lte.${endOfLastMonth})`,
// 'evaluated_results->result': 'eq.false',
// user_id: `eq.${userId}`
// }
// };
// // 添加类型过滤条件
// if (typeFilter) {
// if (typeFilter.startsWith('(')) {
// lastMonthIssuesParams.or = typeFilter;
// } else {
// const [field, op, value] = typeFilter.split('.');
// if (!lastMonthIssuesParams.filter) {
// lastMonthIssuesParams.filter = {};
// }
// lastMonthIssuesParams.filter[field] = `${op}.${value}`;
// }
// }
// const lastMonthIssuesResponse = await handleApiResponse<{ count: number }[]>(
// postgrestGet('evaluation_results', lastMonthIssuesParams),
// '获取上月问题数据失败',
// []
// );
// // 上月问题数量
// lastMonthIssuesCount = lastMonthIssuesResponse[0]?.count || 0;
// }
// 计算问题数量同比增长
let issuesGrowthValue = 0;