Browse Source

系统管理 通知管理 日志管理

master
x_ying 3 years ago
parent
commit
de2314f466
  1. 108
      src/views/system/logManage/doorLog/index.vue
  2. 77
      src/views/system/logManage/index.vue
  3. 107
      src/views/system/logManage/loginLog/index.vue
  4. 115
      src/views/system/logManage/operateLog/index.vue
  5. 118
      src/views/system/logManage/portLog/index.vue
  6. 171
      src/views/system/logManage/warnLog/index.vue
  7. 42
      src/views/system/notifyManage/index.vue

108
src/views/system/logManage/doorLog/index.vue

@ -0,0 +1,108 @@
<template>
<div>
<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-input
v-model="keyWord"
size="small"
clearable
placeholder="请输入关键词"
style="width: 300px;margin-right:10px;padding-left:10px"
class="input-prepend filter-item"
>
<!-- <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-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input>
<date-range-picker v-model="queryTime" class="date-item" />
<rrOperation />
</div>
<el-table
ref="table"
:data="crud.data"
style="width: 100%;"
height="calc(100vh - 356px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="" label="事件" min-width="150" align="center" />
<el-table-column prop="" label="用户" align="center" min-width="150" />
<el-table-column prop="" label="库房" align="center" min-width="150" />
<el-table-column prop="" label="设备" align="center" min-width="180" />
<el-table-column prop="" label="档案信息" align="center" min-width="180" />
<el-table-column prop="" label="档号" align="center" min-width="180" />
<el-table-column prop="" label="报警时间" align="center" min-width="180" />
<el-table-column prop="" label="操作" align="center" min-width="180" />
</el-table>
<pagination />
</div>
</template>
<script>
import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import DateRangePicker from '@/components/DateRangePicker'
import pagination from '@crud/Pagination'
export default {
name: 'DoorLog',
components: { rrOperation, DateRangePicker, pagination },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/storage/initStorageLogList',
sort: ['update_time,desc'],
// crudMethod: caseCrudMethod,
optShow: {
add: false,
edit: false,
del: false,
download: true
}
})
},
data() {
return {
selections: [],
keyWord: '',
optionVal: 1,
options: [
{ value: 1, label: '设备' },
{ value: 2, label: '库房' }
],
queryTime: null
}
},
methods: {
//
handleDownload() {
},
test() {
console.log(this.crud, 'crud')
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) //
},
selectionChangeHandler(val) {
this.selections = val
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
</style>

77
src/views/system/logManage/index.vue

@ -0,0 +1,77 @@
<template>
<div class="app-container lend-container">
<div class="tab-content">
<span class="right-top-line" />
<span class="left-bottom-line" />
<ul class="tab-nav">
<li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">登录日志<i /></li>
<li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">操作日志<i /></li>
<li :class="{ 'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">报警日志<i /></li>
<li :class="{ 'active-tab-nav': activeIndex == 3 }" @click="changeActiveTab(3)">门禁日志<i /></li>
<li :class="{ 'active-tab-nav': activeIndex == 4 }" @click="changeActiveTab(4)">接口访问日志<i /></li>
<!-- 最右侧装饰img -->
<span class="tab-right-img" />
</ul>
<component :is="comName" />
</div>
</div>
</template>
<script>
import loginLog from './loginLog/index.vue'
import operateLog from './operateLog/index.vue'
import warnLog from './warnLog/index.vue'
import doorLog from './doorLog/index.vue'
import portLog from './portLog/index.vue'
export default {
name: 'LogManage',
components: {
loginLog,
operateLog,
warnLog,
doorLog,
portLog
},
data() {
return {
activeIndex: 0
}
},
computed: {
comName: function() {
if (this.activeIndex === 0) {
return 'loginLog'
} else if (this.activeIndex === 1) {
return 'operateLog'
} else if (this.activeIndex === 2) {
return 'warnLog'
} else if (this.activeIndex === 3) {
return 'doorLog'
} else if (this.activeIndex === 4) {
return 'portLog'
}
return 'loginLog'
}
},
methods: {
changeActiveTab(data) {
this.activeIndex = data
}
}
}
</script>
<style lang="scss" scoped>
.lend-container{
.tab-content{
position: relative;
margin-top: 61px;
border: 1px solid #113d72;
}
}
.tab-content .tab-nav{
margin-bottom: 0;
}
</style>

107
src/views/system/logManage/loginLog/index.vue

@ -0,0 +1,107 @@
<template>
<div>
<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-input
v-model="keyWord"
size="small"
clearable
placeholder="请输入关键词"
style="width: 300px;margin-right:10px;padding-left:10px"
class="input-prepend filter-item"
>
<!-- <el-select slot="prepend" v-model="optionVal" style="width: 100px" @keyup.enter.native="crud.toQuery"> -->
<el-select slot="prepend" v-model="optionVal" style="width: 100px">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input>
<date-range-picker v-model="queryTime" class="date-item" />
<rrOperation />
</div>
<el-table
ref="table"
:data="crud.data"
style="width: 100%;"
height="calc(100vh - 356px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="" label="登录账号" min-width="150" align="center" />
<el-table-column prop="" label="用户名" align="center" min-width="150" />
<el-table-column prop="" label="用户角色" align="center" min-width="150" />
<el-table-column prop="" label="所属部门" align="center" min-width="180" />
<el-table-column prop="" label="IP地址" align="center" min-width="180" />
<el-table-column prop="" label="登录时间" align="center" min-width="180" />
</el-table>
<pagination />
</div>
</template>
<script>
import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import DateRangePicker from '@/components/DateRangePicker'
import pagination from '@crud/Pagination'
export default {
name: 'LoginLog',
components: { rrOperation, DateRangePicker, pagination },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/storage/initStorageLogList',
sort: ['update_time,desc'],
// crudMethod: caseCrudMethod,
optShow: {
add: false,
edit: false,
del: false,
download: true
}
})
},
data() {
return {
selections: [],
keyWord: '',
optionVal: 1,
options: [
{ value: 1, label: '用户名' },
{ value: 2, label: '所属部门' },
{ value: 3, label: '登录账号' }
],
queryTime: null
}
},
methods: {
//
handleDownload() {
},
test() {
console.log(this.crud, 'crud')
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) //
},
selectionChangeHandler(val) {
this.selections = val
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
</style>

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

@ -0,0 +1,115 @@
<template>
<div>
<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-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-select>
<el-input
v-model="keyWord"
size="small"
clearable
placeholder="请输入关键词"
style="width: 300px;margin-right:10px;padding-left:10px"
class="input-prepend filter-item"
>
<!-- <el-select slot="prepend" v-model="optionVal" style="width: 100px" @keyup.enter.native="crud.toQuery"> -->
<el-select slot="prepend" v-model="optionVal" style="width: 100px">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input>
<date-range-picker v-model="queryTime" class="date-item" />
<rrOperation />
</div>
<el-table
ref="table"
:data="crud.data"
style="width: 100%;"
height="calc(100vh - 356px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="" label="登录账号" min-width="150" align="center" />
<el-table-column prop="" label="用户名" align="center" min-width="150" />
<el-table-column prop="" label="用户角色" align="center" min-width="150" />
<el-table-column prop="" label="所属部门" align="center" min-width="180" />
<el-table-column prop="" label="IP地址" align="center" min-width="180" />
<el-table-column prop="" label="登录时间" align="center" min-width="180" />
</el-table>
<pagination />
</div>
</template>
<script>
import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import DateRangePicker from '@/components/DateRangePicker'
import pagination from '@crud/Pagination'
export default {
name: 'LoginLog',
components: { rrOperation, DateRangePicker, pagination },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/storage/initStorageLogList',
sort: ['update_time,desc'],
// crudMethod: caseCrudMethod,
optShow: {
add: false,
edit: false,
del: false,
download: true
}
})
},
data() {
return {
selections: [],
keyWord: '',
oprType: 0,
oprTypeOptions: [
{ value: 0, label: '全部' },
{ value: 1, label: '成功' },
{ value: 2, label: '失败' }
],
optionVal: 1,
options: [
{ value: 1, label: '操作人' },
{ value: 2, label: '所属部门' }
],
queryTime: null
}
},
methods: {
//
handleDownload() {
},
test() {
console.log(this.crud, 'crud')
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) //
},
selectionChangeHandler(val) {
this.selections = val
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
</style>

118
src/views/system/logManage/portLog/index.vue

@ -0,0 +1,118 @@
<template>
<div>
<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-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-select>
<el-input
v-model="keyWord"
size="small"
clearable
placeholder="请输入关键词"
style="width: 300px;margin-right:10px;padding-left:10px"
class="input-prepend filter-item"
>
<!-- <el-select slot="prepend" v-model="optionVal" style="width: 100px" @keyup.enter.native="crud.toQuery"> -->
<el-select slot="prepend" v-model="optionVal" style="width: 100px">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input>
<date-range-picker v-model="queryTime" class="date-item" />
<rrOperation />
</div>
<el-table
ref="table"
:data="crud.data"
style="width: 100%;"
height="calc(100vh - 356px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="" label="状态" min-width="150" align="center" />
<el-table-column prop="" label="类型" align="center" min-width="150" />
<el-table-column prop="" label="访问IP" align="center" min-width="150" />
<el-table-column prop="" label="访问端口" align="center" min-width="180" />
<el-table-column prop="" label="接口名称" align="center" min-width="180" />
<el-table-column prop="" label="请求参数" align="center" min-width="180" />
<el-table-column prop="" label="返回值" align="center" min-width="180" />
<el-table-column prop="" label="说明" align="center" min-width="180" />
<el-table-column prop="" label="访问时间" align="center" min-width="180" />
</el-table>
<pagination />
</div>
</template>
<script>
import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import DateRangePicker from '@/components/DateRangePicker'
import pagination from '@crud/Pagination'
export default {
name: 'LoginLog',
components: { rrOperation, DateRangePicker, pagination },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/storage/initStorageLogList',
sort: ['update_time,desc'],
// crudMethod: caseCrudMethod,
optShow: {
add: false,
edit: false,
del: false,
download: true
}
})
},
data() {
return {
selections: [],
keyWord: '',
oprType: 0,
oprTypeOptions: [
{ value: 0, label: '全部' },
{ value: 1, label: '被访问' },
{ value: 2, label: '访问' }
],
optionVal: 1,
options: [
{ value: 1, label: '接口名称' },
{ value: 2, label: 'IP' }
],
queryTime: null
}
},
methods: {
//
handleDownload() {
},
test() {
console.log(this.crud, 'crud')
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) //
},
selectionChangeHandler(val) {
this.selections = val
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
</style>

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

@ -0,0 +1,171 @@
<template>
<div>
<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 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-option v-for="item in oprTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input
v-model="keyWord"
size="small"
clearable
placeholder="请输入关键词"
style="width: 300px;margin-right:10px;padding-left:10px"
class="input-prepend filter-item"
>
<!-- <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-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input>
<date-range-picker v-model="queryTime" class="date-item" />
<rrOperation />
</div>
<el-table
ref="table"
:data="crud.data"
style="width: 100%;"
height="calc(100vh - 356px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="" label="状态" min-width="150" align="center" />
<el-table-column prop="" label="库房" align="center" min-width="150" />
<el-table-column prop="" label="设备" align="center" min-width="150" />
<el-table-column prop="" label="警情描述" align="center" min-width="180" />
<el-table-column prop="" label="说明" align="center" min-width="180" />
<el-table-column prop="" label="报警时间" align="center" min-width="180" />
<el-table-column prop="" label="处理时间" align="center" min-width="180" />
</el-table>
<pagination />
<!-- 手动处理 -->
<el-dialog append-to-body :close-on-click-modal="false" :visible.sync="handleVisible" title="手动处理">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-form ref="formDom" :rules="rules" :model="form" size="small" label-width="80px">
<el-form-item label="说明" prop="description" style="margin-bottom:8px">
<textarea v-model="form.description" cols="55" rows="7" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import DateRangePicker from '@/components/DateRangePicker'
import pagination from '@crud/Pagination'
export default {
name: 'LoginLog',
components: { rrOperation, DateRangePicker, pagination },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/storage/initStorageLogList',
sort: ['update_time,desc'],
// crudMethod: caseCrudMethod,
optShow: {
add: false,
edit: false,
del: false,
download: true
}
})
},
data() {
return {
handleVisible: false,
selections: [],
keyWord: '',
oprType: 0,
oprTypeOptions: [
{ value: 0, label: '全部' },
{ value: 1, label: '已处理' },
{ value: 2, label: '未处理' }
],
optionVal: 1,
options: [
{ value: 1, label: '设备' },
{ value: 2, label: '库房' }
],
queryTime: null,
form: {
description: ''
},
rules: {
description: [
{ required: true, message: '请输入内容', trigger: 'blur' }
]
}
}
},
methods: {
//
handleDownload() {
},
test() {
console.log(this.crud, 'crud')
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) //
},
selectionChangeHandler(val) {
this.selections = val
},
//
handleHand() {
this.handleVisible = true
},
handleConfirm() {
// this.$refs.formDom.validate((valid) => {
// if (valid) {
// this.$message({
// message: '',
// type: 'success'
// })
// this.handleVisible = false
// // this.$refs.recordFormDom.resetFields()
// // this.$refs.recordFormDom.clearValidate()
// } else {
// this.$message.error('')
// return false
// }
// })
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
textarea{
background-color: #021941;
border: 1px solid #339CFF;
border-radius: 3px;
&:focus{
outline: none;
}
caret-color: #fff;
color: #fff;
padding: 10px 12px;
font-size: 14px;
}
</style>

42
src/views/system/notifyManage/index.vue

@ -2,8 +2,8 @@
<div>
<div class="head-container">
<el-button icon="el-icon-s-promotion" size="mini" @click="handleSend">发布</el-button>
<el-button icon="el-icon-edit" size="mini" :disabled="!(selections.length === 1)">修改</el-button>
<el-button icon="el-icon-delete" size="mini" :disabled="!selections.length">删除</el-button>
<el-button icon="el-icon-edit" size="mini" :disabled="!(selections.length === 1)" @click="handleEdit">修改</el-button>
<el-button icon="el-icon-delete" size="mini" :disabled="!selections.length" @click="handleDel">删除</el-button>
</div>
<div class="app-container container-wrap">
<span class="right-top-line" />
@ -38,7 +38,7 @@
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-form :model="sendForm" size="small" label-width="80px" style="margin-left:85px">
<el-form ref="formDom" :model="sendForm" size="small" label-width="80px" style="margin-left:85px">
<el-form-item label="消息类型" prop="msgType" class="down-select">
<el-select v-model="sendForm.msgType" placeholder="请选择" style="width:315px">
<el-option
@ -46,6 +46,7 @@
:key="item.name"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
/>
</el-select>
</el-form-item>
@ -70,6 +71,17 @@
</div>
</div>
</el-dialog>
<!-- 删除 -->
<el-dialog :visible.sync="delVisible" title="提示" @close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<p class="delMsg">确定删除所选消息吗</p>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSave">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</div>
</template>
@ -83,18 +95,19 @@ export default {
tableData: [],
selections: [],
sendVisible: false,
delVisible: false,
sendForm: {
msgType: '1',
notification: '',
pushObj: '用户',
sendObj: []
sendObj: ['全选']
},
checked: '',
msgTypeOptions: [
{ value: '1', label: '系统通知' },
{ value: '2', label: '报警消息' },
{ value: '3', label: '借还消息' },
{ value: '4', label: '下载消息' }
{ value: '2', label: '报警消息', disabled: true },
{ value: '3', label: '借还消息', disabled: true },
{ value: '4', label: '下载消息', disabled: true }
],
personOptions: [
{ value: '1', label: '张三' },
@ -143,12 +156,21 @@ export default {
handleSend() {
this.sendVisible = true
},
handleEdit() {
this.sendForm.notification = this.selections[0].notification
this.sendVisible = true
},
//
handleSave() {
this.sendVisible = false
},
handleClose() {
this.$refs.formDom.resetFields()
this.$refs.formDom.clearValidate()
},
//
handleDel() {
this.delVisible = true
},
//
handelChange(val) {
@ -255,4 +277,8 @@ textarea{
padding-right: 20px;
}
.delMsg{
color: #fff;
font-size: 16px;
}
</style>
Loading…
Cancel
Save