feat: UI优化和功能完善
- 添加公共分页组件,支持上边显示、分页大小10 - 侧边栏/Header按Liner风格优化,添加动画效果 - 异常处理列表支持分页和明细弹窗 - 任务结果页面支持已匹配列表分页 - 修复Dialog弹窗背景透明问题 - 新增dropdown-menu组件 - 添加parsed_file_record模型和回填脚本 - 前端枚举中文化
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
"""添加解析后文件记录模型
|
||||
|
||||
Revision ID: e4f8a1b2c56d
|
||||
Revises: 52067074731d
|
||||
Create Date: 2026-07-07 00:00:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision: str = "e4f8a1b2c56d"
|
||||
down_revision: Union[str, None] = "52067074731d"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_table(
|
||||
"parsed_file_records",
|
||||
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.text("now()"), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.text("now()"), nullable=False),
|
||||
sa.Column("company_id", sa.Integer(), nullable=False),
|
||||
sa.Column("task_id", sa.Integer(), nullable=False),
|
||||
sa.Column("uploaded_file_id", sa.Integer(), nullable=False),
|
||||
sa.Column("file_bucket", sa.String(length=30), nullable=False),
|
||||
sa.Column("row_index", sa.Integer(), nullable=False),
|
||||
sa.Column("raw_data", sa.JSON(), nullable=False),
|
||||
sa.Column("normalized_data", sa.JSON(), nullable=True),
|
||||
sa.Column("employee_id", sa.String(length=100), nullable=True),
|
||||
sa.Column("employee_name", sa.String(length=200), nullable=True),
|
||||
sa.ForeignKeyConstraint(["company_id"], ["companies.id"]),
|
||||
sa.ForeignKeyConstraint(["task_id"], ["reconciliation_tasks.id"]),
|
||||
sa.ForeignKeyConstraint(["uploaded_file_id"], ["uploaded_files.id"]),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_index("ix_parsed_file_records_company_id", "parsed_file_records", ["company_id"])
|
||||
op.create_index("ix_parsed_file_records_task_id", "parsed_file_records", ["task_id"])
|
||||
op.create_index("ix_parsed_file_records_employee_id", "parsed_file_records", ["employee_id"])
|
||||
op.create_index(
|
||||
"ix_parsed_file_records_task_bucket", "parsed_file_records", ["task_id", "file_bucket"]
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_index("ix_parsed_file_records_task_bucket")
|
||||
op.drop_index("ix_parsed_file_records_employee_id")
|
||||
op.drop_index("ix_parsed_file_records_task_id")
|
||||
op.drop_index("ix_parsed_file_records_company_id")
|
||||
op.drop_table("parsed_file_records")
|
||||
Reference in New Issue
Block a user