Browse Source

门禁日志

master
xuhuajiao 5 months ago
parent
commit
4494bb04aa
  1. 54
      src/views/system/logManage/deviceLog/index.vue
  2. 4
      src/views/system/logManage/storeLog/index.vue

54
src/views/system/logManage/deviceLog/index.vue

@ -3,26 +3,17 @@
<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-input
v-model="keyWord"
size="small"
v-model="blurry"
clearable
placeholder="请输入关键词"
style="width: 300px;"
class="input-prepend filter-item"
size="small"
prefix-icon="el-icon-search"
placeholder="请输入你要搜索的内容"
style="width: 200px; margin-left: 10px; margin-right: 10px;"
class="filter-item"
@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-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>
@ -35,7 +26,7 @@
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column prop="cContext" label="日志信息" :show-overflow-tooltip="true" align="center" min-width="120" />
<!-- <el-table-column prop="storeCode" label="库房" align="center" min-width="150" />
<el-table-column prop="QuNo" label="区号" align="center" width="150" /> -->
@ -88,6 +79,7 @@ export default {
data() {
return {
selections: [],
blurry: null,
keyWord: '',
optionVal: 'QuNo',
options: [
@ -104,15 +96,16 @@ export default {
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.roomName = null
this.crud.query.deviceName = null
// this.crud.query.roomName = null
// this.crud.query.deviceName = null
this.crud.query.blurry = this.blurry
this.crud.query.startTime = null
this.crud.query.endTime = null
if (this.optionVal === 'QuNo') {
this.crud.query.QuNo = this.keyWord
} else if (this.optionVal === 'roomName') {
this.crud.query.roomName = this.keyWord
}
// if (this.optionVal === 'QuNo') {
// this.crud.query.QuNo = this.keyWord
// } else if (this.optionVal === 'roomName') {
// this.crud.query.roomName = this.keyWord
// }
if (this.queryTime && this.queryTime.length !== 0) {
this.crud.query.startTime = this.queryTime[0]
this.crud.query.endTime = this.queryTime[1]
@ -123,9 +116,18 @@ export default {
},
//
handleDownload() {
if (this.queryTime && this.queryTime.length !== 0) {
this.crud.query.startTime = this.queryTime[0]
this.crud.query.endTime = this.queryTime[1]
} else {
this.crud.query.startTime = null
this.crud.query.endTime = null
this.$message.warning('请先选择开始时间和结束时间!')
return false
}
this.crud.downloadLoading = true
const fileName = parseTime(new Date()) + '-密集架日志.xlsx'
getBlob(this.baseApi + '/api/securitydoor/exportSecurityDoorLog1List' + '?' + qs.stringify(this.crud.query, { indices: false }), function(blob) {
getBlob(this.baseApi + '/api/alarmDeseCaBinetLog/exportLogList' + '?' + qs.stringify(this.crud.query, { indices: false }), function(blob) {
saveAs(blob, fileName)
})
this.crud.downloadLoading = false

4
src/views/system/logManage/storeLog/index.vue

@ -22,7 +22,7 @@
/>
</el-select>
</el-input> -->
<date-range-picker v-model="queryTime" class="date-item" />
<date-range-picker v-model="queryTime" class="date-item" style="margin-left: 10px;" />
<rrOperation />
</div>
<el-table
@ -34,7 +34,7 @@
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column prop="storeCode" label="库房" align="center" min-width="100">
<template>
<div>5F档案库</div>

Loading…
Cancel
Save