From a6301d7ab3689c87e58c64a1903136c69d19d5d7 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 4 Jun 2025 16:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8D=A1=E7=89=87=E9=AB=98?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/templates/index.html | 257 +++++++++++---------------- 1 file changed, 106 insertions(+), 151 deletions(-) diff --git a/admin/dashboard/templates/index.html b/admin/dashboard/templates/index.html index 9248049..906148d 100644 --- a/admin/dashboard/templates/index.html +++ b/admin/dashboard/templates/index.html @@ -5,7 +5,84 @@ {% block content %}
- + + + + +
+ 用户信息 +
+ + +
+
+ + +
+ 系统信息 +
+ + +
+
+ 操作系统: + {% raw %}{{ systemInfo.os }} {{ systemInfo.os_version }}{% endraw %} +
+
+ Python版本: + {% raw %}{{ systemInfo.python_version }}{% endraw %} +
+
+
+ +
+
+ 运行时间: + {% raw %}{{ formattedUptime }}{% endraw %} +
+
+ 打开文件数: + {% raw %}{{ systemInfo.open_files }}{% endraw %} +
+
+
+ +
+
+ 最后更新: + {% raw %}{{ systemInfo.timestamp }}{% endraw %} +
+
+
+
+
+
+
@@ -166,66 +243,6 @@ - - - - -
- 系统状态 - - 操作系统: {% raw %}{{ systemInfo.os }} {{ systemInfo.os_version }}{% endraw %} | - Python版本: {% raw %}{{ systemInfo.python_version }}{% endraw %} | - 运行时间: {% raw %}{{ formattedUptime }}{% endraw %} | - 最后更新: {% raw %}{{ systemInfo.timestamp }}{% endraw %} - 打开文件数: {% raw %}{{ systemInfo.open_files }}{% endraw %} - -
- - - - - - - - - - - - - -
-
-
{% endblock %} @@ -733,147 +750,85 @@ color: #606266; } - /* 饼图容器样式 */ - .pie-chart-container { - padding: 4px; - text-align: center; - margin-bottom: 0; - box-shadow: none; - } - - .pie-chart-container h4 { - margin-top: 0; - margin-bottom: 4px; - font-size: 11px; - color: #606266; - } - - /* 系统状态卡片样式 */ - .system-info-item { - margin-bottom: 15px; - } - - .system-info-row { - display: flex; - justify-content: space-between; - margin-bottom: 8px; - } - - .system-update-time { - text-align: right; - font-size: 12px; - color: #909399; - margin-top: 10px; - } - - /* 用户信息图表容器样式 */ - .user-info-chart { - text-align: center; - height: 100%; - display: flex; - flex-direction: column; - padding: 5px; - margin-bottom: 0; - box-shadow: none; - } - + /* 用户信息卡片样式 */ .user-info-container { - padding: 0; display: flex; - flex-direction: column; - justify-content: center; - /* 调整高度与饼图完全一致 */ - height: 100px; + align-items: center; + padding: 5px 0; } .user-avatar-container { - text-align: center; - margin-bottom: 5px; + margin-right: 10px; } .user-avatar-container img { - width: 45px; /* 进一步缩小头像 */ - height: 45px; + width: 40px; + height: 40px; border-radius: 50%; - border: 1px solid #fff; /* 减小边框 */ + border: 1px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); } .user-info-details { - display: flex; - flex-direction: column; - gap: 3px; /* 减小间距 */ + flex: 1; } .user-info-item { display: flex; align-items: center; - font-size: 11px; /* 进一步缩小字体 */ - justify-content: center; - height: 16px; /* 固定每行高度 */ + font-size: 12px; + line-height: 1.4; + margin-bottom: 2px; } .user-info-label { - width: 50px; color: #606266; - font-weight: 500; + width: 45px; flex-shrink: 0; - text-align: right; - padding-right: 5px; } .user-info-value { color: #303133; flex: 1; - word-break: break-all; - text-align: left; - max-width: 120px; overflow: hidden; text-overflow: ellipsis; - } - - .user-home-path { - font-size: 10px; + white-space: nowrap; } .user-info-empty { text-align: center; color: #909399; - padding: 20px 0; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; + padding: 10px 0; } - .user-info-empty i { - font-size: 24px; - margin-bottom: 10px; + /* 系统信息卡片样式 */ + .system-info-item { + padding: 5px 0; } - .user-info-row { + .system-info-row { display: flex; justify-content: space-between; - margin-bottom: 12px; - line-height: 1.5; + font-size: 12px; + line-height: 1.4; + margin-bottom: 2px; } .info-label { color: #606266; - font-weight: 500; } .info-value { color: #303133; - text-align: right; } - .system-update-time { - text-align: right; - font-size: 12px; - color: #909399; - margin-top: auto; + /* 卡片头部样式 */ + .el-card__header { + padding: 10px 15px; + } + + .el-card__body { + padding: 10px 15px; } {% endblock %} \ No newline at end of file