审计日志列表增加级别筛选

This commit is contained in:
GoEdgeLab
2023-04-06 10:06:22 +08:00
parent 5daa0d6108
commit 5c6bfe50f4
5 changed files with 46 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
<first-menu>
<menu-item href="/log" code="list">查询</menu-item>
<span class="item disabled">|</span>
<menu-item href="/log/clean" code="clean" v-if="logConfig.canClean">清理</menu-item>
<menu-item href="/log/settings" code="setting">设置</menu-item>
</first-menu>

View File

@@ -15,6 +15,12 @@
<div class="ui field">
<input type="text" name="keyword" style="width:10em" v-model="keyword" placeholder="关键词"/>
</div>
<div class="ui field">
<select class="ui dropdown" name="level" v-model="level">
<option value="">[级别]</option>
<option v-for="levelOption in levelOptions" :value="levelOption.code">{{levelOption.name}}</option>
</select>
</div>
<div class="ui field">
<select class="ui dropdown auto-width" name="userType" v-model="userType">
<option value="">[用户类型]</option>
@@ -25,7 +31,7 @@
<div class="ui field">
<button type="submit" class="ui button">查询</button>
</div>
<div class="ui field" v-if="dayFrom.length > 0 || dayTo.length > 0 || keyword.length > 0">
<div class="ui field" v-if="dayFrom.length > 0 || dayTo.length > 0 || keyword.length > 0 || level.length > 0">
<a href="/log">[清除条件]</a>
</div>
<div class="ui field">

View File

@@ -15,7 +15,7 @@ Tea.context(function () {
this.exportExcel = function () {
let that = this
teaweb.confirm("确定要将当前列表导出到Excel吗", function () {
window.location = "/log/exportExcel?dayFrom=" + that.dayFrom + "&dayTo=" + that.dayTo + "&keyword=" + that.keyword + "&userType=" + that.userType
window.location = "/log/exportExcel?dayFrom=" + that.dayFrom + "&dayTo=" + that.dayTo + "&keyword=" + that.keyword + "&userType=" + that.userType + '&level=' + that.level
})
}