feat: 新增xq0031_xq0032 ERP报表导出插件,完成功能与基建更新

1. 新增xq0031_xq0032插件:包含前后端源码、打包脚本、配置文件与插件元数据
2. 新增内网文件服务器组件:exe、启停脚本、打包脚本与配置
3. 新增敏感凭证RSA加密下发能力与存储结构
4. 新增大文件源管理表与相关API
5. 优化登录流程与会话管理,新增Chrome自动化安装工具链
6. 清理废弃插件与示例代码
7. 更新版本号至1.1.3,完善安装包与.gitignore配置
This commit is contained in:
2026-09-17 12:42:44 +08:00
parent 84d3e103ec
commit b32f8e8fe2
105 changed files with 7819 additions and 4276 deletions
+14 -1
View File
@@ -12,7 +12,7 @@ from pydantic import BaseModel
from webhost.backend import config
from webhost.backend.core.cpapi import _cp_call, _cp_headers, _sync_licensing
from webhost.backend.core.session import (SESSION_COOKIE, _SESS, _SESS_LOCK,
_sess_account, _sess_persist)
_sess_account, _sess_persist, _ACCT_CLOUD_TOKEN)
router = APIRouter()
@@ -66,6 +66,10 @@ def admin_login(b: _LoginIn, response: Response) -> dict:
_SESS[token] = (b.account.strip(), time.time())
_sess_persist()
response.set_cookie(SESSION_COOKIE, token, httponly=True, samesite="lax")
# 沿用中心机登录时签发的用户云令牌,后续 /api/admin/me 等调用凭它定位账号(无需机器 TOKEN)
_cloud_tok = (r or {}).get("cloud_token") or ""
if _cloud_tok:
_ACCT_CLOUD_TOKEN[b.account.strip()] = _cloud_tok
# 登录成功即联网同步该账号的离线授权票据 + 管控清单 + 中心机公钥(供离线运行)
if config.CONTROLPLANE_URL:
try:
@@ -82,6 +86,15 @@ def admin_login(b: _LoginIn, response: Response) -> dict:
except Exception as _exc: # noqa: BLE001
import logging
logging.getLogger(__name__).warning("登录后插件同步失败:%s", _exc)
# 登录后刷新该账号敏感凭证(管理员可拉到;员工被服务端 403 拒绝 → 走本地缓存,无害)
try:
from webhost.backend.core import creds_sync
_creds = creds_sync.load(b.account.strip())
if _creds:
config.apply_creds(_creds)
except Exception as _exc: # noqa: BLE001
import logging
logging.getLogger(__name__).warning("登录后敏感凭证刷新失败:%s", _exc)
return {**r, "account": b.account.strip()}