日志加入加入IP来源,支持多字段模糊搜索,升级七牛云存储版本

This commit is contained in:
dqjdda
2019-08-22 13:47:46 +08:00
parent d0e72ece9f
commit 6d45661f24
9 changed files with 17 additions and 39 deletions

View File

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

View File

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

View File

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