日志加入加入IP来源,支持多字段模糊搜索,升级七牛云存储版本
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="username" label="用户名"/>
|
||||
<el-table-column prop="requestIp" label="IP"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="address" label="IP来源"/>
|
||||
<el-table-column prop="description" label="描述"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="method" label="方法名称"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="params" label="参数"/>
|
||||
@@ -59,10 +60,9 @@ export default {
|
||||
this.url = 'api/logs/error'
|
||||
const sort = 'id,desc'
|
||||
const query = this.query
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
if (type && value) { this.params[type] = value }
|
||||
if (value) { this.params['blurry'] = value }
|
||||
return true
|
||||
},
|
||||
info(id) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="username" label="用户名"/>
|
||||
<el-table-column prop="requestIp" label="IP"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="address" label="IP来源"/>
|
||||
<el-table-column prop="description" label="描述"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="method" label="方法名称"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="params" label="参数"/>
|
||||
@@ -50,10 +51,9 @@ export default {
|
||||
this.url = 'api/logs'
|
||||
const sort = 'id,desc'
|
||||
const query = this.query
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
if (type && value) { this.params[type] = value }
|
||||
if (value) { this.params['blurry'] = value }
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<div class="head-container">
|
||||
<el-input v-model="query.value" clearable placeholder="请输入搜索内容" style="width: 150px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
|
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
|
||||
</el-select>
|
||||
<el-input v-model="query.value" clearable placeholder="请输入你要搜索的内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="$parent.toQuery">搜索</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -15,14 +12,6 @@ export default {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryTypeOptions: [
|
||||
{ key: 'username', display_name: '用户名' },
|
||||
{ key: 'description', display_name: '描述' }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -19,10 +19,7 @@
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
|
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
|
||||
</el-select>
|
||||
<el-input v-model="query.value" clearable placeholder="输入名称或者描述搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
@@ -107,9 +104,8 @@ export default {
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
const query = this.query
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
if (type && value) { this.params[type] = value }
|
||||
if (value) { this.params['blurry'] = value }
|
||||
if (this.$refs.dictDetail) {
|
||||
this.$refs.dictDetail.data = []
|
||||
this.$refs.dictDetail.dictName = ''
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.value" clearable placeholder="输入名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-input v-model="query.value" clearable placeholder="模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<!-- 新增 -->
|
||||
<div v-permission="['ADMIN','MENU_ALL','MENU_CREATE']" style="display: inline-block;margin: 0px 2px;">
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
const query = this.query
|
||||
const value = query.value
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
if (value) { this.params['name'] = value }
|
||||
if (value) { this.params['blurry'] = value }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.value" clearable placeholder="输入名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-input v-model="query.value" clearable placeholder="输入名称或者别名搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<!-- 新增 -->
|
||||
<div v-permission="['ADMIN','PERMISSION_ALL','PERMISSION_CREATE']" style="display: inline-block;margin: 0px 2px 0px">
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
const query = this.query
|
||||
const value = query.value
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
if (value) { this.params['name'] = value }
|
||||
if (value) { this.params['blurry'] = value }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.value" clearable placeholder="输入名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-input v-model="query.value" clearable placeholder="输入名称或者描述搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<!-- 新增 -->
|
||||
<div v-permission="['ADMIN','ROLES_ALL','ROLES_CREATE']" style="display: inline-block;margin: 0px 2px;">
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
const query = this.query
|
||||
const value = query.value
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
if (value) { this.params['name'] = value }
|
||||
if (value) { this.params['blurry'] = value }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="description" label="行为"/>
|
||||
<el-table-column prop="requestIp" label="IP"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="address" label="IP来源"/>
|
||||
<el-table-column prop="time" label="请求耗时" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.time <= 300">{{ scope.row.time }}ms</el-tag>
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.value" clearable placeholder="输入关键字搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
|
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
|
||||
</el-select>
|
||||
<el-input v-model="query.blurry" clearable placeholder="输入名称或者邮箱搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-select v-model="query.enabled" clearable placeholder="状态" class="filter-item" style="width: 90px" @change="toQuery">
|
||||
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
|
||||
</el-select>
|
||||
@@ -117,10 +114,6 @@ export default {
|
||||
label: 'name'
|
||||
},
|
||||
downloadLoading: false,
|
||||
queryTypeOptions: [
|
||||
{ key: 'username', display_name: '用户名' },
|
||||
{ key: 'email', display_name: '邮箱' }
|
||||
],
|
||||
enabledTypeOptions: [
|
||||
{ key: 'true', display_name: '激活' },
|
||||
{ key: 'false', display_name: '锁定' }
|
||||
@@ -148,11 +141,10 @@ export default {
|
||||
this.url = 'api/users'
|
||||
const sort = 'id,desc'
|
||||
const query = this.query
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
const blurry = query.blurry
|
||||
const enabled = query.enabled
|
||||
this.params = { page: this.page, size: this.size, sort: sort, deptId: this.deptId }
|
||||
if (type && value) { this.params[type] = value }
|
||||
if (blurry) { this.params['blurry'] = blurry }
|
||||
if (enabled !== '' && enabled !== null) { this.params['enabled'] = enabled }
|
||||
return true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user