From 2c869edcb1d2cd33b48752e31012b69f568bb1a6 Mon Sep 17 00:00:00 2001 From: OoO Date: Thu, 14 May 2026 00:43:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B5=B1=E4=B8=80=E7=B3=BB=E7=B5=B1=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A0=81=E6=96=B0=E7=89=88=E6=AE=BC=E5=B1=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 2 +- routes/notification_routes.py | 3 +- routes/system_public_routes.py | 6 +- routes/user_routes.py | 10 +- templates/change_password.html | 4 +- templates/components/_ewoooc_shell.html | 2 +- templates/ewoooc_base.html | 3 +- templates/login_history.html | 4 +- templates/notification_templates.html | 2 +- templates/system_settings.html | 591 ++++++++++++------------ templates/user_management.html | 4 +- 11 files changed, 319 insertions(+), 312 deletions(-) diff --git a/config.py b/config.py index 57820d2..70c6f7e 100644 --- a/config.py +++ b/config.py @@ -320,7 +320,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.145" +SYSTEM_VERSION = "V10.146" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/routes/notification_routes.py b/routes/notification_routes.py index 0c88015..c3baa9b 100644 --- a/routes/notification_routes.py +++ b/routes/notification_routes.py @@ -25,7 +25,8 @@ notification_bp = Blueprint('notification', __name__) def notification_templates_page(): """通知模板管理頁面""" return render_template('notification_templates.html', - system_version=SYSTEM_VERSION) + system_version=SYSTEM_VERSION, + active_page='notification_templates') # ========================================== diff --git a/routes/system_public_routes.py b/routes/system_public_routes.py index 1e8592c..890e3e7 100644 --- a/routes/system_public_routes.py +++ b/routes/system_public_routes.py @@ -229,7 +229,11 @@ def settings(): @system_public_bp.route('/system_settings') def system_settings_page(): """系統設定與匯入頁面""" - return render_template('system_settings.html', system_version=SYSTEM_VERSION) + return render_template( + 'system_settings.html', + system_version=SYSTEM_VERSION, + active_page='system_settings', + ) @system_public_bp.route('/ai_automation_smoke') diff --git a/routes/user_routes.py b/routes/user_routes.py index 855e713..db9a499 100644 --- a/routes/user_routes.py +++ b/routes/user_routes.py @@ -26,7 +26,7 @@ user_bp = Blueprint('user_bp', __name__) @admin_required def user_management(): """用戶管理頁面(僅管理員)""" - return render_template('user_management.html') + return render_template('user_management.html', active_page='user_management') @user_bp.route('/change_password') @@ -34,14 +34,18 @@ def user_management(): def change_password(): """修改密碼頁面""" password_requirements = get_password_requirements() - return render_template('change_password.html', password_requirements=password_requirements) + return render_template( + 'change_password.html', + password_requirements=password_requirements, + active_page='change_password', + ) @user_bp.route('/login_history') @admin_required def login_history_page(): """登入歷史頁面(僅管理員)""" - return render_template('login_history.html') + return render_template('login_history.html', active_page='login_history') # ========================================== diff --git a/templates/change_password.html b/templates/change_password.html index c640e64..ab42ff7 100644 --- a/templates/change_password.html +++ b/templates/change_password.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} +{% extends "ewoooc_base.html" %} -{% block title %}修改密碼 - WOOO TECH{% endblock %} +{% block title %}修改密碼 - EwoooC{% endblock %} {% block content %}
diff --git a/templates/components/_ewoooc_shell.html b/templates/components/_ewoooc_shell.html index d39070a..b35b32a 100644 --- a/templates/components/_ewoooc_shell.html +++ b/templates/components/_ewoooc_shell.html @@ -165,7 +165,7 @@ {# 群組 5: 系統(terra) #}
系統
- + 系統管理 14 diff --git a/templates/ewoooc_base.html b/templates/ewoooc_base.html index 3b6498d..94ebcbe 100644 --- a/templates/ewoooc_base.html +++ b/templates/ewoooc_base.html @@ -350,7 +350,8 @@ 'obs_promotion_review', 'obs_rag_queries', 'obs_quality_trend', 'obs_ppt_audit'] %} {% set _group_system = ['settings', 'system_settings', 'logs', 'crawler', - 'user_management', 'ai_automation_smoke'] %} + 'user_management', 'login_history', 'change_password', + 'notification_templates', 'ai_automation_smoke'] %} {% if _page in _group_monitor %}{% set _page_group = 'monitor' %} {% elif _page in _group_analytics %}{% set _page_group = 'analytics' %} {% elif _page in _group_ops %}{% set _page_group = 'ops' %} diff --git a/templates/login_history.html b/templates/login_history.html index f9bf893..3578b56 100644 --- a/templates/login_history.html +++ b/templates/login_history.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} +{% extends "ewoooc_base.html" %} -{% block title %}登入歷史 - WOOO TECH{% endblock %} +{% block title %}登入歷史 - EwoooC{% endblock %} {% block extra_css %} - +@media (max-width: 760px) { + .system-import-page .system-import-head, + .system-import-page .table-container .d-flex { + flex-direction: column; + } - - {% include 'components/_navbar.html' %} + .system-import-page .table-container { + padding: var(--momo-space-4, 16px); + } +} + +{% endblock %} -
-
-

系統設定與資料匯入

+{% block content %} +
+
+
+

系統設定與資料匯入

+

集中管理備份、月總表、即時業績與一般 Excel 匯入。

+ 版本 {{ system_version }} +
-
-
系統維護
-
-
-
完整備份
-

將目前的系統程式碼與資料庫打包存檔 (目前版本: {{ system_version }})。

-
- +
+
系統維護
+
+
+
完整備份
+

將目前的系統程式碼與資料庫打包存檔。

+
+
- -
-
月份總表數據分析匯入
-
-
-
-
月份業績匯總分析 (42 欄位版)
-

此功能專用於匯入「月份總表數據分析」Excel。系統會自動根據「年」與「月」欄位,覆蓋更新該月份之歷史數據,適合大批量資料 (如 8 萬筆+)。

- -
-
- -
+
+
月份總表數據分析匯入
+
+
+
+
月份業績匯總分析 (42 欄位版)
+

此功能專用於匯入「月份總表數據分析」Excel。系統會自動根據「年」與「月」欄位,覆蓋更新該月份之歷史數據,適合大批量資料。

+
-
-
-
-
-

資料處理中,請稍候...

+
+
-
- - -
-
即時業績(全月)匯入
-
-
-
-
匯入即時業績 (全月版)
-

請上傳檔名包含「即時業績」且為「全月」版本之 Excel。資料將自動匯入至專屬分析明細表。

- -
-
- -
+
+
+
+

資料處理中,請稍候...

- -
-
一般 Excel 匯入 (自動建表)
-
-
- - +
+ +
+
即時業績(全月)匯入
+
+
+
+
匯入即時業績 (全月版)
+

請上傳檔名包含「即時業績」且為「全月」版本之 Excel。資料將自動匯入至專屬分析明細表。

+
-
-
- - - - - \ No newline at end of file + }) + .catch(error => { + console.error('Error:', error); + alert('發生連線錯誤或系統超時,請檢查背景處理狀態。'); + }) + .finally(() => { + btn.innerHTML = originalText; + btn.disabled = false; + progress.classList.add('d-none'); + }); +} + +{% endblock %} diff --git a/templates/user_management.html b/templates/user_management.html index b7487f9..27fab1c 100644 --- a/templates/user_management.html +++ b/templates/user_management.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} +{% extends "ewoooc_base.html" %} -{% block title %}用戶管理 - WOOO TECH{% endblock %} +{% block title %}用戶管理 - EwoooC{% endblock %} {% block extra_css %}