菜单跳转功能优化

This commit is contained in:
liuwei
2025-03-19 14:21:40 +08:00
parent b159ddb765
commit 80463770b9
4 changed files with 26 additions and 25 deletions

View File

@@ -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>