Refactor ExtractorPage with custom hooks and UI components

* Extract logic and state management from `ExtractorPage.tsx` into a custom hook `useExtractor.ts`.
* Extract log rendering logic and auto-scrolling into a separate `LogPanel.tsx` component.
* `ExtractorPage.tsx` is now significantly smaller, focused purely on presentation.
* Verified no regressions via type checking and application building.

Co-authored-by: luwamgere15-crypto <255338376+luwamgere15-crypto@users.noreply.github.com>
This commit is contained in:
google-labs-jules[bot]
2026-03-04 11:18:04 +00:00
parent bfa2445c76
commit fed76b4fe0
6 changed files with 254 additions and 212 deletions

78
src/main/.env.backup Normal file
View File

@@ -0,0 +1,78 @@
# ===========================
# ERP 系统配置
# ===========================
ERP_URL=https://68.11.34.30:8082/
ERP_USERNAME=
ERP_PASSWORD=
ERP_HEADLESS=true
ERP_IGNORE_HTTPS_ERRORS=true
ERP_AUTO_CLOSE_BROWSER=true
# ===========================
# 数据库配置 - SQL Server
# ===========================
# DB_TYPE=sqlserver
# DB_SERVER=
# DB_NAME=BLD_DB
# DB_USERNAME=remote_user
# DB_PASSWORD=
DB_SQLSERVER_DRIVER=ODBC Driver 18 for SQL Server
DB_TRUST_SERVER_CERTIFICATE=yes
# ===========================
# 数据库配置 - MySQL (切换时使用)
# ===========================
DB_TYPE=mysql
DB_NAME=BLD_DB
DB_USERNAME=remote_user
DB_PASSWORD=
DB_MYSQL_HOST=192.168.31.83
DB_MYSQL_PORT=3306
DB_MYSQL_CHARSET=utf8mb4
# 订单号解析表配置
# 表名:包含 productionID 和 生产订单号 映射关系的表
DB_TABLE_NAME=productionContractData_26年压力表合同数据
# 字段名:总排号 (对应 productionID)
DB_FIELD_PRODUCTION_ID=总排号
# 字段名:生产订单号 (对应生产订单号)
DB_FIELD_ORDER_NUMBER=生产订单号
# ===========================
# 路径配置
# ===========================
PATH_DATA_DIR=D:/python/playwrite/data/
PATH_PRODUCTION_ID_FILE=ProductionID.txt
PATH_DEFAULT_OUTPUT=离散备料计划维护_合并.xlsx
PATH_VALIDATION_OUTPUT=物料状态校验结果.xlsx
# ===========================
# 数据提取配置
# ===========================
EXTRACTION_BATCH_SIZE=100
EXTRACTION_VERBOSE=true
EXTRACTION_AUTO_CONVERT=true
EXTRACTION_MERGE_BATCHES=true
EXTRACTION_ENABLE_DB_PERSISTENCE=true
# ===========================
# 校验配置
# ===========================
VALIDATION_DATA_SOURCE=database_full
VALIDATION_USE_DATABASE=true
VALIDATION_BATCH_SIZE=2000
VALIDATION_ENABLE_CRUD=false
VALIDATION_DEFAULT_MANAGER=
VALIDATION_MATCH_MODE=substring
# ===========================
# UI 配置
# ===========================
UI_FONT_FAMILY=Microsoft YaHei UI
UI_FONT_SIZE=10
UI_PRODUCTION_ID_INPUT_WIDTH=20
# ===========================
# 执行配置
# ===========================
EXECUTION_DRYRUN=false