|
|
@ -7,8 +7,60 @@ |
|
|
<span class="contenttitleBold">安全日志</span> |
|
|
<span class="contenttitleBold">安全日志</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div style="background-color: #fff; padding: 15px; border-radius: 8px;display: flex;flex-wrap: wrap; margin-bottom: 10px;height:35px;margin-top: 7px;"> |
|
|
|
|
|
<div class="query"> |
|
|
|
|
|
<span>开始时间:</span> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
type="datetime" |
|
|
|
|
|
placeholder="选择开始时间" |
|
|
|
|
|
size="small" |
|
|
|
|
|
v-model="startDate" |
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
|
editable |
|
|
|
|
|
style="width: 177px;" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="query"> |
|
|
|
|
|
<span>结束时间:</span> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
type="datetime" |
|
|
|
|
|
placeholder="选择结束时间" |
|
|
|
|
|
size="small" |
|
|
|
|
|
v-model="endDate" |
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
|
editable |
|
|
|
|
|
style="width: 177px;" |
|
|
|
|
|
> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="query"> |
|
|
|
|
|
<span>操作用户:</span> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="username" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
size="small" |
|
|
|
|
|
filterable |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in registrardata" |
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
:label="item.surname" |
|
|
|
|
|
:value="item.userName" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="query"> |
|
|
|
|
|
<span>请求地址:</span> |
|
|
|
|
|
<el-input placeholder="请输入" size="small" v-model="url" style="width: 177px;"></el-input> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="query"> |
|
|
|
|
|
<el-button size="small" @click="onSubmit" class="commonbutton">查询</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<div style="display: block; margin-top: 7px;"> |
|
|
<div style="display: block; margin-top: 7px;"> |
|
|
<el-table :data="tableData" :height="window.pageHeight < 600 ? 480 : window.pageHeight - 175" border> |
|
|
|
|
|
|
|
|
<el-table :data="tableData" :height="window.pageHeight < 600 ? 415 : window.pageHeight - 225" border> |
|
|
<el-table-column prop="userName" label="用户名" width="70" align="center"> |
|
|
<el-table-column prop="userName" label="用户名" width="70" align="center"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="httpStatusCode" label="状态" width="50" align="center"> |
|
|
<el-table-column prop="httpStatusCode" label="状态" width="50" align="center"> |
|
|
@ -40,23 +92,15 @@ |
|
|
<!-- 详情弹框 --> |
|
|
<!-- 详情弹框 --> |
|
|
<el-dialog title="日志详情" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false"> |
|
|
<el-dialog title="日志详情" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false"> |
|
|
<el-table :data="detailedinformationdata" style="width: 100%;margin-bottom: 10px;"> |
|
|
<el-table :data="detailedinformationdata" style="width: 100%;margin-bottom: 10px;"> |
|
|
<el-table-column prop="userName" label="用户名" width="80"> |
|
|
|
|
|
|
|
|
<el-table-column prop="serviceName" label="服务名称"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="httpStatusCode" label="状态" width="80"> |
|
|
|
|
|
|
|
|
<el-table-column prop="methodName" label="方法名称"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="url" label="地址" width="180"> |
|
|
|
|
|
|
|
|
<el-table-column prop="parameters" label="请求参数"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="clientIpAddress" label="ip地址" width="120"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="clientId" label="客户端id" width="100"></el-table-column> |
|
|
|
|
|
<el-table-column prop="httpMethod" label="请求方法" width="80"></el-table-column> |
|
|
|
|
|
<el-table-column prop="executionTime" label="时间" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ scope.row.executionTime | dateFormat }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="browserInfo" label="浏览器信息" width=""> |
|
|
|
|
|
|
|
|
<el-table-column prop="executionTime" label="执行时间"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="executionDuration" label="请求耗时"></el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogVisible = false" class="difference">取 消</el-button> |
|
|
<el-button @click="dialogVisible = false" class="difference">取 消</el-button> |
|
|
@ -68,6 +112,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import { dailyrecord, querylog } from "@/request/ruquset"; |
|
|
import { dailyrecord, querylog } from "@/request/ruquset"; |
|
|
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { mapState } from "vuex"; |
|
|
import { mapState } from "vuex"; |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
@ -80,10 +125,15 @@ export default { |
|
|
}, |
|
|
}, |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
|
detailedinformationdata: [], |
|
|
detailedinformationdata: [], |
|
|
|
|
|
registrardata:[], |
|
|
|
|
|
username: "", |
|
|
|
|
|
startDate: "", |
|
|
|
|
|
endDate: "", |
|
|
|
|
|
url: "", |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.cratlist(); |
|
|
|
|
|
|
|
|
// this.cratlist() |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
|
|
|
|
|
|
|
@ -92,37 +142,54 @@ export default { |
|
|
...mapState(["window"]), |
|
|
...mapState(["window"]), |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
|
|
|
|
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
cratlist() { |
|
|
cratlist() { |
|
|
// /api/app/audit-log |
|
|
// /api/app/audit-log |
|
|
dailyrecord(this.pages).then((res) => { |
|
|
|
|
|
|
|
|
dailyrecord({ |
|
|
|
|
|
startTime: this.startDate, |
|
|
|
|
|
endTime: this.endDate, |
|
|
|
|
|
userName: this.username, |
|
|
|
|
|
url: this.url, |
|
|
|
|
|
skipCount: this.pages.skipCount, |
|
|
|
|
|
maxResultCount: this.pages.maxResultCount, |
|
|
|
|
|
}).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.tableData = res.data; |
|
|
this.tableData = res.data; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
getList() { |
|
|
|
|
|
getapi("/api/identity/users/getlist",{ |
|
|
|
|
|
SkipCount: 0, |
|
|
|
|
|
MaxResultCount: 1000, |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.registrardata = [...res.data.items]; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
//分页 |
|
|
//分页 |
|
|
handleSizeChange(v) { |
|
|
handleSizeChange(v) { |
|
|
this.pages.maxResultCount = v; |
|
|
this.pages.maxResultCount = v; |
|
|
this.cratlist(); |
|
|
|
|
|
|
|
|
this.onSubmit(); |
|
|
}, |
|
|
}, |
|
|
handleCurrentChange(v) { |
|
|
handleCurrentChange(v) { |
|
|
this.pages.skipCount = v; |
|
|
|
|
|
|
|
|
this.pages.skipCount = v-1; |
|
|
(this.pages.currentPage - 1) * this.pages.MaxResultCount; |
|
|
(this.pages.currentPage - 1) * this.pages.MaxResultCount; |
|
|
this.cratlist(); |
|
|
|
|
|
|
|
|
this.onSubmit(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//查询信息 |
|
|
//查询信息 |
|
|
inquireabout(row) { |
|
|
inquireabout(row) { |
|
|
this.dialogVisible = true; |
|
|
this.dialogVisible = true; |
|
|
this.detailedinformationdata = []; |
|
|
this.detailedinformationdata = []; |
|
|
querylog(row.id).then((res) => { |
|
|
|
|
|
|
|
|
postapi('/api/app/AuditLog/GetAuditLogActionByAuditLogId',{ |
|
|
|
|
|
auditLogId:row.id |
|
|
|
|
|
}).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
if (row.id == res.data.id) { |
|
|
|
|
|
this.detailedinformationdata.push(res.data); |
|
|
this.detailedinformationdata.push(res.data); |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
@ -130,6 +197,9 @@ export default { |
|
|
// this.detailedinformationdata = []; |
|
|
// this.detailedinformationdata = []; |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
}, |
|
|
}, |
|
|
|
|
|
onSubmit(){ |
|
|
|
|
|
this.cratlist() |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
@ -178,4 +248,14 @@ export default { |
|
|
font-family: "NotoSansSC-Regular"; |
|
|
font-family: "NotoSansSC-Regular"; |
|
|
float: right; |
|
|
float: right; |
|
|
} |
|
|
} |
|
|
|
|
|
.query{ |
|
|
|
|
|
margin-right: 10px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
color: #232748; |
|
|
|
|
|
font-size: 400; |
|
|
|
|
|
font-family: "NotoSansSC-Regular"; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |