|
@ -11,6 +11,7 @@ |
|
|
placeholder="请输入关键词" |
|
|
placeholder="请输入关键词" |
|
|
style="width: 300px;margin-right:10px;padding-left:10px" |
|
|
style="width: 300px;margin-right:10px;padding-left:10px" |
|
|
class="input-prepend filter-item" |
|
|
class="input-prepend 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: 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"> |
|
@ -30,24 +31,38 @@ |
|
|
:data="crud.data" |
|
|
:data="crud.data" |
|
|
style="width: 100%;" |
|
|
style="width: 100%;" |
|
|
height="calc(100vh - 356px)" |
|
|
height="calc(100vh - 356px)" |
|
|
|
|
|
:cell-class-name="cell" |
|
|
@row-click="clickRowHandler" |
|
|
@row-click="clickRowHandler" |
|
|
@selection-change="selectionChangeHandler" |
|
|
@selection-change="selectionChangeHandler" |
|
|
> |
|
|
> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column type="index" label="序号" width="100" align="center" /> |
|
|
<el-table-column type="index" label="序号" width="100" 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="alarmLevel" label="状态" align="center" min-width="150"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.alarmLevel===0" class="clear" style="width:56px">异常</span> |
|
|
|
|
|
<span v-if="scope.row.alarmLevel===1" class="clear" style="width:56px">正常</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="roomName" label="库房" align="center" min-width="150" /> |
|
|
|
|
|
<el-table-column prop="deviceName" 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-column prop="archiveNo" label="档号" align="center" min-width="180" /> |
|
|
|
|
|
<el-table-column prop="alarmMsg" label="警情描述" align="center" min-width="180" /> |
|
|
|
|
|
<el-table-column prop="createTime" label="报警时间" align="center" min-width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.createTime | parseTime }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column prop="" label="操作" align="center" min-width="180"> |
|
|
<el-table-column prop="" label="操作" align="center" min-width="180"> |
|
|
<el-button size="mini" style="background:#3A99FD" @click="handleListen">查看监控</el-button> |
|
|
<el-button size="mini" style="background:#3A99FD" @click="handleListen">查看监控</el-button> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="" label="事件" min-width="150" align="center" /> |
|
|
|
|
|
<el-table-column prop="" label="用户" align="center" min-width="150" /> |
|
|
|
|
|
|
|
|
<el-table-column prop="alarmEvent" label="事件" min-width="150" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.alarmEvent===0">出</span> |
|
|
|
|
|
<span v-if="scope.row.alarmEvent===1">进</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="borrowerName" label="用户" align="center" min-width="150" /> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<pagination /> |
|
|
<pagination /> |
|
|
<!-- 查看监控 --> |
|
|
<!-- 查看监控 --> |
|
@ -61,15 +76,16 @@ import CRUD, { presenter, crud } from '@crud/crud' |
|
|
import DateRangePicker from '@/components/DateRangePicker' |
|
|
import DateRangePicker from '@/components/DateRangePicker' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
|
import Listen from '../module/listen.vue' |
|
|
import Listen from '../module/listen.vue' |
|
|
|
|
|
|
|
|
|
|
|
import { exportFile } from '@/utils/index' |
|
|
|
|
|
import { mapGetters } from 'vuex' |
|
|
export default { |
|
|
export default { |
|
|
name: 'DoorLog', |
|
|
name: 'DoorLog', |
|
|
components: { rrOperation, DateRangePicker, pagination, Listen }, |
|
|
components: { rrOperation, DateRangePicker, pagination, Listen }, |
|
|
mixins: [presenter(), crud()], |
|
|
mixins: [presenter(), crud()], |
|
|
cruds() { |
|
|
cruds() { |
|
|
return CRUD({ |
|
|
return CRUD({ |
|
|
url: 'api/storage/initStorageLogList', |
|
|
|
|
|
sort: ['update_time,desc'], |
|
|
|
|
|
|
|
|
url: 'api/securitydoor/initSecurityDoorLog', |
|
|
|
|
|
// sort: ['createTime,desc'], |
|
|
// crudMethod: caseCrudMethod, |
|
|
// crudMethod: caseCrudMethod, |
|
|
optShow: { |
|
|
optShow: { |
|
|
add: false, |
|
|
add: false, |
|
@ -83,18 +99,38 @@ export default { |
|
|
return { |
|
|
return { |
|
|
selections: [], |
|
|
selections: [], |
|
|
keyWord: '', |
|
|
keyWord: '', |
|
|
optionVal: 1, |
|
|
|
|
|
|
|
|
optionVal: 'deviceName', |
|
|
options: [ |
|
|
options: [ |
|
|
{ value: 1, label: '设备' }, |
|
|
|
|
|
{ value: 2, label: '库房' } |
|
|
|
|
|
|
|
|
{ value: 'deviceName', label: '设备' }, |
|
|
|
|
|
{ value: 'roomName', label: '库房' } |
|
|
], |
|
|
], |
|
|
queryTime: null |
|
|
queryTime: null |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapGetters([ |
|
|
|
|
|
'baseApi' |
|
|
|
|
|
]) |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
|
|
|
this.crud.query.roomName = null |
|
|
|
|
|
this.crud.query.deviceName = null |
|
|
|
|
|
this.crud.query.startTime = null |
|
|
|
|
|
this.crud.query.endTime = null |
|
|
|
|
|
if (this.optionVal === 'deviceName') { |
|
|
|
|
|
this.crud.query.deviceName = this.keyWord |
|
|
|
|
|
} else if (this.optionVal === 'roomName') { |
|
|
|
|
|
this.crud.query.roomName = this.keyWord |
|
|
|
|
|
} |
|
|
|
|
|
this.crud.query.startTime = this.queryTime[0] |
|
|
|
|
|
this.crud.query.endTime = this.queryTime[1] |
|
|
|
|
|
}, |
|
|
// 导出 |
|
|
// 导出 |
|
|
handleDownload() { |
|
|
handleDownload() { |
|
|
|
|
|
|
|
|
|
|
|
this.crud.downloadLoading = true |
|
|
|
|
|
exportFile(this.baseApi + '/api/securitydoor/exportSecurityDoorLogList') |
|
|
|
|
|
this.crud.downloadLoading = false |
|
|
}, |
|
|
}, |
|
|
test() { |
|
|
test() { |
|
|
console.log(this.crud, 'crud') |
|
|
console.log(this.crud, 'crud') |
|
@ -108,12 +144,20 @@ export default { |
|
|
// 查看监控 |
|
|
// 查看监控 |
|
|
handleListen() { |
|
|
handleListen() { |
|
|
this.$refs.listenDom.dialogVisible = true |
|
|
this.$refs.listenDom.dialogVisible = true |
|
|
|
|
|
}, |
|
|
|
|
|
cell({ row, columnIndex }) { |
|
|
|
|
|
if (row.alarmLevel === 1 && columnIndex === 2) { |
|
|
|
|
|
return 'have-clear' |
|
|
|
|
|
} else if (row.alarmLevel === 0 && columnIndex === 2) { |
|
|
|
|
|
return 'fail-clear' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
|
|
|
@import '~@/assets/styles/lend-manage.scss'; |
|
|
@import "~@/assets/styles/archives-manage.scss"; |
|
|
@import "~@/assets/styles/archives-manage.scss"; |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |