加入显示筛选条件配置功能

This commit is contained in:
liuwei
2025-04-02 11:46:13 +08:00
parent 6f4488e94d
commit 769ca6fcbc
3 changed files with 11 additions and 7 deletions

View File

@@ -148,8 +148,8 @@
<!-- 右侧内容区 -->
<div class="content">
<!-- 时间范围选择器 -->
<el-row :gutter="20" style="margin-bottom: 20px;">
<!-- 时间范围选择器 - 只在特定页面显示 -->
<el-row :gutter="20" style="margin-bottom: 20px;" v-if="showTimeRangeSelector">
<el-col :span="24">
<el-card shadow="hover">
<el-form :inline="true" size="small">
@@ -181,9 +181,17 @@
return {
currentView: '1',
timeRange: '7',
charts: {}
charts: {},
// 添加一个标志,用于控制时间范围选择器的显示
showTimeRangeSelector: false
}
},
created() {
// 根据当前页面路径决定是否显示时间范围选择器
const path = window.location.pathname;
// 只在统计相关页面显示时间范围选择器
this.showTimeRangeSelector = ['/', '/plugins', '/users', '/groups','/robot_management','/errors'].includes(path);
},
methods: {
handleSelect(key, keyPath) {
this.currentView = key;

View File

@@ -5,8 +5,6 @@
{% block content %}
<!-- 消息列表 -->
<div>
<h1>消息列表</h1>
<!-- 筛选条件 -->
<el-card class="filter-card">
<el-form {% raw %}:inline="true"{% endraw %} size="small">

View File

@@ -4,8 +4,6 @@
{% block content %}
<div>
<h1>微信日志查看</h1>
<el-card class="log-card">
<div slot="header" class="clearfix">
<span>日志查看</span>