用户信息显示优化
This commit is contained in:
@@ -5,8 +5,10 @@
|
||||
{% block content %}
|
||||
<!-- 首页概览 -->
|
||||
<div>
|
||||
|
||||
|
||||
<!-- 用户信息和统计数据 -->
|
||||
<el-row :gutter="20">
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" class="stats-card">
|
||||
<div slot="header">
|
||||
@@ -17,14 +19,94 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- 其他统计卡片保持不变 -->
|
||||
<!-- ... 其他统计卡片 ... -->
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" class="stats-card">
|
||||
<div slot="header">
|
||||
<span>成功率</span>
|
||||
</div>
|
||||
<div style="font-size: 24px; text-align: center;">
|
||||
{% raw %}{{ successRate.toFixed(2) }}{% endraw %}%
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" class="stats-card">
|
||||
<div slot="header">
|
||||
<span>活跃用户数</span>
|
||||
</div>
|
||||
<div style="font-size: 24px; text-align: center;">
|
||||
{% raw %}{{ activeUsers }}{% endraw %}
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" class="stats-card">
|
||||
<div slot="header">
|
||||
<span>活跃群组数</span>
|
||||
</div>
|
||||
<div style="font-size: 24px; text-align: center;">
|
||||
{% raw %}{{ activeGroups }}{% endraw %}
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" class="stats-card">
|
||||
<div slot="header">
|
||||
<span>平均响应时间</span>
|
||||
</div>
|
||||
<div style="font-size: 24px; text-align: center;">
|
||||
{% raw %}{{ avgResponseTime.toFixed(2) }}{% endraw %} ms
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加热门用户、群组和插件 -->
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<!-- 热门用户、群组和插件部分保持不变 -->
|
||||
<!-- ... 热门用户、群组和插件部分 ... -->
|
||||
<el-col :span="8">
|
||||
<el-card shadow="hover">
|
||||
<div slot="header">
|
||||
<span>热门用户</span>
|
||||
</div>
|
||||
<el-table :data="topUsers" style="width: 100%">
|
||||
<!-- 修改:将用户ID改为用户信息,使用固定像素宽度 -->
|
||||
<el-table-column label="用户信息" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
{% raw %}{{ scope.row.user_name || scope.row.user_id }} ({{ scope.row.user_id }}){% endraw %}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="total_calls" label="调用次数" width="80" align="center"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card shadow="hover">
|
||||
<div slot="header">
|
||||
<span>热门群组</span>
|
||||
</div>
|
||||
<el-table :data="topGroups" style="width: 100%">
|
||||
<!-- 修改:将群组ID改为群组信息,使用固定像素宽度 -->
|
||||
<el-table-column label="群组信息" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
{% raw %}{{ scope.row.group_name || scope.row.group_id }} ({{ scope.row.group_id }}){% endraw %}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="total_calls" label="调用次数" width="80" align="center"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card shadow="hover">
|
||||
<div slot="header">
|
||||
<span>热门插件</span>
|
||||
</div>
|
||||
<el-table :data="topPlugins" style="width: 100%">
|
||||
<el-table-column prop="plugin_name" label="插件名称" min-width="180"></el-table-column>
|
||||
<el-table-column prop="total_calls" label="调用次数" width="80" align="center"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
@@ -50,9 +132,9 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 系统状态卡片移到底部 -->
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
|
||||
<!-- 系统状态卡片移到顶部 -->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="hover">
|
||||
<div slot="header">
|
||||
@@ -68,13 +150,29 @@
|
||||
<!-- 左侧用户信息 -->
|
||||
<el-col :span="6">
|
||||
<div class="chart-container pie-chart-container user-info-chart">
|
||||
<!-- 移除了"用户信息"标题 -->
|
||||
<div v-if="currentUser.success" class="user-info-container">
|
||||
<div class="user-avatar-container">
|
||||
<img :src="'/static/' + currentUser.data.avatar" alt="用户头像" />
|
||||
</div>
|
||||
<div class="user-info-details">
|
||||
<!-- 用户信息项保持不变 -->
|
||||
<!-- ... 用户信息项 ... -->
|
||||
<div class="user-info-item">
|
||||
<span class="user-info-label">昵称:</span>
|
||||
<span class="user-info-value">{% raw %}{{ currentUser.data.nickname || '未知用户' }}{% endraw %}</span>
|
||||
</div>
|
||||
<!-- 其他用户信息项保持不变 -->
|
||||
<div class="user-info-item">
|
||||
<span class="user-info-label">微信ID:</span>
|
||||
<span class="user-info-value">{% raw %}{{ currentUser.data.wx_id }}{% endraw %}</span>
|
||||
</div>
|
||||
<div class="user-info-item" v-if="currentUser.data.mobile">
|
||||
<span class="user-info-label">手机号:</span>
|
||||
<span class="user-info-value">{% raw %}{{ currentUser.data.mobile }}{% endraw %}</span>
|
||||
</div>
|
||||
<div class="user-info-item" v-if="currentUser.data.home">
|
||||
<span class="user-info-label">主目录:</span>
|
||||
<span class="user-info-value user-home-path">{% raw %}{{ currentUser.data.home }}{% endraw %}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="user-info-empty">
|
||||
@@ -98,10 +196,22 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- 其他饼图保持不变 -->
|
||||
<!-- ... 其他饼图 ... -->
|
||||
<el-col :span="8">
|
||||
<div class="chart-container pie-chart-container">
|
||||
<h4>内存使用率: {% raw %}{{ systemInfo.memory_usage }}{% endraw %}%</h4>
|
||||
<canvas id="memoryChart" width="72" height="72"></canvas>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="chart-container pie-chart-container">
|
||||
<h4>磁盘使用率: {% raw %}{{ systemInfo.disk_usage }}{% endraw %}%</h4>
|
||||
<canvas id="diskChart" width="72" height="72"></canvas>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
Reference in New Issue
Block a user