14 changed files with 3972 additions and 59 deletions
-
8.env.development
-
9src/api/home/device/index.js
-
16src/views/archivesManage/archivesList/archivesAnjuan/index.vue
-
12src/views/archivesManage/archivesList/archivesJuannei/index.vue
-
4src/views/archivesManage/archivesList/mixins/archives.js
-
4src/views/archivesManage/archivesSearch/index.vue
-
4src/views/archivesManage/lendManage/returnArchives/index.vue
-
65src/views/dashboard/PanelGroup.vue
-
3190src/views/dashboard/data.json
-
94src/views/environmentalScreen/index.vue
-
403src/views/home.vue
-
54src/views/storeManage/levelManage/index.vue
-
145src/views/system/logManage/deviceLog/index.vue
-
7src/views/system/logManage/index.vue
3190
src/views/dashboard/data.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,145 @@ |
|||||
|
<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" |
||||
|
@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> |
||||
|
<el-table |
||||
|
ref="table" |
||||
|
:data="crud.data" |
||||
|
style="width: 100%;" |
||||
|
height="calc(100vh - 356px)" |
||||
|
:cell-class-name="cell" |
||||
|
@row-click="clickRowHandler" |
||||
|
@selection-change="selectionChangeHandler" |
||||
|
> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column prop="storeCode" label="库房" align="center" min-width="150" /> |
||||
|
<el-table-column prop="QuNo" label="区号" align="center" width="150" /> |
||||
|
<el-table-column prop="usLevel" label="状态" align="center" min-width="60"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="scope.row.usLevel===0" class="clear" style="width:56px">操作</span> |
||||
|
<span v-if="scope.row.usLevel===1" class="clear" style="width:56px">报警</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="i64Ts" label="发生时间" align="center" min-width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div>{{ scope.row.i64Ts | parseTime }}</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="cContext" label="日志信息" :show-overflow-tooltip="true" align="center" 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' |
||||
|
import { parseTime, saveAs, getBlob } from '@/utils/index' |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import qs from 'qs' |
||||
|
export default { |
||||
|
name: 'DeviceLog', |
||||
|
components: { rrOperation, DateRangePicker, pagination }, |
||||
|
mixins: [presenter(), crud()], |
||||
|
cruds() { |
||||
|
return CRUD({ |
||||
|
url: 'api/alarmDeseCaBinetLog/list', |
||||
|
optShow: { |
||||
|
add: false, |
||||
|
edit: false, |
||||
|
del: false, |
||||
|
download: true |
||||
|
}, |
||||
|
sort: [] |
||||
|
}) |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
selections: [], |
||||
|
keyWord: '', |
||||
|
optionVal: 'QuNo', |
||||
|
options: [ |
||||
|
{ value: 'QuNo', label: '区号' }, |
||||
|
{ value: 'roomName', label: '库房' } |
||||
|
], |
||||
|
queryTime: [] |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'baseApi' |
||||
|
]) |
||||
|
}, |
||||
|
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 === 'QuNo') { |
||||
|
this.crud.query.QuNo = this.keyWord |
||||
|
} else if (this.optionVal === 'roomName') { |
||||
|
this.crud.query.roomName = this.keyWord |
||||
|
} |
||||
|
if (this.queryTime.length > 0) { |
||||
|
this.crud.query.startTime = this.queryTime[0] |
||||
|
this.crud.query.endTime = this.queryTime[1] |
||||
|
} |
||||
|
}, |
||||
|
// 导出 |
||||
|
handleDownload() { |
||||
|
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) { |
||||
|
saveAs(blob, fileName) |
||||
|
}) |
||||
|
this.crud.downloadLoading = false |
||||
|
}, |
||||
|
clickRowHandler(row) { |
||||
|
this.$refs.table.toggleRowSelection(row) // 单击选中 |
||||
|
}, |
||||
|
selectionChangeHandler(val) { |
||||
|
this.selections = val |
||||
|
}, |
||||
|
cell({ row, columnIndex }) { |
||||
|
if (row.alarmLevel === 1 && columnIndex === 2) { |
||||
|
return 'have-clear' |
||||
|
} else if (row.alarmLevel === 0 && columnIndex === 2) { |
||||
|
return 'fail-clear' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import '~@/assets/styles/lend-manage.scss'; |
||||
|
@import "~@/assets/styles/archives-manage.scss"; |
||||
|
|
||||
|
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue