修改日志无时间查询异常
This commit is contained in:
parent
7ac86e5244
commit
f36e564e38
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
|
||||
|
||||
<el-input v-model="listQuery.ip" placeholder="请输入IP地址"
|
||||
style="width: 200px" class="filter-item ml-20" :maxlength="30"
|
||||
@keyup.enter.native="handleFilter"
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<el-select v-model="listQuery.errType" placeholder="请选择异常类型" style="width: 200px" class="filter-item ml-20">
|
||||
<el-option v-for="item in Object.keys(typeList)" :key="item" :value="typeList[item]" :label="typeList[item]" />
|
||||
</el-select>
|
||||
|
||||
|
||||
<el-select v-model="listQuery.logSort" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
||||
<el-option v-for="item in timeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
|
|
@ -78,9 +78,9 @@
|
|||
<el-table-column label="异常等级" align="center" prop="grade"/>
|
||||
<el-table-column label="事件结果" align="center" prop="fruit"/>
|
||||
<el-table-column label="操作类型" align="center" prop="operType" />
|
||||
<!--
|
||||
<!--
|
||||
<el-table-column label="操作详情" align="center" prop="operateDetail" />
|
||||
|
||||
|
||||
<el-table-column label="操作结果" align="center" prop="errLevel">
|
||||
<template slot-scope="{ row }">
|
||||
{{ getStatus(row.errLevel) }}
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
<el-table-column label="操作路径" align="center" prop="operUri" />
|
||||
<!-- <el-table-column label="执行时间(ms)" align="center" prop="times" /> -->
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
|
|
@ -176,7 +176,7 @@ export default {
|
|||
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
if(this.rangeDate.length>0){
|
||||
if(this.rangeDate && this.rangeDate.length>0){
|
||||
this.listQuery.operTime = this.rangeDate[0]+' - '+this.rangeDate[1];
|
||||
}
|
||||
getErrLogs(this.listQuery).then((response) => {
|
||||
|
|
@ -214,7 +214,7 @@ export default {
|
|||
},
|
||||
//导出
|
||||
handleExport(){
|
||||
|
||||
|
||||
// exportCarDetail().then(res => {
|
||||
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||
// })
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<el-select v-model="listQuery.operateType" placeholder="请选择操作类型" style="width: 200px" class="filter-item ml-20">
|
||||
<el-option v-for="item in Object.keys(operateList)" :key="item" :value="operateList[item]" :label="operateList[item]" />
|
||||
</el-select>
|
||||
|
||||
|
||||
<el-select v-model="listQuery.logSort" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
||||
<el-option v-for="item in timeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
备份
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
<el-table
|
||||
:key="tableKey"
|
||||
v-loading="listLoading"
|
||||
|
|
@ -63,13 +63,13 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" align="center" prop="operaUserName" />
|
||||
|
||||
|
||||
<el-table-column label="操作时间" align="center" prop="operTime" />
|
||||
<el-table-column label="IP地址" align="center" prop="ip" />
|
||||
<el-table-column label="操作模块" align="center" prop="model" />
|
||||
<el-table-column label="操作类型" align="center" prop="operType" />
|
||||
<el-table-column label="操作详情" align="center" prop="operateDetail" />
|
||||
|
||||
|
||||
<el-table-column label="操作结果" align="center" prop="fruit">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.fruit }}
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<el-table-column label="操作路径" align="center" prop="operUri" />
|
||||
<el-table-column label="执行时间(ms)" align="center" prop="times" />
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
|
|
@ -90,16 +90,16 @@
|
|||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
|
||||
|
||||
import _ from 'lodash/fp'
|
||||
import { downloadFile } from '@/utils/download'
|
||||
|
||||
|
||||
import { getYwLogs,downloadYwLogs } from '@/api/log/log'
|
||||
|
||||
|
||||
|
||||
const outcomeList = {
|
||||
1:'成功',
|
||||
2:'失败'
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
8:'登录',
|
||||
9:'登出'
|
||||
};
|
||||
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
if(this.rangeDate.length>0){
|
||||
if(this.rangeDate && this.rangeDate.length>0){
|
||||
this.listQuery.operTime = this.rangeDate[0]+' - '+this.rangeDate[1];
|
||||
}
|
||||
getYwLogs(this.listQuery).then((response) => {
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
pageSize: 10,
|
||||
operaUserName: '',
|
||||
ip: '',
|
||||
|
||||
|
||||
content:'',
|
||||
result: '',
|
||||
operateType: '',
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
},
|
||||
//导出
|
||||
handleExport(){
|
||||
|
||||
|
||||
// exportCarDetail().then(res => {
|
||||
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||
// })
|
||||
|
|
@ -225,8 +225,7 @@
|
|||
}
|
||||
return year + "-" + month + "-" + day;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -29,13 +29,13 @@
|
|||
<h3 style="text-align: center;">日志类型</h3>
|
||||
<div id="eChartBox" style="width: 60%;height:90%;margin: 0 auto;"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import { getAnalyseData } from '@/api/log/log'
|
||||
import { getAnalyseData } from '@/api/log/log'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -79,12 +79,12 @@
|
|||
this.listQuery.operTime = this.getCurrentDate()+' - '+this.getCurrentDate();
|
||||
this.rangeDate = [this.getCurrentDate(),this.getCurrentDate()]
|
||||
this.getData()
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
|
||||
if(this.rangeDate.length>0){
|
||||
if(this.rangeDate && this.rangeDate.length>0){
|
||||
this.listQuery.operTime = this.rangeDate[0]+' - '+this.rangeDate[1];
|
||||
}
|
||||
getAnalyseData(this.listQuery).then((response) => {
|
||||
|
|
@ -178,4 +178,3 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
<el-select v-model="listQuery.operateType" placeholder="请选择操作类型" style="width: 200px" class="filter-item ml-20">
|
||||
<el-option v-for="item in Object.keys(operateList)" :key="item" :value="operateList[item]" :label="operateList[item]" />
|
||||
</el-select>
|
||||
|
||||
|
||||
<el-select v-model="listQuery.logSort" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
||||
<el-option v-for="item in timeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
|
|
@ -63,13 +63,13 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" align="center" prop="operaUserName" />
|
||||
|
||||
|
||||
<el-table-column label="操作时间" align="center" prop="operTime" />
|
||||
<el-table-column label="IP地址" align="center" prop="ip" />
|
||||
<el-table-column label="操作模块" align="center" prop="model" />
|
||||
<el-table-column label="操作类型" align="center" prop="operType" />
|
||||
<el-table-column label="操作详情" align="center" prop="operateDetail" />
|
||||
|
||||
|
||||
<el-table-column label="操作结果" align="center" prop="fruit">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.fruit }}
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<el-table-column label="操作路径" align="center" prop="operUri" />
|
||||
<el-table-column label="执行时间(ms)" align="center" prop="times" />
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
|
|
@ -166,7 +166,7 @@ export default {
|
|||
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
if(this.rangeDate.length>0){
|
||||
if(this.rangeDate && this.rangeDate.length>0){
|
||||
this.listQuery.operTime = this.rangeDate[0]+' - '+this.rangeDate[1];
|
||||
}
|
||||
getSysLogs(this.listQuery).then((response) => {
|
||||
|
|
@ -189,7 +189,7 @@ export default {
|
|||
pageSize: 10,
|
||||
operaUserName: '',
|
||||
ip: '',
|
||||
|
||||
|
||||
content:'',
|
||||
result: '',
|
||||
operateType: '',
|
||||
|
|
@ -204,11 +204,11 @@ export default {
|
|||
downloadSysLogs().then(res => {
|
||||
downloadFile({ fileName: '系统日志.sql', fileData: res, fileType: 'text/html;charset=UTF-8' })
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
//导出
|
||||
handleExport(){
|
||||
|
||||
|
||||
// exportCarDetail().then(res => {
|
||||
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||
// })
|
||||
|
|
|
|||
Loading…
Reference in New Issue