Browse Source

报警日志

master
x_ying 3 years ago
parent
commit
84dbd1cc67
  1. 1
      src/views/system/logManage/operateLog/index.vue
  2. 38
      src/views/system/logManage/warnLog/index.vue

1
src/views/system/logManage/operateLog/index.vue

@ -198,5 +198,6 @@ export default {
.head-container{ .head-container{
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
padding-bottom: 0;
} }
</style> </style>

38
src/views/system/logManage/warnLog/index.vue

@ -1,15 +1,13 @@
<template> <template>
<div> <div>
<div class="head-container"> <div class="head-container">
<!-- <crudOperation /> -->
<!-- <el-button v-permission="permission.download" :loading="crud.downloadLoading" :disabled="!selections.length" size="mini" icon="el-icon-download" @click="handleDownload">导出</el-button> -->
<el-button :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="handleDownload">导出</el-button> <el-button :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="handleDownload">导出</el-button>
<el-button size="mini" icon="el-icon-download" :disabled="!(selections.length===1)" @click="handleHand">手动处理</el-button> <el-button size="mini" icon="el-icon-download" :disabled="!(selections.length===1)" @click="handleHand">手动处理</el-button>
<el-select v-model="oprType" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px" @change="crud.toQuery"> <el-select v-model="oprType" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px" @change="crud.toQuery">
<el-option v-for="item in oprTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in oprTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-input <el-input
v-model="keyWord"
v-model="query.blurry"
size="small" size="small"
clearable clearable
placeholder="请输入关键词" placeholder="请输入关键词"
@ -17,7 +15,6 @@
class="input-prepend filter-item" class="input-prepend filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
> >
<!-- <el-select slot="prepend" v-model="optionVal" style="width: 100px" @keyup.enter.native="crud.toQuery"> -->
<el-select slot="prepend" v-model="optionVal" style="width: 80px"> <el-select slot="prepend" v-model="optionVal" style="width: 80px">
<el-option <el-option
v-for="item in options" v-for="item in options"
@ -27,7 +24,7 @@
/> />
</el-select> </el-select>
</el-input> </el-input>
<date-range-picker v-model="queryTime" class="date-item" />
<date-range-picker v-model="query.createTime" class="date-item" />
<rrOperation /> <rrOperation />
</div> </div>
<el-table <el-table
@ -83,19 +80,21 @@
<script> <script>
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import CRUD, { presenter, crud, header } from '@crud/crud'
import DateRangePicker from '@/components/DateRangePicker' import DateRangePicker from '@/components/DateRangePicker'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import { warnRemark } from '@/api/system/logs' import { warnRemark } from '@/api/system/logs'
import { exportFile } from '@/utils/index'
// import qs from 'qs'
import { mapGetters } from 'vuex'
export default { export default {
name: 'LoginLog', name: 'LoginLog',
components: { rrOperation, DateRangePicker, pagination }, components: { rrOperation, DateRangePicker, pagination },
mixins: [presenter(), crud()],
mixins: [presenter(), crud(), header()],
cruds() { cruds() {
return CRUD({ return CRUD({
url: 'api/alarmlog/', url: 'api/alarmlog/',
sort: ['createTime,desc'],
// crudMethod: caseCrudMethod,
sort: ['state'],
optShow: { optShow: {
add: false, add: false,
edit: false, edit: false,
@ -132,28 +131,27 @@ export default {
} }
} }
}, },
computed: {
...mapGetters([
'baseApi'
])
},
methods: { methods: {
// //
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
this.crud.downloadLoading = true this.crud.downloadLoading = true
this.crud.query.state = null this.crud.query.state = null
this.crud.query.blurry = this.keyWord
// this.crud.query.blurry = this.keyWord
if (this.oprType > -1) { if (this.oprType > -1) {
this.crud.query.state = this.oprType this.crud.query.state = this.oprType
} }
console.log(this.crud.query, '--')
this.crud.downloadLoading = false this.crud.downloadLoading = false
}, },
getData() {
const arr = this.crud.data
console.log(arr, 'arr')
},
// //
handleDownload() { handleDownload() {
},
test() {
console.log(this.crud, 'crud')
this.crud.downloadLoading = true
exportFile(this.baseApi + '/api/alarmlog/download')
this.crud.downloadLoading = false
}, },
clickRowHandler(row) { clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) // this.$refs.table.toggleRowSelection(row) //
@ -181,7 +179,7 @@ export default {
this.$refs.formDom.validate((valid) => { this.$refs.formDom.validate((valid) => {
if (valid) { if (valid) {
warnRemark(params).then(res => { warnRemark(params).then(res => {
console.log(res, '手动处理')
// console.log(res, '')
if (res === 'SUCCESS') { if (res === 'SUCCESS') {
this.crud.refresh() this.crud.refresh()
this.$message({ this.$message({

Loading…
Cancel
Save