From 7589e942eb2799b319dc40d17860ea69bf8f295d Mon Sep 17 00:00:00 2001 From: fish Date: Fri, 24 Jul 2026 21:43:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20Tab=20=E5=B8=83=E5=B1=80=EF=BC=8C=E6=8C=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5=E3=80=81=E5=93=81=E7=A7=8D?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E3=80=81=E5=90=88=E7=BA=A6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=86=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ft-app/app/templates/admin.html | 256 ++++++++++++++++++++------------ 1 file changed, 165 insertions(+), 91 deletions(-) diff --git a/ft-app/app/templates/admin.html b/ft-app/app/templates/admin.html index 36167a5..ba16f67 100644 --- a/ft-app/app/templates/admin.html +++ b/ft-app/app/templates/admin.html @@ -5,105 +5,179 @@ {% block content %} + -{# ── Sync Bar ── #} -
- 数据同步 -
- -
- {% if request.query_params.get('synced') %} - ✓ 已同步 {{ request.query_params.synced }} 条 +{% set tab = request.query_params.get('tab', 'sync') %} + +
+ + + +
+ +{# ═══════════════════ Tab: 数据同步 ═══════════════════ #} +
+
+ 全部合约 +
+ +
+ {% if request.query_params.get('synced') %} + ✓ 已同步 {{ request.query_params.synced }} 条 + {% endif %} +
+ + {% if products %} +
+ + + {% for p in products %} + {% for c in p.contracts %} + + + + + + + {% endfor %} + {% endfor %} +
合约品种状态操作
{{ c.code }}{{ p.name }}{% if c.is_active %}启用{% else %}停用{% endif %} + 查看 +
+ +
+
+
+ {% else %} +
暂无品种,请先在「品种管理」中新建。
{% endif %}
-{# ── New Product ── #} -
新建品种
-
-
-
- - -
-
- - -
-
- - -
- -
+ +{# ═══════════════════ Tab: 品种管理 ═══════════════════ #} +
+
+
新建品种
+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + {% if products %} +
+ + + {% for p in products %} + + + + + + + + {% endfor %} +
代码名称交易所合约数操作
{{ p.code }}{{ p.name }}{{ p.exchange }}{{ p.contracts|length }} +
+ +
+
+
+ {% else %} +
暂无品种,请先新建。
+ {% endif %}
-{# ── Product List ── #} -{% for p in products %} -
{{ p.code }} · {{ p.name }} {{ p.exchange }}
+{# ═══════════════════ Tab: 合约管理 ═══════════════════ #} +
+ {% if products %} + {% for p in products %} +
{{ p.code }} · {{ p.name }}
-{# ── New Contract ── #} -
-
- -
- - -
-
- - -
- -
-
+
+
+ +
+ + +
+
+ + +
+ +
+
-{# ── Contract List ── #} -{% if p.contracts %} -
- - - {% for c in p.contracts %} - - - - - - - + {% if p.contracts %} +
+
合约代码名称状态行情操作
{{ c.code }}{{ c.name }} - {% if c.is_active %} - 启用 - {% else %} - 停用 - {% endif %} - - 查看 -
- -
-
-
- -
-
- -
-
+ + {% for c in p.contracts %} + + + + + + + {% endfor %} +
合约代码名称状态操作
{{ c.code }}{{ c.name }} + {% if c.is_active %}启用{% else %}停用{% endif %} + +
+ +
+
+ +
+
+
+ {% else %} +
暂无合约
+ {% endif %} {% endfor %} - + {% else %} +
暂无品种,请先在「品种管理」中新建。
+ {% endif %}
-{% endif %} - -
- -
- -{% else %} -
暂无品种,请先新建。
-{% endfor %} + {% endblock %}