|
@ -3,9 +3,30 @@ |
|
|
<div class="filter-container"> |
|
|
<div class="filter-container"> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-input v-model="listQuery.createBy" placeholder="用户名" style="width: 150px" size="small" clearable @keyup.enter.native="handleFilter" /> |
|
|
<el-input |
|
|
<el-input v-model="listQuery.address" placeholder="IP来源" style="width: 150px" size="small" clearable @keyup.enter.native="handleFilter" /> |
|
|
v-model="listQuery.createBy" |
|
|
<el-input v-model="listQuery.description" placeholder="描述" style="width: 150px" size="small" clearable @keyup.enter.native="handleFilter" /> |
|
|
placeholder="用户名" |
|
|
|
|
|
style="width: 150px" |
|
|
|
|
|
size="small" |
|
|
|
|
|
clearable |
|
|
|
|
|
@keyup.enter.native="handleFilter" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="listQuery.address" |
|
|
|
|
|
placeholder="IP来源" |
|
|
|
|
|
style="width: 150px" |
|
|
|
|
|
size="small" |
|
|
|
|
|
clearable |
|
|
|
|
|
@keyup.enter.native="handleFilter" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="listQuery.description" |
|
|
|
|
|
placeholder="描述" |
|
|
|
|
|
style="width: 150px" |
|
|
|
|
|
size="small" |
|
|
|
|
|
clearable |
|
|
|
|
|
@keyup.enter.native="handleFilter" |
|
|
|
|
|
/> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="value1" |
|
|
v-model="value1" |
|
|
type="datetimerange" |
|
|
type="datetimerange" |
|
@ -15,7 +36,12 @@ |
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
@keyup.enter.native="handleFilter" |
|
|
@keyup.enter.native="handleFilter" |
|
|
/> |
|
|
/> |
|
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter"> |
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
icon="el-icon-search" |
|
|
|
|
|
size="small" |
|
|
|
|
|
@click="handleFilter" |
|
|
|
|
|
> |
|
|
查询 |
|
|
查询 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -23,11 +49,26 @@ |
|
|
</div> |
|
|
</div> |
|
|
<el-table :data="list" size="small" fit highlight-current-row> |
|
|
<el-table :data="list" size="small" fit highlight-current-row> |
|
|
<el-table-column align="center" label="用户名" prop="createBy" /> |
|
|
<el-table-column align="center" label="用户名" prop="createBy" /> |
|
|
<el-table-column align="center" label="IP" prop="requestIp" :formatter="formatterIp" /> |
|
|
<el-table-column |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="IP" |
|
|
|
|
|
prop="requestIp" |
|
|
|
|
|
:formatter="formatterIp" |
|
|
|
|
|
/> |
|
|
<el-table-column align="center" label="IP来源" prop="address" /> |
|
|
<el-table-column align="center" label="IP来源" prop="address" /> |
|
|
<el-table-column align="center" label="描述" prop="description" /> |
|
|
<el-table-column align="center" label="描述" prop="description" /> |
|
|
<el-table-column align="center" label="方法名称" :show-overflow-tooltip="true" prop="method" /> |
|
|
<el-table-column |
|
|
<el-table-column align="center" label="参数" :show-overflow-tooltip="true" prop="params" /> |
|
|
align="center" |
|
|
|
|
|
label="方法名称" |
|
|
|
|
|
:show-overflow-tooltip="true" |
|
|
|
|
|
prop="method" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="参数" |
|
|
|
|
|
:show-overflow-tooltip="true" |
|
|
|
|
|
prop="params" |
|
|
|
|
|
/> |
|
|
<el-table-column prop="time" label="请求耗时" align="center"> |
|
|
<el-table-column prop="time" label="请求耗时" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-tag v-if="scope.row.time <= 300"> |
|
|
<el-tag v-if="scope.row.time <= 300"> |
|
@ -42,8 +83,66 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column align="center" label="创建日期" prop="createTime" /> |
|
|
<el-table-column align="center" label="创建日期" prop="createTime" /> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="参数" |
|
|
|
|
|
:show-overflow-tooltip="true" |
|
|
|
|
|
prop="params" |
|
|
|
|
|
> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="text" |
|
|
|
|
|
@click="checkDetail(scope.row)" |
|
|
|
|
|
> |
|
|
|
|
|
查看详情 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<pagination v-show="totalCount>0" :total="totalCount" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageRow" @pagination="getList" /> |
|
|
<pagination |
|
|
|
|
|
v-show="totalCount > 0" |
|
|
|
|
|
:total="totalCount" |
|
|
|
|
|
:page-num.sync="listQuery.pageNum" |
|
|
|
|
|
:page-row.sync="listQuery.pageRow" |
|
|
|
|
|
@pagination="getList" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="详情" :visible.sync="dialogFormVisible"> |
|
|
|
|
|
<el-form :model="form"> |
|
|
|
|
|
<el-form-item label="接口名称" :label-width="formLabelWidth"> |
|
|
|
|
|
<span>{{ row.api }}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="接口地址" :label-width="formLabelWidth"> |
|
|
|
|
|
<span>{{ row.uri }}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="接口方法类型" :label-width="formLabelWidth"> |
|
|
|
|
|
<span>{{ row.requestMethod }}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="接口参数" :label-width="formLabelWidth"> |
|
|
|
|
|
<span>{{ row.requestParams }}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="方法名称" :label-width="formLabelWidth"> |
|
|
|
|
|
<span>{{ row.method }}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="接口所属模块" :label-width="formLabelWidth"> |
|
|
|
|
|
<span>{{ row.module }}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="接口IP地址" :label-width="formLabelWidth"> |
|
|
|
|
|
<span>{{ row.requestIp }}</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="dialogFormVisible = false"> |
|
|
|
|
|
取 消 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
@click="dialogFormVisible = false" |
|
|
|
|
|
> |
|
|
|
|
|
确 定 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -56,11 +155,24 @@ export default { |
|
|
return { |
|
|
return { |
|
|
totalCount: 0, |
|
|
totalCount: 0, |
|
|
list: [], |
|
|
list: [], |
|
|
|
|
|
row: {}, |
|
|
|
|
|
dialogFormVisible: false, |
|
|
|
|
|
formLabelWidth: '150px', |
|
|
listQuery: { |
|
|
listQuery: { |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
pageSize: 20, |
|
|
pageSize: 20, |
|
|
orderBy: 'id desc', |
|
|
orderBy: 'id desc', |
|
|
logType: true |
|
|
logType: true, |
|
|
|
|
|
address: '', |
|
|
|
|
|
api: '', |
|
|
|
|
|
apiOperation: '', |
|
|
|
|
|
businessType: '', |
|
|
|
|
|
contentType: '', |
|
|
|
|
|
requestMethod: '', |
|
|
|
|
|
requestParams: '', |
|
|
|
|
|
time: '', |
|
|
|
|
|
updateBy: '', |
|
|
|
|
|
uri: '' |
|
|
}, |
|
|
}, |
|
|
value1: [] |
|
|
value1: [] |
|
|
} |
|
|
} |
|
@ -74,11 +186,15 @@ export default { |
|
|
url: '/log/list', |
|
|
url: '/log/list', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: this.listQuery |
|
|
params: this.listQuery |
|
|
}).then(data => { |
|
|
}).then((data) => { |
|
|
this.list = data.list |
|
|
this.list = data.list |
|
|
this.totalCount = data.total |
|
|
this.totalCount = data.total |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
checkDetail(row) { |
|
|
|
|
|
this.dialogFormVisible = true |
|
|
|
|
|
this.row = row |
|
|
|
|
|
}, |
|
|
handleFilter() { |
|
|
handleFilter() { |
|
|
this.listQuery.pageNum = 1 |
|
|
this.listQuery.pageNum = 1 |
|
|
this.listQuery.createTimeStart = this.value1[0] |
|
|
this.listQuery.createTimeStart = this.value1[0] |
|
|