菜单跳转功能优化
This commit is contained in:
@@ -39,17 +39,18 @@
|
||||
|
||||
<!-- 错误详情对话框 -->
|
||||
<el-dialog title="错误详情" :visible.sync="errorDetailVisible" width="70%">
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="插件名称">{{ errorDetail.plugin_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="命令">{{ errorDetail.command }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户ID">{{ errorDetail.user_id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="群组ID">{{ errorDetail.group_id || '私聊' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="错误信息">{{ errorDetail.error_message }}</el-descriptions-item>
|
||||
<el-descriptions-item label="时间">{{ errorDetail.created_at }}</el-descriptions-item>
|
||||
<el-descriptions-item label="堆栈跟踪">
|
||||
<pre style="white-space: pre-wrap; word-wrap: break-word; max-height: 300px; overflow-y: auto;">{{ errorDetail.stack_trace }}</pre>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div>
|
||||
<p><strong>插件名称:</strong> {% raw %}{{ errorDetail.plugin_name }}{% endraw %}</p>
|
||||
<p><strong>命令:</strong> {% raw %}{{ errorDetail.command }}{% endraw %}</p>
|
||||
<p><strong>用户ID:</strong> {% raw %}{{ errorDetail.user_id }}{% endraw %}</p>
|
||||
<p><strong>群组ID:</strong> {% raw %}{{ errorDetail.group_id || '无' }}{% endraw %}</p>
|
||||
<p><strong>时间:</strong> {% raw %}{{ errorDetail.created_at }}{% endraw %}</p>
|
||||
<p><strong>错误信息:</strong> {% raw %}{{ errorDetail.error_message }}{% endraw %}</p>
|
||||
<div v-if="errorDetail.stack_trace">
|
||||
<p><strong>堆栈跟踪:</strong></p>
|
||||
<pre>{% raw %}{{ errorDetail.stack_trace }}{% endraw %}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column prop="error_calls" label="失败次数" sortable></el-table-column>
|
||||
<el-table-column label="成功率" sortable>
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.success_calls / scope.row.total_calls * 100).toFixed(2) }}%
|
||||
{% raw %} {{ (scope.row.success_calls / scope.row.total_calls * 100).toFixed(2) }}{% endraw %}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
|
||||
@@ -5,30 +5,30 @@
|
||||
{% block content %}
|
||||
<!-- 插件统计 -->
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-row {% raw %}:gutter="20"{% endraw %}>
|
||||
<el-col {% raw %}:span="24"{% endraw %}>
|
||||
<el-card shadow="hover">
|
||||
<div slot="header">
|
||||
<span>插件使用统计</span>
|
||||
</div>
|
||||
<el-table :data="pluginStats" style="width: 100%" border>
|
||||
<el-table {% raw %}:data="pluginStats"{% endraw %} style="width: 100%" border>
|
||||
<el-table-column prop="plugin_name" label="插件名称"></el-table-column>
|
||||
<el-table-column prop="total_calls" label="调用次数" sortable></el-table-column>
|
||||
<el-table-column prop="success_calls" label="成功次数" sortable></el-table-column>
|
||||
<el-table-column prop="error_calls" label="失败次数" sortable></el-table-column>
|
||||
<el-table-column label="成功率" sortable>
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.success_calls / scope.row.total_calls * 100).toFixed(2) }}%
|
||||
{% raw %}{{ (scope.row.success_calls / scope.row.total_calls * 100).toFixed(2) }}{% endraw %}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平均响应时间" sortable>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.avg_response_time.toFixed(2) }}ms
|
||||
{% raw %}{{ scope.row.avg_response_time.toFixed(2) }}{% endraw %}ms
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="viewPluginTrend(scope.row)">查看趋势</el-button>
|
||||
<el-button size="mini" type="primary" {% raw %}@click="viewPluginTrend(scope.row)"{% endraw %}>查看趋势</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -37,9 +37,9 @@
|
||||
</el-row>
|
||||
|
||||
<!-- 插件趋势对话框 -->
|
||||
<el-dialog title="插件使用趋势" :visible.sync="pluginTrendVisible" width="70%">
|
||||
<el-dialog title="插件使用趋势" {% raw %}:visible.sync="pluginTrendVisible"{% endraw %} width="70%">
|
||||
<div class="chart-container">
|
||||
<h3>{{ selectedPlugin ? selectedPlugin.plugin_name : '' }} 使用趋势</h3>
|
||||
<h3>{% raw %}{{ selectedPlugin ? selectedPlugin.plugin_name : '' }}{% endraw %} 使用趋势</h3>
|
||||
<canvas id="pluginTrendChart" width="800" height="400"></canvas>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -5,25 +5,25 @@
|
||||
{% block content %}
|
||||
<!-- 用户统计 -->
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-row {% raw %}:gutter="20"{% endraw %}>
|
||||
<el-col {% raw %}:span="24"{% endraw %}>
|
||||
<el-card shadow="hover">
|
||||
<div slot="header">
|
||||
<span>用户活跃度排行</span>
|
||||
</div>
|
||||
<el-table :data="userStats" style="width: 100%" border>
|
||||
<el-table {% raw %}:data="userStats"{% endraw %} style="width: 100%" border>
|
||||
<el-table-column prop="user_id" label="用户ID"></el-table-column>
|
||||
<el-table-column prop="total_calls" label="调用次数" sortable></el-table-column>
|
||||
<el-table-column prop="success_calls" label="成功次数" sortable></el-table-column>
|
||||
<el-table-column prop="error_calls" label="失败次数" sortable></el-table-column>
|
||||
<el-table-column label="成功率" sortable>
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.success_calls / scope.row.total_calls * 100).toFixed(2) }}%
|
||||
{% raw %}{{ (scope.row.success_calls / scope.row.total_calls * 100).toFixed(2) }}{% endraw %}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="viewUserDetail(scope.row)">查看详情</el-button>
|
||||
<el-button size="mini" type="primary" {% raw %}@click="viewUserDetail(scope.row)"{% endraw %}>查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
Reference in New Issue
Block a user