解决启动时警告信息
This commit is contained in:
parent
cc5da89386
commit
9236d34a6a
|
|
@ -57,6 +57,7 @@
|
||||||
"vue": "2.6.12",
|
"vue": "2.6.12",
|
||||||
"vue-count-to": "1.0.13",
|
"vue-count-to": "1.0.13",
|
||||||
"vue-cropper": "0.5.5",
|
"vue-cropper": "0.5.5",
|
||||||
|
"vue-loader-plugin": "^1.3.0",
|
||||||
"vue-meta": "2.4.0",
|
"vue-meta": "2.4.0",
|
||||||
"vue-router": "3.4.9",
|
"vue-router": "3.4.9",
|
||||||
"vuedraggable": "2.24.3",
|
"vuedraggable": "2.24.3",
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<el-input
|
||||||
<el-input v-model="listQuery.ip" placeholder="请输入IP地址"
|
v-model="listQuery.ip"
|
||||||
style="width: 200px" class="filter-item ml-20" :maxlength="30"
|
placeholder="请输入IP地址"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
:maxlength="30"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -16,27 +19,80 @@
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
/>
|
/>
|
||||||
<el-select v-model="listQuery.grade" placeholder="请选择异常等级" style="width: 200px" class="filter-item ml-20">
|
<el-select
|
||||||
<el-option v-for="item in Object.keys(levelList)" :key="item" :value="levelList[item]" :label="levelList[item]" />
|
v-model="listQuery.grade"
|
||||||
|
placeholder="请选择异常等级"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in Object.keys(levelList)"
|
||||||
|
:key="item"
|
||||||
|
:value="levelList[item]"
|
||||||
|
:label="levelList[item]"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-input v-model="listQuery.errType" placeholder="请输入异常类型"
|
<!-- <el-input v-model="listQuery.errType" placeholder="请输入异常类型"
|
||||||
style="width: 200px" class="filter-item" :maxlength="30"
|
style="width: 200px" class="filter-item" :maxlength="30"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/> -->
|
/> -->
|
||||||
<el-select v-model="listQuery.errType" placeholder="请选择异常类型" style="width: 200px" class="filter-item ml-20">
|
<el-select
|
||||||
<el-option v-for="item in Object.keys(typeList)" :key="item" :value="typeList[item]" :label="typeList[item]" />
|
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>
|
||||||
|
|
||||||
<el-select v-model="listQuery.logSort" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
<el-select
|
||||||
<el-option v-for="item in timeList" :key="item.id" :label="item.name" :value="item.id" />
|
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>
|
</el-select>
|
||||||
<el-select v-model="listQuery.logDesc" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
<el-select
|
||||||
<el-option v-for="item in sortList" :key="item.id" :label="item.name" :value="item.id" />
|
v-model="listQuery.logDesc"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in sortList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button style="margin-left: 20px" class="filter-item" type="primary" @click="handleFilter">
|
<el-button
|
||||||
|
style="margin-left: 20px"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
@click="handleFilter"
|
||||||
|
>
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-left: 20px" class="filter-item" @click="resetFilter">
|
<el-button
|
||||||
|
style="margin-left: 20px"
|
||||||
|
class="filter-item"
|
||||||
|
@click="resetFilter"
|
||||||
|
>
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button @click="handleBackups" class="filter-item" style="margin-left: 20px" type="warning">
|
<!-- <el-button @click="handleBackups" class="filter-item" style="margin-left: 20px" type="warning">
|
||||||
|
|
@ -54,27 +110,43 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:max-height="tableHeight"
|
:max-height="tableHeight"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column
|
||||||
<template scope="scope">
|
label="序号"
|
||||||
<span>{{ (listQuery.pageNum - 1) * listQuery.pageSize + scope.$index + 1 }}</span>
|
align="center"
|
||||||
|
width="80"
|
||||||
|
type="index"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{
|
||||||
|
(listQuery.pageNum - 1) * listQuery.pageSize +
|
||||||
|
scope.$index +
|
||||||
|
1
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" align="center" prop="operaUserName">
|
<el-table-column label="操作人" align="center" prop="operaUserName">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.operaUserName || '/' }}</span>
|
<span>{{ scope.row.operaUserName || '/' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作时间" align="center" prop="operTime" width="180"/>
|
<el-table-column
|
||||||
|
label="操作时间"
|
||||||
|
align="center"
|
||||||
|
prop="operTime"
|
||||||
|
width="180"
|
||||||
|
/>
|
||||||
<el-table-column label="IP地址" align="center" prop="ip" />
|
<el-table-column label="IP地址" align="center" prop="ip" />
|
||||||
<el-table-column label="操作模块" align="center" prop="model">
|
<el-table-column label="操作模块" align="center" prop="model">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.model || '/' }}</span>
|
<span>{{ scope.row.model || '/' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="异常类型" align="center" prop="errType" />
|
<el-table-column label="异常类型" align="center" prop="errType" />
|
||||||
<el-table-column label="异常原因" align="center" prop="operateDetail"/>
|
<el-table-column
|
||||||
|
label="异常原因"
|
||||||
|
align="center"
|
||||||
|
prop="operateDetail"
|
||||||
|
/>
|
||||||
<el-table-column label="异常等级" align="center" prop="grade" />
|
<el-table-column label="异常等级" align="center" prop="grade" />
|
||||||
<!-- <el-table-column label="事件结果" align="center" prop="failureReason"/> -->
|
<!-- <el-table-column label="事件结果" align="center" prop="failureReason"/> -->
|
||||||
<el-table-column label="操作类型" align="center" prop="operType" />
|
<el-table-column label="操作类型" align="center" prop="operType" />
|
||||||
|
|
@ -110,12 +182,11 @@ import { downloadFile } from '@/utils/download'
|
||||||
|
|
||||||
import { getErrLogs, downloadErrLogs } from '@/api/system/log'
|
import { getErrLogs, downloadErrLogs } from '@/api/system/log'
|
||||||
|
|
||||||
|
|
||||||
const levelList = {
|
const levelList = {
|
||||||
1: '高',
|
1: '高',
|
||||||
2: '中',
|
2: '中',
|
||||||
3:'低'
|
3: '低',
|
||||||
};
|
}
|
||||||
const typeList = {
|
const typeList = {
|
||||||
1: '越权访问',
|
1: '越权访问',
|
||||||
2: 'IP异常',
|
2: 'IP异常',
|
||||||
|
|
@ -126,7 +197,7 @@ const typeList = {
|
||||||
// 7:'备份',
|
// 7:'备份',
|
||||||
// 8:'登录',
|
// 8:'登录',
|
||||||
// 9:'登出'
|
// 9:'登出'
|
||||||
};
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
|
|
@ -139,8 +210,16 @@ export default {
|
||||||
listLoading: false,
|
listLoading: false,
|
||||||
tableHeight: 650,
|
tableHeight: 650,
|
||||||
typeList: typeList,
|
typeList: typeList,
|
||||||
timeList:[{id:1,name:'时间'},{id:2,name:'操作人'},{id:4,name:'ip'},{id:5,name:'异常等级'}],
|
timeList: [
|
||||||
sortList:[{id:1,name:'倒序'},{id:2,name:'升序'}],
|
{ id: 1, name: '时间' },
|
||||||
|
{ id: 2, name: '操作人' },
|
||||||
|
{ id: 4, name: 'ip' },
|
||||||
|
{ id: 5, name: '异常等级' },
|
||||||
|
],
|
||||||
|
sortList: [
|
||||||
|
{ id: 1, name: '倒序' },
|
||||||
|
{ id: 2, name: '升序' },
|
||||||
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -159,7 +238,8 @@ export default {
|
||||||
// this.getOperate()
|
// this.getOperate()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.listQuery.operTime = this.getCurrentDate()+' - '+this.getCurrentDate();
|
this.listQuery.operTime =
|
||||||
|
this.getCurrentDate() + ' - ' + this.getCurrentDate()
|
||||||
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
@ -177,10 +257,11 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
if (this.rangeDate && this.rangeDate.length > 0) {
|
if (this.rangeDate && this.rangeDate.length > 0) {
|
||||||
this.listQuery.operTime = this.rangeDate[0]+' - '+this.rangeDate[1];
|
this.listQuery.operTime =
|
||||||
|
this.rangeDate[0] + ' - ' + this.rangeDate[1]
|
||||||
}
|
}
|
||||||
getErrLogs(this.listQuery).then((response) => {
|
getErrLogs(this.listQuery).then((response) => {
|
||||||
this.list = response.rows.map(item => {
|
this.list = response.rows.map((item) => {
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.total = response.total
|
this.total = response.total
|
||||||
|
|
@ -204,37 +285,39 @@ export default {
|
||||||
grade: '',
|
grade: '',
|
||||||
// logSort:1,
|
// logSort:1,
|
||||||
logDesc: 1,
|
logDesc: 1,
|
||||||
};
|
}
|
||||||
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
||||||
this.handleFilter()
|
this.handleFilter()
|
||||||
},
|
},
|
||||||
// 备份
|
// 备份
|
||||||
handleBackups() {
|
handleBackups() {
|
||||||
downloadErrLogs().then(res => {
|
downloadErrLogs().then((res) => {
|
||||||
downloadFile({ fileName: '异常日志.sql', fileData: res, fileType: 'text/html;charset=UTF-8'})
|
downloadFile({
|
||||||
|
fileName: '异常日志.sql',
|
||||||
|
fileData: res,
|
||||||
|
fileType: 'text/html;charset=UTF-8',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//导出
|
//导出
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|
||||||
// exportCarDetail().then(res => {
|
// exportCarDetail().then(res => {
|
||||||
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
getCurrentDate() {
|
getCurrentDate() {
|
||||||
let now = new Date();
|
let now = new Date()
|
||||||
let year = now.getFullYear();
|
let year = now.getFullYear()
|
||||||
let month = now.getMonth() + 1;
|
let month = now.getMonth() + 1
|
||||||
if (month < 10) {
|
if (month < 10) {
|
||||||
month = '0' + month
|
month = '0' + month
|
||||||
}
|
}
|
||||||
let day = now.getDate();
|
let day = now.getDate()
|
||||||
if (day < 10) {
|
if (day < 10) {
|
||||||
day = '0' + day
|
day = '0' + day
|
||||||
}
|
}
|
||||||
return year + "-" + month + "-" + day;
|
return year + '-' + month + '-' + day
|
||||||
}
|
},
|
||||||
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
<el-input v-model="listQuery.operaUserName" placeholder="请输入操作人"
|
<el-input
|
||||||
style="width: 200px" class="filter-item" :maxlength="30"
|
v-model="listQuery.operaUserName"
|
||||||
|
placeholder="请输入操作人"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item"
|
||||||
|
:maxlength="30"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
<el-input v-model="listQuery.ip" placeholder="请输入IP地址"
|
<el-input
|
||||||
style="width: 200px" class="filter-item ml-20" :maxlength="30"
|
v-model="listQuery.ip"
|
||||||
|
placeholder="请输入IP地址"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
:maxlength="30"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -23,23 +31,76 @@
|
||||||
style="width: 200px" class="filter-item ml-20" :maxlength="30"
|
style="width: 200px" class="filter-item ml-20" :maxlength="30"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/> -->
|
/> -->
|
||||||
<el-select v-model="listQuery.result" placeholder="请选择事件结果" style="width: 200px" class="filter-item ml-20">
|
<el-select
|
||||||
<el-option v-for="item in Object.keys(outcomeList)" :key="item" :value="outcomeList[item]" :label="outcomeList[item]" />
|
v-model="listQuery.result"
|
||||||
|
placeholder="请选择事件结果"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in Object.keys(outcomeList)"
|
||||||
|
:key="item"
|
||||||
|
:value="outcomeList[item]"
|
||||||
|
:label="outcomeList[item]"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select v-model="listQuery.operType" placeholder="请选择操作类型" style="width: 200px" class="filter-item ml-20">
|
<el-select
|
||||||
<el-option v-for="item in Object.keys(operateList)" :key="item" :value="operateList[item]" :label="operateList[item]" />
|
v-model="listQuery.operType"
|
||||||
|
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>
|
||||||
|
|
||||||
<el-select v-model="listQuery.logSort" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
<el-select
|
||||||
<el-option v-for="item in timeList" :key="item.id" :label="item.name" :value="item.id" />
|
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>
|
</el-select>
|
||||||
<el-select v-model="listQuery.logDesc" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
<el-select
|
||||||
<el-option v-for="item in sortList" :key="item.id" :label="item.name" :value="item.id" />
|
v-model="listQuery.logDesc"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in sortList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button style="margin-left: 20px" class="filter-item" type="primary" @click="handleFilter">
|
<el-button
|
||||||
|
style="margin-left: 20px"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
@click="handleFilter"
|
||||||
|
>
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-left: 20px" class="filter-item" @click="resetFilter">
|
<el-button
|
||||||
|
style="margin-left: 20px"
|
||||||
|
class="filter-item"
|
||||||
|
@click="resetFilter"
|
||||||
|
>
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button @click="handleBackups" class="filter-item" style="margin-left: 20px" type="warning">
|
<!-- <el-button @click="handleBackups" class="filter-item" style="margin-left: 20px" type="warning">
|
||||||
|
|
@ -57,17 +118,34 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:max-height="tableHeight"
|
:max-height="tableHeight"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column
|
||||||
<template scope="scope">
|
label="序号"
|
||||||
<span>{{ (listQuery.pageNum - 1) * listQuery.pageSize + scope.$index + 1 }}</span>
|
align="center"
|
||||||
|
width="80"
|
||||||
|
type="index"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{
|
||||||
|
(listQuery.pageNum - 1) * listQuery.pageSize +
|
||||||
|
scope.$index +
|
||||||
|
1
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" align="center" prop="operaUserName" />
|
<el-table-column
|
||||||
|
label="操作人"
|
||||||
|
align="center"
|
||||||
|
prop="operaUserName"
|
||||||
|
/>
|
||||||
<el-table-column label="操作时间" align="center" prop="operTime" />
|
<el-table-column label="操作时间" align="center" prop="operTime" />
|
||||||
<el-table-column label="IP地址" align="center" prop="ip" />
|
<el-table-column label="IP地址" align="center" prop="ip" />
|
||||||
<el-table-column label="操作模块" align="center" prop="model" />
|
<el-table-column label="操作模块" align="center" prop="model" />
|
||||||
<el-table-column label="操作类型" align="center" prop="operType" />
|
<el-table-column label="操作类型" align="center" prop="operType" />
|
||||||
<el-table-column label="操作详情" align="center" prop="operateDetail" />
|
<el-table-column
|
||||||
|
label="操作详情"
|
||||||
|
align="center"
|
||||||
|
prop="operateDetail"
|
||||||
|
/>
|
||||||
<el-table-column label="操作结果" align="center" prop="result">
|
<el-table-column label="操作结果" align="center" prop="result">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
{{ row.result }}
|
{{ row.result }}
|
||||||
|
|
@ -97,11 +175,10 @@
|
||||||
|
|
||||||
import { getYwLogs, downloadYwLogs } from '@/api/system/log'
|
import { getYwLogs, downloadYwLogs } from '@/api/system/log'
|
||||||
|
|
||||||
|
|
||||||
const outcomeList = {
|
const outcomeList = {
|
||||||
1: '成功',
|
1: '成功',
|
||||||
2:'失败'
|
2: '失败',
|
||||||
};
|
}
|
||||||
const operateList = {
|
const operateList = {
|
||||||
1: '新增',
|
1: '新增',
|
||||||
2: '修改',
|
2: '修改',
|
||||||
|
|
@ -111,8 +188,8 @@
|
||||||
6: '下载',
|
6: '下载',
|
||||||
7: '备份',
|
7: '备份',
|
||||||
8: '登录',
|
8: '登录',
|
||||||
9:'登出'
|
9: '登出',
|
||||||
};
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
|
|
@ -125,8 +202,16 @@
|
||||||
listLoading: false,
|
listLoading: false,
|
||||||
tableHeight: 650,
|
tableHeight: 650,
|
||||||
operateList: operateList,
|
operateList: operateList,
|
||||||
timeList:[{id:1,name:'时间'},{id:2,name:'操作人'},{id:3,name:'操作模块'},{id:4,name:'ip'},],
|
timeList: [
|
||||||
sortList:[{id:1,name:'倒序'},{id:2,name:'升序'}],
|
{ id: 1, name: '时间' },
|
||||||
|
{ id: 2, name: '操作人' },
|
||||||
|
{ id: 3, name: '操作模块' },
|
||||||
|
{ id: 4, name: 'ip' },
|
||||||
|
],
|
||||||
|
sortList: [
|
||||||
|
{ id: 1, name: '倒序' },
|
||||||
|
{ id: 2, name: '升序' },
|
||||||
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -147,7 +232,8 @@
|
||||||
// this.getOperate()
|
// this.getOperate()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.listQuery.operTime = this.getCurrentDate()+' - '+this.getCurrentDate();
|
this.listQuery.operTime =
|
||||||
|
this.getCurrentDate() + ' - ' + this.getCurrentDate()
|
||||||
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
@ -165,10 +251,11 @@
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
if (this.rangeDate && this.rangeDate.length > 0) {
|
if (this.rangeDate && this.rangeDate.length > 0) {
|
||||||
this.listQuery.operTime = this.rangeDate[0]+' - '+this.rangeDate[1];
|
this.listQuery.operTime =
|
||||||
|
this.rangeDate[0] + ' - ' + this.rangeDate[1]
|
||||||
}
|
}
|
||||||
getYwLogs(this.listQuery).then((response) => {
|
getYwLogs(this.listQuery).then((response) => {
|
||||||
this.list = response.rows.map(item => {
|
this.list = response.rows.map((item) => {
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.total = response.total
|
this.total = response.total
|
||||||
|
|
@ -195,37 +282,39 @@
|
||||||
operType: '',
|
operType: '',
|
||||||
logSort: 1,
|
logSort: 1,
|
||||||
logDesc: 1,
|
logDesc: 1,
|
||||||
};
|
}
|
||||||
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
||||||
this.handleFilter()
|
this.handleFilter()
|
||||||
},
|
},
|
||||||
// 备份
|
// 备份
|
||||||
handleBackups() {
|
handleBackups() {
|
||||||
downloadYwLogs().then(res => {
|
downloadYwLogs().then((res) => {
|
||||||
downloadFile({ fileName: '业务日志.sql', fileData: res, fileType: 'text/html;charset=UTF-8'})
|
downloadFile({
|
||||||
|
fileName: '业务日志.sql',
|
||||||
|
fileData: res,
|
||||||
|
fileType: 'text/html;charset=UTF-8',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//导出
|
//导出
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|
||||||
// exportCarDetail().then(res => {
|
// exportCarDetail().then(res => {
|
||||||
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
getCurrentDate() {
|
getCurrentDate() {
|
||||||
let now = new Date();
|
let now = new Date()
|
||||||
let year = now.getFullYear();
|
let year = now.getFullYear()
|
||||||
let month = now.getMonth() + 1;
|
let month = now.getMonth() + 1
|
||||||
if (month < 10) {
|
if (month < 10) {
|
||||||
month = '0' + month
|
month = '0' + month
|
||||||
}
|
}
|
||||||
let day = now.getDate();
|
let day = now.getDate()
|
||||||
if (day < 10) {
|
if (day < 10) {
|
||||||
day = '0' + day
|
day = '0' + day
|
||||||
}
|
}
|
||||||
return year + "-" + month + "-" + day;
|
return year + '-' + month + '-' + day
|
||||||
}
|
},
|
||||||
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
<el-input v-model="listQuery.operaUserName" placeholder="请输入操作人"
|
<el-input
|
||||||
style="width: 200px" class="filter-item" :maxlength="30"
|
v-model="listQuery.operaUserName"
|
||||||
|
placeholder="请输入操作人"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item"
|
||||||
|
:maxlength="30"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
<el-input v-model="listQuery.ip" placeholder="请输入IP地址"
|
<el-input
|
||||||
style="width: 200px" class="filter-item ml-20" :maxlength="30"
|
v-model="listQuery.ip"
|
||||||
|
placeholder="请输入IP地址"
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
:maxlength="30"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -26,20 +34,63 @@
|
||||||
<el-select v-model="listQuery.result" placeholder="请选择事件结果" style="width: 200px" class="filter-item ml-20">
|
<el-select v-model="listQuery.result" placeholder="请选择事件结果" style="width: 200px" class="filter-item ml-20">
|
||||||
<el-option v-for="item in Object.keys(outcomeList)" :key="item" :value="outcomeList[item]" :label="outcomeList[item]" />
|
<el-option v-for="item in Object.keys(outcomeList)" :key="item" :value="outcomeList[item]" :label="outcomeList[item]" />
|
||||||
</el-select>-->
|
</el-select>-->
|
||||||
<el-select v-model="listQuery.operType" placeholder="请选择操作类型" style="width: 200px" class="filter-item ml-20">
|
<el-select
|
||||||
<el-option v-for="item in Object.keys(operateList)" :key="item" :value="operateList[item]" :label="operateList[item]" />
|
v-model="listQuery.operType"
|
||||||
|
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>
|
||||||
|
|
||||||
<el-select v-model="listQuery.logSort" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
<el-select
|
||||||
<el-option v-for="item in timeList" :key="item.id" :label="item.name" :value="item.id" />
|
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>
|
</el-select>
|
||||||
<el-select v-model="listQuery.logDesc" clearable filterable style="width: 200px" class="filter-item ml-20" placeholder="请选择" >
|
<el-select
|
||||||
<el-option v-for="item in sortList" :key="item.id" :label="item.name" :value="item.id" />
|
v-model="listQuery.logDesc"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 200px"
|
||||||
|
class="filter-item ml-20"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in sortList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button style="margin-left: 20px" class="filter-item" type="primary" @click="handleFilter">
|
<el-button
|
||||||
|
style="margin-left: 20px"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
@click="handleFilter"
|
||||||
|
>
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-left: 20px" class="filter-item" @click="resetFilter">
|
<el-button
|
||||||
|
style="margin-left: 20px"
|
||||||
|
class="filter-item"
|
||||||
|
@click="resetFilter"
|
||||||
|
>
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button @click="handleBackups" class="filter-item" style="margin-left: 20px" type="warning">
|
<!-- <el-button @click="handleBackups" class="filter-item" style="margin-left: 20px" type="warning">
|
||||||
|
|
@ -57,17 +108,34 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:max-height="tableHeight"
|
:max-height="tableHeight"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column
|
||||||
<template scope="scope">
|
label="序号"
|
||||||
<span>{{ (listQuery.pageNum - 1) * listQuery.pageSize + scope.$index + 1 }}</span>
|
align="center"
|
||||||
|
width="80"
|
||||||
|
type="index"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{
|
||||||
|
(listQuery.pageNum - 1) * listQuery.pageSize +
|
||||||
|
scope.$index +
|
||||||
|
1
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" align="center" prop="operaUserName" />
|
<el-table-column
|
||||||
|
label="操作人"
|
||||||
|
align="center"
|
||||||
|
prop="operaUserName"
|
||||||
|
/>
|
||||||
<el-table-column label="操作时间" align="center" prop="operTime" />
|
<el-table-column label="操作时间" align="center" prop="operTime" />
|
||||||
<el-table-column label="IP地址" align="center" prop="ip" />
|
<el-table-column label="IP地址" align="center" prop="ip" />
|
||||||
<el-table-column label="操作模块" align="center" prop="model" />
|
<el-table-column label="操作模块" align="center" prop="model" />
|
||||||
<el-table-column label="操作类型" align="center" prop="operType" />
|
<el-table-column label="操作类型" align="center" prop="operType" />
|
||||||
<el-table-column label="操作详情" align="center" prop="operateDetail" />
|
<el-table-column
|
||||||
|
label="操作详情"
|
||||||
|
align="center"
|
||||||
|
prop="operateDetail"
|
||||||
|
/>
|
||||||
<el-table-column label="操作结果" align="center" prop="result">
|
<el-table-column label="操作结果" align="center" prop="result">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
{{ row.result }}
|
{{ row.result }}
|
||||||
|
|
@ -97,11 +165,10 @@ import { downloadFile } from '@/utils/download'
|
||||||
|
|
||||||
import { getSysLogs, downloadSysLogs } from '@/api/system/log'
|
import { getSysLogs, downloadSysLogs } from '@/api/system/log'
|
||||||
|
|
||||||
|
|
||||||
const outcomeList = {
|
const outcomeList = {
|
||||||
1: '成功',
|
1: '成功',
|
||||||
2:'失败'
|
2: '失败',
|
||||||
};
|
}
|
||||||
const operateList = {
|
const operateList = {
|
||||||
1: '新增',
|
1: '新增',
|
||||||
2: '修改',
|
2: '修改',
|
||||||
|
|
@ -111,8 +178,8 @@ const operateList = {
|
||||||
6: '下载',
|
6: '下载',
|
||||||
7: '备份',
|
7: '备份',
|
||||||
8: '登录',
|
8: '登录',
|
||||||
9:'登出'
|
9: '登出',
|
||||||
};
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
|
|
@ -125,8 +192,16 @@ export default {
|
||||||
listLoading: false,
|
listLoading: false,
|
||||||
tableHeight: 650,
|
tableHeight: 650,
|
||||||
operateList: operateList,
|
operateList: operateList,
|
||||||
timeList:[{id:1,name:'时间'},{id:2,name:'操作人'},{id:3,name:'操作模块'},{id:4,name:'ip'},],
|
timeList: [
|
||||||
sortList:[{id:1,name:'倒序'},{id:2,name:'升序'}],
|
{ id: 1, name: '时间' },
|
||||||
|
{ id: 2, name: '操作人' },
|
||||||
|
{ id: 3, name: '操作模块' },
|
||||||
|
{ id: 4, name: 'ip' },
|
||||||
|
],
|
||||||
|
sortList: [
|
||||||
|
{ id: 1, name: '倒序' },
|
||||||
|
{ id: 2, name: '升序' },
|
||||||
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -147,7 +222,8 @@ export default {
|
||||||
// this.getOperate()
|
// this.getOperate()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.listQuery.operTime = this.getCurrentDate()+' - '+this.getCurrentDate();
|
this.listQuery.operTime =
|
||||||
|
this.getCurrentDate() + ' - ' + this.getCurrentDate()
|
||||||
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
@ -165,10 +241,11 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
if (this.rangeDate && this.rangeDate.length > 0) {
|
if (this.rangeDate && this.rangeDate.length > 0) {
|
||||||
this.listQuery.operTime = this.rangeDate[0]+' - '+this.rangeDate[1];
|
this.listQuery.operTime =
|
||||||
|
this.rangeDate[0] + ' - ' + this.rangeDate[1]
|
||||||
}
|
}
|
||||||
getSysLogs(this.listQuery).then((response) => {
|
getSysLogs(this.listQuery).then((response) => {
|
||||||
this.list = response.rows.map(item => {
|
this.list = response.rows.map((item) => {
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
this.total = response.total
|
this.total = response.total
|
||||||
|
|
@ -195,38 +272,39 @@ export default {
|
||||||
operateType: '',
|
operateType: '',
|
||||||
logSort: 1,
|
logSort: 1,
|
||||||
logDesc: 1,
|
logDesc: 1,
|
||||||
};
|
}
|
||||||
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
this.rangeDate = [this.getCurrentDate(), this.getCurrentDate()]
|
||||||
this.handleFilter()
|
this.handleFilter()
|
||||||
},
|
},
|
||||||
// 备份
|
// 备份
|
||||||
handleBackups() {
|
handleBackups() {
|
||||||
downloadSysLogs().then(res => {
|
downloadSysLogs().then((res) => {
|
||||||
downloadFile({ fileName: '系统日志.sql', fileData: res, fileType: 'text/html;charset=UTF-8' })
|
downloadFile({
|
||||||
|
fileName: '系统日志.sql',
|
||||||
|
fileData: res,
|
||||||
|
fileType: 'text/html;charset=UTF-8',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
//导出
|
//导出
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|
||||||
// exportCarDetail().then(res => {
|
// exportCarDetail().then(res => {
|
||||||
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
// downloadFile({ fileName: '设备详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
getCurrentDate() {
|
getCurrentDate() {
|
||||||
let now = new Date();
|
let now = new Date()
|
||||||
let year = now.getFullYear();
|
let year = now.getFullYear()
|
||||||
let month = now.getMonth() + 1;
|
let month = now.getMonth() + 1
|
||||||
if (month < 10) {
|
if (month < 10) {
|
||||||
month = '0' + month
|
month = '0' + month
|
||||||
}
|
}
|
||||||
let day = now.getDate();
|
let day = now.getDate()
|
||||||
if (day < 10) {
|
if (day < 10) {
|
||||||
day = '0' + day
|
day = '0' + day
|
||||||
}
|
}
|
||||||
return year + "-" + month + "-" + day;
|
return year + '-' + month + '-' + day
|
||||||
}
|
},
|
||||||
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue