feat(api): 新增风险与工单管理接口及多语言支持
Some checks failed
Lint Code / Lint Code (push) Failing after 9m13s

- 新增风险与工单相关多语言菜单项(英文和中文)
- 定义风险相关类型,包括风险分类、风险等级和状态等
- 定义工单相关类型,包括工单类型、优先级及状态等
- 实现风险评估创建、更新、删除、查询及统计接口
- 实现工单创建、更新、删除、查询、处理和分配接口
- 支持批量更新风险状态接口
- 新增我的工单列表及统计接口
- 提供统一的响应结果类型定义
- 更新OpenAPI规范文件以支持新增接口
This commit is contained in:
2026-03-30 14:20:01 +08:00
parent 6f3192cf9a
commit 16f466f666
11 changed files with 3714 additions and 5 deletions

View File

@@ -14,6 +14,10 @@ import {
import { GGanttChart, GGanttRow } from "@infectoone/vue-ganttastic";
import { message } from "@/utils/message";
import dayjs from "dayjs";
import isoWeek from "dayjs/plugin/isoWeek";
// 启用 isoWeek 插件vue-ganttastic 周精度需要
dayjs.extend(isoWeek);
import ArrowLeftIcon from "~icons/ri/arrow-left-line";
import DownloadIcon from "~icons/ri/download-line";
@@ -306,6 +310,18 @@ const ganttDateRange = computed(() => {
};
});
// 计算项目时间跨度(天数)
const projectDays = computed(() => {
const start = dayjs(ganttDateRange.value.start);
const end = dayjs(ganttDateRange.value.end);
return end.diff(start, "day");
});
// 动态计算甘特图精度:超过两个月(60天)使用周精度,否则使用日精度
const ganttPrecision = computed(() => {
return projectDays.value > 60 ? "week" : "day";
});
// 获取项目详情
async function fetchProjectDetail() {
if (!projectId.value) return;
@@ -609,7 +625,7 @@ onMounted(() => {
<g-gantt-chart
:chart-start="ganttDateRange.start"
:chart-end="ganttDateRange.end"
precision="day"
:precision="ganttPrecision"
date-format="YYYY-MM-DD"
bar-start="startDate"
bar-end="endDate"