chore: 清理冗余代码与配置,优化项目结构

1.  删除无用文件与废弃代码:移除locale枚举、element-plus插件、sse路由、api token模块等
2.  简化类型导入与依赖:移除大量未使用的类型导入,统一echarts导入方式
3.  优化配置与样式:调整gitignore、样式引入顺序,新增列表动画样式
4.  修复接口与模型:修正接口返回类型、查询参数配置,更新部门模型字段
5.  优化性能与体验:添加图片懒加载,优化加载逻辑与表格渲染
6.  调整环境配置:新增并更新开发/生产环境配置文件
This commit is contained in:
zhangtao
2026-07-23 20:49:52 +08:00
parent 096e2216d6
commit 0ce31936aa
360 changed files with 8072 additions and 22122 deletions
@@ -1,6 +1,6 @@
from typing import Annotated
from fastapi import APIRouter, Body, Depends, Path, Query, Security, status
from fastapi import APIRouter, Body, Depends, Path, Security, status
from fastapi.responses import JSONResponse
from sqlalchemy.ext.asyncio import AsyncSession
@@ -30,7 +30,7 @@ async def get_workflow_list_controller(
auth: Annotated[AuthSchema, Security(AuthPermission(["module_task:workflow:flow:query"]))],
db: Annotated[AsyncSession, Depends(db_getter)],
page: Annotated[PaginationQueryParam, Depends()],
search: Annotated[WorkflowQueryParam, Query()],
search: Annotated[WorkflowQueryParam, Depends()],
) -> JSONResponse:
result_dict = await WorkflowService(auth, db).get_workflow_page(
page_no=page.page_no,
@@ -5,16 +5,14 @@ from app.core.base_model import ModelMixin, UserMixin
class WorkflowModel(ModelMixin, UserMixin):
"""工作流定义:Vue Flow 画布序列化 + 拓扑分层并行执行
"""
"""工作流定义:Vue Flow 画布序列化 + 拓扑分层并行执行"""
__tablename__: str = "task_workflow"
__table_args__: dict[str, str] = {"comment": "工作流定义表"}
__loader_options__: list[str] = ["created_by", "updated_by", "deleted_by"]
name: Mapped[str] = mapped_column(String(128), nullable=False, comment="流程名称")
name: Mapped[str] = mapped_column(String(64), nullable=False, index=True, comment="流程名称")
code: Mapped[str] = mapped_column(String(64), unique=True, nullable=False, comment="流程编码")
nodes: Mapped[list | None] = mapped_column(JSON, nullable=True, comment="VueFlow节点")
edges: Mapped[list | None] = mapped_column(JSON, nullable=True, comment="VueFlow连接线")
status: Mapped[int] = mapped_column(Integer, default=0, nullable=False, comment="状态(0:草稿 1:已发布 2:已归档)", index=True)
status: Mapped[int] = mapped_column(Integer, default=0, nullable=False, comment="状态(0:草稿 1:已发布 2:已归档)")
description: Mapped[str | None] = mapped_column(Text, default=None, nullable=True, comment="备注")
@@ -93,8 +93,8 @@ class WorkflowOutSchema(BaseSchema, UserBySchema):
class WorkflowQueryParam(BaseQueryParam, UserByQueryParam):
"""工作流查询"""
name: str | None = Field(None, description="流程名称")
code: str | None = Field(None, description="流程编码")
name: str | None = Field(None, description="流程名称", json_schema_extra={"q": "like"})
code: str | None = Field(None, description="流程编码", json_schema_extra={"q": "eq"})
class WorkflowExecuteSchema(BaseModel):